in_source_id stringlengths 13 58 | issue stringlengths 3 241k | before_files listlengths 0 3 | after_files listlengths 0 3 | pr_diff stringlengths 109 107M ⌀ |
|---|---|---|---|---|
ESMCI__cime-4305 | Trailing slash in casename creates unexpected behavior
If the `casename` argument to `CIME.case.create()` has a trailing slash, the method used to extract the `casename` from a path results in an empty string for `lookups['CASE']`, which I suspect is not an intended result. In CESM2, this causes the `CASE` variable to... | [
{
"content": "\"\"\"\nfunctions for building CIME models\n\"\"\"\nimport glob, shutil, time, threading, subprocess\nfrom pathlib import Path\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.utils import (\n get_model,\n analyze_build_log,\n stringify_bool,\n run_and_log_case_status,\n get... | [
{
"content": "\"\"\"\nfunctions for building CIME models\n\"\"\"\nimport glob, shutil, time, threading, subprocess\nfrom pathlib import Path\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.utils import (\n get_model,\n analyze_build_log,\n stringify_bool,\n run_and_log_case_status,\n get... | diff --git a/CIME/build.py b/CIME/build.py
index 85381b2d9b2..a928d8fa9aa 100644
--- a/CIME/build.py
+++ b/CIME/build.py
@@ -272,7 +272,11 @@ def xml_to_make_variable(case, varname, cmake=False):
return ""
if isinstance(varvalue, bool):
varvalue = stringify_bool(varvalue)
-
+ elif isinstance(v... |
ipython__ipython-12807 | python crashes when importing matplotlib in terminal mode on m1 mac
Hello community,
I am experiencing the following crash when trying to plot from the command line on my M1 mac:
```
(base) ➜ ~ ipython
Python 3.9.1 | packaged by conda-forge | (default, Jan 26 2021, 01:30:54)
Type 'copyright', 'credits' or '... | [
{
"content": "\"\"\"Inputhook for OS X\n\nCalls NSApp / CoreFoundation APIs via ctypes.\n\"\"\"\n\n# obj-c boilerplate from appnope, used under BSD 2-clause\n\nimport ctypes\nimport ctypes.util\nfrom threading import Event\n\nobjc = ctypes.cdll.LoadLibrary(ctypes.util.find_library('objc'))\n\nvoid_p = ctypes.c_... | [
{
"content": "\"\"\"Inputhook for OS X\n\nCalls NSApp / CoreFoundation APIs via ctypes.\n\"\"\"\n\n# obj-c boilerplate from appnope, used under BSD 2-clause\n\nimport ctypes\nimport ctypes.util\nfrom threading import Event\n\nobjc = ctypes.cdll.LoadLibrary(ctypes.util.find_library('objc'))\n\nvoid_p = ctypes.c_... | diff --git a/IPython/terminal/pt_inputhooks/osx.py b/IPython/terminal/pt_inputhooks/osx.py
index a3131ee4683..80440196fb4 100644
--- a/IPython/terminal/pt_inputhooks/osx.py
+++ b/IPython/terminal/pt_inputhooks/osx.py
@@ -41,7 +41,7 @@ def C(classname):
CFFileDescriptorCreate = CoreFoundation.CFFileDescriptorCreate
... |
ultrabug__py3status-1222 | Formatting bug with not_zero
Possible formatting bug with `\?not_zero` and/or the inheritance.
`valid format`.
```
format_duration = u'\?not_zero [{years}y][{weeks}w][{months}m][{days}d]' +\
u'[\?soft ][{hours}][\?soft :][{minutes:02d}][\?soft :][{seconds:02d}]'
```
`invalid format`.
```
f... | [
{
"content": "# -*- coding: utf-8 -*-\nimport re\nimport sys\n\nfrom numbers import Number\n\nfrom py3status.composite import Composite\n\ntry:\n from urllib.parse import parse_qsl\nexcept ImportError:\n from urlparse import parse_qsl\n\n\npython2 = sys.version_info < (3, 0)\n\n\nclass Formatter:\n \"\... | [
{
"content": "# -*- coding: utf-8 -*-\nimport re\nimport sys\n\nfrom numbers import Number\n\nfrom py3status.composite import Composite\n\ntry:\n from urllib.parse import parse_qsl\nexcept ImportError:\n from urlparse import parse_qsl\n\n\npython2 = sys.version_info < (3, 0)\n\n\nclass Formatter:\n \"\... | diff --git a/py3status/formatter.py b/py3status/formatter.py
index 6735494f4a..fbe2c92948 100644
--- a/py3status/formatter.py
+++ b/py3status/formatter.py
@@ -583,8 +583,9 @@ def render(self, get_params, module, _if=None):
text += conversion(item)
continue
elif text:
- ... |
AUTOMATIC1111__stable-diffusion-webui-11 | Fix faces using GFPGAN + high batch count tends to fail 6GB VRAM
6GB is already on a knife's edge, and this seems to push it over. However it doesn't do it every single time, and I have not seen it happen when using batch count 1, even when hitting submit repeatedly.
RuntimeError: CUDA out of memory. Tried to alloca... | [
{
"content": "import argparse, os, sys, glob\r\nfrom collections import namedtuple\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nimport numpy as np\r\nimport gradio as gr\r\nfrom omegaconf import OmegaConf\r\nfrom PIL import Image, ImageFont, ImageDraw, PngImagePlugin\r\nfrom itertools import islice\r\nfrom e... | [
{
"content": "import argparse, os, sys, glob\r\nfrom collections import namedtuple\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nimport numpy as np\r\nimport gradio as gr\r\nfrom omegaconf import OmegaConf\r\nfrom PIL import Image, ImageFont, ImageDraw, PngImagePlugin\r\nfrom itertools import islice\r\nfrom e... | diff --git a/webui.py b/webui.py
index 2751d75adf4..b3375e98a16 100644
--- a/webui.py
+++ b/webui.py
@@ -678,6 +678,7 @@ def infotext():
x_sample = x_sample.astype(np.uint8)
if use_GFPGAN and GFPGAN is not None:
+ torch_gc()
... |
vyperlang__vyper-305 | Array of bytes has infinite type size
I am pretty sure this is an error, although I am a bit unclear behind the purpose of declaring the size of a type to be infinite. Is this a part of the gas estimate?
Anyways, if you define an array of bytes using another type, it throws an error e.g.:
```python
def __init__(te... | [
{
"content": "import ast\nfrom .opcodes import opcodes\nimport copy\nfrom .exceptions import InvalidTypeException, TypeMismatchException\n\n# Available base types\nbase_types = ['num', 'decimal', 'bytes32', 'num256', 'signed256', 'bool', 'address']\n\n# Valid base units\nvalid_units = ['currency', 'wei', 'curre... | [
{
"content": "import ast\nfrom .opcodes import opcodes\nimport copy\nfrom .exceptions import InvalidTypeException, TypeMismatchException\n\n# Available base types\nbase_types = ['num', 'decimal', 'bytes32', 'num256', 'signed256', 'bool', 'address']\n\n# Valid base units\nvalid_units = ['currency', 'wei', 'curre... | diff --git a/viper/types.py b/viper/types.py
index b766d18205..4956330876 100644
--- a/viper/types.py
+++ b/viper/types.py
@@ -310,7 +310,7 @@ def get_size_of_type(typ):
elif isinstance(typ, ListType):
return get_size_of_type(typ.subtype) * typ.count
elif isinstance(typ, MappingType):
- raise ... |
easybuilders__easybuild-framework-757 | santiy_check_commands doesn't work for ipython
| [
{
"content": "##\n# Copyright 2013 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc).\n#\n# http://github.com/hpcugent/easybuild\n#\n# EasyBuild is free software: you can redistribute it and/or modify\n# it under the ter... | [
{
"content": "##\n# Copyright 2013 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of the University of Ghent (http://ugent.be/hpc).\n#\n# http://github.com/hpcugent/easybuild\n#\n# EasyBuild is free software: you can redistribute it and/or modify\n# it under the ter... | diff --git a/easybuild/framework/extensioneasyblock.py b/easybuild/framework/extensioneasyblock.py
index 741797d477..e72dea0a66 100644
--- a/easybuild/framework/extensioneasyblock.py
+++ b/easybuild/framework/extensioneasyblock.py
@@ -113,7 +113,7 @@ def sanity_check_step(self, exts_filter=None, custom_paths=None, cust... |
tobymao__sqlglot-1663 | Issue when calculating lineage when a CTE has the same name as a table from the schema
**Fully reproducible code snippet**
The following code
```sql
from sqlglot.lineage import lineage
selected_column = "col_a"
sql = """
with
my_cte_name_also_a_table_name as (
select * from raw.schema.my_table
)
... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport typing as t\nfrom dataclasses import dataclass, field\n\nfrom sqlglot import Schema, exp, maybe_parse\nfrom sqlglot.optimizer import Scope, build_scope, optimize\nfrom sqlglot.optimizer.lower_identities import lower_identities\nfrom sqlglot... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport typing as t\nfrom dataclasses import dataclass, field\n\nfrom sqlglot import Schema, exp, maybe_parse\nfrom sqlglot.optimizer import Scope, build_scope, optimize\nfrom sqlglot.optimizer.lower_identities import lower_identities\nfrom sqlglot... | diff --git a/sqlglot/lineage.py b/sqlglot/lineage.py
index ef38934a43..f2f076e009 100644
--- a/sqlglot/lineage.py
+++ b/sqlglot/lineage.py
@@ -109,10 +109,7 @@ def to_node(
# a version that has only the column we care about.
# "x", SELECT x, y FROM foo
# => "x", SELECT x FRO... |
jupyterhub__zero-to-jupyterhub-k8s-910 | Supporting launching companion Pods
We're starting work on a new project for cybersecurity education building on the [TryCybSI](http://try.cybersecurity.ieee.org/trycybsi/) environment. The basic premise is that students are able to spin up a multi-pod sandbox environment to be able to walk through various security co... | [
{
"content": "import os\nimport glob\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes import client\n\nfrom z2jh import get_config, get_secret, set_config_if_not_none\nfrom jupyterhub.utils import url_path_join\n\n# Configure JupyterHub to use the curl backend for making HTTP requests,\n# rather... | [
{
"content": "import os\nimport glob\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes import client\n\nfrom z2jh import get_config, get_secret, set_config_if_not_none\nfrom jupyterhub.utils import url_path_join\n\n# Configure JupyterHub to use the curl backend for making HTTP requests,\n# rather... | diff --git a/images/hub/jupyterhub_config.py b/images/hub/jupyterhub_config.py
index ea054fdffc..3278870a6f 100644
--- a/images/hub/jupyterhub_config.py
+++ b/images/hub/jupyterhub_config.py
@@ -129,6 +129,10 @@
if init_containers:
c.KubeSpawner.init_containers.extend(init_containers)
+extra_containers = get_co... |
xonsh__xonsh-3483 | The online xonsh (via repl.it) is broken
When I go to [https://xon.sh/](https://xon.sh/) the prompt under **Try it now!** shows me only a plain Python prompt, not a xonsh prompt.
Even `import xonsh` gives a `ModuleNotFoundError`. So it looks like repl.it's Python REPL does not install the packages from the `requirem... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to sho... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to sho... | diff --git a/docs/conf.py b/docs/conf.py
index 7725519699..e3d34499a6 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -67,6 +67,7 @@ def setup(sphinx):
#'sphinx.ext.autosummary',
"numpydoc",
"cmdhelp",
+ "runthis.sphinxext",
]
# Add any paths that contain templates here, relative to this directory... |
Project-MONAI__MONAI-5690 | use reshape over view? any benefit to keep using view over reshape?
https://github.com/Project-MONAI/MONAI/blob/a05c20292cf0c293ee5964517de099c67deb9d64/monai/metrics/confusion_matrix.py#L166
Hi all,
I got `view-size-is-not-compatible-with-input-tensors-size-and-stride` error when using confusion_matrix.
Shoul... | [
{
"content": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable la... | [
{
"content": "# Copyright (c) MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable la... | diff --git a/monai/metrics/confusion_matrix.py b/monai/metrics/confusion_matrix.py
index da8561f45c..872819f1a9 100644
--- a/monai/metrics/confusion_matrix.py
+++ b/monai/metrics/confusion_matrix.py
@@ -163,8 +163,8 @@ def get_confusion_matrix(y_pred: torch.Tensor, y: torch.Tensor, include_backgrou
batch_size, n_c... |
sublimelsp__LSP-658 | hover regression
After the latest commits hover popups produce errors, I suspect c9a73907f00972a415e8e979d5dcc96c11ec3f09 is responsible for this
* OS: Windows 10
* language server: pyls
* How you installed LSP: git
* Minimal reproduction steps
1. open a .py file
2. hover over an function name
* Log
```... | [
{
"content": "import mdpopups\nimport sublime\nimport sublime_plugin\nimport webbrowser\nfrom html import escape\ntry:\n from typing import List, Optional, Any, Dict\n assert List and Optional and Any and Dict\nexcept ImportError:\n pass\n\nfrom .core.configurations import is_supported_syntax\nfrom .di... | [
{
"content": "import mdpopups\nimport sublime\nimport sublime_plugin\nimport webbrowser\nfrom html import escape\ntry:\n from typing import List, Optional, Any, Dict\n assert List and Optional and Any and Dict\nexcept ImportError:\n pass\n\nfrom .core.configurations import is_supported_syntax\nfrom .di... | diff --git a/plugin/hover.py b/plugin/hover.py
index 1ade91461..c7c402015 100644
--- a/plugin/hover.py
+++ b/plugin/hover.py
@@ -139,9 +139,9 @@ def hover_content(self, point, response: 'Optional[Any]') -> str:
value = ""
language = None
if isinstance(item, str):
- ... |
pulp__pulpcore-2941 | Content app is making queries on head requests
```
(pulp) [vagrant@pulp3-source-centos8-stream-fips ~]$ nc 127.0.0.1 4444 [8/8]
> /home/vagrant/devel/pulpcore/pulpcore/content/handler.py(144)list_distribu... | [
{
"content": "import asyncio\nimport logging\nimport mimetypes\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import (\n HTTPForbidden,\n HTTPFou... | [
{
"content": "import asyncio\nimport logging\nimport mimetypes\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import (\n HTTPForbidden,\n HTTPFou... | diff --git a/CHANGES/2924.bugfix b/CHANGES/2924.bugfix
new file mode 100644
index 0000000000..4ba7d13ebd
--- /dev/null
+++ b/CHANGES/2924.bugfix
@@ -0,0 +1 @@
+Improve content app performance on head requests
diff --git a/docs/components.rst b/docs/components.rst
index e8823a7c24..e6a4c763f4 100644
--- a/docs/component... |
svthalia__concrexit-1836 | DeviceListView permission not checked
### Describe the bug
The `DeviceListView` of `api/v2` has a `IsAuthenticatedOwnerOrReadOnly` permission which is never checked as `get_object` is not used in the view.
### How to reproduce
Steps to reproduce the behaviour:
1. Set a breakpoint in the `IsAuthenticatedOwnerOrRea... | [
{
"content": "from django.utils.translation import get_language_from_request\nfrom oauth2_provider.contrib.rest_framework import IsAuthenticatedOrTokenHasScope\nfrom rest_framework.filters import OrderingFilter\nfrom rest_framework.generics import (\n ListAPIView,\n RetrieveAPIView,\n CreateAPIView,\n ... | [
{
"content": "from django.utils.translation import get_language_from_request\nfrom oauth2_provider.contrib.rest_framework import IsAuthenticatedOrTokenHasScope\nfrom rest_framework.filters import OrderingFilter\nfrom rest_framework.generics import (\n ListAPIView,\n RetrieveAPIView,\n CreateAPIView,\n ... | diff --git a/website/pushnotifications/api/v2/views.py b/website/pushnotifications/api/v2/views.py
index 4c4815c74..31d032b05 100644
--- a/website/pushnotifications/api/v2/views.py
+++ b/website/pushnotifications/api/v2/views.py
@@ -22,10 +22,7 @@
class DeviceListView(ListAPIView, CreateAPIView):
"""Returns an ov... |
sublimelsp__LSP-1557 | [regression] lsp_execute does nothing due to empty session
Since this [commit](https://github.com/sublimelsp/LSP/commit/7d05794fa3cc4ecd3931d09a90e801addc70d9fa) the `capability` variable got deleted which means that `self.best_session(self.capability)` is unable to find session.
The consequence is that [LSP-metals.... | [
{
"content": "import sublime\nfrom .core.protocol import Error\nfrom .core.protocol import ExecuteCommandParams\nfrom .core.registry import LspTextCommand\nfrom .core.registry import windows\nfrom .core.typing import List, Optional, Any\nfrom .core.views import uri_from_view, offset_to_point, region_to_range, t... | [
{
"content": "import sublime\nfrom .core.protocol import Error\nfrom .core.protocol import ExecuteCommandParams\nfrom .core.registry import LspTextCommand\nfrom .core.registry import windows\nfrom .core.typing import List, Optional, Any\nfrom .core.views import uri_from_view, offset_to_point, region_to_range, t... | diff --git a/plugin/execute_command.py b/plugin/execute_command.py
index da9c8d667..5c2f96d85 100644
--- a/plugin/execute_command.py
+++ b/plugin/execute_command.py
@@ -27,7 +27,7 @@ def run_async() -> None:
listener.do_signature_help_async(manual=False)
return sublime.set_timeout_as... |
spotify__luigi-1363 | PR #1137 yields SIGUSR1 AttributeError on Windows
PR #1137 put in place `signal.SIGUSR1` which breaks luigi on Windows machines. Replacing all instances of `SIGUSR1` with `SIGTERM` appears to fix the issue.
Specifically, the error generated:
```
(env) PS C:\Users\...> python .\hello_world.py
python : 'ps' is not rec... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#... | diff --git a/luigi/worker.py b/luigi/worker.py
index 0d77b3f8a5..1333a958de 100644
--- a/luigi/worker.py
+++ b/luigi/worker.py
@@ -367,7 +367,10 @@ def __init__(self, scheduler=None, worker_id=None, worker_processes=1, assistant
self.run_succeeded = True
self.unfulfilled_counts = collections.defaultdi... |
getpelican__pelican-867 | Setting default summary length = 0
I want to disable the default article summary, and only show one if defined in the article metadata. I assumed this would be done with:
```
SUMMARY_MAX_LENGTH = 0
```
But this has the same effect as `SUMMARY_MAX_LENGTH = None`, meaning all content is shown. It does work however by s... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\n\nimport copy\nimport locale\nimport logging\nimport functools\nimport os\nimport re\nimport sys\n\nfrom datetime import datetime\n\n\nfrom pelican import signals\nfrom pelican.settings import _DEFAULT_CO... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\n\nimport copy\nimport locale\nimport logging\nimport functools\nimport os\nimport re\nimport sys\n\nfrom datetime import datetime\n\n\nfrom pelican import signals\nfrom pelican.settings import _DEFAULT_CO... | diff --git a/pelican/contents.py b/pelican/contents.py
index a56048566..b130b1744 100644
--- a/pelican/contents.py
+++ b/pelican/contents.py
@@ -231,10 +231,11 @@ def _get_summary(self):
if hasattr(self, '_summary'):
return self._summary
- if self.settings['SUMMARY_MAX_LENGTH']:
- ... |
opsdroid__opsdroid-866 | Telegram Connector : Parsing edited message cause process to freeze
# Description
Hi,
I am experiencing a strange behaviour, when opsdroid is not active and someone send many messages and call them back for modification and send them back. this cause parsing error when opsdroid start receiving those messages and pa... | [
{
"content": "\"\"\"A connector for Telegram.\"\"\"\nimport asyncio\nimport logging\nimport aiohttp\n\n\nfrom opsdroid.connector import Connector\nfrom opsdroid.events import Message\n\n\n_LOGGER = logging.getLogger(__name__)\n\n\nclass ConnectorTelegram(Connector):\n \"\"\"A connector the the char service T... | [
{
"content": "\"\"\"A connector for Telegram.\"\"\"\nimport asyncio\nimport logging\nimport aiohttp\n\n\nfrom opsdroid.connector import Connector\nfrom opsdroid.events import Message\n\n\n_LOGGER = logging.getLogger(__name__)\n\n\nclass ConnectorTelegram(Connector):\n \"\"\"A connector the the char service T... | diff --git a/opsdroid/connector/telegram/__init__.py b/opsdroid/connector/telegram/__init__.py
index d78d93be2..33086e5a2 100644
--- a/opsdroid/connector/telegram/__init__.py
+++ b/opsdroid/connector/telegram/__init__.py
@@ -152,6 +152,8 @@ async def _parse_message(self, response):
"""
for result in r... |
goauthentik__authentik-6851 | Add WantAuthnRequestsSigned Parameter to SAML Metadata Endpoint for Improved Integration with Spring Boot SAML Library
**Is your feature request related to a problem? Please describe.**
Yes, I consistently encounter an issue when integrating with the Spring Boot SAML Library. When the **WantAuthnRequestsSigned** param... | [
{
"content": "\"\"\"SAML Identity Provider Metadata Processor\"\"\"\nfrom hashlib import sha256\nfrom typing import Iterator, Optional\n\nimport xmlsec # nosec\nfrom django.http import HttpRequest\nfrom django.urls import reverse\nfrom lxml.etree import Element, SubElement, tostring # nosec\n\nfrom authentik.... | [
{
"content": "\"\"\"SAML Identity Provider Metadata Processor\"\"\"\nfrom hashlib import sha256\nfrom typing import Iterator, Optional\n\nimport xmlsec # nosec\nfrom django.http import HttpRequest\nfrom django.urls import reverse\nfrom lxml.etree import Element, SubElement, tostring # nosec\n\nfrom authentik.... | diff --git a/authentik/providers/saml/processors/metadata.py b/authentik/providers/saml/processors/metadata.py
index 83c1a1ee3a28..5aecf24f6760 100644
--- a/authentik/providers/saml/processors/metadata.py
+++ b/authentik/providers/saml/processors/metadata.py
@@ -171,6 +171,8 @@ def build_entity_descriptor(self) -> str:... |
getsentry__sentry-python-817 | last_event_id() returns None after SentryAsgiMiddleware.__call__() finished
I'm unable to access `last_event_id` of `SentryAsgiMiddleware` on exception handler in `Starlette` framework.
```python
from sentry_sdk import last_event_id
from sentry_sdk.integrations.asgi import SentryAsgiMiddleware
from starlette.applic... | [
{
"content": "\"\"\"\nAn ASGI middleware.\n\nBased on Tom Christie's `sentry-asgi <https://github.com/encode/sentry-asgi>`_.\n\"\"\"\n\nimport asyncio\nimport inspect\nimport urllib\n\nfrom sentry_sdk._functools import partial\nfrom sentry_sdk._types import MYPY\nfrom sentry_sdk.hub import Hub, _should_send_def... | [
{
"content": "\"\"\"\nAn ASGI middleware.\n\nBased on Tom Christie's `sentry-asgi <https://github.com/encode/sentry-asgi>`_.\n\"\"\"\n\nimport asyncio\nimport inspect\nimport urllib\n\nfrom sentry_sdk._functools import partial\nfrom sentry_sdk._types import MYPY\nfrom sentry_sdk.hub import Hub, _should_send_def... | diff --git a/sentry_sdk/integrations/asgi.py b/sentry_sdk/integrations/asgi.py
index 79071db788..7a0d0bd339 100644
--- a/sentry_sdk/integrations/asgi.py
+++ b/sentry_sdk/integrations/asgi.py
@@ -107,8 +107,14 @@ async def _run_asgi3(self, scope, receive, send):
async def _run_app(self, scope, callback):
... |
ietf-tools__datatracker-4911 | Wrapping issues in ballot modal on narrow screens
### Describe the issue
<img width="582" alt="Screenshot 2022-12-15 at 18 02 42" src="https://user-images.githubusercontent.com/200328/207908976-51568fb5-a3b4-4ccc-8026-8065d13da38d.png">
### Code of Conduct
- [X] I agree to follow the [IETF's Code of Conduct](https... | [
{
"content": "# Copyright The IETF Trust 2012-2021, All Rights Reserved\n# Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).\n# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are per... | [
{
"content": "# Copyright The IETF Trust 2012-2021, All Rights Reserved\n# Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).\n# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are per... | diff --git a/ietf/doc/templatetags/ballot_icon.py b/ietf/doc/templatetags/ballot_icon.py
index 8f9aa9ce8e..ee7d5f6278 100644
--- a/ietf/doc/templatetags/ballot_icon.py
+++ b/ietf/doc/templatetags/ballot_icon.py
@@ -140,7 +140,7 @@ def sort_key(t):
i = i + 1
res.append("</tr></tbody></table></a>")
- r... |
readthedocs__readthedocs.org-3657 | AttributeError: 'SyncRepositoryTask' object has no attribute '_log'
https://sentry.io/read-the-docs/readthedocs-org/issues/471122664/
```
AttributeError: 'SyncRepositoryTask' object has no attribute '_log'
File "readthedocs/projects/tasks.py", line 175, in run
self.sync_repo()
File "readthedocs/projects/tasks.... | [
{
"content": "\"\"\"\nTasks related to projects.\n\nThis includes fetching repository code, cleaning ``conf.py`` files, and\nrebuilding documentation.\n\"\"\"\n\nfrom __future__ import absolute_import\n\nimport datetime\nimport hashlib\nimport json\nimport logging\nimport os\nimport shutil\nimport socket\nfrom ... | [
{
"content": "\"\"\"\nTasks related to projects.\n\nThis includes fetching repository code, cleaning ``conf.py`` files, and\nrebuilding documentation.\n\"\"\"\n\nfrom __future__ import absolute_import\n\nimport datetime\nimport hashlib\nimport json\nimport logging\nimport os\nimport shutil\nimport socket\nfrom ... | diff --git a/readthedocs/projects/tasks.py b/readthedocs/projects/tasks.py
index 6a5342f3b2c..67f5891bd33 100644
--- a/readthedocs/projects/tasks.py
+++ b/readthedocs/projects/tasks.py
@@ -151,6 +151,15 @@ def sync_repo(self):
except Exception:
log.exception('Unknown Sync Versions Exceptio... |
pulp__pulpcore-2938 | Content app is making queries on head requests
```
(pulp) [vagrant@pulp3-source-centos8-stream-fips ~]$ nc 127.0.0.1 4444 [8/8]
> /home/vagrant/devel/pulpcore/pulpcore/content/handler.py(144)list_distribu... | [
{
"content": "import asyncio\nimport logging\nimport mimetypes\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import HTTPForbidden, HTTPFound, HTTPNotF... | [
{
"content": "import asyncio\nimport logging\nimport mimetypes\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import HTTPForbidden, HTTPFound, HTTPNotF... | diff --git a/CHANGES/2924.bugfix b/CHANGES/2924.bugfix
new file mode 100644
index 0000000000..4ba7d13ebd
--- /dev/null
+++ b/CHANGES/2924.bugfix
@@ -0,0 +1 @@
+Improve content app performance on head requests
diff --git a/pulpcore/content/handler.py b/pulpcore/content/handler.py
index 5821393b79..48284ce8e3 100644
--- ... |
mozilla__pontoon-3133 | Can't save term translation after updating the term's text in DB
I've changed the term's text to `Review checker`, since that's the correct capitalization in English (changed from the original)
https://pontoon.mozilla.org/a/terminology/term/666/change/
To my surprise, the term showed up as untranslated for Italian.... | [
{
"content": "import re\n\nfrom django.db import models\n\nfrom pontoon.base.models import Entity, ProjectLocale, Resource, TranslatedResource\n\n\ndef update_terminology_project_stats():\n resource = Resource.objects.get(project__slug=\"terminology\")\n project = resource.project\n total_strings = Ent... | [
{
"content": "import re\n\nfrom django.db import models\n\nfrom pontoon.base.models import Entity, ProjectLocale, Resource, TranslatedResource\n\n\ndef update_terminology_project_stats():\n resource = Resource.objects.get(project__slug=\"terminology\")\n project = resource.project\n total_strings = Ent... | diff --git a/pontoon/terminology/models.py b/pontoon/terminology/models.py
index b863f89f2b..54907d467b 100644
--- a/pontoon/terminology/models.py
+++ b/pontoon/terminology/models.py
@@ -160,10 +160,12 @@ def create_entity(self):
# Using update() to avoid circular Term.save() call
Term.objects.filte... |
pulp__pulpcore-2937 | Content app is making queries on head requests
```
(pulp) [vagrant@pulp3-source-centos8-stream-fips ~]$ nc 127.0.0.1 4444 [8/8]
> /home/vagrant/devel/pulpcore/pulpcore/content/handler.py(144)list_distribu... | [
{
"content": "import asyncio\nimport logging\nimport mimetypes\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import HTTPForbidden, HTTPFound, HTTPNotF... | [
{
"content": "import asyncio\nimport logging\nimport mimetypes\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import HTTPForbidden, HTTPFound, HTTPNotF... | diff --git a/CHANGES/2924.bugfix b/CHANGES/2924.bugfix
new file mode 100644
index 0000000000..4ba7d13ebd
--- /dev/null
+++ b/CHANGES/2924.bugfix
@@ -0,0 +1 @@
+Improve content app performance on head requests
diff --git a/pulpcore/content/handler.py b/pulpcore/content/handler.py
index 0744459b6d..0ce64aed2d 100644
--- ... |
streamlink__streamlink-1119 | Enable certificate verification for Twitch
### Description
Certificate verification is disable when making API calls in the Twitch plugin. According to comments in the code, "The certificate used by Twitch cannot be verified on some OpenSSL versions." The commit to disable verification was done 3 years ago during Li... | [
{
"content": "# coding=utf-8\nimport re\nimport warnings\nfrom random import random\n\nimport requests\nfrom streamlink.compat import urlparse\nfrom streamlink.exceptions import NoStreamsError, PluginError, StreamError\nfrom streamlink.plugin import Plugin, PluginOptions\nfrom streamlink.plugin.api import http,... | [
{
"content": "# coding=utf-8\nimport re\nimport warnings\nfrom random import random\n\nimport requests\nfrom streamlink.compat import urlparse\nfrom streamlink.exceptions import NoStreamsError, PluginError, StreamError\nfrom streamlink.plugin import Plugin, PluginOptions\nfrom streamlink.plugin.api import http,... | diff --git a/src/streamlink/plugins/twitch.py b/src/streamlink/plugins/twitch.py
index 80440d22079..5fc76586f9b 100644
--- a/src/streamlink/plugins/twitch.py
+++ b/src/streamlink/plugins/twitch.py
@@ -203,8 +203,7 @@ def call(self, path, format="json", schema=None, **extra_params):
headers = {'Accept': 'applic... |
pulp__pulpcore-2939 | Content app is making queries on head requests
```
(pulp) [vagrant@pulp3-source-centos8-stream-fips ~]$ nc 127.0.0.1 4444 [8/8]
> /home/vagrant/devel/pulpcore/pulpcore/content/handler.py(144)list_distribu... | [
{
"content": "import asyncio\nimport logging\nimport mimetypes\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import HTTPForbidden, HTTPFound, HTTPNotF... | [
{
"content": "import asyncio\nimport logging\nimport mimetypes\nimport os\nimport re\nfrom gettext import gettext as _\n\nfrom aiohttp.client_exceptions import ClientResponseError\nfrom aiohttp.web import FileResponse, StreamResponse, HTTPOk\nfrom aiohttp.web_exceptions import HTTPForbidden, HTTPFound, HTTPNotF... | diff --git a/CHANGES/2924.bugfix b/CHANGES/2924.bugfix
new file mode 100644
index 0000000000..4ba7d13ebd
--- /dev/null
+++ b/CHANGES/2924.bugfix
@@ -0,0 +1 @@
+Improve content app performance on head requests
diff --git a/docs/components.rst b/docs/components.rst
index fc1135d107..870096f22c 100644
--- a/docs/component... |
apache__tvm-8761 | Fix a word typo and add spaces.
Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#revie... | [
{
"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n... | [
{
"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n... | diff --git a/apps/microtvm/zephyr/template_project/microtvm_api_server.py b/apps/microtvm/zephyr/template_project/microtvm_api_server.py
index 30a61bb4f89f..d93772899bb8 100644
--- a/apps/microtvm/zephyr/template_project/microtvm_api_server.py
+++ b/apps/microtvm/zephyr/template_project/microtvm_api_server.py
@@ -678,9... |
kivy__kivy-2386 | Popups not centered with softinput_mode 'resize'
While using softinput_mode 'resize', when the keyboard is opened popups are pushed off the top of the screen:


When I do, I get the error:
> rastervision_1 | Executing rastervision... | [
{
"content": "from abc import abstractmethod\nfrom copy import deepcopy\nimport logging\n\nimport rastervision as rv\nfrom rastervision.core.config import (Config, ConfigBuilder,\n BundledConfigMixin)\nfrom rastervision.data import (RasterTransformerConfig, StatsTransformerC... | [
{
"content": "from abc import abstractmethod\nfrom copy import deepcopy\nimport logging\n\nimport rastervision as rv\nfrom rastervision.core.config import (Config, ConfigBuilder,\n BundledConfigMixin)\nfrom rastervision.data import (RasterTransformerConfig, StatsTransformerC... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index e20d63315..e199cd7e2 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -35,6 +35,7 @@ Raster Vision 0.8.2
Bug Fixes
^^^^^^^^^
+- Load null channel_order correctly `#733 <https://github.com/azavea/raster-vision/pull/733>`_
- Handle Rasterio crs th... |
mathesar-foundation__mathesar-2171 | AttributeError "attname" or "nspname" from various endpoints
I have been getting this API error intermittently when making a GET request to the records and columns endpoints. It always happens after making some DDL request, like importing a table, or renaming a columns, or extracting columns -- though I can't reproduce... | [
{
"content": "import inspect\nimport warnings\n\nfrom psycopg2.errors import UndefinedFunction\n\nimport sqlalchemy\nfrom sqlalchemy.exc import ProgrammingError\n\nfrom db.records import exceptions\n\n\ndef execute_statement(engine, statement, connection_to_use=None):\n try:\n if connection_to_use:\n ... | [
{
"content": "import inspect\nimport warnings\n\nfrom psycopg2.errors import UndefinedFunction\n\nimport sqlalchemy\nfrom sqlalchemy.exc import ProgrammingError\n\nfrom db.records import exceptions\n\n\ndef execute_statement(engine, statement, connection_to_use=None):\n try:\n if connection_to_use:\n ... | diff --git a/db/utils.py b/db/utils.py
index 534b03ab6e..cdd34ec048 100644
--- a/db/utils.py
+++ b/db/utils.py
@@ -96,7 +96,11 @@ def warning_ignored_func(*args, **kwargs):
@ignore_type_warning
def get_pg_catalog_table(table_name, engine, metadata):
- return sqlalchemy.Table(table_name, metadata, autoload_with=e... |
acl-org__acl-anthology-741 | ACL 2019 videos are available
They can be [browsed here](vimeo.com/user/46432367/folder/1250297).
They video company provided a CSV file linking Anthology IDs to Vimeo URLs. Does anyone want to do the work of ingesting this? [02 ACL2019.xlsx](https://github.com/acl-org/acl-anthology/files/4098244/02.ACL2019.xlsx)
... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2019 Marcel Bollmann <marcel@bollmann.me>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/l... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2019 Marcel Bollmann <marcel@bollmann.me>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/l... | diff --git a/bin/anthology/utils.py b/bin/anthology/utils.py
index 8f3647dc9f..18c234d639 100644
--- a/bin/anthology/utils.py
+++ b/bin/anthology/utils.py
@@ -331,6 +331,9 @@ def parse_element(xml_element):
elif tag == "video":
# Treat videos the same way as other attachments
tag = "a... |
PennyLaneAI__pennylane-331 | Investigate alternate matrix pseudo-inverse functions
The QGT optimizer makes use of the matrix pseudo-inverse, via the `scipy.linalg.pinv` function. However, there are several alternative functions we could also use:
* https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.pinv.html
* https://docs.scipy... | [
{
"content": "# Copyright 2018 Xanadu Quantum Technologies Inc.\r\n\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\... | [
{
"content": "# Copyright 2018 Xanadu Quantum Technologies Inc.\r\n\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\... | diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md
index 0b0f6e39571..966f22f9c6d 100644
--- a/.github/CHANGELOG.md
+++ b/.github/CHANGELOG.md
@@ -23,6 +23,9 @@
and test_operation.py
[#329](https://github.com/XanaduAI/pennylane/pull/329)
+* The quantum natural gradient now uses `scipy.linalg.pinvh` which ... |
pytorch__pytorch-2414 | nn.Embedding improperly sorts inputs when max_norm is specified
```python
import torch
import torch.nn as nn
from torch.autograd import Variable
ids = Variable(torch.LongTensor([2, 12, 4, 8, 8, 6]))
embed = nn.Embedding(22, 5, max_norm=1.0)
print(ids) # before: 2 12 4 8 8 6
out = embed(ids)
print(ids) # aft... | [
{
"content": "import torch\nfrom torch.autograd.function import Function\nfrom torch._thnn import type2backend\nfrom torch.autograd.function import once_differentiable\n\nfrom . import _all_functions\n\n\nclass Embedding(Function):\n\n @staticmethod\n def _renorm(ctx, indices, weight, max_norm, norm_type)... | [
{
"content": "import torch\nfrom torch.autograd.function import Function\nfrom torch._thnn import type2backend\nfrom torch.autograd.function import once_differentiable\n\nfrom . import _all_functions\n\n\nclass Embedding(Function):\n\n @staticmethod\n def _renorm(ctx, indices, weight, max_norm, norm_type)... | diff --git a/test/test_nn.py b/test/test_nn.py
index 9be5415ee6ccb1..7b51a04615a218 100644
--- a/test/test_nn.py
+++ b/test/test_nn.py
@@ -822,6 +822,21 @@ def test_embedding_padding_idx(self):
self.assertEqual(output[0][0].sum().data[0], 0)
self.assertEqual(output[1][2].sum().data[0], 0)
+ def t... |
google__pytype-925 | Add support for PEP 604 (Union |) in stub files
Part of #785, though not a complete fix because this doesn't allow the `|` syntax at runtime (I think).
I was pleasantly surprised by how easy this change was. I hope that doesn't mean I missed something.
| [
{
"content": "# python3\n\n\"\"\"Parse a pyi file using typed_ast.\"\"\"\n\nimport hashlib\nimport sys\n\nimport typing\nfrom typing import Any, List, Optional, Tuple, Union\n\nimport dataclasses\n\nfrom pytype import utils\nfrom pytype.ast import debug\nfrom pytype.pyi import classdef\nfrom pytype.pyi import c... | [
{
"content": "# python3\n\n\"\"\"Parse a pyi file using typed_ast.\"\"\"\n\nimport hashlib\nimport sys\n\nimport typing\nfrom typing import Any, List, Optional, Tuple, Union\n\nimport dataclasses\n\nfrom pytype import utils\nfrom pytype.ast import debug\nfrom pytype.pyi import classdef\nfrom pytype.pyi import c... | diff --git a/pytype/pyi/parser.py b/pytype/pyi/parser.py
index 984204451..7c83fbfac 100644
--- a/pytype/pyi/parser.py
+++ b/pytype/pyi/parser.py
@@ -190,6 +190,12 @@ def visit_Attribute(self, node):
annotation = _attribute_to_name(node).id
return self.defs.new_type(annotation)
+ def visit_BinOp(self, node)... |
gratipay__gratipay.com-3031 | audit csrf_token for httponly
We've received a security disclosure about [not setting `httponly` for `csrf_token`](https://github.com/gratipay/gratipay.com/blob/1749/gratipay/security/csrf.py#L153). We should review that decision and leave a comment in the code where that is necessitated.
| [
{
"content": "\"\"\"Cross Site Request Forgery middleware, borrowed from Django.\n\nSee also:\n\n https://github.com/django/django/blob/master/django/middleware/csrf.py\n https://docs.djangoproject.com/en/dev/ref/contrib/csrf/\n https://github.com/gratipay/gratipay.com/issues/88\n\n\"\"\"\n\nfrom datet... | [
{
"content": "\"\"\"Cross Site Request Forgery middleware, borrowed from Django.\n\nSee also:\n\n https://github.com/django/django/blob/master/django/middleware/csrf.py\n https://docs.djangoproject.com/en/dev/ref/contrib/csrf/\n https://github.com/gratipay/gratipay.com/issues/88\n\n\"\"\"\n\nfrom datet... | diff --git a/gratipay/security/csrf.py b/gratipay/security/csrf.py
index 7f7cff3880..a87ff93b8e 100644
--- a/gratipay/security/csrf.py
+++ b/gratipay/security/csrf.py
@@ -150,6 +150,8 @@ def add_csrf_token_to_response(response, request=None):
return # early parsing must've failed
csrf_token = request.con... |
cloudtools__troposphere-531 | S3ObjectVersion is spelled "SS3ObjectVersion" in the lambda Code object validation
I just noticed [this](https://github.com/cloudtools/troposphere/blob/1f67fb140f5b94cf0f29213a7300bad3ea046a0f/troposphere/awslambda.py#L31) while I was reading through the code. I haven't run into problems as I haven't had to use this pa... | [
{
"content": "from . import AWSObject, AWSProperty\nfrom .validators import positive_integer\n\nMEMORY_VALUES = [x for x in range(128, 1600, 64)]\n\n\ndef validate_memory_size(memory_value):\n \"\"\" Validate memory size for Lambda Function\n :param memory_value: The memory size specified in the Function\... | [
{
"content": "from . import AWSObject, AWSProperty\nfrom .validators import positive_integer\n\nMEMORY_VALUES = [x for x in range(128, 1600, 64)]\n\n\ndef validate_memory_size(memory_value):\n \"\"\" Validate memory size for Lambda Function\n :param memory_value: The memory size specified in the Function\... | diff --git a/troposphere/awslambda.py b/troposphere/awslambda.py
index 3566f7a3b..f5bc8724f 100644
--- a/troposphere/awslambda.py
+++ b/troposphere/awslambda.py
@@ -28,7 +28,7 @@ def validate(self):
zip_file = self.properties.get('ZipFile')
s3_bucket = self.properties.get('S3Bucket')
s3_key =... |
getsentry__sentry-501 | Problem with the encoding
Data:
```
Error processing post_process() on "<class 'sentry.plugins.sentry_mail.MailProcessor'>": UnicodeDecodeError('ascii', '\n<!DOCTYPE html>\n<html style="font-size: 12px">\n<head style="font-size: 12px">\n\n</head>\n<body style=\'font-size: 12px; width: 100%; font-family: "helvetica neu... | [
{
"content": "\"\"\"\nsentry.plugins.sentry_mail.models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\nimport sentry\n\nfrom django import forms\nfrom django.core.mail import EmailMultiAlter... | [
{
"content": "\"\"\"\nsentry.plugins.sentry_mail.models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\nimport sentry\n\nfrom django import forms\nfrom django.core.mail import EmailMultiAlter... | diff --git a/sentry/plugins/sentry_mail/models.py b/sentry/plugins/sentry_mail/models.py
index 51cc4fc7949ab2..0bf835d02b8c53 100644
--- a/sentry/plugins/sentry_mail/models.py
+++ b/sentry/plugins/sentry_mail/models.py
@@ -125,7 +125,7 @@ def notify_users(self, group, event, fail_silently=False):
conti... |
meltano__meltano-7120 | bug: Project files deep merge error when child dict has str value
### Meltano Version
2.12.0
### Python Version
NA
### Bug scope
Other
### Operating System
N/A
### Description
Minimal reproducible example:
```
>>> meltano.core.project_files.deep_merge({}, [{'': ''}])
╭─────────────────────────────── Trace... | [
{
"content": "\"\"\"Module for handling multiple project .yml files.\"\"\"\n\nfrom __future__ import annotations\n\nimport copy\nimport logging\nfrom collections import OrderedDict\nfrom os import PathLike\nfrom pathlib import Path\nfrom typing import Any, Mapping, MutableMapping, Sequence, TypeVar\n\nfrom atom... | [
{
"content": "\"\"\"Module for handling multiple project .yml files.\"\"\"\n\nfrom __future__ import annotations\n\nimport copy\nimport logging\nfrom collections import OrderedDict\nfrom os import PathLike\nfrom pathlib import Path\nfrom typing import Any, Mapping, MutableMapping, Sequence, TypeVar\n\nfrom atom... | diff --git a/src/meltano/core/project_files.py b/src/meltano/core/project_files.py
index 7ed17fecec..5db7db6e1b 100644
--- a/src/meltano/core/project_files.py
+++ b/src/meltano/core/project_files.py
@@ -50,7 +50,7 @@ def deep_merge(parent: TMapping, children: list[TMapping]) -> TMapping:
# get node or ... |
modoboa__modoboa-2141 | Disabled account can still receive email
# Impacted versions
* OS Type: Debian
* OS Version: Buster
* Database Type: PostgreSQL
* Database version: 11
* Modoboa: 1.17.0
# Steps to reproduce
1. Create an account with _Simple user_ role and disable it - either at the creation or after
2. Send an email to th... | [
{
"content": "\"\"\"Forms related to accounts management.\"\"\"\n\nfrom collections import OrderedDict\nfrom functools import reduce\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import password_validation\nfrom django.http import QueryDict\nfrom django.urls import reve... | [
{
"content": "\"\"\"Forms related to accounts management.\"\"\"\n\nfrom collections import OrderedDict\nfrom functools import reduce\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import password_validation\nfrom django.http import QueryDict\nfrom django.urls import reve... | diff --git a/modoboa/admin/forms/account.py b/modoboa/admin/forms/account.py
index f2ca42690..51d246480 100644
--- a/modoboa/admin/forms/account.py
+++ b/modoboa/admin/forms/account.py
@@ -206,9 +206,8 @@ def save(self, commit=True):
account.role = self.cleaned_data["role"]
if hasattr(account,... |
openstates__openstates-scrapers-2884 | WY failing since at least 2019-02-22
WY has been failing since 2019-02-22
Based on automated runs it appears that WY has not run successfully in 2 days (2019-02-22).
```
KeyError: 'bill'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/**PGUSER**/v... | [
{
"content": "import re\nimport pytz\nimport datetime\nimport json\n\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom openstates.utils import LXMLMixin\n\n\nTIMEZONE = pytz.timezone('US/Mountain')\n\n\ndef categorize_action(action):\n categorizers = (\n ('Introduced and Referred', ('introduct... | [
{
"content": "import re\nimport pytz\nimport datetime\nimport json\n\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom openstates.utils import LXMLMixin\n\n\nTIMEZONE = pytz.timezone('US/Mountain')\n\n\ndef categorize_action(action):\n categorizers = (\n ('Introduced and Referred', ('introduct... | diff --git a/openstates/wy/bills.py b/openstates/wy/bills.py
index 72b2d9505f..d7d15f983c 100644
--- a/openstates/wy/bills.py
+++ b/openstates/wy/bills.py
@@ -268,6 +268,9 @@ def parse_local_date(self, date_str):
date_str = date_str + '.0'
date_obj = datetime.datetime.strptime(date_str, '%Y-%m-%... |
meltano__meltano-7427 | bug: `flask` not found when running `meltano-cloud` via `pipx`
### Meltano Version
N/A
### Python Version
3.11
### Bug scope
CLI (options, error messages, logging, etc.)
### Operating System
Python 3.11 Docker container
### Description
```sh
pip install pipx
pipx install 'git+https://github.com/meltano/melta... | [
{
"content": "\"\"\"Authentication for Meltano Cloud.\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport os\nimport subprocess\nimport sys\nimport typing as t\nimport webbrowser\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom urllib.parse import urlencode, urljoin\n\nim... | [
{
"content": "\"\"\"Authentication for Meltano Cloud.\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport os\nimport subprocess\nimport sys\nimport typing as t\nimport webbrowser\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom urllib.parse import urlencode, urljoin\n\nim... | diff --git a/src/cloud-cli/meltano/cloud/api/auth/auth.py b/src/cloud-cli/meltano/cloud/api/auth/auth.py
index a93de314ea..1162fc8559 100644
--- a/src/cloud-cli/meltano/cloud/api/auth/auth.py
+++ b/src/cloud-cli/meltano/cloud/api/auth/auth.py
@@ -84,7 +84,11 @@ def callback_server(self) -> t.Iterator[None]:
se... |
spack__spack-30189 | Installation issue: openssh %nvhpc
### Steps to reproduce the issue
$ spack maintainers openssh
@bernhardkaindl
$ spack install openssh %nvhpc@22.1 ^openssl %gcc
```
[+] /home2/cessenat/Softs/spack/opt/spack/linux-ubuntu20.04-zen2/nvhpc-22.1/pkgconf-1.8.0-a3kn22sdo3dikakyqkux3xsr4gcmnu5n
[+] /usr (external perl... | [
{
"content": "# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport re\nimport socket\n\nfrom spack import *\n\n\nclass Openssh(AutotoolsPackage):\n \"\"... | [
{
"content": "# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport re\nimport socket\n\nfrom spack import *\n\n\nclass Openssh(AutotoolsPackage):\n \"\"... | diff --git a/var/spack/repos/builtin/packages/openssh/package.py b/var/spack/repos/builtin/packages/openssh/package.py
index 01723ae60bf8cc..59c9cb385ffdd3 100644
--- a/var/spack/repos/builtin/packages/openssh/package.py
+++ b/var/spack/repos/builtin/packages/openssh/package.py
@@ -66,6 +66,10 @@ def configure_args(sel... |
spack__spack-23478 | Installation issue: zfp install fails due to use of system python
When trying to build zfp on my system, I encountered a bunch of odd python errors. Upon deeper investigation, it appears that the CMake configuration tool zfp was using found/decided to use the system installed python instead of the spack installed pyth... | [
{
"content": "# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Zfp(CMakePackage, CudaPackage):\n \"\"\"zfp is a compressed n... | [
{
"content": "# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Zfp(CMakePackage, CudaPackage):\n \"\"\"zfp is a compressed n... | diff --git a/var/spack/repos/builtin/packages/zfp/package.py b/var/spack/repos/builtin/packages/zfp/package.py
index a065af9281dccd..4d2e2006d57ef9 100644
--- a/var/spack/repos/builtin/packages/zfp/package.py
+++ b/var/spack/repos/builtin/packages/zfp/package.py
@@ -78,6 +78,7 @@ class Zfp(CMakePackage, CudaPackage):
... |
pyro-ppl__pyro-3251 | Docs builds are failing
Docs builds seem to have been failing since 1.8.5 release. We should fix this before the 1.8.6 release.
https://readthedocs.org/projects/pyro-ppl/builds/20847164/
<img width="812" alt="image" src="https://github.com/pyro-ppl/pyro/assets/648532/45149fae-a72d-481a-aaf9-73262d50aa92">
| [
{
"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\nimport sys\n\nimport sphinx_rtd_theme\n\n# import pkg_resources\n\n# -*- coding: utf-8 -*-\n#\n# Pyro documentation build configuration file, created by\n# sphinx-quickstart on Thu Jun 15 17:16:1... | [
{
"content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport os\nimport sys\n\nimport sphinx_rtd_theme\n\n# import pkg_resources\n\n# -*- coding: utf-8 -*-\n#\n# Pyro documentation build configuration file, created by\n# sphinx-quickstart on Thu Jun 15 17:16:1... | diff --git a/.readthedocs.yml b/.readthedocs.yml
index 321000738b..61fd13982c 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -6,7 +6,7 @@ sphinx:
configuration: docs/source/conf.py
# Optionally build your docs in additional formats such as PDF and ePub
-formats: all
+# formats: all
# Optionally set th... |
pulp__pulpcore-3692 | `UnexportableArtifactException` does not expect any arguments during the initialization
`UnexportableArtifactException.__init__() takes 1 positional argument but 2 were given)'`
https://github.com/pulp/pulpcore/blob/351bd8653820195ffd3b16c5fbab0f14fd0061fe/pulpcore/app/tasks/export.py#L41-L59
| [
{
"content": "import hashlib\nimport json\nimport logging\nimport os\nimport os.path\nimport subprocess\nimport tarfile\n\nfrom distutils.util import strtobool\nfrom gettext import gettext as _\nfrom glob import glob\nfrom pathlib import Path\nfrom pkg_resources import get_distribution\n\nfrom django.conf impor... | [
{
"content": "import hashlib\nimport json\nimport logging\nimport os\nimport os.path\nimport subprocess\nimport tarfile\n\nfrom distutils.util import strtobool\nfrom gettext import gettext as _\nfrom glob import glob\nfrom pathlib import Path\nfrom pkg_resources import get_distribution\n\nfrom django.conf impor... | diff --git a/CHANGES/3313.bugfix b/CHANGES/3313.bugfix
new file mode 100644
index 0000000000..df96ca5e8f
--- /dev/null
+++ b/CHANGES/3313.bugfix
@@ -0,0 +1 @@
+Fixed an error when raising ``UnexportableArtifactException``.
diff --git a/pulpcore/app/tasks/export.py b/pulpcore/app/tasks/export.py
index 1061c85fe2..47d81e... |
ansible-collections__community.general-1151 | Module postgresql_pg_hba Throws KeyError When Setting Method Options
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMAR... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# Copyright: (c) 2019, Sebastiaan Mannem (@sebasmannem) <sebastiaan.mannem@enterprisedb.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# Copyright: (c) 2019, Sebastiaan Mannem (@sebasmannem) <sebastiaan.mannem@enterprisedb.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function... | diff --git a/changelogs/fragments/1124-pg_hba-dictkey bugfix.yaml b/changelogs/fragments/1124-pg_hba-dictkey bugfix.yaml
new file mode 100644
index 00000000000..82fd4e256c3
--- /dev/null
+++ b/changelogs/fragments/1124-pg_hba-dictkey bugfix.yaml
@@ -0,0 +1,2 @@
+bugfixes:
+ - pg_hba - fix a crash when a new rule with... |
python-gitlab__python-gitlab-1027 | projects.get() raises error when project is specified as "userspace/name" rather than ID
## Description of the problem, including code/CLI snippet
Attempt to make a query using the project's path, per the [example in the documentation](https://github.com/python-gitlab/python-gitlab/blame/v1.12.1/docs/gl_objects/proj... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2013-2017 Gauvain Pocentek <gauvain@pocentek.net>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 ... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2013-2017 Gauvain Pocentek <gauvain@pocentek.net>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 ... | diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index 9a3a8b1d2..32aa2658a 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -90,8 +90,8 @@ def __init__(
self._api_version = str(api_version)
self._server_version = self._server_revision = None
- self._base_url = url
- sel... |
cookiecutter__cookiecutter-1989 | Add Python 3.12 support
* Cookiecutter version: 2.5.0
* Python version: 3.12
* Operating System: All
| [
{
"content": "\"\"\"cookiecutter distutils configuration.\"\"\"\nfrom pathlib import Path\n\nfrom setuptools import setup\n\n\ndef _get_version() -> str:\n \"\"\"Read cookiecutter/VERSION.txt and return its contents.\"\"\"\n path = Path(\"cookiecutter\").resolve()\n version_file = path / \"VERSION.txt\... | [
{
"content": "\"\"\"cookiecutter distutils configuration.\"\"\"\nfrom pathlib import Path\n\nfrom setuptools import setup\n\n\ndef _get_version() -> str:\n \"\"\"Read cookiecutter/VERSION.txt and return its contents.\"\"\"\n path = Path(\"cookiecutter\").resolve()\n version_file = path / \"VERSION.txt\... | diff --git a/.github/workflows/pip-publish.yml b/.github/workflows/pip-publish.yml
index b0e335761..d4d5b11ce 100644
--- a/.github/workflows/pip-publish.yml
+++ b/.github/workflows/pip-publish.yml
@@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
- python-versio... |
ansible__ansible-modules-extras-2047 | pkg5_publisher throws KeyError with unexpected output from `pkg publisher -Ftsv`
##### Issue Type:
Bug Report
##### Ansible Version:
```
$ ansible --version
ansible 2.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = None
```
##### Summary:
I have a system with the output of publishers l... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright 2014 Peter Oliver <ansible@mavit.org.uk>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright 2014 Peter Oliver <ansible@mavit.org.uk>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of... | diff --git a/packaging/os/pkg5_publisher.py b/packaging/os/pkg5_publisher.py
index 08c33464e7f..79eccd2ec08 100644
--- a/packaging/os/pkg5_publisher.py
+++ b/packaging/os/pkg5_publisher.py
@@ -180,13 +180,14 @@ def get_publishers(module):
publishers[name]['origin'] = []
publishers[name]['mirro... |
pwr-Solaar__Solaar-1255 | Solaar uses 100% of one logical CPU
**Information**
<!-- Make sure that your issue is not one of the known issues in the Solaar documentation at https://pwr-solaar.github.io/Solaar/ -->
<!-- Do not bother opening an issue for a version older than 1.0.6. Please update to the latest version and see if your issue persi... | [
{
"content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the... | [
{
"content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the... | diff --git a/docs/installation.md b/docs/installation.md
index 976c5e72c1..d7b71f4b52 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -20,18 +20,21 @@ Most of Solaar should work fine with any kernel more recent than 5.2,
but newer kernels might be needed for some devices to be correctly recognized and ... |
openstates__openstates-scrapers-1932 | MA failing since at least 2017-09-23
MA has been failing since 2017-09-23
Based on automated runs it appears that MA has not run successfully in 2 days (2017-09-23).
```
03:01:51 INFO pupa: save bill H3794 in 190th as bill_9f314d68-a0fe-11e7-aa77-0242ac110005.json
03:01:53 INFO pupa: save bill H3795 in 190th as bi... | [
{
"content": "import re\nimport requests\nimport os\nfrom datetime import datetime\nimport lxml.html\nfrom pupa.scrape import Scraper, Bill, VoteEvent\nfrom pupa.utils import convert_pdf\n\nfrom .actions import Categorizer\n\n\nclass MABillScraper(Scraper):\n categorizer = Categorizer()\n session_filters ... | [
{
"content": "import re\nimport requests\nimport os\nfrom datetime import datetime\nimport lxml.html\nfrom pupa.scrape import Scraper, Bill, VoteEvent\nfrom pupa.utils import convert_pdf\n\nfrom .actions import Categorizer\n\n\nclass MABillScraper(Scraper):\n categorizer = Categorizer()\n session_filters ... | diff --git a/openstates/ma/bills.py b/openstates/ma/bills.py
index 562869cc55..811384bc64 100644
--- a/openstates/ma/bills.py
+++ b/openstates/ma/bills.py
@@ -220,7 +220,7 @@ def scrape_action_page(self, bill, page):
if "Supplement" in action_name:
actor = "lower"
vote_act... |
zestedesavoir__zds-site-3167 | Le lien de la dernière réponse donne (parfois) une 404
> Je ne suis pas sûr que ce soit dû à la ZEP-12, mais il semble y avoir un problème avec le [lien vers la dernière réponse](https://zestedesavoir.com/forums/sujet/4288/publier-une-app-android-material-design-de-a-a-z/?page=2#p84199) à [ce sujet](https://zestedesavo... | [
{
"content": "# coding: utf-8\n\nfrom django.conf import settings\nfrom django.db import models\nfrom zds.settings import ZDS_APP\nfrom zds.utils import slugify\nfrom math import ceil\nimport os\nimport string\nimport uuid\n\nfrom django.contrib.auth.models import Group, User\nfrom datetime import datetime, tim... | [
{
"content": "# coding: utf-8\n\nfrom django.conf import settings\nfrom django.db import models\nfrom zds.settings import ZDS_APP\nfrom zds.utils import slugify\nfrom math import ceil\nimport os\nimport string\nimport uuid\n\nfrom django.contrib.auth.models import Group, User\nfrom datetime import datetime, tim... | diff --git a/zds/forum/models.py b/zds/forum/models.py
index 52d12e6640..0a8a578bb7 100644
--- a/zds/forum/models.py
+++ b/zds/forum/models.py
@@ -312,7 +312,7 @@ def resolve_last_read_post_absolute_url(self):
pk, pos = self.resolve_last_post_pk_and_pos_read_by_user(user)
return '{}?pa... |
mindsdb__mindsdb-1749 | Error when importing MindsDB in a Jupyter notebook
**Your Environment**
* Python version: 3.6
* Operating system: Ubuntu
* Mindsdb version: 2.12.2
**Describe the bug**
Importing MindsDB from a Jupyter Notebook fails, apparently because the HTTP API triggers.
**To Reproduce**
1. Run a new Jupyter notebook
... | [
{
"content": "import argparse\nimport datetime\nimport requests\nfrom functools import wraps\n\nfrom mindsdb.utilities.fs import create_process_mark, delete_process_mark\n\n\ndef args_parse():\n parser = argparse.ArgumentParser(description='CL argument for mindsdb server')\n parser.add_argument('--api', t... | [
{
"content": "import argparse\nimport datetime\nimport requests\nfrom functools import wraps\n\nfrom mindsdb.utilities.fs import create_process_mark, delete_process_mark\n\n\ndef args_parse():\n parser = argparse.ArgumentParser(description='CL argument for mindsdb server')\n parser.add_argument('--api', t... | diff --git a/mindsdb/utilities/functions.py b/mindsdb/utilities/functions.py
index 80521a0eb94..43537426977 100644
--- a/mindsdb/utilities/functions.py
+++ b/mindsdb/utilities/functions.py
@@ -39,13 +39,10 @@ def cast_row_types(row, field_types):
def is_notebook():
try:
- shell = get_ipython().__class__.... |
pypa__pipenv-672 | Pipfile touched even on pipenv run
I have a watch command tracking my `Pipfile` but on every call of `pipenv run` the command is executed, even if the file wasn't changed. I tracked this down to the call of `Project.touch_pipfile`. I'm not sure if it required, for `Pipfile` to be touched every time, probably it is just... | [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport os\nimport re\nimport sys\nimport base64\nimport hashlib\n\nimport contoml\nimport delegator\nimport pipfile\nimport toml\n\nfrom .utils import (\n mkdir_p, convert_deps_from_pip, pep423_name, recase_file,\n find_requirements, is_file, is_vcs, pyt... | [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport os\nimport re\nimport sys\nimport base64\nimport hashlib\n\nimport contoml\nimport delegator\nimport pipfile\nimport toml\n\nfrom .utils import (\n mkdir_p, convert_deps_from_pip, pep423_name, recase_file,\n find_requirements, is_file, is_vcs, pyt... | diff --git a/pipenv/project.py b/pipenv/project.py
index a883af7bf6..92da9c3a93 100644
--- a/pipenv/project.py
+++ b/pipenv/project.py
@@ -311,12 +311,15 @@ def touch_pipfile(self):
@property
def pipfile_is_empty(self):
- self.touch_pipfile()
+ if not self.pipfile_exists:
+ return T... |
pytorch__audio-814 | Dataset traversal cannot be deterministic
[Many dataset implementations use `walk_files` function](https://github.com/pytorch/audio/search?q=walk_files&unscoped_q=walk_files) which uses `os.walk` which does not give us choice to make directory traversal in deterministic order.
This makes it harder to test dataset an... | [
{
"content": "import csv\nimport errno\nimport hashlib\nimport logging\nimport os\nimport sys\nimport tarfile\nimport threading\nimport zipfile\nfrom _io import TextIOWrapper\nfrom queue import Queue\nfrom typing import Any, Iterable, List, Optional, Tuple, Union\n\nimport torch\nimport urllib\nimport urllib.re... | [
{
"content": "import csv\nimport errno\nimport hashlib\nimport logging\nimport os\nimport sys\nimport tarfile\nimport threading\nimport zipfile\nfrom _io import TextIOWrapper\nfrom queue import Queue\nfrom typing import Any, Iterable, List, Optional, Tuple, Union\n\nimport torch\nimport urllib\nimport urllib.re... | diff --git a/test/datasets/libritts_test.py b/test/datasets/libritts_test.py
index b84cfdac30..f31561d211 100644
--- a/test/datasets/libritts_test.py
+++ b/test/datasets/libritts_test.py
@@ -49,16 +49,14 @@ def setUpClass(cls):
def test_libritts(self):
dataset = LIBRITTS(self.root_dir)
- samples ... |
dotkom__onlineweb4-330 | Article archive should just list tags that are used
IMO, tags that are not used in any articles should not be listed in the tagcloud.
Feels unnecessary to have them there.
| [
{
"content": "from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage\nfrom django.db.models import Count\nfrom django.http import HttpResponse\nfrom django.shortcuts import render_to_response, get_object_or_404\nfrom django.template import Template, Context, loader, RequestContext\nfrom models... | [
{
"content": "from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage\nfrom django.db.models import Count\nfrom django.http import HttpResponse\nfrom django.shortcuts import render_to_response, get_object_or_404\nfrom django.template import Template, Context, loader, RequestContext\nfrom models... | diff --git a/apps/article/views.py b/apps/article/views.py
index a63fedcdc..177218aca 100755
--- a/apps/article/views.py
+++ b/apps/article/views.py
@@ -109,9 +109,8 @@ def archive(request, name=None, slug=None, year=None, month=None):
articles = filtered
# Get the 30 most used tags, then randomize them... |
ethereum__web3.py-3237 | Change wait_for_transaction_receipt timeout type sig from `float` to `Optional[float]`
Right now `w3.eth.wait_for_transaction_receipt` works just fine with `timeout=None`, because `timeout` is passed to [`asyncio.wait_for`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for) which accepts an `Optional... | [
{
"content": "import asyncio\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaitable,\n Callable,\n List,\n Optional,\n Tuple,\n Type,\n Union,\n cast,\n overload,\n)\nimport warnings\n\nfrom eth_typing import (\n Address,\n BlockNumber,\n ChecksumAddress,\n HexStr... | [
{
"content": "import asyncio\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaitable,\n Callable,\n List,\n Optional,\n Tuple,\n Type,\n Union,\n cast,\n overload,\n)\nimport warnings\n\nfrom eth_typing import (\n Address,\n BlockNumber,\n ChecksumAddress,\n HexStr... | diff --git a/newsfragments/3237.breaking.rst b/newsfragments/3237.breaking.rst
new file mode 100644
index 0000000000..d200e10877
--- /dev/null
+++ b/newsfragments/3237.breaking.rst
@@ -0,0 +1 @@
+Change the signature for the async version of ``wait_for_transaction_receipt()`` to use ``Optional[float]`` instead of ``flo... |
saleor__saleor-5160 | Errors occur when update a page
### What I'm trying to achieve
Update a `Page`
### Steps to reproduce the problem
1. Call `Mutation.pageUpdate ` with `input: {}`
```bash
web_1 | ERROR saleor.graphql.errors.unhandled A query failed unexpectedly [PID:8:Thread-52]
web_1 | Traceback (most recent call last)... | [
{
"content": "import graphene\nfrom django.utils.text import slugify\n\nfrom ...core.permissions import PagePermissions\nfrom ...page import models\nfrom ..core.mutations import ModelDeleteMutation, ModelMutation\nfrom ..core.types.common import SeoInput\nfrom ..core.utils import clean_seo_fields\n\n\nclass Pag... | [
{
"content": "import graphene\nfrom django.utils.text import slugify\n\nfrom ...core.permissions import PagePermissions\nfrom ...page import models\nfrom ..core.mutations import ModelDeleteMutation, ModelMutation\nfrom ..core.types.common import SeoInput\nfrom ..core.utils import clean_seo_fields\n\n\nclass Pag... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c0902ff9c7f..bf27f776446 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -46,6 +46,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Add mypy checks - #5150 by @IKarbowiak
- Move extracting user or service_account from context to uti... |
pantsbuild__pants-14012 | [scalac]: Failing to load kind-projector plugin when there is more than one global scalac plugins
**Describe the bug**
Spotted an odd behaviour when using more than one global scalac plugins, in which during `./pants check ...` command, Pantsbuild would complain about not being able to find/load one of them.
Projec... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Iterator, cast\n\nfrom pants.backend.scala.subsystems.scalac import Sca... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Iterator, cast\n\nfrom pants.backend.scala.subsystems.scalac import Sca... | diff --git a/src/python/pants/backend/scala/compile/scalac_plugins.py b/src/python/pants/backend/scala/compile/scalac_plugins.py
index c23293d4b4e..0851fec5d25 100644
--- a/src/python/pants/backend/scala/compile/scalac_plugins.py
+++ b/src/python/pants/backend/scala/compile/scalac_plugins.py
@@ -86,9 +86,8 @@ class Glo... |
inventree__InvenTree-6067 | EMail host is required for SSO self registration
### Please verify that this bug has NOT been raised before.
- [X] I checked and didn't find a similar issue
### Describe the bug*
The [CustomSocialAccountAdapter](https://github.com/inventree/InvenTree/blob/c28c991591c9bd2c29be4c0046d500e3271feda2/InvenTree/InvenTree/... | [
{
"content": "\"\"\"Helper forms which subclass Django forms to provide additional functionality.\"\"\"\n\nimport logging\nfrom urllib.parse import urlencode\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group, User\nfrom django.contrib.sites.models import... | [
{
"content": "\"\"\"Helper forms which subclass Django forms to provide additional functionality.\"\"\"\n\nimport logging\nfrom urllib.parse import urlencode\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group, User\nfrom django.contrib.sites.models import... | diff --git a/InvenTree/InvenTree/forms.py b/InvenTree/InvenTree/forms.py
index 4896dc75b86e..b3ca485fd92f 100644
--- a/InvenTree/InvenTree/forms.py
+++ b/InvenTree/InvenTree/forms.py
@@ -228,7 +228,12 @@ def clean(self):
def registration_enabled():
"""Determine whether user registration is enabled."""
- retu... |
blaze__blaze-822 | into for datetimes
```
In [30]: from blaze import into
In [31]: import datetime
In [32]: into(np.datetime64, datetime.datetime.now())
NotImplementedError: Blaze does not know a rule for the following conversion
datetime64 <- datetime
```
this comes up when needing to get out a value out of a reduction
```
In [51]: ... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport os\nfrom dynd import nd\nimport datashape\nimport sys\nfrom functools import partial\nfrom datashape import dshape, Record, to_numpy_dtype, Option\nfrom datashape.predicates import isscalar\nimport toolz\nfrom toolz import ... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport os\nfrom dynd import nd\nimport datashape\nimport sys\nfrom functools import partial\nfrom datashape import dshape, Record, to_numpy_dtype, Option\nfrom datashape.predicates import isscalar\nimport toolz\nfrom toolz import ... | diff --git a/blaze/api/into.py b/blaze/api/into.py
index 1ac7fe70d..e00a93828 100644
--- a/blaze/api/into.py
+++ b/blaze/api/into.py
@@ -1023,6 +1023,31 @@ def into(a, b, **kwargs):
return a(b)
+@dispatch(np.datetime64, (datetime, np.datetime64))
+def into(_, b, **kwargs):
+ return np.datetime64(b)
+
+
+@di... |
jazzband__pip-tools-1353 | 6.0.0 has an undeclared dependency on importlib-metadata at python 3.6
<!-- Describe the issue briefly here. -->
pip-compile from pip-tools 6.0 doesn't work at python 3.6, throws an error about failing to find importlib.metadata
#### Environment Versions
pip-tools 6.0.0, python 3.6.8 are the important ones
... | [
{
"content": "import os\nimport shlex\nimport sys\nimport tempfile\nfrom typing import Any, BinaryIO, Optional, Tuple, cast\n\nimport click\nfrom click.utils import LazyFile, safecall\nfrom pip._internal.commands import create_command\nfrom pip._internal.req.constructors import install_req_from_line\nfrom pip._... | [
{
"content": "import os\nimport shlex\nimport sys\nimport tempfile\nfrom typing import Any, BinaryIO, Optional, Tuple, cast\n\nimport click\nfrom click.utils import LazyFile, safecall\nfrom pep517 import meta\nfrom pip._internal.commands import create_command\nfrom pip._internal.req.constructors import install_... | diff --git a/piptools/scripts/compile.py b/piptools/scripts/compile.py
index eaae76991..810f09812 100755
--- a/piptools/scripts/compile.py
+++ b/piptools/scripts/compile.py
@@ -6,10 +6,10 @@
import click
from click.utils import LazyFile, safecall
+from pep517 import meta
from pip._internal.commands import create_c... |
networkx__networkx-3364 | issues about the function 'preferential_attachment_graph' for bipartite networks
Hi, when using the function of 'preferential_attachment_graph' to generate a random bipartite network, how to set the probability 'p'?
I have checked the journal paper, 'Jean-Loup Guillaume and Matthieu Latapy, Bipartite structure o... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2006-2011 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\n#\n# Authors: Aric Hagberg <aric.hagberg@gmail.com>\n# Pie... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2006-2011 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\n#\n# Authors: Aric Hagberg <aric.hagberg@gmail.com>\n# Pie... | diff --git a/networkx/algorithms/bipartite/generators.py b/networkx/algorithms/bipartite/generators.py
index cf5d3dce6e8..d4e37232b3e 100644
--- a/networkx/algorithms/bipartite/generators.py
+++ b/networkx/algorithms/bipartite/generators.py
@@ -380,7 +380,11 @@ def preferential_attachment_graph(aseq, p, create_using=No... |
python-pillow__Pillow-6709 | Exposing the OpenJPEG sgnd parameter when JPEG2000 encoding
I'd like to be able to perform JPEG2K encoding of medical images using Pillow, particularly 16-bit signed greyscale (commonly used with CT and MR). Because of the limited supported `modes` in `Jpeg2KEncode.c` this is not currently possible as all input data i... | [
{
"content": "#\n# The Python Imaging Library\n# $Id$\n#\n# JPEG2000 file handling\n#\n# History:\n# 2014-03-12 ajh Created\n# 2021-06-30 rogermb Extract dpi information from the 'resc' header box\n#\n# Copyright (c) 2014 Coriolis Systems Limited\n# Copyright (c) 2014 Alastair Houghton\n#\n# See the README fi... | [
{
"content": "#\n# The Python Imaging Library\n# $Id$\n#\n# JPEG2000 file handling\n#\n# History:\n# 2014-03-12 ajh Created\n# 2021-06-30 rogermb Extract dpi information from the 'resc' header box\n#\n# Copyright (c) 2014 Coriolis Systems Limited\n# Copyright (c) 2014 Alastair Houghton\n#\n# See the README fi... | diff --git a/Tests/test_file_jpeg2k.py b/Tests/test_file_jpeg2k.py
index cd142e67fc7..0229b224304 100644
--- a/Tests/test_file_jpeg2k.py
+++ b/Tests/test_file_jpeg2k.py
@@ -252,6 +252,20 @@ def test_mct():
assert_image_similar(im, jp2, 1.0e-3)
+def test_sgnd(tmp_path):
+ outfile = str(tmp_path / "te... |
rasterio__rasterio-1269 | mask.py::geometry_window does not properly handle objects with __geo_interface__
`geometry_window` works properly for GeoJSON (as in our tests).
It does not work properly for objects that implement the `__geo_interface__`, because we are always expecting the input shapes to be a `dict`. This causes errors if the us... | [
{
"content": "\"\"\"Functions for working with features in a raster dataset.\"\"\"\n\n\nimport logging\nimport warnings\nimport numpy as np\n\nfrom rasterio._features import _shapes, _sieve, _rasterize, _bounds\nfrom rasterio.dtypes import validate_dtype, can_cast_dtype, get_minimum_dtype\nfrom rasterio.enums i... | [
{
"content": "\"\"\"Functions for working with features in a raster dataset.\"\"\"\n\n\nimport logging\nimport warnings\nimport numpy as np\n\nfrom rasterio._features import _shapes, _sieve, _rasterize, _bounds\nfrom rasterio.dtypes import validate_dtype, can_cast_dtype, get_minimum_dtype\nfrom rasterio.enums i... | diff --git a/rasterio/features.py b/rasterio/features.py
index eabbee82b..b0513f219 100644
--- a/rasterio/features.py
+++ b/rasterio/features.py
@@ -309,13 +309,17 @@ def bounds(geometry, north_up=True):
Parameters
----------
- geometry: GeoJSON-like feature, feature collection, or geometry.
+ geometr... |
aws-cloudformation__cfn-lint-2785 | include_experimental does not work when set via metadata
### CloudFormation Lint Version
0.77.10
### What operating system are you using?
Ubuntu 22
### Describe the bug
The README.md file says that `include_experimental` can be enabled with the `-e` flag or via metadata: https://github.com/aws-cloudformation/cfn-l... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport argparse\nimport copy\nimport glob\nimport json\nimport logging\nimport os\nimport sys\nfrom pathlib import Path\nfrom typing import Dict\n\nimport jsonschema\n\nimport cfnlin... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport argparse\nimport copy\nimport glob\nimport json\nimport logging\nimport os\nimport sys\nfrom pathlib import Path\nfrom typing import Dict\n\nimport jsonschema\n\nimport cfnlin... | diff --git a/src/cfnlint/config.py b/src/cfnlint/config.py
index 80d865524e..e486de7f80 100644
--- a/src/cfnlint/config.py
+++ b/src/cfnlint/config.py
@@ -585,6 +585,9 @@ def set_template_args(self, template):
if config_name == "configure_rules":
if isinstance(confi... |
OpenNMT__OpenNMT-py-764 | RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
I am trying to train a Transformer model with the parameters in [http://opennmt.net/OpenNMT-py/FAQ.html#how-do-i-use-the-transformer-model](url) and I get the following error: _RuntimeError: one of the variables... | [
{
"content": "\"\"\"\nImplementation of \"Attention is All You Need\"\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport numpy as np\n\nimport onmt\nfrom onmt.Models import EncoderBase\nfrom onmt.Models import DecoderState\nfrom onmt.Utils import aeq\n\nMAX_SIZE = 5000\n\n\nclass PositionwiseFeedForward(nn.... | [
{
"content": "\"\"\"\nImplementation of \"Attention is All You Need\"\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport numpy as np\n\nimport onmt\nfrom onmt.Models import EncoderBase\nfrom onmt.Models import DecoderState\nfrom onmt.Utils import aeq\n\nMAX_SIZE = 5000\n\n\nclass PositionwiseFeedForward(nn.... | diff --git a/onmt/modules/Transformer.py b/onmt/modules/Transformer.py
index 6e3b3dbb4e..77b07cab7d 100644
--- a/onmt/modules/Transformer.py
+++ b/onmt/modules/Transformer.py
@@ -29,8 +29,8 @@ def __init__(self, size, hidden_size, dropout=0.1):
self.w_1 = nn.Linear(size, hidden_size)
self.w_2 = nn.Lin... |
streamlit__streamlit-2615 | Components static files / encoding on windows
# Summary
(windows only)
When serving component static files, the encoding is not specified. It falls back to the system's default, which can fail to decode the file.
# Steps to reproduce
What are the steps we should take to reproduce the bug:
1. Set windows sy... | [
{
"content": "# Copyright 2018-2021 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
{
"content": "# Copyright 2018-2021 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | diff --git a/lib/streamlit/components/v1/components.py b/lib/streamlit/components/v1/components.py
index 1fa5305d7fbe..1e77622f054a 100644
--- a/lib/streamlit/components/v1/components.py
+++ b/lib/streamlit/components/v1/components.py
@@ -320,9 +320,9 @@ def get(self, path: str) -> None:
LOGGER.debug("Componen... |
biopython__biopython-3804 | Parsing Exonerate text output with SearchIO can truncate codons at exon-intron boundaries
### Setup
I am reporting a problem with Biopython version, Python version, and operating
system as follows:
```python
Python 3.8.3 (default, May 19 2020, 13:54:14)
CPython
macOS-10.15.7-x86_64-i386-64bit
BioPython 1.78
... | [
{
"content": "# Copyright 2012 by Wibowo Arindrarto. All rights reserved.\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that should have been included as part of this\n# pa... | [
{
"content": "# Copyright 2012 by Wibowo Arindrarto. All rights reserved.\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that should have been included as part of this\n# pa... | diff --git a/Bio/SearchIO/ExonerateIO/exonerate_text.py b/Bio/SearchIO/ExonerateIO/exonerate_text.py
index b53e1e475ad..1abbe9663cb 100644
--- a/Bio/SearchIO/ExonerateIO/exonerate_text.py
+++ b/Bio/SearchIO/ExonerateIO/exonerate_text.py
@@ -27,7 +27,7 @@
# for splitting the line based on intron annotations
# e.g. ' ... |
InternLM__lmdeploy-405 | [Bug] Can't inference with stream=false 0.0.8
### Checklist
- [x] 1. I have searched related issues but cannot get the expected help.
- [x] 2. The bug has not been fixed in the latest version.
### Describe the bug
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.11/site-packages/uvicor... | [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport asyncio\nimport os.path as osp\nimport sys\nfrom configparser import ConfigParser\nfrom contextlib import contextmanager\nfrom queue import Queue\nfrom threading import Thread\nfrom typing import Iterable, List\n\nimport numpy as np\nimport t... | [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport asyncio\nimport os.path as osp\nimport sys\nfrom configparser import ConfigParser\nfrom contextlib import contextmanager\nfrom queue import Queue\nfrom threading import Thread\nfrom typing import Iterable, List\n\nimport numpy as np\nimport t... | diff --git a/lmdeploy/turbomind/turbomind.py b/lmdeploy/turbomind/turbomind.py
index c39110b713..45760a309a 100644
--- a/lmdeploy/turbomind/turbomind.py
+++ b/lmdeploy/turbomind/turbomind.py
@@ -344,7 +344,7 @@ def _broadcast_np(data, dtype, shape=(batch_size, )):
outputs = []
for output, len_... |
aws__sagemaker-python-sdk-1848 | bug: AttributeError: 'NoneType' object has no attribute 'module' when applying the v2 upgrade tool
**Describe the bug**
When applying the `sagemaker-upgrade-v2` automated CLI tool, earlier ast modification leads to an `AttributeError` exception.
**To reproduce**
1. Craft a script that will be modified by a Ser... | [
{
"content": "# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#... | [
{
"content": "# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#... | diff --git a/src/sagemaker/cli/compatibility/v2/modifiers/image_uris.py b/src/sagemaker/cli/compatibility/v2/modifiers/image_uris.py
index fe0ba9df2d..140450ced7 100644
--- a/src/sagemaker/cli/compatibility/v2/modifiers/image_uris.py
+++ b/src/sagemaker/cli/compatibility/v2/modifiers/image_uris.py
@@ -112,8 +112,10 @@ ... |
pyinstaller__pyinstaller-7058 | AssertionError when using PyInstaller. Fixed when following line is commented in modulegraph.py: assert prev_insts[-2].opname == 'LOAD_CONST'
<!--
Welcome to the PyInstaller issue tracker! Before creating an issue, please heed the following:
1. This tracker should only be used to report bugs and request features / ... | [
{
"content": "\n# Filter DeprecationWarnings until the code has been revised\nimport warnings\nwarnings.filterwarnings(\"ignore\", \"the imp module is deprecated in\")\nwarnings.filterwarnings(\"ignore\", \"imp_walk will be removed in a future\")\n\nimport os\nimport imp\nimport sys\nimport re\nimport marshal\n... | [
{
"content": "\n# Filter DeprecationWarnings until the code has been revised\nimport warnings\nwarnings.filterwarnings(\"ignore\", \"the imp module is deprecated in\")\nwarnings.filterwarnings(\"ignore\", \"imp_walk will be removed in a future\")\n\nimport os\nimport imp\nimport sys\nimport re\nimport marshal\n... | diff --git a/PyInstaller/lib/modulegraph/util.py b/PyInstaller/lib/modulegraph/util.py
index 7c742da7b4..239efd162d 100644
--- a/PyInstaller/lib/modulegraph/util.py
+++ b/PyInstaller/lib/modulegraph/util.py
@@ -136,7 +136,9 @@ def iterate_instructions(code_object):
Yields `dis.Instruction`. After each code-block (... |
sktime__sktime-4542 | [BUG] `'month_of_quarter'` feature in `DateTimeFeatures` not giving correct output
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
The 'month_of_quarter' feature of DateTimeFeatures() is not giving correct output.
**To Reproduce**
<!--
Add a Minimal, Complete, and Verifiable ... | [
{
"content": "#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\"\"\"Extract calendar features from datetimeindex.\"\"\"\n__author__ = [\"danbartl\", \"KishManani\"]\n__all__ = [\"DateTimeFeatures\"]\n\nimport warnings\n\nimport numpy a... | [
{
"content": "#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\"\"\"Extract calendar features from datetimeindex.\"\"\"\n__author__ = [\"danbartl\", \"KishManani\"]\n__all__ = [\"DateTimeFeatures\"]\n\nimport warnings\n\nimport numpy a... | diff --git a/sktime/transformations/series/date.py b/sktime/transformations/series/date.py
index a87248850ce..14af9a8925c 100644
--- a/sktime/transformations/series/date.py
+++ b/sktime/transformations/series/date.py
@@ -267,7 +267,7 @@ def _calendar_dummies(x, funcs):
elif funcs == "week_of_month":
cd = ... |
keras-team__keras-9803 | Missing space before a comma in a docstring
https://github.com/keras-team/keras/blob/e85d3dc15072f774736eb0e3c216eb0b7da1db9a/keras/layers/convolutional_recurrent.py#L860
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Convolutional-recurrent layers.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom .. import backend as K\nfrom .. import activations\nfrom .. import initializers\nfrom .. import regularizer... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Convolutional-recurrent layers.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom .. import backend as K\nfrom .. import activations\nfrom .. import initializers\nfrom .. import regularizer... | diff --git a/keras/layers/convolutional_recurrent.py b/keras/layers/convolutional_recurrent.py
index 808dcf8422eb..e64fbe15db70 100644
--- a/keras/layers/convolutional_recurrent.py
+++ b/keras/layers/convolutional_recurrent.py
@@ -857,10 +857,10 @@ class ConvLSTM2D(ConvRNN2D):
# Input shape
- if data_form... |
mne-tools__mne-python-7889 | DOC: spurious website content on 4k screens
in a maximized window on a 4k screen, I'm seeing strange content on the far left side:

| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# MNE documentation build configuration file, created by\n# sphinx-quickstart on Fri Jun 11 10:45:48 2010.\n#\n# This file is execfile()d with the current directory set to its containing\n# dir.\n#\n# Note that not all possible configuration values are present in this\n... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# MNE documentation build configuration file, created by\n# sphinx-quickstart on Fri Jun 11 10:45:48 2010.\n#\n# This file is execfile()d with the current directory set to its containing\n# dir.\n#\n# Note that not all possible configuration values are present in this\n... | diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html
index e0af6795416..731be366ad2 100755
--- a/doc/_templates/layout.html
+++ b/doc/_templates/layout.html
@@ -64,7 +64,7 @@
{% endblock %}
{# put the sidebar before the body #}
-{% block sidebar1 %}{{ sidebar() }}{% endblock %}
+{% block sidebar1 %}... |
sktime__sktime-6285 | [MNT] Update dask requirement from `<2024.2.2` to `<2024.4.2`, add new required `dataframe` extra to `pyproject.toml`.
Fixes #6280 by updating `dask` to the newest version which fixes incompatibility with python 3.11.9
| [
{
"content": "#!/usr/bin/env python3 -u\n\"\"\"The ``mlflow_sktime`` module provides an MLflow API for ``sktime`` forecasters.\n\nThis module exports ``sktime`` models in the following formats:\n\nsktime (native) format\n This is the main flavor that can be loaded back into sktime, which relies on pickle\n ... | [
{
"content": "#!/usr/bin/env python3 -u\n\"\"\"The ``mlflow_sktime`` module provides an MLflow API for ``sktime`` forecasters.\n\nThis module exports ``sktime`` models in the following formats:\n\nsktime (native) format\n This is the main flavor that can be loaded back into sktime, which relies on pickle\n ... | diff --git a/sktime/utils/mlflow_sktime.py b/sktime/utils/mlflow_sktime.py
index 9c1a3ae0809..4c662574833 100644
--- a/sktime/utils/mlflow_sktime.py
+++ b/sktime/utils/mlflow_sktime.py
@@ -47,7 +47,6 @@
import os
import pandas as pd
-import yaml
import sktime
from sktime import utils
@@ -56,6 +55,7 @@
from skt... |
django-cms__django-cms-2333 | PlaceholderFields and Frontend editing will not work for existing objects if any PlaceholderFields are added to a model.
PlaceholderFields added to models after objects have already been created don't appear to have been initialized properly and this prevents them from appearing (AT ALL) on the frontend and front-end e... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom cms.forms.fields import PageSelectFormField, PlaceholderFormField\nfrom cms.models.pagemodel import Page\nfrom cms.models.placeholdermodel import Placeholder\nfrom cms.utils.placeholder import PlaceholderNoAction, validate_placeholder_name\nfrom django.db import model... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom cms.forms.fields import PageSelectFormField, PlaceholderFormField\nfrom cms.models.pagemodel import Page\nfrom cms.models.placeholdermodel import Placeholder\nfrom cms.utils.placeholder import PlaceholderNoAction, validate_placeholder_name\nfrom django.db import model... | diff --git a/cms/models/fields.py b/cms/models/fields.py
index 224d8735355..61cb0f2cd7d 100644
--- a/cms/models/fields.py
+++ b/cms/models/fields.py
@@ -38,6 +38,9 @@ def pre_save(self, model_instance, add):
else:
slot = self._get_placeholder_slot(model_instance)
placeholder = getattr... |
conan-io__conan-11123 | [bug] conan sh environment fails to generate deactivation_file on ubuntu-20.04
### Environment Details (include every applicable attribute)
* Github VM Ubuntu-20.04
* Ubuntu-20.04
* Compiler N/A
* up until 1.48
* 3.10.4
### Steps to reproduce (Include if Applicable)
- Create an Virtual Run, Build or... | [
{
"content": "import fnmatch\nimport os\nimport textwrap\nfrom collections import OrderedDict\nfrom contextlib import contextmanager\n\nfrom conans.client.subsystems import deduce_subsystem, WINDOWS, subsystem_path\nfrom conans.errors import ConanException\nfrom conans.util.files import save\n\n\nclass _EnvVarP... | [
{
"content": "import fnmatch\nimport os\nimport textwrap\nfrom collections import OrderedDict\nfrom contextlib import contextmanager\n\nfrom conans.client.subsystems import deduce_subsystem, WINDOWS, subsystem_path\nfrom conans.errors import ConanException\nfrom conans.util.files import save\n\n\nclass _EnvVarP... | diff --git a/conan/tools/env/environment.py b/conan/tools/env/environment.py
index fd57f306985..88c008e9255 100644
--- a/conan/tools/env/environment.py
+++ b/conan/tools/env/environment.py
@@ -354,7 +354,7 @@ def save_sh(self, file_location, generate_deactivate=True):
deactivate_file = os.path.join(filepath, "... |
translate__translate-3429 | Multistring doesnt work as a python2 string
Previously you were able to so ~~`str(multistring("foo"))`~~ but it seems this no longer works.
EDIT: apologies that was a bad example it should have read something like `str(multistring("é"))`
Im wondering if we should add py2 compat similar to the one in django (https://d... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2006 Zuza Software Foundation\n#\n# This file is part of translate.\n#\n# translate is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either versio... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2006 Zuza Software Foundation\n#\n# This file is part of translate.\n#\n# translate is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either versio... | diff --git a/translate/misc/multistring.py b/translate/misc/multistring.py
index 4061edd104..6b5ba09444 100644
--- a/translate/misc/multistring.py
+++ b/translate/misc/multistring.py
@@ -75,6 +75,11 @@ def __repr__(self):
_repr = "multistring([" + u",".join(self.strings) + "])"
return _repr.encode('ut... |
Pyomo__pyomo-925 | Unallowed character (~) found in CPLEX log file path/name.
I am getting
ValueError: Unallowed character (~) found in CPLEX log file path/name.
For portability reasons, only [a-zA-Z0-9 :.-_] are allowed.
When trying to solve the following simple problem with both cplex 12.8 and 12.9.
This seems to be simil... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin... | diff --git a/pyomo/solvers/plugins/solvers/CPLEX.py b/pyomo/solvers/plugins/solvers/CPLEX.py
index e5fcc82fb0d..25ee5651a36 100644
--- a/pyomo/solvers/plugins/solvers/CPLEX.py
+++ b/pyomo/solvers/plugins/solvers/CPLEX.py
@@ -62,7 +62,8 @@ def _validate_file_name(cplex, filename, description):
"CPLEX or... |
PennyLaneAI__pennylane-4311 | [BUG] qml.apply duplicates new ops
### Expected behavior
`qml.apply` adds a single instance of a new operation to a circuit
### Actual behavior
`qml.apply` adds two instances of a new operation to a circuit
### Additional information
_No response_
### Source code
```shell
import pennylane as qml
def my_quan... | [
{
"content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unle... | [
{
"content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unle... | diff --git a/pennylane/queuing.py b/pennylane/queuing.py
index 1b99b5f8328..e2c84602e0e 100644
--- a/pennylane/queuing.py
+++ b/pennylane/queuing.py
@@ -459,6 +459,22 @@ def circuit(x):
>>> print(qml.draw(circuit)(0.6))
0: ──RX(0.4)──RY(0.6)──RX(0.4)──┤ ⟨Z⟩
+ .. warning::
+
+ If you use ``apply`` ... |
joke2k__faker-1509 | Bug in `mac_platform_token`
* Faker version: Latest
* OS: Any
`mac_platform_token` generates a MacOS platform token used in user agent strings. However, during https://github.com/joke2k/faker/commit/da1ae11a06a8f64bd4b0f7d1391d7661521e4caf#diff-7d7f34af58b0ae686b413e6ed3463229243aacfb0891fbc544cb951224c5af97L220, l... | [
{
"content": "import string\n\nfrom datetime import datetime\n\nfrom .. import BaseProvider\n\n\nclass Provider(BaseProvider):\n \"\"\"Implement default user agent provider for Faker.\"\"\"\n\n user_agents = (\n 'chrome', 'firefox', 'internet_explorer', 'opera', 'safari',\n )\n\n windows_plat... | [
{
"content": "import string\n\nfrom datetime import datetime\n\nfrom .. import BaseProvider\n\n\nclass Provider(BaseProvider):\n \"\"\"Implement default user agent provider for Faker.\"\"\"\n\n user_agents = (\n 'chrome', 'firefox', 'internet_explorer', 'opera', 'safari',\n )\n\n windows_plat... | diff --git a/faker/providers/user_agent/__init__.py b/faker/providers/user_agent/__init__.py
index 2a4c8a7d66..40fe1830cc 100644
--- a/faker/providers/user_agent/__init__.py
+++ b/faker/providers/user_agent/__init__.py
@@ -192,7 +192,7 @@ def linux_platform_token(self):
def mac_platform_token(self):
"""... |
google__fuzzbench-72 | Eclipser maxfilelen value
I experienced the same problem that you had in choosing maxfilelen to evaluate Eclipser some time ago.
I found that they used 1048576 in their experiments (https://github.com/SoftSec-KAIST/Eclipser-Artifact/blob/master/docker-scripts/experiment-scripts/package-exp/run_eclipser.sh#L25), so may... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable la... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable la... | diff --git a/fuzzers/eclipser/fuzzer.py b/fuzzers/eclipser/fuzzer.py
index d8bf8af49..50a435369 100644
--- a/fuzzers/eclipser/fuzzer.py
+++ b/fuzzers/eclipser/fuzzer.py
@@ -66,7 +66,9 @@ def fuzz(input_corpus, output_corpus, target_binary):
'-f',
'foo',
'--maxfilelen',
- str(10 * 1024 ... |
Flexget__Flexget-2802 | Unhandled error in plugin from_transmission
<!---
Before opening an issue, verify:
- Is this a feature request? Post it on https://feathub.com/Flexget/Flexget
- Is this an issue with webui? Make an issue over on https://github.com/Flexget/webui
- Did you recently upgrade? Look at the Change Log and Upgrade Action... | [
{
"content": "import base64\nimport os\nimport re\nfrom datetime import datetime, timedelta\nfrom fnmatch import fnmatch\nfrom netrc import NetrcParseError, netrc\nfrom time import sleep\nfrom urllib.parse import urlparse\n\nfrom functools import partial\nfrom loguru import logger\n\nfrom flexget import plugin\... | [
{
"content": "import base64\nimport os\nimport re\nfrom datetime import datetime, timedelta\nfrom fnmatch import fnmatch\nfrom netrc import NetrcParseError, netrc\nfrom time import sleep\nfrom urllib.parse import urlparse\n\nfrom functools import partial\nfrom loguru import logger\n\nfrom flexget import plugin\... | diff --git a/flexget/plugins/clients/transmission.py b/flexget/plugins/clients/transmission.py
index ccd80bfdd1..1744b5c107 100644
--- a/flexget/plugins/clients/transmission.py
+++ b/flexget/plugins/clients/transmission.py
@@ -192,13 +192,6 @@ def on_task_input(self, task, config):
self.client = self.creat... |
praw-dev__praw-637 | PRAW does not work with custom SSL cert bundle
Because of the proxy I'm using, I need to use a custom SSL cert bundle. Normally using the requests library, this is achievable in one of 2 ways:
Explicitly setting `verify` to the path of the bundle:
```
requests.get('https://google.com', verify='/path/to/cacert.pem')
`... | [
{
"content": "\"\"\"Provides classes that handle request dispatching.\"\"\"\n\nfrom __future__ import print_function, unicode_literals\n\nimport socket\nimport sys\nimport time\nfrom functools import wraps\nfrom praw.errors import ClientException\nfrom praw.helpers import normalize_url\nfrom requests import Ses... | [
{
"content": "\"\"\"Provides classes that handle request dispatching.\"\"\"\n\nfrom __future__ import print_function, unicode_literals\n\nimport socket\nimport sys\nimport time\nfrom functools import wraps\nfrom praw.errors import ClientException\nfrom praw.helpers import normalize_url\nfrom requests import Ses... | diff --git a/praw/handlers.py b/praw/handlers.py
index 85e9fe68a..fa4df1105 100644
--- a/praw/handlers.py
+++ b/praw/handlers.py
@@ -98,8 +98,12 @@ def request(self, request, proxies, timeout, verify, **_):
arguments intended for the cache handler.
"""
- return self.http.send(request, proxies... |
python-telegram-bot__python-telegram-bot-1673 | [FEATURE] Add telegram.ext.filters.Filters.poll for native poll messages
#### Is your feature request related to a problem? Please describe.
Since version 4.2, Bot API added poll message support, and PTB has also followed up with that in the API. However, as of PTB 12.2.0, ther is no support of poll messages in built ... | [
{
"content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2018\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Pub... | [
{
"content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2018\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Pub... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index 63cd5e0bdb5..62de900d412 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -26,6 +26,7 @@ The following wonderful people contributed directly or indirectly to this projec
- `d-qoi <https://github.com/d-qoi>`_
- `daimajia <https://github.com/daimajia>`_
- `Daniel Reed <https:/... |
searx__searx-2385 | Startpage not returning any results
**Version:**
I tried it with `v0.17.0` and `820b468bfe96f693d60ce06f1e78af51f00deefc`
**Installation-Method:**
Manually according to wiki (with uwsgi)
**What happened?**
The startpage engine is not returning any results
**How To Reproduce**
Execute a query with `!sp tes... | [
{
"content": "# Startpage (Web)\n#\n# @website https://startpage.com\n# @provide-api no (nothing found)\n#\n# @using-api no\n# @results HTML\n# @stable no (HTML can change)\n# @parse url, title, content\n#\n# @todo paging\n\nfrom lxml import html\nfrom dateutil import parser\nfrom d... | [
{
"content": "# Startpage (Web)\n#\n# @website https://startpage.com\n# @provide-api no (nothing found)\n#\n# @using-api no\n# @results HTML\n# @stable no (HTML can change)\n# @parse url, title, content\n#\n# @todo paging\n\nfrom lxml import html\nfrom dateutil import parser\nfrom d... | diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py
index 90ed0a7a17..16e846a144 100644
--- a/searx/engines/startpage.py
+++ b/searx/engines/startpage.py
@@ -36,8 +36,8 @@
# specific xpath variables
# ads xpath //div[@id="results"]/div[@id="sponsored"]//div[@class="result"]
# not ads: div[@class="re... |
pytorch__ignite-1330 | Docstring of Canberra metric warning
Following this comment
> @sdesrozis could you please investigate why there is a warning here : https://travis-ci.org/github/pytorch/ignite/jobs/730492404#L2924
thanks !
> Doc link is apparently badly rendered : https://pytorch.org/ignite/master/contrib/metrics.html#ignite.c... | [
{
"content": "from typing import Callable, Union\n\nimport torch\n\nfrom ignite.contrib.metrics.regression._base import _BaseRegression\nfrom ignite.metrics.metric import reinit__is_reduced, sync_all_reduce\n\n\nclass CanberraMetric(_BaseRegression):\n r\"\"\"\n Calculates the Canberra Metric.\n\n :mat... | [
{
"content": "from typing import Callable, Union\n\nimport torch\n\nfrom ignite.contrib.metrics.regression._base import _BaseRegression\nfrom ignite.metrics.metric import reinit__is_reduced, sync_all_reduce\n\n\nclass CanberraMetric(_BaseRegression):\n r\"\"\"\n Calculates the Canberra Metric.\n\n :mat... | diff --git a/ignite/contrib/metrics/regression/canberra_metric.py b/ignite/contrib/metrics/regression/canberra_metric.py
index 3436e24c2949..23cba54ea2cf 100644
--- a/ignite/contrib/metrics/regression/canberra_metric.py
+++ b/ignite/contrib/metrics/regression/canberra_metric.py
@@ -19,7 +19,6 @@ class CanberraMetric(_B... |
marshmallow-code__webargs-148 | Parser.parse adds "missing" to original_data
When parsing input, parser.parse adds `'field': missing` to `original_data` for every missing field. This happens only at first level, not in nested schema.
Hopefully, this test case will make this clearer:
```py
from marshmallow import Schema, fields, validates_schem... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport collections\nimport functools\nimport inspect\nimport logging\nimport warnings\ntry:\n import simplejson as json\nexcept ImportError:\n import json\n\nimport marshmallow as ma\nfrom marshmallow.compat import iteritems... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport collections\nimport functools\nimport inspect\nimport logging\nimport warnings\ntry:\n import simplejson as json\nexcept ImportError:\n import json\n\nimport marshmallow as ma\nfrom marshmallow.compat import iteritems... | diff --git a/tests/test_core.py b/tests/test_core.py
index 7ef54215..f5d71b16 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -5,7 +5,7 @@
import pytest
import marshmallow
-from marshmallow import Schema, post_load, class_registry
+from marshmallow import Schema, post_load, class_registry, validates_sch... |
WordPress__openverse-api-197 | Dead link filtering reduces number of queryable pages
## Description
<!-- Concisely describe the bug. -->
The dead link filtering algorithm significantly limits the pages that can be retrieved.
## Reproduction
0. Go to audio search endpoint: `http://localhost:8000/v1/audio/`. Note the number of pages.
1. Go t... | [
{
"content": "import catalog.api.models as models\nimport logging as log\nimport json\nimport pprint\nfrom aws_requests_auth.aws_auth import AWSRequestsAuth\nfrom elasticsearch import Elasticsearch, RequestsHttpConnection\nfrom elasticsearch.exceptions import NotFoundError, RequestError\nfrom elasticsearch_dsl ... | [
{
"content": "import catalog.api.models as models\nimport logging as log\nimport json\nimport pprint\nfrom aws_requests_auth.aws_auth import AWSRequestsAuth\nfrom elasticsearch import Elasticsearch, RequestsHttpConnection\nfrom elasticsearch.exceptions import NotFoundError, RequestError\nfrom elasticsearch_dsl ... | diff --git a/openverse-api/catalog/api/controllers/search_controller.py b/openverse-api/catalog/api/controllers/search_controller.py
index ae2b42f80..96a233e3f 100644
--- a/openverse-api/catalog/api/controllers/search_controller.py
+++ b/openverse-api/catalog/api/controllers/search_controller.py
@@ -485,6 +485,8 @@ def... |
celery__celery-5631 | Null args in backend_cleanup task from beat.
# Checklist
- [x] I have read the relevant section in the
[contribution guide](http://docs.celeryproject.org/en/latest/contributing.html#other-bugs)
on reporting bugs.
- [x] I have checked the [issues list](https://github.com/celery/celery/issues?q=is%3Aissue+label%3... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The periodic task scheduler.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport copy\nimport errno\nimport heapq\nimport os\nimport shelve\nimport sys\nimport time\nimport traceback\nfrom calendar import timegm\nfrom collections import namedtup... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The periodic task scheduler.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport copy\nimport errno\nimport heapq\nimport os\nimport shelve\nimport sys\nimport time\nimport traceback\nfrom calendar import timegm\nfrom collections import namedtup... | diff --git a/celery/beat.py b/celery/beat.py
index 6511120a9e9..f589d89d084 100644
--- a/celery/beat.py
+++ b/celery/beat.py
@@ -384,7 +384,7 @@ def apply_async(self, entry, producer=None, advance=True, **kwargs):
task = self.app.tasks.get(entry.task)
try:
- entry_args = [v() if isinstanc... |
ipython__ipython-7513 | Temporary files in FilesWriter
I am not sure if this is a bug or not, but it was unexpected behavior for me, so I figured I'd report it.
When using `FilesWriter` with nbconvert, if you are converting multiple notebooks at once that rely on the same set of supplementary files, they do get copied to the build directory,... | [
{
"content": "# encoding: utf-8\n\"\"\"\nUtilities for path handling.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport os\nimport sys\nimport errno\nimport shutil\nimport random\nimport tempfile\nimport glob\nfrom warnings import warn\nfr... | [
{
"content": "# encoding: utf-8\n\"\"\"\nUtilities for path handling.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport os\nimport sys\nimport errno\nimport shutil\nimport random\nimport tempfile\nimport glob\nfrom warnings import warn\nfr... | diff --git a/IPython/utils/path.py b/IPython/utils/path.py
index 9b764c95a81..1802173d406 100644
--- a/IPython/utils/path.py
+++ b/IPython/utils/path.py
@@ -554,6 +554,12 @@ def link_or_copy(src, dst):
link_errno = link(src, dst)
if link_errno == errno.EEXIST:
+ if os.stat(src).st_ino == os.stat(dst)... |
goauthentik__authentik-3114 | [Gitea] Authentication sources with non-lowercase names do not work
When creating an authentication source from Gitea (OAuth), if one supplies a name with uppercase letters in it, the callback URL returned by Authentik will be all lowercase and thus does not match the authentication source in Gitea.
Jenkins login broke... | [
{
"content": "\"\"\"authentik OAuth2 Token views\"\"\"\nfrom base64 import urlsafe_b64encode\nfrom dataclasses import InitVar, dataclass\nfrom hashlib import sha256\nfrom re import error as RegexError\nfrom re import fullmatch\nfrom typing import Any, Optional\n\nfrom django.http import HttpRequest, HttpRespons... | [
{
"content": "\"\"\"authentik OAuth2 Token views\"\"\"\nfrom base64 import urlsafe_b64encode\nfrom dataclasses import InitVar, dataclass\nfrom hashlib import sha256\nfrom re import error as RegexError\nfrom re import fullmatch\nfrom typing import Any, Optional\n\nfrom django.http import HttpRequest, HttpRespons... | diff --git a/authentik/providers/oauth2/views/token.py b/authentik/providers/oauth2/views/token.py
index 8aeb5d5481a7..1b2840a84363 100644
--- a/authentik/providers/oauth2/views/token.py
+++ b/authentik/providers/oauth2/views/token.py
@@ -87,7 +87,7 @@ def parse(
provider=provider,
client_id=c... |
digitalfabrik__integreat-cms-632 | get_last_root_page template tag not working
### Describe the Bug
<!-- A clear and concise description of what the bug is. -->
The `get_last_root_page` template tag is not working:
https://github.com/Integreat/integreat-cms/blob/develop/src/cms/templatetags/page_filters.py#L10-L20
This is because in the page Query... | [
{
"content": "\"\"\"\nThis is a collection of tags and filters for :class:`~cms.models.pages.page.Page` objects.\n\"\"\"\nfrom django import template\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef get_last_root_page(pages):\n \"\"\"\n This tag returns the last page on the root level.\n\n ... | [
{
"content": "\"\"\"\nThis is a collection of tags and filters for :class:`~cms.models.pages.page.Page` objects.\n\"\"\"\nfrom django import template\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef get_last_root_page(pages):\n \"\"\"\n This tag returns the last page on the root level.\n\n ... | diff --git a/src/cms/templatetags/page_filters.py b/src/cms/templatetags/page_filters.py
index 1b5184967e..a82c96f2a3 100644
--- a/src/cms/templatetags/page_filters.py
+++ b/src/cms/templatetags/page_filters.py
@@ -12,9 +12,9 @@ def get_last_root_page(pages):
This tag returns the last page on the root level.
... |
pex-tool__pex-483 | Extend wheel ABI support for pypy.
pypy version:
```
$ pypy
Python 2.7.10 (246c9cf22037b11dc0e8c29ce3f291d3b8c5935a, Mar 10 2016, 18:28:19)
[PyPy 5.0.0 with GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>>
```
The following c... | [
{
"content": "# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import\n\nfrom collections import namedtuple\n\nfrom .pep425tags import get_abbr_impl, get_abi_tag, get_impl_ver, get_platform, get... | [
{
"content": "# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import\n\nfrom collections import namedtuple\n\nfrom .pep425tags import get_abbr_impl, get_abi_tag, get_impl_ver, get_platform, get... | diff --git a/pex/platforms.py b/pex/platforms.py
index b05edae45..132f4dfb9 100644
--- a/pex/platforms.py
+++ b/pex/platforms.py
@@ -49,8 +49,10 @@ def create(cls, platform):
@staticmethod
def _maybe_prefix_abi(impl, version, abi):
- # N.B. This permits users to pass in simpler extended platform strings like... |
Flexget__Flexget-1369 | Discover from iptorrents: 'NoneType' object has no attribute 'findAll'
The `iptorrents` plugin is unable to find and produce entries from searches.
### Expected behaviour:
Expected search plugin `iptorrents` to produce entries when used with `discover`.
### Actual behaviour:
Critical error was returned, see below:
`... | [
{
"content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # pylint: disable=unused-import, redefined-builtin\nfrom future.moves.urllib.parse import quote_plus\n\nimport re\nimport logging\n\nfrom flexget import plugin\nfrom flexget.config_schema import one_or_more... | [
{
"content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # pylint: disable=unused-import, redefined-builtin\nfrom future.moves.urllib.parse import quote_plus\n\nimport re\nimport logging\n\nfrom flexget import plugin\nfrom flexget.config_schema import one_or_more... | diff --git a/flexget/plugins/sites/iptorrents.py b/flexget/plugins/sites/iptorrents.py
index 9ef93530e4..c73c6c7749 100644
--- a/flexget/plugins/sites/iptorrents.py
+++ b/flexget/plugins/sites/iptorrents.py
@@ -141,7 +141,7 @@ def search(self, task, entry, config=None):
raise plugin.PluginError("Invali... |
paperless-ngx__paperless-ngx-3347 | [BUG] Owner of new correspondent is automatically set by backend, creates visibility issue
### Description
Currently when creating a new correspondent and purposefully leaving the owner empty, it gets set to the current user anyway when saving. In a multi-user environment this means the new correspondent won't be visi... | [
{
"content": "import datetime\nimport math\nimport re\n\nfrom celery import states\n\ntry:\n import zoneinfo\nexcept ImportError:\n from backports import zoneinfo\nimport magic\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group\nfrom django.contrib.auth.models import User\nfro... | [
{
"content": "import datetime\nimport math\nimport re\n\nfrom celery import states\n\ntry:\n import zoneinfo\nexcept ImportError:\n from backports import zoneinfo\nimport magic\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group\nfrom django.contrib.auth.models import User\nfro... | diff --git a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts
index 2ac7f2d99ac..89aa68f8426 100644
--- a/src-ui/src/app/components/common/edit-dia... |
aws__sagemaker-python-sdk-978 | transformer() method for an SKLearn estimator is failing
Please fill out the form below.
### System Information
- **Framework (e.g. TensorFlow) / Algorithm (e.g. KMeans)**: SKLearn
- **Framework Version**: sagemaker 1.36.1
- **Python Version**: 3.6
- **CPU or GPU**: CPU
- **Python SDK Version**: sagemaker 1.36.... | [
{
"content": "# Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.... | [
{
"content": "# Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.... | diff --git a/src/sagemaker/sklearn/estimator.py b/src/sagemaker/sklearn/estimator.py
index 45c5ad665f..b6b5685e45 100644
--- a/src/sagemaker/sklearn/estimator.py
+++ b/src/sagemaker/sklearn/estimator.py
@@ -151,6 +151,12 @@ def create_model(
object. See :func:`~sagemaker.sklearn.model.SKLearnModel` for ful... |
open-telemetry__opentelemetry-python-contrib-210 | Add database_index attribute for redis instrumentation when db is not 0
Prior discussion [here](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/184#discussion_r528913282).
The spec says for redis if db is not 0 it should have `db.redis.database_index` set to the index of the database being access... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/util.py b/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/util.py
index f2ac71a360..8898dab9f8 100644
--- a/instrumentation/opentelemetry-instrumentation-redis/src/opentel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.