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 ⌀ |
|---|---|---|---|---|
streamlink__streamlink-3887 | Change default HLS playlist reload time to 6 seconds rather than 15 to meet HLS spec recommendation
### Checklist
- [X] This is a feature request and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-stream... | [
{
"content": "import logging\nimport re\nimport struct\nfrom collections import OrderedDict, defaultdict\nfrom concurrent.futures import Future\nfrom threading import Event\nfrom typing import List, NamedTuple, Optional, Union\nfrom urllib.parse import urlparse\n\n# noinspection PyPackageRequirements\nfrom Cryp... | [
{
"content": "import logging\nimport re\nimport struct\nfrom collections import OrderedDict, defaultdict\nfrom concurrent.futures import Future\nfrom threading import Event\nfrom typing import List, NamedTuple, Optional, Union\nfrom urllib.parse import urlparse\n\n# noinspection PyPackageRequirements\nfrom Cryp... | diff --git a/src/streamlink/stream/hls.py b/src/streamlink/stream/hls.py
index e6babb9c31f..13a8766428c 100644
--- a/src/streamlink/stream/hls.py
+++ b/src/streamlink/stream/hls.py
@@ -217,7 +217,7 @@ def __init__(self, *args, **kwargs):
self.playlist_end: Optional[Sequence.num] = None
self.playlist_s... |
cloud-custodian__cloud-custodian-9103 | Handle aws-iso region
### Describe the feature
Currently, c7n is hard coded to only handle 'aws', 'aws-us-gov', and 'aws-cn' partitions. My team works in the 'aws-iso' partition. To support working in the 'aws-iso' region, a small change to the [list of hardcoded regions](https://github.com/cloud-custodian/cloud-custo... | [
{
"content": "# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom c7n.provider import clouds, Provider\n\nfrom collections import Counter, namedtuple\nimport contextlib\nimport copy\nimport datetime\nimport itertools\nimport logging\nimport os\nimport operator\nimport socket\... | [
{
"content": "# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom c7n.provider import clouds, Provider\n\nfrom collections import Counter, namedtuple\nimport contextlib\nimport copy\nimport datetime\nimport itertools\nimport logging\nimport os\nimport operator\nimport socket\... | diff --git a/c7n/resources/aws.py b/c7n/resources/aws.py
index e4b7646418a..de7aee08e27 100644
--- a/c7n/resources/aws.py
+++ b/c7n/resources/aws.py
@@ -855,10 +855,10 @@ def get_service_region_map(regions, resource_types, provider='aws'):
resource_service_map = {
r: clouds[provider].resources.get(r).reso... |
pypa__setuptools-3046 | [BUG] Issue with local distutils override, duplicate module entries
### setuptools version
60.5.0
### Python version
3.9.9
### OS
macOS
### Additional environment information
edit(jaraco): ~~I explicitly state that I DO NOT AGREE with being forced to agree with the PSF Code of Conduct to submit thi... | [
{
"content": "# don't import any costly modules\nimport sys\nimport os\n\n\nis_pypy = '__pypy__' in sys.builtin_module_names\n\n\ndef warn_distutils_present():\n if 'distutils' not in sys.modules:\n return\n if is_pypy and sys.version_info < (3, 7):\n # PyPy for 3.6 unconditionally imports d... | [
{
"content": "# don't import any costly modules\nimport sys\nimport os\n\n\nis_pypy = '__pypy__' in sys.builtin_module_names\n\n\ndef warn_distutils_present():\n if 'distutils' not in sys.modules:\n return\n if is_pypy and sys.version_info < (3, 7):\n # PyPy for 3.6 unconditionally imports d... | diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py
index c6f7de6066..605a6edc7c 100644
--- a/_distutils_hack/__init__.py
+++ b/_distutils_hack/__init__.py
@@ -57,6 +57,7 @@ def ensure_local_distutils():
# check that submodules load as expected
core = importlib.import_module('distutils.core... |
pallets__werkzeug-1740 | _dump_date year conversion doesn't zfill(4)
I have some dates that have a year before year 1000 and the _dump_date function doesn't represent them as zero filled to 4 so parsing the output with '%a, %d %b %Y %H:%M:%S %Z' throws an exception.
```
index b428ceeb..d233d0f2 100644
--- a/src/werkzeug/http.py
+++ b/src... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.http\n ~~~~~~~~~~~~~\n\n Werkzeug comes with a bunch of utilities that help Werkzeug to deal with\n HTTP data. Most of the classes and functions provided by this module are\n used by the wrappers, but they are useful on their own, too, esp... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.http\n ~~~~~~~~~~~~~\n\n Werkzeug comes with a bunch of utilities that help Werkzeug to deal with\n HTTP data. Most of the classes and functions provided by this module are\n used by the wrappers, but they are useful on their own, too, esp... | diff --git a/CHANGES.rst b/CHANGES.rst
index 6c77093cc..ee0deb617 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -10,6 +10,8 @@ Unreleased
- Only allow a single access control allow origin value. :pr:`1723`
- Fix crash when trying to parse a non-existent Content Security
Policy header. :pr:`1731`
+- ``http_... |
uclapi__uclapi-3515 | [BUG] AttributeError /dashboard/api/analytics/quota
**Describe the bug**
`AttributeError` `/dashboard/api/analytics/quota`
`NoneType` object has no attribute 'user'
**To Reproduce**
Steps to reproduce the behavior:
1. `https://uclapi.com/dashboard/api/analytics/quota`
2. HTTP 500
**Expected behavior**
Not... | [
{
"content": "import json\nimport redis\nfrom django.db.models import Count\n\nfrom django.http import JsonResponse\nfrom django.utils.datastructures import MultiValueDictKeyError\nfrom django.utils.datetime_safe import datetime\n\nfrom oauth.models import OAuthToken\nfrom oauth.scoping import Scopes\nfrom comm... | [
{
"content": "import json\nimport redis\nfrom django.db.models import Count\n\nfrom django.http import JsonResponse\nfrom django.utils.datastructures import MultiValueDictKeyError\nfrom django.utils.datetime_safe import datetime\n\nfrom oauth.models import OAuthToken\nfrom oauth.scoping import Scopes\nfrom comm... | diff --git a/backend/uclapi/dashboard/api_applications.py b/backend/uclapi/dashboard/api_applications.py
index 1208ce8db..fa9744999 100644
--- a/backend/uclapi/dashboard/api_applications.py
+++ b/backend/uclapi/dashboard/api_applications.py
@@ -481,12 +481,17 @@ def get_quota_remaining(token):
if token.startswit... |
RedHatInsights__insights-core-1861 | Insights Archive spec is Incorrect
In #1817 the spec for the `aws_instance_type` insights archive should be the mangled version of the `python -m` command as specified in [insights core assets PR 132](https://github.com/RedHatInsights/insights-core-assets/pull/132) instead of the `curl` command.
| [
{
"content": "from insights.core.spec_factory import first_of, glob_file, simple_file, head\nfrom functools import partial\nfrom insights.core.context import HostArchiveContext\nfrom insights.specs import Specs\n\nsimple_file = partial(simple_file, context=HostArchiveContext)\nglob_file = partial(glob_file, con... | [
{
"content": "from insights.core.spec_factory import first_of, glob_file, simple_file, head\nfrom functools import partial\nfrom insights.core.context import HostArchiveContext\nfrom insights.specs import Specs\n\nsimple_file = partial(simple_file, context=HostArchiveContext)\nglob_file = partial(glob_file, con... | diff --git a/insights/specs/insights_archive.py b/insights/specs/insights_archive.py
index 7ed78b4b71..c547359b49 100644
--- a/insights/specs/insights_archive.py
+++ b/insights/specs/insights_archive.py
@@ -11,7 +11,7 @@ class InsightsArchiveSpecs(Specs):
all_installed_rpms = glob_file("insights_commands/rpm_-qa... |
bridgecrewio__checkov-5413 | CKV_AWS_299 Fails for Values That Can't be Set
**Describe the issue**
Failing on - Check: CKV_AWS_299: "Ensure DMS S3 defines in-transit encryption"
When the endpoint of a DMS Migration Task has a Endpoint that is S3, there is no option in AWS to specify ssl_mode. AWS does not have an ssl_mode for DMS Endpoints of ... | [
{
"content": "from __future__ import annotations\n\nfrom typing import Any\n\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\nfrom checkov.common.models.enums import CheckCategories\n\n\nclass DMSS3DefinesIntransitEncryption(BaseResourceValueCheck):\n def __ini... | [
{
"content": null,
"path": "checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py"
}
] | diff --git a/checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py b/checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py
deleted file mode 100644
index 88ed442b81..0000000000
--- a/checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py
+++ /dev/null
@@ -1,24 +0,... |
pre-commit__pre-commit-83 | pre-commit crashes when running during unresolved merge conflict
I intentionally forced the following by making two branches conflict and then editing a file on that branch. `pre-commit` should fail-fast in a merge conflict situation.
```
$ git diff --exit-code
diff --cc foo.txt
index 8ff26e7,c148433..0000000
--- a/f... | [
{
"content": "from __future__ import print_function\n\nimport logging\nimport os\nimport pkg_resources\nimport shutil\nimport stat\nimport subprocess\nimport sys\nfrom asottile.ordereddict import OrderedDict\nfrom asottile.yaml import ordered_dump\nfrom asottile.yaml import ordered_load\nfrom plumbum import loc... | [
{
"content": "from __future__ import print_function\n\nimport logging\nimport os\nimport pkg_resources\nimport shutil\nimport stat\nimport subprocess\nimport sys\nfrom asottile.ordereddict import OrderedDict\nfrom asottile.yaml import ordered_dump\nfrom asottile.yaml import ordered_load\nfrom plumbum import loc... | diff --git a/pre_commit/commands.py b/pre_commit/commands.py
index ac9d44878..33e36879f 100644
--- a/pre_commit/commands.py
+++ b/pre_commit/commands.py
@@ -229,11 +229,21 @@ def _run_hook(runner, hook_id, args, write):
return 1
+def _has_unmerged_paths(runner):
+ _, stdout, _ = runner.cmd_runner.run(['... |
pre-commit__pre-commit-1011 | FileExistsError : [WinError 183] Cannot create a file when that file already exists
version : 1.15.2
OS : Windows 10
```console
$ pre-commit install
An unexpected error has occurred: FileExistsError: [WinError 183] Cannot create a file when that file already exists: '.git\\hooks\\pre-commit' -> '.git\\hooks\\pr... | [
{
"content": "from __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport io\nimport itertools\nimport logging\nimport os.path\nimport sys\n\nfrom pre_commit import git\nfrom pre_commit import output\nfrom pre_commit.clientlib import load_config\nfrom pre_commit.repository import al... | [
{
"content": "from __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport io\nimport itertools\nimport logging\nimport os.path\nimport shutil\nimport sys\n\nfrom pre_commit import git\nfrom pre_commit import output\nfrom pre_commit.clientlib import load_config\nfrom pre_commit.repos... | diff --git a/pre_commit/commands/install_uninstall.py b/pre_commit/commands/install_uninstall.py
index 5f9f5c392..701afccb3 100644
--- a/pre_commit/commands/install_uninstall.py
+++ b/pre_commit/commands/install_uninstall.py
@@ -5,6 +5,7 @@
import itertools
import logging
import os.path
+import shutil
import sys
... |
pulp__pulpcore-2665 | Improve proxy connection failure error message
Raise a more informative error message when the proxy rejects requests from Pulp
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2047485
| [
{
"content": "import logging\n\nimport aiohttp\nimport asyncio\nimport backoff\n\nfrom .base import BaseDownloader, DownloadResult\nfrom pulpcore.exceptions import (\n DigestValidationError,\n SizeValidationError,\n TimeoutException,\n)\n\n\nlog = logging.getLogger(__name__)\n\n\nlogging.getLogger(\"ba... | [
{
"content": "import logging\n\nimport aiohttp\nimport asyncio\nimport backoff\n\nfrom .base import BaseDownloader, DownloadResult\nfrom pulpcore.exceptions import (\n DigestValidationError,\n SizeValidationError,\n TimeoutException,\n)\n\n\nlog = logging.getLogger(__name__)\n\n\nlogging.getLogger(\"ba... | diff --git a/CHANGES/2654.bugfix b/CHANGES/2654.bugfix
new file mode 100644
index 0000000000..304ad33a16
--- /dev/null
+++ b/CHANGES/2654.bugfix
@@ -0,0 +1 @@
+Improved the error message when HTTP proxies reject requests from Pulp.
diff --git a/pulpcore/download/http.py b/pulpcore/download/http.py
index 2b1b72df43..a66... |
tobymao__sqlglot-3367 | Timestamp trunc method issue from postgres to MySQL
I was trying to convert an SQL query from Postgres to MySQL. Check the following code snippet
```
import sqlglot
sqlglot.transpile("SELECT date_trunc('hour', timestamp '2001-02-16 20:38:40') FROM dual", read="postgres", write="mysql")
```
This returns
`["... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n Dialect,\n NormalizationStrategy,\n arrow_json_extract_sql,\n date_add_interval_sql,\n datestrtodate_sql,\n build_f... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n Dialect,\n NormalizationStrategy,\n arrow_json_extract_sql,\n date_add_interval_sql,\n datestrtodate_sql,\n build_f... | diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py
index 03576d29e5..7b4d0e496a 100644
--- a/sqlglot/dialects/mysql.py
+++ b/sqlglot/dialects/mysql.py
@@ -867,3 +867,16 @@ def chr_sql(self, expression: exp.Chr) -> str:
charset = expression.args.get("charset")
using = f" USING {... |
OpenNMT__OpenNMT-py-303 | small bug with truncated decoding and tgt feature concat.
I'm running https://github.com/Henry-E/opennmt-gen and getting an error with matrix multiplication.
` File "/home/henrye/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/autograd/_functions/blas.py", line 26, in forward
matrix1, matrix2, out=output... | [
{
"content": "from __future__ import division\n\"\"\"\nThis is the loadable seq2seq trainer library that is\nin charge of training details, loss compute, and statistics.\nSee train.py for a use case of this library.\n\nNote!!! To make this a general library, we implement *only*\nmechanism things here(i.e. what ... | [
{
"content": "from __future__ import division\n\"\"\"\nThis is the loadable seq2seq trainer library that is\nin charge of training details, loss compute, and statistics.\nSee train.py for a use case of this library.\n\nNote!!! To make this a general library, we implement *only*\nmechanism things here(i.e. what ... | diff --git a/onmt/Trainer.py b/onmt/Trainer.py
index a04d44c970..8f9647ef93 100644
--- a/onmt/Trainer.py
+++ b/onmt/Trainer.py
@@ -106,12 +106,12 @@ def train(self, epoch, report_func=None):
_, src_lengths = batch.src
src = onmt.IO.make_features(batch, 'src')
- tgt = onmt.IO.make_... |
kivy__kivy-2292 | touch grab doesn't work for weakproxy
If you pass a weakproxy to `MotionEvent.grab()`, a `TypeError` is raised as you cannot create a weakref to a weakproxy. This can be worked around by changing the following line in `MotionEvent.grab()`:
```
class_instance = weakref.ref(class_instance)
```
to this:
```
try:
cl... | [
{
"content": "'''\n.. _motionevent:\n\nMotion Event\n============\n\nThe :class:`MotionEvent` is the base class used for every touch and non-touch\nevent. This class defines all the properties and methods needed to\nhandle 2D and 3D movements but has many more capabilities.\n\n.. note::\n\n You never create ... | [
{
"content": "'''\n.. _motionevent:\n\nMotion Event\n============\n\nThe :class:`MotionEvent` is the base class used for every touch and non-touch\nevent. This class defines all the properties and methods needed to\nhandle 2D and 3D movements but has many more capabilities.\n\n.. note::\n\n You never create ... | diff --git a/kivy/input/motionevent.py b/kivy/input/motionevent.py
index ef825daeb9..bcd3a0cb8c 100644
--- a/kivy/input/motionevent.py
+++ b/kivy/input/motionevent.py
@@ -320,7 +320,11 @@ def on_touch_up(self, touch):
raise Exception('Grab works only for Touch MotionEvents.')
if self.grab_exclusiv... |
ESMCI__cime-4326 | Add "set_value" method to CIME.BuildTools.configure.FakeCase so that user can add needed variables
In principle this is a simple change, but I want to make sure it's acceptable. I'd like to add a set_value method to the FakeCase class in CIME.BuiltTools.configure so that the user can add the variables they want to have... | [
{
"content": "#!/usr/bin/env python3\n\n\"\"\"This script writes CIME build information to a directory.\n\nThe pieces of information that will be written include:\n\n1. Machine-specific build settings (i.e. the \"Macros\" file).\n2. File-specific build settings (i.e. \"Depends\" files).\n3. Environment variable... | [
{
"content": "#!/usr/bin/env python3\n\n\"\"\"This script writes CIME build information to a directory.\n\nThe pieces of information that will be written include:\n\n1. Machine-specific build settings (i.e. the \"Macros\" file).\n2. File-specific build settings (i.e. \"Depends\" files).\n3. Environment variable... | diff --git a/CIME/BuildTools/configure.py b/CIME/BuildTools/configure.py
index f4f9a5c1c37..4cd9059e5db 100755
--- a/CIME/BuildTools/configure.py
+++ b/CIME/BuildTools/configure.py
@@ -153,6 +153,10 @@ def __init__(self, compiler, mpilib, debug, comp_interface, threading=False):
def get_build_threaded(self):
... |
litestar-org__litestar-2885 | Docs: Channels run_in_background.py example does not work
### Summary
Hi,
i just tried to run the channels example "run_in_background.py" from the [website](https://docs.litestar.dev/2/usage/channels.html) (which translates to [run_in_background.py](https://github.com/litestar-org/litestar/blob/main/docs/examples... | [
{
"content": "from litestar import Litestar, WebSocket, websocket\nfrom litestar.channels import ChannelsPlugin\nfrom litestar.channels.backends.memory import MemoryChannelsBackend\n\n\n@websocket(\"/ws\")\nasync def handler(socket: WebSocket, channels: ChannelsPlugin) -> None:\n await socket.accept()\n\n ... | [
{
"content": "from litestar import Litestar, WebSocket, websocket\nfrom litestar.channels import ChannelsPlugin\nfrom litestar.channels.backends.memory import MemoryChannelsBackend\n\n\n@websocket(\"/ws\")\nasync def handler(socket: WebSocket, channels: ChannelsPlugin) -> None:\n await socket.accept()\n\n ... | diff --git a/docs/examples/channels/run_in_background.py b/docs/examples/channels/run_in_background.py
index 97b4d2e599..20d389a13d 100644
--- a/docs/examples/channels/run_in_background.py
+++ b/docs/examples/channels/run_in_background.py
@@ -7,13 +7,13 @@
async def handler(socket: WebSocket, channels: ChannelsPlugin)... |
scrapy__scrapy-5691 | Warning: Unable to determine whether or not callable is a generator with a return value [unable to parse decorated class methods]
### Description
If you have a decorated spider method, `scrapy.utils.misc` [throws a warning](https://github.com/scrapy/scrapy/blob/master/scrapy/utils/misc.py#L240-L264) saying that it c... | [
{
"content": "\"\"\"Helper functions which don't fit anywhere else\"\"\"\nimport ast\nimport inspect\nimport os\nimport re\nimport hashlib\nimport warnings\nfrom collections import deque\nfrom contextlib import contextmanager\nfrom importlib import import_module\nfrom pkgutil import iter_modules\n\nfrom w3lib.h... | [
{
"content": "\"\"\"Helper functions which don't fit anywhere else\"\"\"\nimport ast\nimport inspect\nimport os\nimport re\nimport hashlib\nimport warnings\nfrom collections import deque\nfrom contextlib import contextmanager\nfrom importlib import import_module\nfrom pkgutil import iter_modules\n\nfrom w3lib.h... | diff --git a/scrapy/utils/misc.py b/scrapy/utils/misc.py
index 1221b39b229..4d4fb9600f0 100644
--- a/scrapy/utils/misc.py
+++ b/scrapy/utils/misc.py
@@ -226,7 +226,14 @@ def returns_none(return_node):
return value is None or isinstance(value, ast.NameConstant) and value.value is None
if inspect.isgenera... |
interactions-py__interactions.py-659 | [BUG] NoneType exception when using extension_autocomplete and disable_sync=True
### Describe the bug.
When attempting to register an autocomplete callback inside an extension with `disable_sync=True`, a NoneType exception occurs
### List the steps.
Define a command with autocomplete option and an autocomplete callb... | [
{
"content": "import re\nimport sys\nfrom asyncio import get_event_loop, iscoroutinefunction\nfrom functools import wraps\nfrom importlib import import_module\nfrom importlib.util import resolve_name\nfrom inspect import getmembers\nfrom logging import Logger\nfrom types import ModuleType\nfrom typing import An... | [
{
"content": "import re\nimport sys\nfrom asyncio import get_event_loop, iscoroutinefunction\nfrom functools import wraps\nfrom importlib import import_module\nfrom importlib.util import resolve_name\nfrom inspect import getmembers\nfrom logging import Logger\nfrom types import ModuleType\nfrom typing import An... | diff --git a/interactions/client.py b/interactions/client.py
index e5040ed38..9a6b62745 100644
--- a/interactions/client.py
+++ b/interactions/client.py
@@ -849,7 +849,7 @@ async def autocomplete_choice_list(ctx, user_input: str = ""):
elif isinstance(command, str):
_command_obj: ApplicationComman... |
psf__black-2970 | `#fmt:skip` causes NTERNAL ERROR: Black produced different code on the second pass of the formatter
**Describe the bug**
A comment `#fmt:skip` with no internal space causes `INTERNAL ERROR: Black produced different code on the second pass of the formatter`
Also the same code, if run with `--fast` creates incorrec... | [
{
"content": "import sys\nfrom dataclasses import dataclass\nfrom functools import lru_cache\nimport re\nfrom typing import Iterator, List, Optional, Union\n\nif sys.version_info >= (3, 8):\n from typing import Final\nelse:\n from typing_extensions import Final\n\nfrom blib2to3.pytree import Node, Leaf\nf... | [
{
"content": "import sys\nfrom dataclasses import dataclass\nfrom functools import lru_cache\nimport re\nfrom typing import Iterator, List, Optional, Union\n\nif sys.version_info >= (3, 8):\n from typing import Final\nelse:\n from typing_extensions import Final\n\nfrom blib2to3.pytree import Node, Leaf\nf... | diff --git a/CHANGES.md b/CHANGES.md
index 30c00566b3c..23dc176e627 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -10,6 +10,9 @@
<!-- Changes that affect Black's stable style -->
+- Fix unstable formatting involving `# fmt: skip` comments without internal spaces
+ (#2970)
+
### Preview style
<!-- Changes that a... |
scrapy__scrapy-4207 | Scrapy does not use a non-zero exit code when pipeline's open_spider throws the exception
<!--
Thanks for taking an interest in Scrapy!
If you have a question that starts with "How to...", please see the Scrapy Community page: https://scrapy.org/community/.
The GitHub issue tracker's purpose is to deal with bug ... | [
{
"content": "import os\nfrom scrapy.commands import ScrapyCommand\nfrom scrapy.utils.conf import arglist_to_dict\nfrom scrapy.utils.python import without_none_values\nfrom scrapy.exceptions import UsageError\n\n\nclass Command(ScrapyCommand):\n\n requires_project = True\n\n def syntax(self):\n ret... | [
{
"content": "import os\nfrom scrapy.commands import ScrapyCommand\nfrom scrapy.utils.conf import arglist_to_dict\nfrom scrapy.utils.python import without_none_values\nfrom scrapy.exceptions import UsageError\n\n\nclass Command(ScrapyCommand):\n\n requires_project = True\n\n def syntax(self):\n ret... | diff --git a/scrapy/commands/crawl.py b/scrapy/commands/crawl.py
index 8093fd40295..7b417e2eba4 100644
--- a/scrapy/commands/crawl.py
+++ b/scrapy/commands/crawl.py
@@ -54,8 +54,13 @@ def run(self, args, opts):
raise UsageError("running 'scrapy crawl' with more than one spider is no longer supported")
... |
LMFDB__lmfdb-4241 | Bad links on HMF browse pages
A report from the bug report system, from Paul Gunnells:
"On
https://www.lmfdb.org/ModularForm/GL2/TotallyReal/browse/2/
the links in the middle column (the Number of newforms column) are all the same and point to https://www.lmfdb.org/ModularForm/GL2/TotallyReal/?field_label=... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom flask import url_for\nfrom lmfdb import db\nfrom lmfdb.utils import comma\nfrom lmfdb.utils.display_stats import StatsDisplay, proportioners, totaler\nfrom lmfdb.logger import make_logger\nfrom lmfdb.number_fields.web_number_field import nf_display_knowl\nfrom sage.mi... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom flask import url_for\nfrom lmfdb import db\nfrom lmfdb.utils import comma\nfrom lmfdb.utils.display_stats import StatsDisplay, proportioners, totaler\nfrom lmfdb.logger import make_logger\nfrom lmfdb.number_fields.web_number_field import nf_display_knowl\nfrom sage.mi... | diff --git a/lmfdb/hilbert_modular_forms/hmf_stats.py b/lmfdb/hilbert_modular_forms/hmf_stats.py
index 2538c4bbda..49b576e292 100644
--- a/lmfdb/hilbert_modular_forms/hmf_stats.py
+++ b/lmfdb/hilbert_modular_forms/hmf_stats.py
@@ -97,7 +97,7 @@ def statistics(self, d=None):
"counts": {F: {"nforms"... |
easybuilders__easybuild-framework-3993 | allow --copy-ec for installed modules without requiring --rebuild
Currently, trying to use `--copy-ec` when the module already exists gives the message:
```
== category/software/version is already installed (module found), skipping
== No easyconfigs left to be built.
```
since nothing is being (re)built when `--co... | [
{
"content": "#!/usr/bin/env python\n# #\n# Copyright 2009-2022 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https:/... | [
{
"content": "#!/usr/bin/env python\n# #\n# Copyright 2009-2022 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https:/... | diff --git a/easybuild/main.py b/easybuild/main.py
index 61d27b3089..c43c0583df 100644
--- a/easybuild/main.py
+++ b/easybuild/main.py
@@ -447,7 +447,7 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None):
forced = options.force or options.rebuild
dry_run_mode = options.dry_run or ... |
GPflow__GPflow-1164 | GPflow2 set_default_float and set_default_int accept tf dtypes but that breaks code
Some functions such as the Gauss-Hermite quadrature code call `numpy_array.astype(default_float())`, which fails if `default_float()` returns a *tensorflow* dtype such as `tf.float64` instead of `np.float64`. However, `gpflow.config.set... | [
{
"content": "import contextlib\nimport enum\nimport os\nfrom dataclasses import dataclass, field, replace\nfrom typing import Dict, Optional, Union\n\nimport numpy as np\nimport tabulate\nimport tensorflow as tf\nimport tensorflow_probability as tfp\n\n\n__all__ = [\n \"Config\", \"as_context\", \"config\",... | [
{
"content": "import contextlib\nimport enum\nimport os\nfrom dataclasses import dataclass, field, replace\nfrom typing import Dict, Optional, Union\n\nimport numpy as np\nimport tabulate\nimport tensorflow as tf\nimport tensorflow_probability as tfp\n\n\n__all__ = [\n \"Config\", \"as_context\", \"config\",... | diff --git a/gpflow/config/__config__.py b/gpflow/config/__config__.py
index 56a54943a..27acaa68f 100644
--- a/gpflow/config/__config__.py
+++ b/gpflow/config/__config__.py
@@ -114,7 +114,7 @@ def set_default_int(value_type):
if not tf_dtype.is_integer:
raise TypeError(f"{value_type} is not an integer dty... |
xorbitsai__inference-800 | RuntimeError: Cluster is not available after multiple attempts
### Describe the bug
A clear and concise description of what the bug is.
### To Reproduce
To help us to reproduce this bug, please provide information below:
1. Your Python version.
2. The version of xinference you use.
3. Versions of crucial pack... | [
{
"content": "# Copyright 2022-2023 XProbe 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 ap... | [
{
"content": "# Copyright 2022-2023 XProbe 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 ap... | diff --git a/xinference/core/worker.py b/xinference/core/worker.py
index a69397d344..99ce1a1958 100644
--- a/xinference/core/worker.py
+++ b/xinference/core/worker.py
@@ -106,14 +106,17 @@ async def __post_create__(self):
),
}
- async def singal_handler():
- await self._supervi... |
beetbox__beets-4198 | spotify: Use pagination to fetch beyond the first 50 tracks of a release
Not sure if this is a problem related to the plugin, or if the Spotify API doesn't serve more than 50 tracks per release. The other tracks are reported "Unmatched" during import.
| [
{
"content": "# This file is part of beets.\n# Copyright 2019, Rahul Ahuja.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitatio... | [
{
"content": "# This file is part of beets.\n# Copyright 2019, Rahul Ahuja.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitatio... | diff --git a/beetsplug/spotify.py b/beetsplug/spotify.py
index 2529160dd0..931078d286 100644
--- a/beetsplug/spotify.py
+++ b/beetsplug/spotify.py
@@ -194,9 +194,16 @@ def album_for_id(self, album_id):
)
)
+ tracks_data = album_data['tracks']
+ tracks_items = tracks_data['i... |
interlegis__sapl-1887 | Documentos administrativos: oferecer o próximo número ao adicionar
Ao adicionar novo documento administrativo, depois de selecionar o tipo, oferecer o campo Ano preenchido com o ano corrente e o campo Número preenchido com próximo número do ano corrente.
:
tipo = TipoDocumentoAdministrativo.objects.get(pk=request.GET['tipo'])
ano = re... |
pytorch__vision-5285 | There is a Difference between Torchvsion Shear and PIL Shear
### 🐛 Describe the bug
As @agaldran pointed out in the TrivialAugment repo (https://github.com/automl/trivialaugment/issues/6), there seems to be difference between the behavior of a shear implemented with the PIL and the TorchVision affine transform.
... | [
{
"content": "import math\nfrom enum import Enum\nfrom typing import List, Tuple, Optional, Dict\n\nimport torch\nfrom torch import Tensor\n\nfrom . import functional as F, InterpolationMode\n\n__all__ = [\"AutoAugmentPolicy\", \"AutoAugment\", \"RandAugment\", \"TrivialAugmentWide\"]\n\n\ndef _apply_op(\n i... | [
{
"content": "import math\nfrom enum import Enum\nfrom typing import List, Tuple, Optional, Dict\n\nimport torch\nfrom torch import Tensor\n\nfrom . import functional as F, InterpolationMode\n\n__all__ = [\"AutoAugmentPolicy\", \"AutoAugment\", \"RandAugment\", \"TrivialAugmentWide\"]\n\n\ndef _apply_op(\n i... | diff --git a/torchvision/transforms/autoaugment.py b/torchvision/transforms/autoaugment.py
index efb0cc90e8d..2c42bc375f6 100644
--- a/torchvision/transforms/autoaugment.py
+++ b/torchvision/transforms/autoaugment.py
@@ -22,6 +22,7 @@ def _apply_op(
shear=[math.degrees(magnitude), 0.0],
interp... |
kedro-org__kedro-2190 | Support full URIs in `abfss://` paths
## Description
I found a breaking change in Azure Data Lake Storage Gen 2 paths (`abfss://` protocol) when upgrading from kedro 0.17.7 to 0.18.4 that was undocumented, I was wondering if that was intentional and by design or if it's a bug that should be fixed.
In Kedro 0.17.7 ... | [
{
"content": "\"\"\"This module provides a set of classes which underpin the data loading and\nsaving functionality provided by ``kedro.io``.\n\"\"\"\n\nimport abc\nimport copy\nimport logging\nimport re\nimport warnings\nfrom collections import namedtuple\nfrom datetime import datetime, timezone\nfrom functool... | [
{
"content": "\"\"\"This module provides a set of classes which underpin the data loading and\nsaving functionality provided by ``kedro.io``.\n\"\"\"\n\nimport abc\nimport copy\nimport logging\nimport re\nimport warnings\nfrom collections import namedtuple\nfrom datetime import datetime, timezone\nfrom functool... | diff --git a/RELEASE.md b/RELEASE.md
index 769c990e46..ab45e883ed 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -17,6 +17,7 @@
* Added support for generator functions as nodes, i.e. using `yield` instead of return.
* Enable chunk-wise processing in nodes with generator functions.
* Save node outputs after every `y... |
kubeflow__pipelines-1154 | Backend Docker build fails with python error in resnet-train-pipeline.py
Ran on master branch (`086d4763d9f163acdeb423bc2bc49ab470442a92`) with `--no-cache` arg and got the following the error:
```
Step 20/31 : RUN find . -maxdepth 2 -name '*.py' -type f | while read pipeline; do dsl-compile --py "$pipeline" --outpu... | [
{
"content": "#!/usr/bin/env python3\n# Copyright 2019 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# Unl... | [
{
"content": "#!/usr/bin/env python3\n# Copyright 2019 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# Unl... | diff --git a/samples/resnet-cmle/resnet-train-pipeline.py b/samples/resnet-cmle/resnet-train-pipeline.py
index fc70a748a91..5be9deb1e49 100644
--- a/samples/resnet-cmle/resnet-train-pipeline.py
+++ b/samples/resnet-cmle/resnet-train-pipeline.py
@@ -124,7 +124,7 @@ def resnet_train(
eval_bat... |
praw-dev__praw-939 | Provide "best" sort for front page (models.Front)
The new "best" sort for the front page isn't currently available via PRAW. See [this Reddit thread](https://www.reddit.com/r/redditdev/comments/8h8ijn/how_do_you_sort_best_via_the_api/).
| [
{
"content": "\"\"\"Provide the Front class.\"\"\"\nfrom .listing.mixins import SubredditListingMixin\n\n\nclass Front(SubredditListingMixin):\n \"\"\"Front is a Listing class that represents the front page.\"\"\"\n\n def __init__(self, reddit):\n \"\"\"Initialize a Front instance.\"\"\"\n s... | [
{
"content": "\"\"\"Provide the Front class.\"\"\"\nfrom ..const import urljoin\nfrom .listing.generator import ListingGenerator\nfrom .listing.mixins import SubredditListingMixin\n\n\nclass Front(SubredditListingMixin):\n \"\"\"Front is a Listing class that represents the front page.\"\"\"\n\n def __init... | diff --git a/CHANGES.rst b/CHANGES.rst
index 9a8149b03..d86e92391 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -9,6 +9,7 @@ Unreleased
* Add method :meth:`.WikiPage.revision` to get a specific wiki page revision.
* Added parameter ``skip_existing`` to :meth:`.stream_generator` to skip
existing items when starting... |
mitmproxy__mitmproxy-6032 | Broken command argument type parsing
#### Problem Description
It seems like our command argument type parsing does not like `from __future__ import annotations`.
#### Steps to reproduce the behavior:
1. `mitmproxy`
2. `[n] [enter] [r]`
| [
{
"content": "\"\"\"\n This module manages and invokes typed commands.\n\"\"\"\nimport functools\nimport inspect\nimport logging\nimport sys\nimport textwrap\nimport types\nfrom collections.abc import Callable\nfrom collections.abc import Iterable\nfrom collections.abc import Sequence\nfrom typing import Any... | [
{
"content": "\"\"\"\n This module manages and invokes typed commands.\n\"\"\"\nimport functools\nimport inspect\nimport logging\nimport sys\nimport textwrap\nimport types\nfrom collections.abc import Callable\nfrom collections.abc import Iterable\nfrom collections.abc import Sequence\nfrom typing import Any... | diff --git a/mitmproxy/command.py b/mitmproxy/command.py
index d9b56b5848..5b12497e13 100644
--- a/mitmproxy/command.py
+++ b/mitmproxy/command.py
@@ -22,7 +22,7 @@
def verify_arg_signature(f: Callable, args: Iterable[Any], kwargs: dict) -> None:
- sig = inspect.signature(f)
+ sig = inspect.signature(f, eval... |
django-import-export__django-import-export-1007 | Format field is always shown on Django 2.2
After upgrading to Django 2.2, the `Format` field is always shown in admins where I inherit from `ImportExportActionModelAdmin`, even thougt the export action is not selected. Here is a screenshot:
:
self.abs_url = url
self.active = False
self.url_context = url_context
- self.update_date = date... |
redis__redis-py-2922 | async Sentinel is broken for pubsub
**Version**: 5.0.0
**Description**: async client with Sentinel is broken for pubsub (similar to the [issue](https://github.com/redis/redis-py/issues/2893) for synchronous one that already fixed): `redis.asyncio.client.PubSub.parse_response()` is calling `redis.asyncio.sentinel.Sen... | [
{
"content": "import asyncio\nimport random\nimport weakref\nfrom typing import AsyncIterator, Iterable, Mapping, Optional, Sequence, Tuple, Type\n\nfrom redis.asyncio.client import Redis\nfrom redis.asyncio.connection import (\n Connection,\n ConnectionPool,\n EncodableT,\n SSLConnection,\n)\nfrom ... | [
{
"content": "import asyncio\nimport random\nimport weakref\nfrom typing import AsyncIterator, Iterable, Mapping, Optional, Sequence, Tuple, Type\n\nfrom redis.asyncio.client import Redis\nfrom redis.asyncio.connection import (\n Connection,\n ConnectionPool,\n EncodableT,\n SSLConnection,\n)\nfrom ... | diff --git a/redis/asyncio/sentinel.py b/redis/asyncio/sentinel.py
index 5ed924096c..20c0a1fdd5 100644
--- a/redis/asyncio/sentinel.py
+++ b/redis/asyncio/sentinel.py
@@ -69,12 +69,14 @@ async def read_response(
timeout: Optional[float] = None,
*,
disconnect_on_error: Optional[float] = True,
... |
pulp__pulpcore-3039 | Remove orphans: Repository matching query does not exist.
**Version**
```
$ rpm -qa | grep tfm-rubygem-pulp
tfm-rubygem-pulp_certguard_client-1.5.0-1.el7.noarch
tfm-rubygem-pulp_ansible_client-0.13.1-1.el7.noarch
tfm-rubygem-pulp_deb_client-2.18.0-1.el7.noarch
tfm-rubygem-pulp_rpm_client-3.17.4-1.el7.noarch
tfm-... | [
{
"content": "from drf_spectacular.utils import extend_schema\nfrom rest_framework.views import APIView\n\nfrom pulpcore.app.loggers import deprecation_logger\nfrom pulpcore.app.response import OperationPostponedResponse\nfrom pulpcore.app.serializers import AsyncOperationResponseSerializer\nfrom pulpcore.app.t... | [
{
"content": "from drf_spectacular.utils import extend_schema\nfrom rest_framework.views import APIView\n\nfrom pulpcore.app.loggers import deprecation_logger\nfrom pulpcore.app.response import OperationPostponedResponse\nfrom pulpcore.app.serializers import AsyncOperationResponseSerializer\nfrom pulpcore.app.t... | diff --git a/CHANGES/3030.bugfix b/CHANGES/3030.bugfix
new file mode 100644
index 0000000000..dc389d112f
--- /dev/null
+++ b/CHANGES/3030.bugfix
@@ -0,0 +1 @@
+Serialized orphan cleanup tasks with respect to each other to prevent them from failing.
diff --git a/pulpcore/app/views/orphans.py b/pulpcore/app/views/orphans... |
celery__celery-5500 | SQLAlchemy's ProgrammingError exception causes a traceback when AsyncResult.ready() is called
## Checklist
- [ ] I have included the output of ``celery -A proj report`` in the issue.
(if you are not able to do this, then at least specify the Celery
version affected).
- [ ] I have verified that the is... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Result backend base classes.\n\n- :class:`BaseBackend` defines the interface.\n\n- :class:`KeyValueStoreBackend` is a common base class\n using K/V semantics like _get and _put.\n\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport datetime\n... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Result backend base classes.\n\n- :class:`BaseBackend` defines the interface.\n\n- :class:`KeyValueStoreBackend` is a common base class\n using K/V semantics like _get and _put.\n\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport datetime\n... | diff --git a/celery/backends/base.py b/celery/backends/base.py
index be17dca2201..2074a6f5bd7 100644
--- a/celery/backends/base.py
+++ b/celery/backends/base.py
@@ -278,7 +278,10 @@ def exception_to_python(self, exc):
cls = create_exception_cls(exc_type,
... |
apluslms__a-plus-474 | The exercise results page does not show that a module is open for reading while the exercises are still closed.
The UI leaves the impression that the module is completely closed (between the reading opening time and the opening time). The "opens" badge in the module box also only shows the normal open time. The UI shou... | [
{
"content": "import json\nfrom django import template\nfrom django.db.models import Max, Min\nfrom django.template.loader import render_to_string\nfrom django.utils import timezone\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom course.models import CourseModule\nfrom lib.errors import TagUsag... | [
{
"content": "import json\nfrom django import template\nfrom django.db.models import Max, Min\nfrom django.template.loader import render_to_string\nfrom django.utils import timezone\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom course.models import CourseModule\nfrom lib.errors import TagUsag... | diff --git a/exercise/templates/exercise/_user_results.html b/exercise/templates/exercise/_user_results.html
index 22db59c87..d95b86b58 100644
--- a/exercise/templates/exercise/_user_results.html
+++ b/exercise/templates/exercise/_user_results.html
@@ -24,14 +24,21 @@
{% module_accessible module as accessible %}
{% e... |
elastic__apm-agent-python-1744 | [META 735] Change default APM server_url to 'http://127.0.0.1:8200' to avoid IPv6 ambiguity
See meta issue for the description and details:
- Meta issue: https://github.com/elastic/apm/issues/735
| [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b491eb1a4..cd4423973 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -40,6 +40,7 @@ endif::[]
===== Bug fixes
* Small fix to underlying Starlette logic to prevent duplicate Client objects {pull}1735[#1735]
+* Change `server_url` default to `http... |
frappe__frappe-11558 | IMAP port settings are not updated from Email Domain to Email Account
## Description of the issue
When changing the IMAP port in an existing Email Domain, the Email Accounts using this Domain are not updated accordingly. This can lead to Frappe trying an IMAPS connection (which usually is 993) to the plain IMAP port... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors\n# For license information, please see license.txt\n\nfrom __future__ import unicode_literals\nimport frappe\nfrom frappe import _\nfrom frappe.model.document import Document\nfrom frappe.utils import val... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors\n# For license information, please see license.txt\n\nfrom __future__ import unicode_literals\nimport frappe\nfrom frappe import _\nfrom frappe.model.document import Document\nfrom frappe.utils import val... | diff --git a/frappe/email/doctype/email_domain/email_domain.py b/frappe/email/doctype/email_domain/email_domain.py
index 08583dc22836..ae47a8afb8a0 100644
--- a/frappe/email/doctype/email_domain/email_domain.py
+++ b/frappe/email/doctype/email_domain/email_domain.py
@@ -69,7 +69,7 @@ def on_update(self):
for email_a... |
freedomofpress__securedrop-2903 | PyCrypto is no longer being actively maintained
As first noted in https://github.com/freedomofpress/securedrop/issues/204#issuecomment-272338348:
> So it's come to our attention that we need to replace PyCrypto, the progress of which is pretty much stalled (e.g., [this year-old vulnerability](https://github.com/dlit... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom base64 import b32encode\nimport os\nimport subprocess\n\nfrom Crypto.Random import random\nimport gnupg\nfrom gnupg._util import _is_stream, _make_binary_stream\nimport scrypt\n\nimport config\nimport store\n\n# to fix gpg error #78 on product... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom base64 import b32encode\nimport os\nimport subprocess\n\nfrom Cryptodome.Random import random\nimport gnupg\nfrom gnupg._util import _is_stream, _make_binary_stream\nimport scrypt\n\nimport config\nimport store\n\n# to fix gpg error #78 on pro... | diff --git a/securedrop/crypto_util.py b/securedrop/crypto_util.py
index 2f9610746f..5b144bfdf5 100644
--- a/securedrop/crypto_util.py
+++ b/securedrop/crypto_util.py
@@ -5,7 +5,7 @@
import os
import subprocess
-from Crypto.Random import random
+from Cryptodome.Random import random
import gnupg
from gnupg._util i... |
Mailu__Mailu-1862 | Radicale password check fails (length limited?)
So far, the webdav radicale is protected with basic auth (apparently htaccess or similar).
If user password > 8 then it fails to connect.
we should remove this limitation to let use stong passwords
Radicale password check fails (length limited?)
So far, the webdav radi... | [
{
"content": "from mailu import models, utils\nfrom mailu.internal import internal, nginx\nfrom flask import current_app as app\n\nimport flask\nimport flask_login\nimport base64\nimport ipaddress\n\n\n@internal.route(\"/auth/email\")\ndef nginx_authentication():\n \"\"\" Main authentication endpoint for Ngi... | [
{
"content": "from mailu import models, utils\nfrom mailu.internal import internal, nginx\nfrom flask import current_app as app\n\nimport flask\nimport flask_login\nimport base64\nimport ipaddress\n\n\n@internal.route(\"/auth/email\")\ndef nginx_authentication():\n \"\"\" Main authentication endpoint for Ngi... | diff --git a/core/admin/mailu/internal/views/auth.py b/core/admin/mailu/internal/views/auth.py
index 8ff10aed3..2baeddced 100644
--- a/core/admin/mailu/internal/views/auth.py
+++ b/core/admin/mailu/internal/views/auth.py
@@ -63,7 +63,7 @@ def basic_authentication():
authorization = flask.request.headers.get("Autho... |
napari__napari-278 | Clims cannot be set to integer values
## 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
Clims cannot be set to integer values
## To Reproduce
Steps to reproduce the behavior:
```python
from napari import Window, Viewer
viewer = Viewer()
window = Window(viewer)
viewer.add_image(da... | [
{
"content": "from warnings import warn\nfrom xml.etree.ElementTree import Element\nfrom base64 import b64encode\nfrom imageio import imwrite\n\nimport numpy as np\nfrom copy import copy\n\nimport vispy.color\n\nfrom .._base_layer import Layer\nfrom ..._vispy.scene.visuals import Image as ImageNode\n\nfrom ...u... | [
{
"content": "from warnings import warn\nfrom xml.etree.ElementTree import Element\nfrom base64 import b64encode\nfrom imageio import imwrite\n\nimport numpy as np\nfrom copy import copy\n\nimport vispy.color\n\nfrom .._base_layer import Layer\nfrom ..._vispy.scene.visuals import Image as ImageNode\n\nfrom ...u... | diff --git a/examples/add_image.py b/examples/add_image.py
index ed250c88440..5b743bd7ec3 100644
--- a/examples/add_image.py
+++ b/examples/add_image.py
@@ -40,7 +40,7 @@
# change the layer colormap and color limits
layer.colormap = 'gray'
- layer.clim = (0.1, 0.9)
+ layer.clim = (0, 0.9)
# cha... |
litestar-org__litestar-1370 | Bug: msgspec version needs updating
### Description
Starlite currently needs msgspec >= 0.11.0 from here https://github.com/starlite-api/starlite/blob/8a49aff754d5b409397183eb395cac5a44193d72/pyproject.toml#L52.
Starlite uses msgspec.inspect:
https://github.com/starlite-api/starlite/blob/41089a2d5dff696a25c78a5832... | [
{
"content": "from inspect import Signature\n\nfrom msgspec.inspect import UNSET\nfrom pydantic.fields import Undefined\n\nfrom starlite.types import Empty\n\nDEFAULT_ALLOWED_CORS_HEADERS = {\"Accept\", \"Accept-Language\", \"Content-Language\", \"Content-Type\"}\nDEFAULT_CHUNK_SIZE = 1024 * 128 # 128KB\nHTTP_... | [
{
"content": "from inspect import Signature\n\nfrom pydantic.fields import Undefined\n\nfrom starlite.types import Empty\n\nDEFAULT_ALLOWED_CORS_HEADERS = {\"Accept\", \"Accept-Language\", \"Content-Language\", \"Content-Type\"}\nDEFAULT_CHUNK_SIZE = 1024 * 128 # 128KB\nHTTP_RESPONSE_BODY = \"http.response.bod... | diff --git a/pyproject.toml b/pyproject.toml
index c3b35f91c7..a0b10d8b3e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -49,7 +49,7 @@ importlib-metadata = { version = "*", python = "<3.10" }
jinja2 = { version = ">=3.1.2", optional = true }
jsbeautifier = { version = "*", optional = true }
mako = { version = ... |
mars-project__mars-1699 | [BUG] Run the example code hangs in distributed mode
<!--
Thank you for your contribution!
Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.
-->
**Describe the bug**
Create a Mars cluster and run the code in readme:
``` Python
import mars.tensor as mt
N... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2020 Alibaba Group Holding Ltd.\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://... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2020 Alibaba Group Holding Ltd.\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://... | diff --git a/mars/deploy/local/tests/test_cluster.py b/mars/deploy/local/tests/test_cluster.py
index 1c6226a2b2..89a500554b 100644
--- a/mars/deploy/local/tests/test_cluster.py
+++ b/mars/deploy/local/tests/test_cluster.py
@@ -261,11 +261,13 @@ def testSingleOutputTensorExecute(self, *_):
self.assertTrue(n... |
ethereum__web3.py-2587 | Web3 instantiation from subclass throws error
* Version: 5.30.0
* Python: 3.8
* OS: osx
* pip freeze output is intentionally omitted.
### What was wrong?
We use a sub-class of Web3, for the purpose of this example, call it SubclassWeb3, as follows:
```
class SubclassWeb3(Web3):
def __init__(self, ....):
... | [
{
"content": "import inspect\nfrom io import (\n UnsupportedOperation,\n)\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Dict,\n List,\n Optional,\n Sequence,\n Union,\n)\n\nfrom web3.exceptions import (\n ValidationError,\n)\nfrom web3.module import (\n Module,\n)\n\nif TYPE_CHEC... | [
{
"content": "import inspect\nfrom io import (\n UnsupportedOperation,\n)\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Dict,\n List,\n Optional,\n Sequence,\n Union,\n)\n\nfrom web3.exceptions import (\n ValidationError,\n)\nfrom web3.module import (\n Module,\n)\n\nif TYPE_CHEC... | diff --git a/newsfragments/2587.bugfix.rst b/newsfragments/2587.bugfix.rst
new file mode 100644
index 0000000000..46266f86c9
--- /dev/null
+++ b/newsfragments/2587.bugfix.rst
@@ -0,0 +1 @@
+Allow classes to inherit from the ``Web3`` class by attaching modules appropriately.
diff --git a/tests/core/contracts/test_implic... |
ARM-DOE__ACT-553 | Accessor not available in dataset
I fetched the latest updates after the lazy_loading PR and ran pytest and am seeing a lot of errors with accessors not loading. Clean, QCFilter, and QCTests are no longer available in the datasets for some reason.
FAILED test_io.py::test_io_mfdataset - AttributeError: 'Dataset' obj... | [
{
"content": "\"\"\"\nThis module contains procedures for working with QC information\nand for applying tests to data.\n\n\"\"\"\n\nimport lazy_loader as lazy\n\n# We need to import clean first to register the accessor\nfrom .clean import *\n\n__getattr__, __dir__, __all__ = lazy.attach(\n __name__,\n sub... | [
{
"content": "\"\"\"\nThis module contains procedures for working with QC information\nand for applying tests to data.\n\n\"\"\"\n\nimport lazy_loader as lazy\n\n# We need to import clean first to register the accessor\nfrom .clean import *\nfrom .qcfilter import QCFilter\nfrom .qctests import QCTests\n\n__geta... | diff --git a/act/__init__.py b/act/__init__.py
index 513ba2831b..8a927eaa9c 100644
--- a/act/__init__.py
+++ b/act/__init__.py
@@ -5,11 +5,13 @@
"""
import lazy_loader as lazy
+
# No more pandas warnings
from pandas.plotting import register_matplotlib_converters
from . import tests
from ._version import get_v... |
django-cms__django-filer-534 | KeyError: 'location'
``` python
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/Users/bashu/Projects/django-sigma-cms-demo/virtualenv/lib/python2.7/s... | [
{
"content": "#-*- coding: utf-8 -*-\nfrom django import forms\nfrom django.contrib.admin.util import unquote\nfrom django.core.urlresolvers import reverse\nfrom django.http import HttpResponseRedirect\nfrom django.utils.translation import ugettext as _\nfrom filer import settings\nfrom filer.admin.permissions ... | [
{
"content": "#-*- coding: utf-8 -*-\nfrom django import forms\nfrom django.contrib.admin.util import unquote\nfrom django.core.urlresolvers import reverse\nfrom django.http import HttpResponseRedirect\nfrom django.utils.translation import ugettext as _\nfrom filer import settings\nfrom filer.admin.permissions ... | diff --git a/filer/admin/fileadmin.py b/filer/admin/fileadmin.py
index 10814d3c6..2dd75797e 100644
--- a/filer/admin/fileadmin.py
+++ b/filer/admin/fileadmin.py
@@ -57,7 +57,7 @@ def response_change(self, request, obj):
instead of the default change_list_view
"""
r = super(FileAdmin, self).re... |
jazzband__django-oauth-toolkit-341 | Error when requesting an oauth access token with the same request encoding as the django default
Details in this SO question: http://stackoverflow.com/questions/34403912/when-trying-to-request-for-oauth-access-token-i-get-typeerror-encode-argumen
Error is `TypeError: encode() argument 1 must be string, not None`
| [
{
"content": "from __future__ import unicode_literals\n\nimport six\nimport base64\nimport binascii\nimport logging\nfrom datetime import timedelta\n\nfrom django.utils import timezone\nfrom django.contrib.auth import authenticate\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom oauthlib.oauth2 impo... | [
{
"content": "from __future__ import unicode_literals\n\nimport six\nimport base64\nimport binascii\nimport logging\nfrom datetime import timedelta\n\nfrom django.utils import timezone\nfrom django.conf import settings\nfrom django.contrib.auth import authenticate\nfrom django.core.exceptions import ObjectDoesN... | diff --git a/oauth2_provider/oauth2_validators.py b/oauth2_provider/oauth2_validators.py
index 25908d979..7cc6f3e18 100644
--- a/oauth2_provider/oauth2_validators.py
+++ b/oauth2_provider/oauth2_validators.py
@@ -7,6 +7,7 @@
from datetime import timedelta
from django.utils import timezone
+from django.conf import s... |
deis__deis-3272 | Domain name validation: w3.domain.com
I tried to add a domain to my app: `deis domains:add w3.domain.com`
and got the following error :
`{u'domain': [u'Hostname does not look valid.']}`
w3.domain.com is a valid domain.
| [
{
"content": "\"\"\"\nClasses to serialize the RESTful representation of Deis API models.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport json\nimport re\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\nfrom django.utils import timezone\nfrom rest_framework import s... | [
{
"content": "\"\"\"\nClasses to serialize the RESTful representation of Deis API models.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport json\nimport re\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\nfrom django.utils import timezone\nfrom rest_framework import s... | diff --git a/controller/api/serializers.py b/controller/api/serializers.py
index 361676f42f..504e0b3fc8 100644
--- a/controller/api/serializers.py
+++ b/controller/api/serializers.py
@@ -251,7 +251,8 @@ def validate_domain(self, value):
allowed = re.compile("^(?!-)[a-z0-9-]{1,63}(?<!-)$", re.IGNORECASE)
... |
mindsdb__lightwood-1074 | Expose global insights generated in the analysis phase
Lightwood can generate "global" insights that are not in a row-by-row fashion (e.g. boolean flags of some sort), but we're not exposing this in the predictor interface. ~We should fix it, somehow.~
Current thoughts:
- store global insights at the predictor le... | [
{
"content": "# TODO: _add_implicit_values unit test ensures NO changes for a fully specified file.\nfrom copy import deepcopy\nfrom type_infer.base import TypeInformation\nfrom dataprep_ml import StatisticalAnalysis\n\nfrom lightwood.helpers.templating import call, inline_dict, align\nfrom lightwood.helpers.te... | [
{
"content": "# TODO: _add_implicit_values unit test ensures NO changes for a fully specified file.\nfrom copy import deepcopy\nfrom type_infer.base import TypeInformation\nfrom dataprep_ml import StatisticalAnalysis\n\nfrom lightwood.helpers.templating import call, inline_dict, align\nfrom lightwood.helpers.te... | diff --git a/lightwood/api/json_ai.py b/lightwood/api/json_ai.py
index abfea6007..c580eb80c 100644
--- a/lightwood/api/json_ai.py
+++ b/lightwood/api/json_ai.py
@@ -1208,6 +1208,7 @@ def code_from_json_ai(json_ai: JsonAI) -> str:
else:
log.info(f'[Predict phase 4/{{n_phases}}] - Analyzing output')
insights, ... |
scikit-image__scikit-image-1904 | Add comment clarifying use of strided output array for generic_filter RAG construction
See [here](https://github.com/scikit-image/scikit-image/pull/1826/files#r48343523).
| [
{
"content": "import networkx as nx\nimport numpy as np\nfrom numpy.lib.stride_tricks import as_strided\nfrom scipy import ndimage as ndi\nfrom scipy import sparse\nimport math\nfrom ... import draw, measure, segmentation, util, color\ntry:\n from matplotlib import colors\n from matplotlib import cm\nexce... | [
{
"content": "import networkx as nx\nimport numpy as np\nfrom numpy.lib.stride_tricks import as_strided\nfrom scipy import ndimage as ndi\nfrom scipy import sparse\nimport math\nfrom ... import draw, measure, segmentation, util, color\ntry:\n from matplotlib import colors\n from matplotlib import cm\nexce... | diff --git a/skimage/future/graph/rag.py b/skimage/future/graph/rag.py
index dae5bbd1a0d..96f00b6fa58 100644
--- a/skimage/future/graph/rag.py
+++ b/skimage/future/graph/rag.py
@@ -143,6 +143,13 @@ def __init__(self, label_image=None, connectivity=1, data=None, **attr):
if label_image is not None:
... |
aws__aws-cli-1864 | Exception thrown if uploaded file size > 5TB
We recently hit an exception when uploading a large file that by the looks of it should instead be reported to the user as a helpful message. The exception is being raised attempting to create that helpful message.
Version: aws-cli/1.10.11 Python/2.7.9 Windows/2012Server bo... | [
{
"content": "# Copyright 2013 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 2013 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/awscli/customizations/s3/s3handler.py b/awscli/customizations/s3/s3handler.py
index d674dd71ed17..37a0cf5c3993 100644
--- a/awscli/customizations/s3/s3handler.py
+++ b/awscli/customizations/s3/s3handler.py
@@ -184,7 +184,7 @@ def _enqueue_tasks(self, files):
if too_large and filename.operation... |
fossasia__open-event-server-1396 | Category/type hashtags are not clickable
Make the category/top hashtags under each event element in home page and search page clickable.
| [
{
"content": "\"\"\"Copyright 2015 Rafal Kowalski\"\"\"\nimport logging\nimport os\nfrom urllib2 import urlopen\n\nfrom flask import url_for, redirect, request, session, send_from_directory\nfrom flask.ext import login\nfrom flask_admin import expose\nfrom flask_admin.base import AdminIndexView\nfrom flask.ext.... | [
{
"content": "\"\"\"Copyright 2015 Rafal Kowalski\"\"\"\nimport logging\nimport os\nimport urllib\nfrom urllib2 import urlopen\n\nfrom flask import url_for, redirect, request, session, send_from_directory\nfrom flask.ext import login\nfrom flask_admin import expose\nfrom flask_admin.base import AdminIndexView\n... | diff --git a/open_event/static/css/admin/explore.css b/open_event/static/css/admin/explore.css
index ff086bc34b..1e564a26cd 100644
--- a/open_event/static/css/admin/explore.css
+++ b/open_event/static/css/admin/explore.css
@@ -142,3 +142,6 @@
}
}
+.filter-hashtag {
+ cursor: pointer;
+}
diff --git a/open_event... |
pyro-ppl__numpyro-476 | Regression in fori_collect when progress bar disabled
I am finding that with progress bar disabled, `fori_collect` is not returning the same results for the sparse regression example:
- [x] It fetches the wrong `init_state` and runs adaptation twice.
- [ ] Results returned when progress bar is enabled/disabled are ... | [
{
"content": "from collections import namedtuple\nfrom contextlib import contextmanager\nimport os\nimport random\nimport re\n\nimport numpy as onp\nimport tqdm\n\nimport jax\nfrom jax import jit, lax, ops, vmap\nfrom jax.interpreters.batching import BatchTracer\nfrom jax.interpreters.partial_eval import JaxprT... | [
{
"content": "from collections import namedtuple\nfrom contextlib import contextmanager\nimport os\nimport random\nimport re\n\nimport numpy as onp\nimport tqdm\n\nimport jax\nfrom jax import jit, lax, ops, vmap\nfrom jax.interpreters.batching import BatchTracer\nfrom jax.interpreters.partial_eval import JaxprT... | diff --git a/numpyro/util.py b/numpyro/util.py
index 537973405..77ee3e3fc 100644
--- a/numpyro/util.py
+++ b/numpyro/util.py
@@ -181,11 +181,11 @@ def fori_collect(lower, upper, body_fun, init_val, transform=identity,
def _body_fn(i, vals):
val, collection, start_state = vals
- val = ... |
pyro-ppl__numpyro-250 | HMC adaptation stuck at warmup phase due to step_size -> nan
A script to replicate this issue
```
import jax.numpy as np
from jax.scipy.special import logsumexp
from numpyro.mcmc import mcmc
def dual_moon_pe(x):
term1 = 0.5 * ((np.linalg.norm(x, axis=-1) - 2) / 0.4) ** 2
term2 = -0.5 * ((x[..., :1] + n... | [
{
"content": "from collections import namedtuple\n\nimport jax\nfrom jax import grad, jit, partial, random, value_and_grad, vmap\nfrom jax.flatten_util import ravel_pytree\nimport jax.numpy as np\nfrom jax.ops import index_update\nfrom jax.scipy.special import expit\nfrom jax.tree_util import tree_multimap\n\nf... | [
{
"content": "from collections import namedtuple\n\nimport jax\nfrom jax import grad, jit, partial, random, value_and_grad, vmap\nfrom jax.flatten_util import ravel_pytree\nimport jax.numpy as np\nfrom jax.ops import index_update\nfrom jax.scipy.special import expit\nfrom jax.tree_util import tree_multimap\n\nf... | diff --git a/numpyro/hmc_util.py b/numpyro/hmc_util.py
index 068c896a0..34f6c1685 100644
--- a/numpyro/hmc_util.py
+++ b/numpyro/hmc_util.py
@@ -248,6 +248,7 @@ def _body_fn(state):
# case for a diverging trajectory (e.g. in the case of evaluating log prob
# of a value simulated using a large step siz... |
pyqtgraph__pyqtgraph-2930 | Changed exportDialog
This pull request fixes #2367. The code has been changed as it was suggested in the issue.

| [
{
"content": "from .. import exporters as exporters\nfrom .. import functions as fn\nfrom ..graphicsItems.PlotItem import PlotItem\nfrom ..graphicsItems.ViewBox import ViewBox\nfrom ..Qt import QtCore, QtWidgets\n\nfrom . import exportDialogTemplate_generic as ui_template\n\nclass FormatExportListWidgetItem(QtW... | [
{
"content": "from .. import exporters as exporters\nfrom .. import functions as fn\nfrom ..graphicsItems.PlotItem import PlotItem\nfrom ..graphicsItems.ViewBox import ViewBox\nfrom ..Qt import QtCore, QtWidgets\n\nfrom . import exportDialogTemplate_generic as ui_template\n\nclass FormatExportListWidgetItem(QtW... | diff --git a/pyqtgraph/GraphicsScene/exportDialog.py b/pyqtgraph/GraphicsScene/exportDialog.py
index c39a6d760b..99ebe89042 100644
--- a/pyqtgraph/GraphicsScene/exportDialog.py
+++ b/pyqtgraph/GraphicsScene/exportDialog.py
@@ -51,10 +51,11 @@ def show(self, item=None):
self.selectBox.setVisible(True)
... |
pytorch__vision-2960 | Replace assert with ValueError in AnchorGenerator
## 🐛 Bug
I think with the Retina Net PR, there was an update to anchor utils.
My old code still works fine on torchvision 0.7 and pytorch 1.6. But on upgrading to 0.8 it doesn't.
I am not sure if this was BC Breaking change.
## To Reproduce
Steps to reproduc... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport torch\nfrom torch import nn\n\nfrom torch.jit.annotations import List, Optional, Dict\nfrom .image_list import ImageList\n\n\nclass AnchorGenerator(nn.Module):\n \"\"\"\n Module that generates anchors for a set o... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport torch\nfrom torch import nn\n\nfrom torch.jit.annotations import List, Optional, Dict\nfrom .image_list import ImageList\n\n\nclass AnchorGenerator(nn.Module):\n \"\"\"\n Module that generates anchors for a set o... | diff --git a/torchvision/models/detection/anchor_utils.py b/torchvision/models/detection/anchor_utils.py
index 94bb006c5dd..9cf27834f75 100644
--- a/torchvision/models/detection/anchor_utils.py
+++ b/torchvision/models/detection/anchor_utils.py
@@ -100,7 +100,12 @@ def grid_anchors(self, grid_sizes, strides):
... |
carpentries__amy-1056 | Add filter by group name in training applications list view
Add filter by group name in training applications list view
| [
{
"content": "import re\n\nimport django_filters\nfrom django.db.models import Q\nfrom django.forms import widgets\nfrom django_countries import Countries\n\nfrom workshops.forms import bootstrap_helper_filter\nfrom workshops.models import (\n Event,\n Organization,\n Person,\n Airport,\n EventRe... | [
{
"content": "import re\n\nimport django_filters\nfrom django.db.models import Q\nfrom django.forms import widgets\nfrom django_countries import Countries\n\nfrom workshops.forms import bootstrap_helper_filter\nfrom workshops.models import (\n Event,\n Organization,\n Person,\n Airport,\n EventRe... | diff --git a/workshops/filters.py b/workshops/filters.py
index 83b936f0b..8a749d7ce 100644
--- a/workshops/filters.py
+++ b/workshops/filters.py
@@ -389,6 +389,11 @@ class TrainingRequestFilter(AMYFilterSet):
action=filter_by_person,
)
+ group_name = django_filters.CharFilter(
+ name='group_na... |
nvaccess__nvda-14733 | NVDA only reads one page at a time in Say all in Kindle App
<!-- Please read the text in this edit field before filling it in.
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
http... | [
{
"content": "# A part of NonVisual Desktop Access (NVDA)\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n# Copyright (C) 2006-2022 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Babbage B.V., Bill Dengler,\r\n# Julien Cochuyt\r\n\r\nfrom abc import... | [
{
"content": "# A part of NonVisual Desktop Access (NVDA)\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n# Copyright (C) 2006-2022 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Babbage B.V., Bill Dengler,\r\n# Julien Cochuyt\r\n\r\nfrom abc import... | diff --git a/source/locale/fi/characterDescriptions.dic b/source/locale/fi/characterDescriptions.dic
index c8bb255fa8a..94be5722ad8 100644
--- a/source/locale/fi/characterDescriptions.dic
+++ b/source/locale/fi/characterDescriptions.dic
@@ -17,12 +17,12 @@ k kalle
l lauri
m matti
n niilo
-o otto
-p pekka
+o osk... |
openmc-dev__openmc-2302 | `StatePoint.runtime` incorrectly written from depletion simulation.
When running a depletion simulation, OpenMC generates a statepoint file for each depletion step.
The expected behavior is that OpenMC stores all data in these statepoint files that it normally would when running a transport simulation. However, I ha... | [
{
"content": "\"\"\"Transport-coupled transport operator for depletion.\n\nThis module implements a transport operator coupled to OpenMC's transport solver\nso that it can be used by depletion integrators. The implementation makes use of\nthe Python bindings to OpenMC's C API so that reading tally results and u... | [
{
"content": "\"\"\"Transport-coupled transport operator for depletion.\n\nThis module implements a transport operator coupled to OpenMC's transport solver\nso that it can be used by depletion integrators. The implementation makes use of\nthe Python bindings to OpenMC's C API so that reading tally results and u... | diff --git a/openmc/deplete/coupled_operator.py b/openmc/deplete/coupled_operator.py
index a8c1fa156c4..669e98ddac3 100644
--- a/openmc/deplete/coupled_operator.py
+++ b/openmc/deplete/coupled_operator.py
@@ -460,7 +460,6 @@ def __call__(self, vec, source_rate):
# Run OpenMC
openmc.lib.run()
- ... |
nipy__nipype-3590 | `locale.getdefaultlocale()` is deprecated
nipype uses the [`locale.getdefaultlocale()`](https://docs.python.org/3/library/locale.html#locale.getdefaultlocale) function [here](https://github.com/nipy/nipype/blob/eb779e6113074c2071830001eacdefca26518ce3/nipype/utils/subprocess.py#L34) and [here](https://github.com/nipy/n... | [
{
"content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Miscellaneous file manipulation functions\n\"\"\"\nimport sys\nimport pickle\nimport errno\nimport subprocess as sp\nimport gzip\nimport hashlib\nimport locale\nfrom hashlib im... | [
{
"content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Miscellaneous file manipulation functions\n\"\"\"\nimport sys\nimport pickle\nimport errno\nimport subprocess as sp\nimport gzip\nimport hashlib\nimport locale\nfrom hashlib im... | diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py
index e0ec687a6a..ef52d00cc6 100644
--- a/nipype/utils/filemanip.py
+++ b/nipype/utils/filemanip.py
@@ -670,7 +670,7 @@ def read_stream(stream, logger=None, encoding=None):
"""
- default_encoding = encoding or locale.getdefaultlocale()[1] or... |
strawberry-graphql__strawberry-3318 | Subscription is not working with permission_classes
<!-- Provide a general summary of the bug in the title above. -->
Subscription is failing with error after upgrading to version 0.217.0 from 0.216.1. Bug seems to be in `permission_classes`, because if I'm trying to use subscription without permission_classes, it wor... | [
{
"content": "from __future__ import annotations\n\nimport abc\nfrom functools import cached_property\nfrom inspect import iscoroutinefunction\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaitable,\n Dict,\n List,\n Optional,\n Type,\n Union,\n)\n\nfrom strawberry.exceptions import S... | [
{
"content": "from __future__ import annotations\n\nimport abc\nimport inspect\nfrom functools import cached_property\nfrom inspect import iscoroutinefunction\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaitable,\n Dict,\n List,\n Optional,\n Type,\n Union,\n)\n\nfrom strawberry.exc... | diff --git a/RELEASE.md b/RELEASE.md
new file mode 100644
index 0000000000..d1ee608a3d
--- /dev/null
+++ b/RELEASE.md
@@ -0,0 +1,3 @@
+Release type: patch
+
+This hotfix enables permission extensions to be used with AsyncGenerators.
diff --git a/strawberry/permission.py b/strawberry/permission.py
index a1642eb931..50fd... |
streamlit__streamlit-2100 | Video on main API page is broken
See: https://docs.streamlit.io/en/stable/api.html#streamlit.video

| [
{
"content": "import streamlit as st\n\nVIDEO_URL = \"https://vod-progressive.akamaized.net/exp=1595241944~acl=%2A%2F664785003.mp4%2A~hmac=2a26d355839498b80bbb2c43e6808bd12bc0d2e7920616a8226a1e017c270217/vimeo-prod-skyfire-std-us/01/4526/7/197634410/664785003.mp4?filename=Star+-+6962.mp4\"\n\nst.video(VIDEO_URL... | [
{
"content": "import streamlit as st\n\nVIDEO_URL = \"https://static.streamlit.io/examples/star.mp4\"\n\nst.video(VIDEO_URL)\n\nst.write(\n \"\"\"\n #### Video credit:\n\n Creator: User _fxxu_ from _Pixabay_.\n\n License: Free for commercial use. No attribution required.\n https://pixabay.com/en/... | diff --git a/docs/api-examples-source/charts.video.py b/docs/api-examples-source/charts.video.py
index 27f9cb27ea09..129218399c78 100644
--- a/docs/api-examples-source/charts.video.py
+++ b/docs/api-examples-source/charts.video.py
@@ -1,6 +1,6 @@
import streamlit as st
-VIDEO_URL = "https://vod-progressive.akamaized... |
matrix-org__synapse-12671 | CI run against latest deps is failing
See https://github.com/matrix-org/synapse/actions/runs/2292542675
| [
{
"content": "# Copyright 2014-2016 OpenMarket Ltd\n# Copyright 2020-2021 The Matrix.org Foundation C.I.C.\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.a... | [
{
"content": "# Copyright 2014-2016 OpenMarket Ltd\n# Copyright 2020-2021 The Matrix.org Foundation C.I.C.\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.a... | diff --git a/changelog.d/12671.misc b/changelog.d/12671.misc
new file mode 100644
index 000000000000..56df4e383154
--- /dev/null
+++ b/changelog.d/12671.misc
@@ -0,0 +1 @@
+Fix mypy against latest pillow stubs.
diff --git a/poetry.lock b/poetry.lock
index ddafaaeba066..fce3cde11cc4 100644
--- a/poetry.lock
+++ b/poetry... |
cookiecutter__cookiecutter-655 | Fix the repo regex to handle + in URLs
The documentation said that you could do git+https:// or git+ssh:// but that was not, in fact, true.
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.main\n-----------------\n\nMain entry point for the `cookiecutter` command.\n\nThe code in this module is also a good example of how to use Cookiecutter as a\nlibrary rather than a script.\n\"\"\"\n\nfrom __future__ import unic... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.main\n-----------------\n\nMain entry point for the `cookiecutter` command.\n\nThe code in this module is also a good example of how to use Cookiecutter as a\nlibrary rather than a script.\n\"\"\"\n\nfrom __future__ import unic... | diff --git a/cookiecutter/main.py b/cookiecutter/main.py
index 56dbc5e5d..d8ff7b6c7 100755
--- a/cookiecutter/main.py
+++ b/cookiecutter/main.py
@@ -30,19 +30,18 @@
'bb': 'https://bitbucket.org/{0}',
}
-REPO_REGEX = """
-(
-((git|ssh|https|http):(//)?) # something like git:// ssh:// etc.
- | ... |
liqd__a4-meinberlin-2083 | store window: district tile announces more results than there are if I click on them
store window tile shows ALL project of district, if I click and get to project overview, the default filter takes out all old projects and plans without beteiligung.
can we only count running projects with participation?
| [
{
"content": "import random\n\nfrom django.db import models\nfrom django.utils.functional import cached_property\nfrom modelcluster.fields import ParentalKey\nfrom modelcluster.models import ClusterableModel\nfrom wagtail.admin import edit_handlers\nfrom wagtail.admin.edit_handlers import FieldPanel\nfrom wagta... | [
{
"content": "import random\n\nfrom django.db import models\nfrom django.utils.functional import cached_property\nfrom modelcluster.fields import ParentalKey\nfrom modelcluster.models import ClusterableModel\nfrom wagtail.admin import edit_handlers\nfrom wagtail.admin.edit_handlers import FieldPanel\nfrom wagta... | diff --git a/meinberlin/apps/cms/models/storefronts.py b/meinberlin/apps/cms/models/storefronts.py
index 05bf7f5126..20b8c4926b 100644
--- a/meinberlin/apps/cms/models/storefronts.py
+++ b/meinberlin/apps/cms/models/storefronts.py
@@ -50,12 +50,17 @@ def project_url(self):
@cached_property
def district_proj... |
modin-project__modin-1910 | [REFACTOR] Avoid unconditional index access in DataFrameGroupBy ctor
Currently, each groupby statement works as a barrier for lazy execution due to unconditional index access in DataFrameGroupBy ctor.
| [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | diff --git a/modin/pandas/groupby.py b/modin/pandas/groupby.py
index 258abebcfda..4773d8f877a 100644
--- a/modin/pandas/groupby.py
+++ b/modin/pandas/groupby.py
@@ -49,7 +49,6 @@ def __init__(
self._idx_name = idx_name
self._df = df
self._query_compiler = self._df._query_compiler
- sel... |
nvaccess__nvda-14732 | NVDA only reads one page at a time in Say all in Kindle App
<!-- Please read the text in this edit field before filling it in.
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
http... | [
{
"content": "# A part of NonVisual Desktop Access (NVDA)\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n# Copyright (C) 2006-2022 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Babbage B.V., Bill Dengler,\r\n# Julien Cochuyt\r\n\r\nfrom abc import... | [
{
"content": "# A part of NonVisual Desktop Access (NVDA)\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n# Copyright (C) 2006-2022 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Babbage B.V., Bill Dengler,\r\n# Julien Cochuyt\r\n\r\nfrom abc import... | diff --git a/source/speech/sayAll.py b/source/speech/sayAll.py
index 7069c660691..39b529c1c5a 100644
--- a/source/speech/sayAll.py
+++ b/source/speech/sayAll.py
@@ -267,7 +267,6 @@ def nextLine(self):
if not self.initialIteration or not self.shouldReadInitialPosition():
if not self.nextLineImpl():
- self... |
falconry__falcon-1961 | Doc not up to date or unclear on trailing slash with routing
The doc say:
> Also, note that if the template contains a trailing slash character, it will be stripped in order to normalize the routing logic. https://falcon.readthedocs.io/en/stable/api/routing.html#routing-utilities
https://github.com/falconry/falco... | [
{
"content": "# Copyright 2013 by Rackspace Hosting, 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 requir... | [
{
"content": "# Copyright 2013 by Rackspace Hosting, 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 requir... | diff --git a/falcon/routing/util.py b/falcon/routing/util.py
index 583da68af..d9edc5b36 100644
--- a/falcon/routing/util.py
+++ b/falcon/routing/util.py
@@ -48,8 +48,17 @@ def compile_uri_template(template):
/books/{isbn}/characters
/books/{isbn}/characters/{name}
- Also, note that if the templat... |
falconry__falcon-61 | Rename Request.body to Request.stream
Mirros Response. And it really is a stream.
| [
{
"content": "\"\"\"Defines the Request class.\n\nCopyright 2013 by Rackspace Hosting, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE... | [
{
"content": "\"\"\"Defines the Request class.\n\nCopyright 2013 by Rackspace Hosting, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE... | diff --git a/README.md b/README.md
index 150f94ed8..cf20ba6d6 100644
--- a/README.md
+++ b/README.md
@@ -123,7 +123,7 @@ class ThingsResource:
def on_post(self, req, resp):
try:
- raw_json = req.body.read()
+ raw_json = req.stream.read()
except Exception:
rais... |
wemake-services__wemake-django-template-1376 | Add django-stubs-ext project
We need to add it to both:
- https://github.com/wemake-services/wemake-django-template/blob/master/%7B%7Bcookiecutter.project_name%7D%7D/server/wsgi.py
- https://github.com/wemake-services/wemake-django-template/blob/master/%7B%7Bcookiecutter.project_name%7D%7D/manage.py
Link: https://... | [
{
"content": "\"\"\"\nWSGI config for server project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/\n\"\"\"\n\nimport os\n\nfrom django.core.wsgi import get_wsgi_applicatio... | [
{
"content": "\"\"\"\nWSGI config for server project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/\n\"\"\"\n\nimport os\n\nimport django_stubs_ext\nfrom django.core.wsgi i... | diff --git a/{{cookiecutter.project_name}}/manage.py b/{{cookiecutter.project_name}}/manage.py
index 4038558ff..b6dc129a5 100755
--- a/{{cookiecutter.project_name}}/manage.py
+++ b/{{cookiecutter.project_name}}/manage.py
@@ -3,6 +3,8 @@
import os
import sys
+import django_stubs_ext
+
def main() -> None:
"""... |
googleapis__python-spanner-django-780 | Autofield patching doesn't work for multi-database migration against MySQL
I am trying to keep all of my existing tables in MySQL but add "spanner" as a second database for certain apps.
`DATABASES` looks something like this:
```
{'default': {'ENGINE': 'django.db.backends.mysql',
'NAME': 'dbname',
'USER': ... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file or at\n# https://developers.google.com/open-source/licenses/bsd\n\nimport datetime\nimport os\nimport django\n\n# Monkey-patch AutoField to generate a random value ... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file or at\n# https://developers.google.com/open-source/licenses/bsd\n\nimport datetime\nimport os\nimport django\n\n# Monkey-patch AutoField to generate a random value ... | diff --git a/django_spanner/__init__.py b/django_spanner/__init__.py
index 54c513d60d..ad4bc4e38d 100644
--- a/django_spanner/__init__.py
+++ b/django_spanner/__init__.py
@@ -15,6 +15,7 @@
import pkg_resources
from google.cloud.spanner_v1 import JsonObject
from django.db.models.fields import (
+ NOT_PROVIDED,
... |
Cog-Creators__Red-DiscordBot-4466 | Can't remove paths added before backup
# Command bugs
<!--
Did you find a bug with a command? Fill out the following:
-->
#### Command name
`removepath`
#### What cog is this command from?
CogManagerUI
#### What were you expecting to happen?
The path to be removed
#### What actually happened?... | [
{
"content": "import contextlib\nimport keyword\nimport pkgutil\nfrom importlib import import_module, invalidate_caches\nfrom importlib.machinery import ModuleSpec\nfrom pathlib import Path\nfrom typing import Union, List, Optional\n\nimport redbot.cogs\nfrom redbot.core.utils import deduplicate_iterables\nimpo... | [
{
"content": "import contextlib\nimport keyword\nimport pkgutil\nfrom importlib import import_module, invalidate_caches\nfrom importlib.machinery import ModuleSpec\nfrom pathlib import Path\nfrom typing import Union, List, Optional\n\nimport redbot.cogs\nfrom redbot.core.utils import deduplicate_iterables\nimpo... | diff --git a/redbot/core/cog_manager.py b/redbot/core/cog_manager.py
index ffaec6f1ef1..aecff67d389 100644
--- a/redbot/core/cog_manager.py
+++ b/redbot/core/cog_manager.py
@@ -127,11 +127,7 @@ def _ensure_path_obj(path: Union[Path, str]) -> Path:
pathlib.Path
"""
- try:
- path.exi... |
searx__searx-1135 | Yacy results crash
Getting:
Engines cannot retrieve results:
yacy (unexpected crash)
> ERROR:searx.search:engine yacy : exception : 'url'
> Traceback (most recent call last):
> File "/home/leo/searx/searx/search.py", line 118, in search_one_request_safe
> search_results = search_one_request(engine, query,... | [
{
"content": "# Yacy (Web, Images, Videos, Music, Files)\n#\n# @website http://yacy.net\n# @provide-api yes\n# (http://www.yacy-websuche.de/wiki/index.php/Dev:APIyacysearch)\n#\n# @using-api yes\n# @results JSON\n# @stable yes\n# @parse (general) url, title, content, publish... | [
{
"content": "# Yacy (Web, Images, Videos, Music, Files)\n#\n# @website http://yacy.net\n# @provide-api yes\n# (http://www.yacy-websuche.de/wiki/index.php/Dev:APIyacysearch)\n#\n# @using-api yes\n# @results JSON\n# @stable yes\n# @parse (general) url, title, content, publish... | diff --git a/searx/engines/yacy.py b/searx/engines/yacy.py
index c19140bb06..7c307ce530 100644
--- a/searx/engines/yacy.py
+++ b/searx/engines/yacy.py
@@ -74,8 +74,17 @@ def response(resp):
for result in search_results[0].get('items', []):
# parse image results
if result.get('image'):
+
+ ... |
pwr-Solaar__Solaar-1111 | Use Host Switch buttons to alternate between receivers for both Keyboard and Mouse
**Information**
- Solaar version: 1.0.4+git1275-8fccd84-202102090518~ubuntu20.04.1
- Distribution: KUbuntu 20.04
- Kernel version: Linux 5.10.15-xanmod1 x86_64 GNU/Linux
- Output of `solaar show` for the target device (if applicable)... | [
{
"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/lib/solaar/cli/config.py b/lib/solaar/cli/config.py
index 0b7aebaa2c..b5a0d39e89 100644
--- a/lib/solaar/cli/config.py
+++ b/lib/solaar/cli/config.py
@@ -58,12 +58,13 @@ def select_choice(value, choices, setting, key):
ivalue = to_int(value)
val = None
for choice in choices:
- if valu... |
huggingface__accelerate-445 | `psutil` required by utils/modeling.py but it isn't declared as a dependency
### System Info
```Shell
Accelerate `0.10.0.dev0` on Debian Bullseye running Python 3.10.5.
File "/opt/venv/lib/python3.10/site-packages/accelerate/utils/modeling.py", line 276, in get_max_memory
import psutil
ModuleNotFoundError: ... | [
{
"content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\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#... | [
{
"content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\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#... | diff --git a/setup.py b/setup.py
index 45c4ae9124d..93916bd9fd1 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,6 @@
extras["quality"] = ["black ~= 22.0", "isort >= 5.5.4", "flake8 >= 3.8.3"]
extras["docs"] = []
extras["test"] = [
- "psutil",
"pytest",
"pytest-xdist",
"pytest-subtests",
@@ -60,7 ... |
litestar-org__litestar-1791 | Enhancement: Only run Sonar & Snyk on forks
### Summary
When forking the repo, tests are brought with it but Snyk & Sonar CI fails because the secrets are not set.
### Basic Example
Add ` && github.repository_owner == 'starlite-api'` to the if-check in `ci.yaml` to prevent these two CI items from running on non-upst... | [
{
"content": "from functools import partial\nfrom os import PathLike\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHECKING,\n Any,\n AsyncIterable,\n AsyncIterator,\n Callable,\n Dict,\n Iterable,\n Iterator,\n Literal,\n Mapping,\n Sequence,\n Set,\n Tuple,\n ... | [
{
"content": "from functools import partial\nfrom os import PathLike\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHECKING,\n Any,\n AsyncIterable,\n AsyncIterator,\n Callable,\n Dict,\n Iterable,\n Iterator,\n Literal,\n Mapping,\n MutableMapping,\n Sequence,\n ... | diff --git a/litestar/types/composite_types.py b/litestar/types/composite_types.py
index 7a2a9bd0c1..55b8e966d4 100644
--- a/litestar/types/composite_types.py
+++ b/litestar/types/composite_types.py
@@ -12,6 +12,7 @@
Iterator,
Literal,
Mapping,
+ MutableMapping,
Sequence,
Set,
Tuple,
@@... |
nautobot__nautobot-837 | The Jobs REST API feature should auto-retrieve objects defined as ObjectVar fields
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting reproducible bugs. If you need assistance
with Nautobot installation, or if you have a general question, please s... | [
{
"content": "\"\"\"Jobs functionality - consolidates and replaces legacy \"custom scripts\" and \"reports\" features.\"\"\"\nfrom collections import OrderedDict\nimport inspect\nimport json\nimport logging\nimport os\nimport pkgutil\nimport shutil\nimport traceback\nimport warnings\n\n\nfrom cacheops import ca... | [
{
"content": "\"\"\"Jobs functionality - consolidates and replaces legacy \"custom scripts\" and \"reports\" features.\"\"\"\nfrom collections import OrderedDict\nimport inspect\nimport json\nimport logging\nimport os\nimport pkgutil\nimport shutil\nimport traceback\nimport warnings\n\n\nfrom cacheops import ca... | diff --git a/nautobot/docs/additional-features/jobs.md b/nautobot/docs/additional-features/jobs.md
index 69f11d564c6..32655053f01 100644
--- a/nautobot/docs/additional-features/jobs.md
+++ b/nautobot/docs/additional-features/jobs.md
@@ -366,6 +366,12 @@ The URL contains the `class_path` element that is composed of 3 el... |
microsoft__playwright-python-302 | Error running build_package.py
When running build_package, it fails as curl is not available:
```txt
Traceback (most recent call last):
File "build_package.py", line 43, in <module>
subprocess.check_call(["curl", url, "-o", "driver/" + zip_file])
File "/usr/lib/python3.8/subprocess.py", line 359, in check_... | [
{
"content": "# Copyright (c) Microsoft Corporation.\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 ap... | [
{
"content": "# Copyright (c) Microsoft Corporation.\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 ap... | diff --git a/build_package.py b/build_package.py
index 2092797c6..26aedea56 100644
--- a/build_package.py
+++ b/build_package.py
@@ -18,6 +18,7 @@
import stat
import subprocess
import sys
+import urllib.request
import zipfile
from playwright.path_utils import get_file_dirname
@@ -40,7 +41,7 @@ def driver_version... |
weecology__retriever-539 | Dataset install issues with SQL for some databases
E.g., Adler2007 installs fine into csv (and other text file engines):
```
ethan@stice:~$ retriever install csv Adler2007
=> Installing Kansas plant quadrats (Ecological Archives 2007)
Downloading species_list.csv...ain.csv: 163400 / 16340000 41
Done!ting rows to ./Adl... | [
{
"content": "from __future__ import print_function\nfrom future import standard_library\nstandard_library.install_aliases()\nfrom builtins import object\nfrom builtins import range\nfrom builtins import input\nfrom builtins import zip\nfrom builtins import next\nfrom builtins import str\nimport sys\nimport os\... | [
{
"content": "from __future__ import print_function\nfrom future import standard_library\nstandard_library.install_aliases()\nfrom builtins import object\nfrom builtins import range\nfrom builtins import input\nfrom builtins import zip\nfrom builtins import next\nfrom builtins import str\nimport sys\nimport os\... | diff --git a/lib/engine.py b/lib/engine.py
index bc8c23b49..13ff9e559 100644
--- a/lib/engine.py
+++ b/lib/engine.py
@@ -277,12 +277,12 @@ def convert_data_type(self, datatype):
thistype = self.datatypes[thistype]
if isinstance(thistype, tuple):
- if len(datatype) > 1 and int(... |
open-telemetry__opentelemetry-python-3280 | eachdist fails to update version correctly
The update script fails to update the version when the dep in `pyproject.toml` has a version matcher other than `=` for instance, `1.16.0.dev` will not get updated to `1.16.0` if the dep were to be specified as `opentelemetry-sdk >= 1.16.0.dev`. Refer to this commit https://gi... | [
{
"content": "#!/usr/bin/env python3\n\nimport argparse\nimport os\nimport re\nimport shlex\nimport shutil\nimport subprocess\nimport sys\nfrom configparser import ConfigParser\nfrom inspect import cleandoc\nfrom itertools import chain\nfrom os.path import basename\nfrom pathlib import Path, PurePath\n\nDEFAULT... | [
{
"content": "#!/usr/bin/env python3\n\nimport argparse\nimport os\nimport re\nimport shlex\nimport shutil\nimport subprocess\nimport sys\nfrom configparser import ConfigParser\nfrom inspect import cleandoc\nfrom itertools import chain\nfrom os.path import basename\nfrom pathlib import Path, PurePath\n\nDEFAULT... | diff --git a/eachdist.ini b/eachdist.ini
index 51f52313d2a..c33b4e09230 100644
--- a/eachdist.ini
+++ b/eachdist.ini
@@ -34,6 +34,7 @@ version=0.39b0.dev
packages=
opentelemetry-opentracing-shim
+ opentelemetry-opencensus-shim
opentelemetry-exporter-opencensus
opentelemetry-exporter-prometheus
... |
python-poetry__poetry-8227 | fix: remove exception when keyring is locked
# Pull Request Check List
Resolves: #1917
<!-- This is just a reminder about the most common mistakes. Please make sure that you tick all *appropriate* boxes. But please read our [contribution guide](https://python-poetry.org/docs/contributing/) at least once, it wil... | [
{
"content": "from __future__ import annotations\n\nimport dataclasses\nimport logging\n\nfrom contextlib import suppress\nfrom typing import TYPE_CHECKING\n\n\nif TYPE_CHECKING:\n from poetry.config.config import Config\n\nlogger = logging.getLogger(__name__)\n\n\nclass PasswordManagerError(Exception):\n ... | [
{
"content": "from __future__ import annotations\n\nimport dataclasses\nimport logging\n\nfrom contextlib import suppress\nfrom typing import TYPE_CHECKING\n\n\nif TYPE_CHECKING:\n from poetry.config.config import Config\n\nlogger = logging.getLogger(__name__)\n\n\nclass PasswordManagerError(Exception):\n ... | diff --git a/src/poetry/utils/password_manager.py b/src/poetry/utils/password_manager.py
index 620556043c0..166386f4565 100644
--- a/src/poetry/utils/password_manager.py
+++ b/src/poetry/utils/password_manager.py
@@ -47,8 +47,18 @@ def get_credential(
import keyring
+ from keyring.errors import Keyr... |
bookwyrm-social__bookwyrm-1740 | Books on multiple shelves duplicated in the "all books" view
<img width="1172" alt="Screen Shot 2021-12-02 at 11 47 40 AM" src="https://user-images.githubusercontent.com/1807695/144495864-f94425a7-b11f-4df4-8ab7-c850d5a17996.png">
| [
{
"content": "\"\"\" shelf views \"\"\"\nfrom collections import namedtuple\n\nfrom django.db.models import OuterRef, Subquery, F\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.paginator import Paginator\nfrom django.http import HttpResponseBadRequest\nfrom django.shortcuts import ... | [
{
"content": "\"\"\" shelf views \"\"\"\nfrom collections import namedtuple\n\nfrom django.db.models import OuterRef, Subquery, F\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.paginator import Paginator\nfrom django.http import HttpResponseBadRequest\nfrom django.shortcuts import ... | diff --git a/bookwyrm/templates/snippets/shelf_selector.html b/bookwyrm/templates/snippets/shelf_selector.html
index f96f48a89a..9a3fd2ce9f 100644
--- a/bookwyrm/templates/snippets/shelf_selector.html
+++ b/bookwyrm/templates/snippets/shelf_selector.html
@@ -63,16 +63,18 @@
{% endfor %}
{% if shelf.identifier == 'a... |
microsoft__ptvsd-1425 | python without debugging won't start if there is a breakpoint
@tmdag commented on [Thu May 02 2019](https://github.com/microsoft/vscode-python/issues/5540)
## Environment data
- VSCode Version: 1.33.1
- OS Version:Linux 5.0.7-200.fc29.x86_64
- Extension version (available under the Extensions sidebar): Python 2019.... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nimport pydevd\nimport threading\n\nfrom ptvsd.daemon import DaemonBase\nfrom ptvsd.session import DebugSession\nfrom ptvsd.wrapper import VS... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nimport pydevd\nimport threading\n\nfrom ptvsd.daemon import DaemonBase\nfrom ptvsd.session import DebugSession\nfrom ptvsd.wrapper import VS... | diff --git a/src/ptvsd/runner.py b/src/ptvsd/runner.py
index 1c9ddadc5..b172efb48 100644
--- a/src/ptvsd/runner.py
+++ b/src/ptvsd/runner.py
@@ -39,6 +39,19 @@ class Daemon(DaemonBase):
class SESSION(DebugSession):
class MESSAGE_PROCESSOR(VSCLifecycleMsgProcessor):
+
+ def on_setBreakpoints(s... |
sopel-irc__sopel-987 | KeyError trying to reload a system module name
`KeyError: 'time' (file "/opt/rh/python33/root/usr/lib/python3.3/site-packages/sopel/modules/reload.py", line 62, in f_reload)` should be a sane error message
| [
{
"content": "# coding=utf-8\n\"\"\"\nreload.py - Sopel Module Reloader Module\nCopyright 2008, Sean B. Palmer, inamidst.com\nLicensed under the Eiffel Forum License 2.\n\nhttp://sopel.chat\n\"\"\"\nfrom __future__ import unicode_literals, absolute_import, print_function, division\n\nimport collections\nimport ... | [
{
"content": "# coding=utf-8\n\"\"\"\nreload.py - Sopel Module Reloader Module\nCopyright 2008, Sean B. Palmer, inamidst.com\nLicensed under the Eiffel Forum License 2.\n\nhttp://sopel.chat\n\"\"\"\nfrom __future__ import unicode_literals, absolute_import, print_function, division\n\nimport collections\nimport ... | diff --git a/sopel/modules/reload.py b/sopel/modules/reload.py
index c94bf04c22..4b18724225 100644
--- a/sopel/modules/reload.py
+++ b/sopel/modules/reload.py
@@ -40,7 +40,7 @@ def f_reload(bot, trigger):
return bot.reply('done')
if name not in sys.modules:
- return bot.reply('%s: not loaded, try... |
common-workflow-language__cwltool-1269 | SyntaxWarning when running on python v3.8.2
## Expected Behavior
No warnings present when running `cwltool --version`
## Actual Behavior
The following two lines are written to stderr
```
/home/alexiswl/anaconda3/envs/cwl/lib/python3.8/site-packages/cwltool-3.0.20200324120055-py3.8.egg/cwltool/docker.py:423: Synt... | [
{
"content": "\"\"\"Enables Docker software containers via the {dx-,u,}docker runtimes.\"\"\"\n\nimport datetime\nimport csv\nimport os\nimport re\nimport shutil\nimport sys\nimport tempfile\nimport threading\nfrom distutils import spawn\nfrom io import open, StringIO # pylint: disable=redefined-builtin\nfrom ... | [
{
"content": "\"\"\"Enables Docker software containers via the {dx-,u,}docker runtimes.\"\"\"\n\nimport datetime\nimport csv\nimport os\nimport re\nimport shutil\nimport sys\nimport tempfile\nimport threading\nfrom distutils import spawn\nfrom io import open, StringIO # pylint: disable=redefined-builtin\nfrom ... | diff --git a/cwltool/docker.py b/cwltool/docker.py
index 0035955c2..6ffb4fbd1 100644
--- a/cwltool/docker.py
+++ b/cwltool/docker.py
@@ -420,7 +420,7 @@ def create_runtime(
runtime.append("--memory=%dm" % self.builder.resources["ram"])
elif not user_space_docker_cmd:
res_req, _ = self... |
psychopy__psychopy-3187 | setAutoDraw(false) skipped when video shorter than duration given in PsychoPy
This happens because when a **MovieStim** is done playing its status turns to `PsychoJS.Status.FINISHED`, but the check that is generated in place is expecting a status of `PsychoJS.Status.STARTED`:
```js
if (movie.status === PsychoJS.Statu... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nPart of the PsychoPy library\nCopyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd.\nDistributed under the terms of the GNU General Public License (GPL).\n\"\"\"\n\nfrom __future__ import absolute_import, print_funct... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nPart of the PsychoPy library\nCopyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd.\nDistributed under the terms of the GNU General Public License (GPL).\n\"\"\"\n\nfrom __future__ import absolute_import, print_funct... | diff --git a/psychopy/experiment/components/_base.py b/psychopy/experiment/components/_base.py
index 341c10fc54..87f874975a 100644
--- a/psychopy/experiment/components/_base.py
+++ b/psychopy/experiment/components/_base.py
@@ -355,7 +355,7 @@ def writeStopTestCodeJS(self, buff):
code = (f"frameRemains = {p... |
saulpw__visidata-1813 | Feature request: Provide command `reopen-closed-sheet` like Chrome's Ctrl-Shift-T
It often happens that I close a sheet by mistake and immediately curse because I've already done a bunch of manipulations on this tab that I'll now have to repeat. (I know I can guard a sheet but that doesn't fit my workflow.)
I wish V... | [
{
"content": "import os\nimport os.path\n\nfrom visidata import VisiData, vd, Path, BaseSheet, TableSheet, TextSheet, SettableColumn\n\n\nvd.option('filetype', '', 'specify file type', replay=True)\n\n\n@VisiData.api\ndef inputFilename(vd, prompt, *args, **kwargs):\n return vd.input(prompt, type=\"filename\"... | [
{
"content": "import os\nimport os.path\n\nfrom visidata import VisiData, vd, Path, BaseSheet, TableSheet, TextSheet, SettableColumn\n\n\nvd.option('filetype', '', 'specify file type', replay=True)\n\n\n@VisiData.api\ndef inputFilename(vd, prompt, *args, **kwargs):\n return vd.input(prompt, type=\"filename\"... | diff --git a/visidata/_open.py b/visidata/_open.py
index 080e1969f..9bbb05ad7 100644
--- a/visidata/_open.py
+++ b/visidata/_open.py
@@ -185,7 +185,9 @@ def loadInternalSheet(vd, cls, p, **kwargs):
BaseSheet.addCommand('o', 'open-file', 'vd.push(openSource(inputFilename("open: "), create=True))', 'Open file or URL')... |
open-telemetry__opentelemetry-python-1652 | Do not allow TracerProvider resource to be settable
As per the [TracerProvider section](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#resource-sdk):
> When used with distributed tracing, a resource can be associated with the TracerProvider when the TracerProvid... | [
{
"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/CHANGELOG.md b/CHANGELOG.md
index 339d4b86741..43efa6ad00a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Rename `IdsGenerator` to `IdGenerator`
([#1651])(https://github.com/open-telemetry/open... |
getpelican__pelican-1003 | Issue with import tumblr
Running the command:
> pelican-import --tumblr -o output/ -b name api_key
returns this result:
Traceback (most recent call last):
File "/usr/local/bin/pelican-import", line 8, in <module>
load_entry_point('pelican==3.3', 'console_scripts', 'pelican-import')()
File "/Library/Python/2... | [
{
"content": "#!/usr/bin/env python\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport argparse\ntry:\n # py3k import\n from html.parser import HTMLParser\nexcept ImportError:\n # py2 import\n from HTMLParser import HTMLParser # NOQA\nimport os\nimport re\ni... | [
{
"content": "#!/usr/bin/env python\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport argparse\ntry:\n # py3k import\n from html.parser import HTMLParser\nexcept ImportError:\n # py2 import\n from HTMLParser import HTMLParser # NOQA\nimport os\nimport re\ni... | diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py
index 46582937c..46410c132 100755
--- a/pelican/tools/pelican_import.py
+++ b/pelican/tools/pelican_import.py
@@ -400,8 +400,9 @@ def get_tumblr_posts(api_key, blogname, offset=0):
content = '<p><a href="%s" rel="external no... |
pytorch__vision-2614 | Root directory of Fashion MNIST
## 📚 Documentation
Hi there,
The [docs of FashionMNIST ](https://pytorch.org/docs/stable/torchvision/datasets.html#torchvision.datasets.FashionMNIST) dataset says:
**root** (_string_) – Root directory of dataset where `Fashion-MNIST/processed/training.pt` and `Fashion-MNIST/pro... | [
{
"content": "from .vision import VisionDataset\nimport warnings\nfrom PIL import Image\nimport os\nimport os.path\nimport numpy as np\nimport torch\nimport codecs\nimport string\nfrom typing import Any, Callable, Dict, IO, List, Optional, Tuple, Union\nfrom .utils import download_url, download_and_extract_arch... | [
{
"content": "from .vision import VisionDataset\nimport warnings\nfrom PIL import Image\nimport os\nimport os.path\nimport numpy as np\nimport torch\nimport codecs\nimport string\nfrom typing import Any, Callable, Dict, IO, List, Optional, Tuple, Union\nfrom .utils import download_url, download_and_extract_arch... | diff --git a/torchvision/datasets/mnist.py b/torchvision/datasets/mnist.py
index 2c037270ed9..8cf82c30a0f 100644
--- a/torchvision/datasets/mnist.py
+++ b/torchvision/datasets/mnist.py
@@ -169,8 +169,8 @@ class FashionMNIST(MNIST):
"""`Fashion-MNIST <https://github.com/zalandoresearch/fashion-mnist>`_ Dataset.
... |
open-telemetry__opentelemetry-python-contrib-421 | exporter-datadog: docstring does not match arguments
The docstring here:
https://github.com/open-telemetry/opentelemetry-python-contrib/blob/master/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/exporter.py#L68
says it expects a list, but what it really expects is a string containing a com... | [
{
"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/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/exporter.py b/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/exporter.py
index f76231a459..da1794afff 100644
--- a/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/exporter.py
++... |
mindsdb__mindsdb-1639 | Add new method to return the columns for MySQL datasources :electric_plug: :1234:
When MindsDB creates a new MySQL datasource we get information for columns by fetching all datasources. The problem here is that if datasource is big it takes a lot of time. We need a new get_columns method to return the columns name per... | [
{
"content": "import os\nimport shutil\nimport tempfile\n\nfrom contextlib import closing\nimport mysql.connector\n\nfrom lightwood.api import dtype\nfrom mindsdb.integrations.base import Integration\nfrom mindsdb.utilities.log import log\n\n\nclass MySQLConnectionChecker:\n def __init__(self, **kwargs):\n ... | [
{
"content": "import os\nimport shutil\nimport tempfile\n\nfrom contextlib import closing\nimport mysql.connector\n\nfrom lightwood.api import dtype\nfrom mindsdb.integrations.base import Integration\nfrom mindsdb.utilities.log import log\n\n\nclass MySQLConnectionChecker:\n def __init__(self, **kwargs):\n ... | diff --git a/mindsdb/integrations/mysql/mysql.py b/mindsdb/integrations/mysql/mysql.py
index 1f55274350a..01353bff470 100644
--- a/mindsdb/integrations/mysql/mysql.py
+++ b/mindsdb/integrations/mysql/mysql.py
@@ -197,10 +197,19 @@ def get_row_count(self, query):
FROM ({query}) as query;"""
result ... |
interlegis__sapl-400 | sapl 31: ordem cronológida de filiações
Na função Filiação, ordenar cronologicamente.
| [
{
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.5 on 2016-05-03 20:05\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('materia', '0030_auto_20160502_1630'),\n ('materia', '0030_auto... | [
{
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.5 on 2016-05-03 20:05\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('materia', '0030_auto_20160429_1349'),\n ('materia', '0030_auto... | diff --git a/materia/migrations/0031_merge.py b/materia/migrations/0031_merge.py
index 4912ef045..9faf9d45a 100644
--- a/materia/migrations/0031_merge.py
+++ b/materia/migrations/0031_merge.py
@@ -8,8 +8,8 @@
class Migration(migrations.Migration):
dependencies = [
- ('materia', '0030_auto_20160502_1630')... |
rucio__rucio-1630 | group-policy option is not propagated properly to the conveyor
Motivation
----------
The `--group-policy` option is not propagated properly to the conveyor.
| [
{
"content": "# Copyright 2014-2018 CERN for the benefit of the ATLAS collaboration.\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/LICE... | [
{
"content": "# Copyright 2014-2018 CERN for the benefit of the ATLAS collaboration.\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/LICE... | diff --git a/bin/rucio-conveyor-submitter b/bin/rucio-conveyor-submitter
index d2c94956ce..2293e90b32 100755
--- a/bin/rucio-conveyor-submitter
+++ b/bin/rucio-conveyor-submitter
@@ -43,7 +43,7 @@ def get_parser():
parser.add_argument("--group-bulk", action="store", default=1, type=int,
he... |
streamlit__streamlit-6188 | Using new experimental_data_editor throws TypeError
### Checklist
- [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues.
- [X] I added a very descriptive title to this issue.
- [X] I have provided sufficient information below to help reproduce this issue.
... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\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... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\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... | diff --git a/lib/streamlit/type_util.py b/lib/streamlit/type_util.py
index 59243b986b03..604fb75600c5 100644
--- a/lib/streamlit/type_util.py
+++ b/lib/streamlit/type_util.py
@@ -650,13 +650,11 @@ def pyarrow_table_to_bytes(table: pa.Table) -> bytes:
def is_colum_type_arrow_incompatible(column: Union[Series, Index])... |
django-import-export__django-import-export-1771 | `SimpleArrayWidget.render()` crashes if value is None
**Describe the bug**
`SimpleArrayWidget.render()` crashes if value is None
```
'NoneType' object is not iterable
```
| [
{
"content": "import json\nimport logging\nimport numbers\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom warnings import warn\n\nimport django\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.utils import timezone\nfr... | [
{
"content": "import json\nimport logging\nimport numbers\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom warnings import warn\n\nimport django\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.utils import timezone\nfr... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index be2ee31de..b7d8b3936 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -10,6 +10,7 @@ Changelog
- added try / catch to :meth:`~import_export.results.RowResult.add_instance_info` to handle unserializable instances (#1767)
- fix: YAML export does no... |
python-pillow__Pillow-5756 | AnimGIF not transparent
The frames of the down below animated GIF are not transparent (first frame works).
Testcase:
````python
import base64, io
import PIL.Image
animgif = '''
R0lGODlhJgAgAPdEAAIBAQsKChkGBCUdBy4lByoqKUw5AFlFAltJE2dNAkVFRU1OTlZVVWFiYoIgAIRjAJJxApx1AaJ6AK2MJMGRAM+bANKdANagANmjAOKqBOewC+a5L//MM... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# GIF file handling\n#\n# History:\n# 1995-09-01 fl Created\n# 1996-12-14 fl Added interlace support\n# 1996-12-30 fl Added animation support\n# 1997-01-05 fl Added write support, fixed local colour map bug\n# 1997-02-23 fl Make sure to load r... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# GIF file handling\n#\n# History:\n# 1995-09-01 fl Created\n# 1996-12-14 fl Added interlace support\n# 1996-12-30 fl Added animation support\n# 1997-01-05 fl Added write support, fixed local colour map bug\n# 1997-02-23 fl Make sure to load r... | diff --git a/Tests/images/dispose_bgnd_transparency.gif b/Tests/images/dispose_bgnd_transparency.gif
new file mode 100644
index 00000000000..7c626fe72c0
Binary files /dev/null and b/Tests/images/dispose_bgnd_transparency.gif differ
diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py
index 46e2b5ab23b..985f8e52... |
Qiskit__qiskit-2618 | BackendConfiguration should allow None for gates and basis_gates
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
`BackendConfiguration` needs to allow f... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org... | diff --git a/qiskit/providers/models/backendconfiguration.py b/qiskit/providers/models/backendconfiguration.py
index 080426430277..157dd5c92502 100644
--- a/qiskit/providers/models/backendconfiguration.py
+++ b/qiskit/providers/models/backendconfiguration.py
@@ -72,10 +72,8 @@ class BackendConfigurationSchema(BaseSchem... |
optuna__optuna-1007 | Order dependencies in `setup.py` alphabetically.
The libraries in `setup.py` are not arranged in alphabetical order. I think it would be helpful for developers if we fix it.
Examples:
https://github.com/optuna/optuna/blob/master/setup.py#L30-L41
```python
def get_install_requires() -> List[str]:
return [... | [
{
"content": "import os\nimport sys\n\nimport pkg_resources\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\n\n\ndef get_version() -> str:\n\n version_filepath = os.path.join(os.path.dirname(__file__), 'optun... | [
{
"content": "import os\nimport sys\n\nimport pkg_resources\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\n\n\ndef get_version() -> str:\n\n version_filepath = os.path.join(os.path.dirname(__file__), 'optun... | diff --git a/setup.py b/setup.py
index 9a7498f60b..95725b9c8b 100644
--- a/setup.py
+++ b/setup.py
@@ -33,11 +33,11 @@ def get_install_requires() -> List[str]:
'alembic',
'cliff',
'colorlog',
+ 'joblib',
'numpy',
'scipy!=1.4.0',
'sqlalchemy>=1.1.0',
... |
pulp__pulpcore-3946 | Pull through requesting existing content produces a bad call to contentartifact_set
**Version**
3.28, as this code was not released earlier.
**Describe the bug**
```
File "/usr/local/lib/python3.8/site-packages/pulpcore/content/handler.py", line 847, in _save_artifact
cas = list(content.contentartifact_set().s... | [
{
"content": "import asyncio\nimport logging\nfrom multidict import CIMultiDict\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 HTTPError,... | [
{
"content": "import asyncio\nimport logging\nfrom multidict import CIMultiDict\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 HTTPError,... | diff --git a/CHANGES/3945.bugfix b/CHANGES/3945.bugfix
new file mode 100644
index 0000000000..ff2810d103
--- /dev/null
+++ b/CHANGES/3945.bugfix
@@ -0,0 +1 @@
+Fixed error when downloading pull-through content that already exists in Pulp.
diff --git a/pulpcore/content/handler.py b/pulpcore/content/handler.py
index 0765... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.