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
⌀
Lightning-AI__pytorch-lightning-1589
Named converted to regular tuples when sent to the gpu. <!-- ### Common bugs: 1. Tensorboard not showing in Jupyter-notebook see [issue 79](https://github.com/PyTorchLightning/pytorch-lightning/issues/79). 2. PyTorch 1.1.0 vs 1.2.0 support [see FAQ](https://github.com/PyTorchLightning/pytorch-lightning#faq) ...
[ { "content": "\"\"\"\nLightning makes multi-gpu training and 16 bit training trivial.\n\n.. note:: None of the flags below require changing anything about your lightningModel definition.\n\nChoosing a backend\n==================\n\nLightning supports two backends. DataParallel and DistributedDataParallel.\n Bot...
[ { "content": "\"\"\"\nLightning makes multi-gpu training and 16 bit training trivial.\n\n.. note:: None of the flags below require changing anything about your lightningModel definition.\n\nChoosing a backend\n==================\n\nLightning supports two backends. DataParallel and DistributedDataParallel.\n Bot...
diff --git a/pytorch_lightning/trainer/distrib_parts.py b/pytorch_lightning/trainer/distrib_parts.py index 73efaf67c486b..db4e132c0b445 100644 --- a/pytorch_lightning/trainer/distrib_parts.py +++ b/pytorch_lightning/trainer/distrib_parts.py @@ -461,10 +461,15 @@ def __transfer_data_to_device(self, batch, device, gpu_id...
pyro-ppl__pyro-1882
Incomplete download of MNIST data ### Description `make test-examples` fails to fully download mnist data dependency for the air example ### Details On `osx==10.14.1` and `docker==18.09.2` ``` git checkout 3ac5a02e0e6b0a11ae796707413c11df2c14ff6b make build pyro_branch=dev pytorch_branch=release python_ve...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport subprocess\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_PATH = os.path.dirname(os.path.abspath(__file__))\nVERSION = \"\"\"\n# This file is auto-generated with the version information dur...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport subprocess\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_PATH = os.path.dirname(os.path.abspath(__file__))\nVERSION = \"\"\"\n# This file is auto-generated with the version information dur...
diff --git a/Makefile b/Makefile index 3d3eb6bd4e..a60c8749ed 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ test: lint docs doctest FORCE pytest -vx -n auto --stage unit test-examples: lint FORCE - pytest -vx -n auto --stage test_examples + pytest -vx --stage test_examples test-tutorials: lint FORCE ...
pypa__pip-3007
pip 7.0.1: you should use "--trusted-host". Hey, no such option "--trusted-host"! ``` $ cat req.txt --extra-index-url http://pip.mycompany.com/simple mylib myanotherlib $ pip install -r req.txt Collecting mylib (from -r req.txt (line 2)) .../urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object ...
[ { "content": "\"\"\"\nRequirements file parsing\n\"\"\"\n\nfrom __future__ import absolute_import\n\nimport os\nimport re\nimport shlex\nimport optparse\nimport warnings\n\nfrom pip._vendor.six.moves.urllib import parse as urllib_parse\nfrom pip._vendor.six.moves import filterfalse\n\nimport pip\nfrom pip.downl...
[ { "content": "\"\"\"\nRequirements file parsing\n\"\"\"\n\nfrom __future__ import absolute_import\n\nimport os\nimport re\nimport shlex\nimport optparse\nimport warnings\n\nfrom pip._vendor.six.moves.urllib import parse as urllib_parse\nfrom pip._vendor.six.moves import filterfalse\n\nimport pip\nfrom pip.downl...
diff --git a/CHANGES.txt b/CHANGES.txt index 124aafb9c4d..21e4051d23f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,8 @@ changes made to the repository protocol made in PEP 470, these options are no longer functional. +* Allow ``--trusted-host`` within a requirements file. :issue:`2822`. + **7.1.2 ...
pyca__cryptography-10345
Allow verifying an x509 cert chain without making assertions about the subject name Thanks to all who worked on the X.509 verification support in version 42. I am trying to use this API for verifying a signing certificate, and realizing that the API requires me to assert a subject name (DNS name or IP address) to ge...
[ { "content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import annotations\n\nimport typing\n\nfrom cryptography.hazmat.bindings._rust import x509 as rus...
[ { "content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import annotations\n\nimport typing\n\nfrom cryptography.hazmat.bindings._rust import x509 as rus...
diff --git a/docs/x509/verification.rst b/docs/x509/verification.rst index 6afc75f289e5..ab360417b482 100644 --- a/docs/x509/verification.rst +++ b/docs/x509/verification.rst @@ -104,6 +104,73 @@ the root of trust: :class:`cryptography.x509.general_name.DNSName`, :class:`cryptography.x509.general_name.IPAddre...
encode__django-rest-framework-2869
allow DateTimeFields to accept strings as input I found an interesting "bug" with Django Rest Framework along with how Django's DateTimeField works. Given the following TestCase: ``` class ReadOnlyDateTimeModel(models.Model): date = models.DateTimeField() def save(self, *args, **kwargs): self.date = '...
[ { "content": "from __future__ import unicode_literals\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.exceptions import ValidationError as DjangoValidationError\nfrom django.core.validators import RegexValidator\nfrom django.forms import ImageField as D...
[ { "content": "from __future__ import unicode_literals\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.exceptions import ValidationError as DjangoValidationError\nfrom django.core.validators import RegexValidator\nfrom django.forms import ImageField as D...
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 68835bded4..460645796a 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -925,6 +925,9 @@ def to_internal_value(self, value): self.fail('invalid', format=humanized_format) def to_representation(self, value): + ...
pypa__virtualenv-2543
PermissionError when using venv creator on Solaris **Issue** Several tests are failing for us on Solaris when `venv` creator is being used (and not just the test suite, installed virtualenv as well): ```console python3.7 -m virtualenv -vvv --with-traceback --creator venv xxxx ``` From what I found out, this is bec...
[ { "content": "from __future__ import annotations\n\nimport os\nimport sys\nfrom abc import ABCMeta, abstractmethod\n\nfrom .activator import Activator\n\nif sys.version_info >= (3, 10):\n from importlib.resources import files\n\n def read_binary(module_name: str, filename: str) -> bytes:\n return (...
[ { "content": "from __future__ import annotations\n\nimport os\nimport sys\nfrom abc import ABCMeta, abstractmethod\n\nfrom .activator import Activator\n\nif sys.version_info >= (3, 10):\n from importlib.resources import files\n\n def read_binary(module_name: str, filename: str) -> bytes:\n return (...
diff --git a/docs/changelog/2543.bugfix.rst b/docs/changelog/2543.bugfix.rst new file mode 100644 index 000000000..5f0d6ca31 --- /dev/null +++ b/docs/changelog/2543.bugfix.rst @@ -0,0 +1,2 @@ +Prevent ``PermissionError`` when using venv creator on systems that deliver files without user write +permission - by :user:`ku...
great-expectations__great_expectations-1870
Use cleaner solution for non-truncating division in python 2 Prefer `from __future__ import division` to `1.*x/y`
[ { "content": "# -*- coding: utf-8 -*-\n#\n# great_expectations documentation build configuration file, created by\n# sphinx-quickstart on Thu Jun 8 23:00:19 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are pr...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# great_expectations documentation build configuration file, created by\n# sphinx-quickstart on Thu Jun 8 23:00:19 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are pr...
diff --git a/docs/changelog.rst b/docs/changelog.rst index 1fc64ceae0f9..e9957adb7c79 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -23,7 +23,7 @@ Develop 0.12.0 ----------------- -* [BREAKING] This release includes a breaking change that *only* affects users who directly call `add_expectation`, `remo...
readthedocs__readthedocs.org-5523
Link to GitHub include 'origin' and thus are broken ## Details I'm facing the same problem as mentioned in #3203 That issue is closed. * Read the Docs project URL: http://datastandard.globalcoffeeplatform.org * Build URL (if applicable): https://readthedocs.org/api/v2/build/8790271.txt * Read the Docs username ...
[ { "content": "\"\"\"Project forms.\"\"\"\nfrom random import choice\nfrom re import fullmatch\nfrom urllib.parse import urlparse\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Fieldset, Layout, HTML\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib....
[ { "content": "\"\"\"Project forms.\"\"\"\nfrom random import choice\nfrom re import fullmatch\nfrom urllib.parse import urlparse\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Fieldset, Layout, HTML\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib....
diff --git a/readthedocs/projects/forms.py b/readthedocs/projects/forms.py index 21e567f275a..e5e32d06dbc 100644 --- a/readthedocs/projects/forms.py +++ b/readthedocs/projects/forms.py @@ -241,12 +241,14 @@ def __init__(self, *args, **kwargs): ) default_choice = (None, '-' * 9) - all_versions...
zulip__zulip-21053
Throw an error when EMAIL_HOST_USER is specified but not email_password As a convenience (from someone who was misreading zulip/zulip-secrets.conf as zulip/secrets.conf), it would be nice to see an error message when EMAIL_HOST_USER is specified but the password is missing in the secrets file.
[ { "content": "import datetime\nimport hashlib\nimport logging\nimport os\nimport smtplib\nfrom email.headerregistry import Address\nfrom email.parser import Parser\nfrom email.policy import default\nfrom email.utils import formataddr, parseaddr\nfrom typing import Any, Dict, List, Mapping, Optional, Sequence, T...
[ { "content": "import datetime\nimport hashlib\nimport logging\nimport os\nimport smtplib\nfrom email.headerregistry import Address\nfrom email.parser import Parser\nfrom email.policy import default\nfrom email.utils import formataddr, parseaddr\nfrom typing import Any, Dict, List, Mapping, Optional, Sequence, T...
diff --git a/zerver/lib/send_email.py b/zerver/lib/send_email.py index f02aabf93ba46..8fae31424b834 100644 --- a/zerver/lib/send_email.py +++ b/zerver/lib/send_email.py @@ -249,6 +249,8 @@ def send_email( ) template = template_prefix.split("/")[-1] + log_email_config_errors() + if dry_run: ...
alltheplaces__alltheplaces-341
La Veneciana (Argentina) Ice cream shop. HTML webpage to scrape: http://www.laveneciana.com.ar/sucursales.html
[ { "content": "import scrapy\nimport re\nfrom locations.items import GeojsonPointItem\nclass LavenecianaSpider(scrapy.Spider):\n name = \"laveneciana\"\n allowed_domains = [\"www.laveneciana.com.ar\"]\n download_delay = 0.5\n start_urls = (\n 'http://www.laveneciana.com.ar/sucursales.html',\n ...
[ { "content": "import scrapy\nimport re\nfrom locations.items import GeojsonPointItem\nclass LavenecianaSpider(scrapy.Spider):\n name = \"laveneciana\"\n allowed_domains = [\"www.laveneciana.com.ar\"]\n download_delay = 0.5\n start_urls = (\n 'http://www.laveneciana.com.ar/sucursales.html',\n ...
diff --git a/locations/spiders/laveneciana.py b/locations/spiders/laveneciana.py index c4fb2313331..dcbeed0ffe9 100644 --- a/locations/spiders/laveneciana.py +++ b/locations/spiders/laveneciana.py @@ -23,13 +23,9 @@ def parse(self, response): lat='' lon='' id='' - ...
wemake-services__wemake-python-styleguide-2500
WPS204: Overused expression should not count -1 ### What's wrong WPS complains about -1 being used to often as overused expression. Example: `position = (0, -1)` ### How it should be No violation should be raised. See https://github.com/wemake-services/wemake-python-styleguide/issues/1753 ### Flake8 version and ...
[ { "content": "import ast\nfrom typing import Union\n\nfrom wemake_python_styleguide.compat.aliases import FunctionNodes\nfrom wemake_python_styleguide.compat.nodes import Constant\nfrom wemake_python_styleguide.constants import SPECIAL_ARGUMENT_NAMES_WHITELIST\nfrom wemake_python_styleguide.logic import nodes, ...
[ { "content": "import ast\nfrom typing import Union\n\nfrom wemake_python_styleguide.compat.aliases import FunctionNodes\nfrom wemake_python_styleguide.compat.nodes import Constant\nfrom wemake_python_styleguide.constants import SPECIAL_ARGUMENT_NAMES_WHITELIST\nfrom wemake_python_styleguide.logic import nodes, ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bcb32287..0f1b69f52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,9 +21,16 @@ Semantic versioning in our case means: ### Features +- **Breaking**: drops `python3.6` support - Adds `__init_subclass__` in the beginning of accepted methods order as per WPS338 ...
buildbot__buildbot-3640
Git step tries to extract the git version, even if output is not from Git If on a system you have a git command (but somehow it is a rogue one and don't output anything) or if your Twisted spawn_process goes wild (ex on Windows) you can end up with this error on Buildbot ``` buildbot/steps/source/git.py", line 5...
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
diff --git a/master/buildbot/steps/source/git.py b/master/buildbot/steps/source/git.py index 837d5fd3c9a3..223d5f8fdb5d 100644 --- a/master/buildbot/steps/source/git.py +++ b/master/buildbot/steps/source/git.py @@ -583,9 +583,13 @@ def checkBranchSupport(self): stdout = yield self._dovccmd(['--version'], colle...
googleapis__python-bigquery-1751
Support jsonExtension in LoadJobConfig This would allow running the equivalent to: ``` bq load --source_format=NEWLINE_DELIMITED_JSON --json_extension=GEOJSON <some>.<table> <some_geojson_path> ```
[ { "content": "# Copyright 2015 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ { "content": "# Copyright 2015 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
diff --git a/google/cloud/bigquery/job/load.py b/google/cloud/bigquery/job/load.py index 6b6c8bfd9..176435456 100644 --- a/google/cloud/bigquery/job/load.py +++ b/google/cloud/bigquery/job/load.py @@ -327,6 +327,19 @@ def ignore_unknown_values(self): def ignore_unknown_values(self, value): self._set_sub_p...
certbot__certbot-9029
Missing command line option --no-reuse-key Using the --reuse-key command line option modifies the renewal configuration file (in a magical undocumented way) so as to make the reusing of the existing key persistent for subsequent automatic renewals. There is no (non-magical) documented way to reverse this, and to remove...
[ { "content": "\"\"\"Certbot command line argument & config processing.\"\"\"\n# pylint: disable=too-many-lines\nimport argparse\nimport logging\nimport logging.handlers\nimport sys\nfrom typing import Optional\n\nimport certbot\nfrom certbot._internal import constants\nfrom certbot._internal.cli.cli_constants i...
[ { "content": "\"\"\"Certbot command line argument & config processing.\"\"\"\n# pylint: disable=too-many-lines\nimport argparse\nimport logging\nimport logging.handlers\nimport sys\nfrom typing import Optional\n\nimport certbot\nfrom certbot._internal import constants\nfrom certbot._internal.cli.cli_constants i...
diff --git a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py index 18bc243e4db..12c45088fe9 100644 --- a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py +++ b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py...
django-cms__django-cms-2782
session language is not overwritten with LanguageCookieMiddleware session language is not overwritten with LanguageCookieMiddleware
[ { "content": "# -*- coding: utf-8 -*-\nimport datetime\n\nfrom django.utils.translation import get_language\nfrom django.conf import settings\n\n\nclass LanguageCookieMiddleware(object):\n def process_response(self, request, response):\n language = get_language()\n if settings.LANGUAGE_COOKIE_N...
[ { "content": "# -*- coding: utf-8 -*-\nimport datetime\n\nfrom django.utils.translation import get_language\nfrom django.conf import settings\n\n\nclass LanguageCookieMiddleware(object):\n def process_response(self, request, response):\n language = get_language()\n if hasattr(request, 'session'...
diff --git a/cms/middleware/language.py b/cms/middleware/language.py index d30802d7cf5..9a9852b0436 100644 --- a/cms/middleware/language.py +++ b/cms/middleware/language.py @@ -8,6 +8,11 @@ class LanguageCookieMiddleware(object): def process_response(self, request, response): language = get_language() + ...
sunpy__sunpy-3371
Lat and Lon the wrong way around when put into fitshe`sunpy.map.make_fitswcs_header` # Description I think its a bug in the `make_fitswcs_header` here https://github.com/sunpy/sunpy/blob/master/sunpy/map/header_helper.py#L134 The x and y values of the input SkyCoord (i.e. lon and lat) are put into the fits header a...
[ { "content": "import warnings\n\nimport numpy as np\n\nimport astropy.units as u\nimport astropy.wcs\nfrom astropy.coordinates import SkyCoord\n\nfrom sunpy.coordinates import frames\nfrom sunpy.util import MetaDict\nfrom sunpy.util.exceptions import SunpyUserWarning\n\n__all__ = ['meta_keywords', 'make_fitswcs...
[ { "content": "import warnings\n\nimport numpy as np\n\nimport astropy.units as u\nimport astropy.wcs\nfrom astropy.coordinates import SkyCoord\n\nfrom sunpy.coordinates import frames\nfrom sunpy.util import MetaDict\nfrom sunpy.util.exceptions import SunpyUserWarning\n\n__all__ = ['meta_keywords', 'make_fitswcs...
diff --git a/changelog/3371.bugfix.rst b/changelog/3371.bugfix.rst new file mode 100644 index 00000000000..1fbc87d0fb1 --- /dev/null +++ b/changelog/3371.bugfix.rst @@ -0,0 +1 @@ +Fixing the ordering of lon and lat inputs into make_fitswcs_header \ No newline at end of file diff --git a/sunpy/map/header_helper.py b/su...
sunpy__sunpy-2956
Improve our warnings in line with PEP 565 See astropy/astropy#8465
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nThis module contains errors/exceptions and warnings of general use for\nsunpy. Exceptions that are specific to a given subpackage should *not*\nbe here, but rather in the particular subpackage.\n\"\"\"\n\nclass SunpyWarning(W...
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nThis module contains errors/exceptions and warnings of general use for\nsunpy. Exceptions that are specific to a given subpackage should *not*\nbe here, but rather in the particular subpackage.\n\"\"\"\nimport sys\n\n\nclass ...
diff --git a/sunpy/util/exceptions.py b/sunpy/util/exceptions.py index af62af7daca..c728fa1c872 100644 --- a/sunpy/util/exceptions.py +++ b/sunpy/util/exceptions.py @@ -4,6 +4,8 @@ sunpy. Exceptions that are specific to a given subpackage should *not* be here, but rather in the particular subpackage. """ +import sys...
microsoft__hi-ml-784
BaseMIL output files no longer contain the "bottom" column In the datafiles that are output for test set predictions, we seem to have lost the "bottom" column. "left", "right", "top" are still present. Hence, we can't create attention heatmap plots.
[ { "content": "# ------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.\n# ------------------------------------------...
[ { "content": "# ------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.\n# ------------------------------------------...
diff --git a/hi-ml-cpath/src/health_cpath/models/deepmil.py b/hi-ml-cpath/src/health_cpath/models/deepmil.py index 7a864b2cd..25c1c9191 100644 --- a/hi-ml-cpath/src/health_cpath/models/deepmil.py +++ b/hi-ml-cpath/src/health_cpath/models/deepmil.py @@ -299,7 +299,7 @@ def update_results_with_metadata(self, batch: Dict,...
ray-project__ray-8842
[Asyncio] InvalidStateError when multiple awaits on same oid <!--Please include [tune], [rllib], [autoscaler] etc. in the issue title if relevant--> ### What is the problem? *Ray version and other system information (Python version, TensorFlow version, OS):* ### Reproduction (REQUIRED) Please provide a script...
[ { "content": "\"\"\"\nThis file should only be imported from Python 3.\nIt will raise SyntaxError when importing from Python 2.\n\"\"\"\nimport asyncio\nfrom collections import namedtuple\nimport time\nimport inspect\n\nimport ray\n\n\ndef sync_to_async(func):\n \"\"\"Convert a blocking function to async fun...
[ { "content": "\"\"\"\nThis file should only be imported from Python 3.\nIt will raise SyntaxError when importing from Python 2.\n\"\"\"\nimport asyncio\nfrom collections import namedtuple\nimport time\nimport inspect\n\nimport ray\n\n\ndef sync_to_async(func):\n \"\"\"Convert a blocking function to async fun...
diff --git a/python/ray/async_compat.py b/python/ray/async_compat.py index ff1cd595a3e90..1428e765c08fe 100644 --- a/python/ray/async_compat.py +++ b/python/ray/async_compat.py @@ -75,6 +75,11 @@ def done_callback(future): # Result from direct call. assert isinstance(result, AsyncGetResponse),...
fossasia__open-event-server-5824
Implement checks on deleting an event **Is your feature request related to a problem? Please describe.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> Deleting of an event should be prevent by an API if any order has been placed for the event, in order to avoid ...
[ { "content": "from flask import request, current_app\nfrom flask_jwt import current_identity, _jwt_required\nfrom flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom flask_rest_jsonapi.exceptions import ObjectNotFound\nfrom marshmallow_jsonapi import fields\nfrom marshmallow_jsona...
[ { "content": "from flask import request, current_app\nfrom flask_jwt import current_identity, _jwt_required\nfrom flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\nfrom flask_rest_jsonapi.exceptions import ObjectNotFound\nfrom marshmallow_jsonapi import fields\nfrom marshmallow_jsona...
diff --git a/app/api/events.py b/app/api/events.py index c4b5b9e62a..02f2cf06ab 100644 --- a/app/api/events.py +++ b/app/api/events.py @@ -468,9 +468,11 @@ def before_update_object(self, event, data, view_kwargs): :param view_kwargs: :return: """ - if has_access('is_admin') and data....
hylang__hy-2167
Tests are failing on Python 3.10.0rc2 `(require tests.resources.macro-with-require)` leads to ``` … File "/home/hippo/Workspace/hyenv/hy/hy/macros.py", line 134, in require parent_frame = inspect.stack()[1][0] File "/home/hippo/Workspace/Python-3.10.0rc2/mybuild/lib/python3.10/inspect.py", line 1676, in ...
[ { "content": "import sys\nimport os\nimport builtins\nimport importlib\nimport inspect\nimport pkgutil\nimport traceback\nfrom ast import AST\n\nfrom funcparserlib.parser import NoParseError\n\nfrom hy._compat import PY3_8\nfrom hy.model_patterns import whole\nfrom hy.models import replace_hy_obj, Expression, S...
[ { "content": "import sys\nimport os\nimport builtins\nimport importlib\nimport inspect\nimport pkgutil\nimport traceback\nfrom ast import AST\n\nfrom funcparserlib.parser import NoParseError\n\nfrom hy._compat import PY3_8, PY3_10\nfrom hy.model_patterns import whole\nfrom hy.models import replace_hy_obj, Expre...
diff --git a/hy/macros.py b/hy/macros.py index f211c737f..239915b2f 100644 --- a/hy/macros.py +++ b/hy/macros.py @@ -9,7 +9,7 @@ from funcparserlib.parser import NoParseError -from hy._compat import PY3_8 +from hy._compat import PY3_8, PY3_10 from hy.model_patterns import whole from hy.models import replace_hy_o...
qtile__qtile-1687
Ampersands need to be escaped in WindowName widget # Issue description Ampersands in window names need to be changed in WindowName widget to "&amp;" before being passed to Pango/Cairo # Qtile version 0.15.1 # Stack traces Exception: parse_markup() failed for b'Seth Lakeman - King & Country' 2020-04-27 19:12:0...
[ { "content": "# Copyright (c) 2008, 2010 Aldo Cortesi\n# Copyright (c) 2010 matt\n# Copyright (c) 2011 Mounier Florian\n# Copyright (c) 2012 Tim Neumann\n# Copyright (c) 2013 Craig Barnes\n# Copyright (c) 2014 Sean Vig\n# Copyright (c) 2014 Tycho Andersen\n#\n# Permission is hereby granted, free of charge, to a...
[ { "content": "# Copyright (c) 2008, 2010 Aldo Cortesi\n# Copyright (c) 2010 matt\n# Copyright (c) 2011 Mounier Florian\n# Copyright (c) 2012 Tim Neumann\n# Copyright (c) 2013 Craig Barnes\n# Copyright (c) 2014 Sean Vig\n# Copyright (c) 2014 Tycho Andersen\n#\n# Permission is hereby granted, free of charge, to a...
diff --git a/libqtile/widget/windowname.py b/libqtile/widget/windowname.py index 7dea10aef9..daad401483 100644 --- a/libqtile/widget/windowname.py +++ b/libqtile/widget/windowname.py @@ -24,7 +24,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from libqtile import b...
celery__celery-1206
MongoDB and BROKER_USE_SSL=True I've recently started with mongodb and BROKER_USE_SSL=True, this doesn't seem to work. Celery is trying to reconnect with Re-establishing connection message. BROKER_USE_SSL=False works well. ``` python [2013-02-21 14:57:45,708: DEBUG/MainProcess] consumer: Re-establishing connection to...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n celery.backends.mongodb\n ~~~~~~~~~~~~~~~~~~~~~~~\n\n MongoDB result store backend.\n\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom datetime import datetime\n\ntry:\n import pymongo\nexcept ImportError: # pragma: no cover\n pymongo = None...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n celery.backends.mongodb\n ~~~~~~~~~~~~~~~~~~~~~~~\n\n MongoDB result store backend.\n\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom datetime import datetime\n\ntry:\n import pymongo\nexcept ImportError: # pragma: no cover\n pymongo = None...
diff --git a/celery/backends/mongodb.py b/celery/backends/mongodb.py index 489cb22fbb6..ec4fc32f34f 100644 --- a/celery/backends/mongodb.py +++ b/celery/backends/mongodb.py @@ -96,7 +96,10 @@ def _get_connection(self): # This enables the use of replica sets and sharding. # See pymongo.Connecti...
mdn__kuma-6739
T - Add email to whoami userData so that Stripe form can be prefilled.
[ { "content": "from django.conf import settings\nfrom django.http import Http404, HttpResponsePermanentRedirect, JsonResponse\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.translation import activate, gettext as _\nfrom django.views.decorators.cache import never_cache\nfrom django.views.deco...
[ { "content": "from django.conf import settings\nfrom django.http import Http404, HttpResponsePermanentRedirect, JsonResponse\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.translation import activate, gettext as _\nfrom django.views.decorators.cache import never_cache\nfrom django.views.deco...
diff --git a/kuma/api/v1/tests/test_views.py b/kuma/api/v1/tests/test_views.py index 6bbb8bbaac6..0e68fdf48c8 100644 --- a/kuma/api/v1/tests/test_views.py +++ b/kuma/api/v1/tests/test_views.py @@ -223,6 +223,7 @@ def test_whoami_anonymous(client, settings, timezone): "samples": {"sample_always": True, "sam...
ibis-project__ibis-3341
bug: wrong results when a group_by is followed by a filter Note: I am not sure whether this one should stay here or go to the ibis_bigquery repo. However, I think this one is quite serious because it leads very hard-to-detect bugs. ``` import ibis import ibis_bigquery from google.cloud import bigquery import ...
[ { "content": "from __future__ import annotations\n\nimport operator\n\nimport toolz\n\nimport ibis.expr.lineage as lin\nimport ibis.expr.operations as ops\nimport ibis.expr.types as ir\nfrom ibis import util\nfrom ibis.common.exceptions import (\n ExpressionError,\n IbisTypeError,\n RelationError,\n)\n...
[ { "content": "from __future__ import annotations\n\nimport operator\n\nimport toolz\n\nimport ibis.expr.lineage as lin\nimport ibis.expr.operations as ops\nimport ibis.expr.types as ir\nfrom ibis import util\nfrom ibis.common.exceptions import (\n ExpressionError,\n IbisTypeError,\n RelationError,\n)\n...
diff --git a/ibis/expr/analysis.py b/ibis/expr/analysis.py index 281961beb090..cf421fa1b920 100644 --- a/ibis/expr/analysis.py +++ b/ibis/expr/analysis.py @@ -620,7 +620,12 @@ def apply_filter(expr, predicates): # Potential fusion opportunity # GH1344: We can't sub in things with correlated subqueries...
encode__starlette-707
Strip trailing slash ( / ) from URL route strings. Hey all, an optional trailing slash seems to be pretty standard on most websites, but in Starlette, you must add separate routes to handle them. Example: ``` routes = [ Route('/', PlainTextResponse("home")), Route('/test', PlainTextResponse("test")), ...
[ { "content": "import asyncio\nimport inspect\nimport re\nimport traceback\nimport typing\nfrom enum import Enum\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.convertors import CONVERTOR_TYPES, Convertor\nfrom starlette.datastructures import URL, Headers, URLPath\nfrom starlette.exceptio...
[ { "content": "import asyncio\nimport inspect\nimport re\nimport traceback\nimport typing\nfrom enum import Enum\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.convertors import CONVERTOR_TYPES, Convertor\nfrom starlette.datastructures import URL, Headers, URLPath\nfrom starlette.exceptio...
diff --git a/starlette/routing.py b/starlette/routing.py index e1c5cca72..f74fe820d 100644 --- a/starlette/routing.py +++ b/starlette/routing.py @@ -615,9 +615,14 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: return if scope["type"] == "http" and self.redirect_...
scoutapp__scout_apm_python-219
Core Agent inheriting and holding open sockets from parent Reported via Slack: ``` Mike O'Toole 9:12 AM hey there -- are there any instructions available on installing/starting the core-agent separately from a django app? cschneid:scout-orange: 9:13 AM @Mike O'Toole - the binary gets downloaded to /tmp/scout_a...
[ { "content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport hashlib\nimport json\nimport logging\nimport os\nimport subprocess\nimport tarfile\nimport time\n\nimport requests\n\nfrom scout_apm.core.context import AgentContext\n\nlogger = logging.get...
[ { "content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport hashlib\nimport json\nimport logging\nimport os\nimport subprocess\nimport tarfile\nimport time\n\nimport requests\n\nfrom scout_apm.core.context import AgentContext\n\nlogger = logging.get...
diff --git a/CHANGELOG.md b/CHANGELOG.md index b13b33eb..6a2bc6a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Pending + +### Fixed + +- Close file descriptors when launching the core agent process. This fixes a + bug where uwsgi's HTTP ports would be held by the it on Python 2.7. +...
python-telegram-bot__python-telegram-bot-597
add reasons description when an Unauthorized exceptions occurs Add possibility to know the description of an Unauthorized exceptions. Botogram (https://botogram.pietroalbini.org/) has the feature and it returns a description of the error well documented here: https://botogram.pietroalbini.org/docs/dev/unavailable-ch...
[ { "content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2016\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Pub...
[ { "content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2016\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Pub...
diff --git a/telegram/error.py b/telegram/error.py index b6155965688..9f0f77a4036 100644 --- a/telegram/error.py +++ b/telegram/error.py @@ -62,9 +62,7 @@ def __str__(self): class Unauthorized(TelegramError): - - def __init__(self): - super(Unauthorized, self).__init__('Unauthorized') + pass clas...
tornadoweb__tornado-2395
KeyError when closing IOLoop This started showing up in Dask's test suite recently: ```python-traceback distributed/utils_test.py:144: in pristine_loop loop.close(all_fds=True) ../../Software/anaconda/envs/test-environment/lib/python3.6/site-packages/tornado/platform/asyncio.py:223: in close super(AsyncI...
[ { "content": "\"\"\"Bridges between the `asyncio` module and Tornado IOLoop.\n\n.. versionadded:: 3.2\n\nThis module integrates Tornado with the ``asyncio`` module introduced\nin Python 3.4. This makes it possible to combine the two libraries on\nthe same event loop.\n\n.. deprecated:: 5.0\n\n While the code ...
[ { "content": "\"\"\"Bridges between the `asyncio` module and Tornado IOLoop.\n\n.. versionadded:: 3.2\n\nThis module integrates Tornado with the ``asyncio`` module introduced\nin Python 3.4. This makes it possible to combine the two libraries on\nthe same event loop.\n\n.. deprecated:: 5.0\n\n While the code ...
diff --git a/tornado/platform/asyncio.py b/tornado/platform/asyncio.py index b6a490afac..e0042e1d9b 100644 --- a/tornado/platform/asyncio.py +++ b/tornado/platform/asyncio.py @@ -62,8 +62,13 @@ def close(self, all_fds=False): self.remove_handler(fd) if all_fds: self.close_fd(f...
huggingface__diffusers-1196
Memory efficient attention not working with fp16 weights ### Describe the bug Following the example code with available in the `0.7.0` release ```py from diffusers import StableDiffusionPipeline import torch pipe = StableDiffusionPipeline.from_pretrained( "runwayml/stable-diffusion-v1-5", revision="...
[ { "content": "# Copyright 2022 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 2022 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/src/diffusers/models/attention.py b/src/diffusers/models/attention.py index bac85e2f39cf..e8ea37970e04 100644 --- a/src/diffusers/models/attention.py +++ b/src/diffusers/models/attention.py @@ -492,6 +492,8 @@ def forward(self, hidden_states, context=None, mask=None): # attention, what we cannot g...
elastic__apm-agent-python-1470
Missing error message: Oops. That didn't work. The following error occured: **Describe the bug**: No error message appear ``` >> python3 manage.py elasticapm test Trying to send a test error to APM Server using these settings: SERVICE_NAME: DJANGO_DEVELOPMENT SECRET_TOKEN: xxx SERVER: http://localhost:8200...
[ { "content": "# -*- coding: utf-8 -*-\n\n# BSD 3-Clause License\n#\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 conditions are met:\n#\n# * Redistributions...
[ { "content": "# -*- coding: utf-8 -*-\n\n# BSD 3-Clause License\n#\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 conditions are met:\n#\n# * Redistributions...
diff --git a/elasticapm/transport/http.py b/elasticapm/transport/http.py index fa51450e8..16f2c9d52 100644 --- a/elasticapm/transport/http.py +++ b/elasticapm/transport/http.py @@ -194,7 +194,7 @@ def fetch_server_info(self): body = response.data data = json_encoder.loads(body.decode("utf8")) ...
ray-project__ray-10767
[autoscaler] Usability regressions in new autoscaler output @richardliaw we've regressed the output here, it's a minor issue but super annoying. ``` Useful commands Monitor autoscaling with ray exec example-ml.yaml 'tail -n 100 -f /tmp/ray/session_latest/logs/monitor*' Connect to a terminal on the cluste...
[ { "content": "import colorful as cf\nimport copy\nimport hashlib\nimport json\nimport logging\nimport os\nimport random\nimport sys\nimport subprocess\nimport tempfile\nimport time\nfrom typing import Any, Dict, Optional\n\nimport click\nimport yaml\ntry: # py3\n from shlex import quote\nexcept ImportError:...
[ { "content": "import colorful as cf\nimport copy\nimport hashlib\nimport json\nimport logging\nimport os\nimport random\nimport sys\nimport subprocess\nimport tempfile\nimport time\nfrom typing import Any, Dict, Optional\n\nimport click\nimport yaml\ntry: # py3\n from shlex import quote\nexcept ImportError:...
diff --git a/python/ray/autoscaler/commands.py b/python/ray/autoscaler/commands.py index c49408456dc18..b3b32763b0721 100644 --- a/python/ray/autoscaler/commands.py +++ b/python/ray/autoscaler/commands.py @@ -730,9 +730,13 @@ def get_or_create_head_node(config, cf.bold(" ray exec {}{} {}"), config_fil...
scrapy__scrapy-2496
TypeError: 'float' object is not iterable (on Twisted dev + Scrapy dev) This happens on Twisted trunk and with latest Scrapy master. ``` $ scrapy shell http://localhost:8081/ 2016-12-22 12:52:01 [scrapy.utils.log] INFO: Scrapy 1.2.2 started (bot: scrapybot) 2016-12-22 12:52:01 [scrapy.utils.log] INFO: Overridden ...
[ { "content": "from twisted.internet import defer\nfrom twisted.internet.base import ThreadedResolver\n\nfrom scrapy.utils.datatypes import LocalCache\n\n# TODO: cache misses\n\ndnscache = LocalCache(10000)\n\nclass CachingThreadedResolver(ThreadedResolver):\n def __init__(self, reactor, cache_size, timeout):...
[ { "content": "from twisted.internet import defer\nfrom twisted.internet.base import ThreadedResolver\n\nfrom scrapy.utils.datatypes import LocalCache\n\n# TODO: cache misses\n\ndnscache = LocalCache(10000)\n\nclass CachingThreadedResolver(ThreadedResolver):\n def __init__(self, reactor, cache_size, timeout):...
diff --git a/scrapy/resolver.py b/scrapy/resolver.py index 3954fd97757..4f4f0b04f00 100644 --- a/scrapy/resolver.py +++ b/scrapy/resolver.py @@ -16,8 +16,11 @@ def __init__(self, reactor, cache_size, timeout): def getHostByName(self, name, timeout=None): if name in dnscache: return defer.succ...
geopandas__geopandas-1602
BUG: rename_geometry should check if duplicate column name is created Currently if you use the name of an existing column in `rename_geometry`, you get a bit confusing error message: ```python >>> df = geopandas.read_file(geopandas.datasets.get_path("naturalearth_lowres")) # this gives a not super helpful error ...
[ { "content": "import json\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas import DataFrame, Series\n\nfrom shapely.geometry import mapping, shape\nfrom shapely.geometry.base import BaseGeometry\n\n\nfrom pyproj import CRS\n\nfrom geopandas.array import GeometryArray, from_shapely, Geome...
[ { "content": "import json\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas import DataFrame, Series\n\nfrom shapely.geometry import mapping, shape\nfrom shapely.geometry.base import BaseGeometry\n\n\nfrom pyproj import CRS\n\nfrom geopandas.array import GeometryArray, from_shapely, Geome...
diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py index a764b17885..8b7d82ecb5 100644 --- a/geopandas/geodataframe.py +++ b/geopandas/geodataframe.py @@ -289,10 +289,15 @@ def rename_geometry(self, col, inplace=False): geodataframe : GeoDataFrame """ geometry_col = self.geome...
HypothesisWorks__hypothesis-1524
note should print when verbosity is set to at least verbose We have the `note` function that prints its argument only on the final example, but actually it should probably print it for *every* example when `verbosity >= Verbosity.verbose`, so that people can actually see the tests as they run.
[ { "content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2018 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a f...
[ { "content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2018 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a f...
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index be4a92c188..f10164e240 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -204,6 +204,7 @@ their individual contributions. * `Sushobhit <https://github.com/sushobhit27>`_ (sushobhitsolanki@gmail.com) * `Tariq Khokhar <https://www.github.com/tkb>`_ (tariq@kho...
googleapis__google-auth-library-python-451
Breaking changes for impersonated_credentials between 1.6.3 and 1.7.0+ #### Environment details - OS: MacOS Mojave - Python version: 3.7.3 - pip version: 19.0.3 - `google-auth` version: 1.6.3, 1.7.0, 1.10.0 The default credentials are my user credentials (with the ServiceAccountTokenCreator role on the...
[ { "content": "# Copyright 2018 Google 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 applica...
[ { "content": "# Copyright 2018 Google 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 applica...
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index f95b1f1dc..bd92ca8d4 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -43,21 +43,27 @@ To run a single session, specify it with ``nox -s``:: $ nox -f system_tests/noxfile.py -s service_account + +Project and Credentials Setup +----------------------...
plone__Products.CMFPlone-3367
DX-Site-Root: ZMI Nav-Tree is no longer expandable After migrating to dx-site-root, the navtree within the zmi is no longer expandable ![Screenshot 2021-09-20 at 09 10 52](https://user-images.githubusercontent.com/365761/133967168-6a1b8f88-b8ca-4252-9d60-91ca842a0e3e.png) https://github.com/plone/Products.CMFPlon...
[ { "content": "from AccessControl import ClassSecurityInfo\nfrom AccessControl import Unauthorized\nfrom AccessControl.class_init import InitializeClass\nfrom Acquisition import aq_base\nfrom ComputedAttribute import ComputedAttribute\nfrom five.localsitemanager.registry import PersistentComponents\nfrom OFS.Obj...
[ { "content": "from AccessControl import ClassSecurityInfo\nfrom AccessControl import Unauthorized\nfrom AccessControl.class_init import InitializeClass\nfrom Acquisition import aq_base\nfrom ComputedAttribute import ComputedAttribute\nfrom five.localsitemanager.registry import PersistentComponents\nfrom OFS.Obj...
diff --git a/Products/CMFPlone/Portal.py b/Products/CMFPlone/Portal.py index 8710dbbb18..024a9e49cf 100644 --- a/Products/CMFPlone/Portal.py +++ b/Products/CMFPlone/Portal.py @@ -137,6 +137,16 @@ def __before_publishing_traverse__(self, arg1, arg2=None): super(PloneSite, self).__before_publishing_traverse__(...
opendatacube__datacube-core-394
Ambiguous boolean check in `query_geopolygon` Failure report from NCI install: ``` /g/data/v10/public/modules/agdc-py3/1.5.4/lib/python3.6/site-packages/datacube/api/query.py in query_geopolygon(geopolygon, **kwargs) 172 raise ValueError('Spatial dimensions must be in the same coordinate reference syst...
[ { "content": "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agree...
[ { "content": "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agree...
diff --git a/datacube/api/query.py b/datacube/api/query.py index f162e670a8..c6ec03a925 100644 --- a/datacube/api/query.py +++ b/datacube/api/query.py @@ -194,10 +194,13 @@ def query_geopolygon(geopolygon=None, **kwargs): elif len(crs) > 1: raise ValueError('Spatial dimensions must be in the same coordina...
pydantic__pydantic-9134
Using a private attribute in model_post_init of subclass ### Initial Checks - [X] I confirm that I'm using Pydantic V2 ### Description Using/accessing/checking a private attribute in `model_post_init` of a subclass *before* calling `super().model_post_init` raises a cryptic `TypeError: 'NoneType' object is not subsc...
[ { "content": "\"\"\"Private logic for creating models.\"\"\"\nfrom __future__ import annotations as _annotations\n\nimport builtins\nimport operator\nimport typing\nimport warnings\nimport weakref\nfrom abc import ABCMeta\nfrom functools import partial\nfrom types import FunctionType\nfrom typing import Any, Ca...
[ { "content": "\"\"\"Private logic for creating models.\"\"\"\nfrom __future__ import annotations as _annotations\n\nimport builtins\nimport operator\nimport typing\nimport warnings\nimport weakref\nfrom abc import ABCMeta\nfrom functools import partial\nfrom types import FunctionType\nfrom typing import Any, Ca...
diff --git a/pydantic/_internal/_model_construction.py b/pydantic/_internal/_model_construction.py index 86bdba2b8e9..74766293ce1 100644 --- a/pydantic/_internal/_model_construction.py +++ b/pydantic/_internal/_model_construction.py @@ -93,7 +93,7 @@ def __new__( private_attributes = inspect_namespace( ...
ansible__molecule-130
molecule converge --tags <tags> fails if not created `molecule converge` will first call `molecule create` if instances haven't been created. This causes an error when passing --tags to `molecule converge` since `create` doesn't support tags.
[ { "content": "# Copyright (c) 2015 Cisco Systems\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, c...
[ { "content": "# Copyright (c) 2015 Cisco Systems\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, c...
diff --git a/molecule/commands.py b/molecule/commands.py index bc874c31c6..116798a4c0 100644 --- a/molecule/commands.py +++ b/molecule/commands.py @@ -190,7 +190,22 @@ def execute(self, idempotent=False, create_instances=True, create_inventory=True create_inventory = False if create_instances an...
pypi__warehouse-3525
Remove X-Forwarded-Proto/X-Forwarded-Port h2o workaround [In `warehouse/utils/wsgi.py`](https://github.com/pypa/warehouse/blob/master/warehouse/utils/wsgi.py#L51-L58) we note that once https://github.com/h2o/h2o/issues/883 is solved, we can remove a few lines about `X-Forwarded-Port` and `X-Forwarded-Proto`. They resol...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
diff --git a/tests/unit/utils/test_wsgi.py b/tests/unit/utils/test_wsgi.py index 9e1222e39e93..2dfbfdfe9b83 100644 --- a/tests/unit/utils/test_wsgi.py +++ b/tests/unit/utils/test_wsgi.py @@ -149,30 +149,6 @@ def test_selects_right_x_forwarded_value(self): ), ] - def test_accepts_x_forwarded_p...
urllib3__urllib3-3150
Cannot pass ssl kwarg cert_data in proxy context Discovered that one while writting tls-in-tls http/2 tests in #3030 While we can do ```python with proxy_from_url("...", ca_certs=DEFAULT_CA) as http: ... ``` we cannot ```python with proxy_from_url("...", cert_data=open(DEFAULT_CA, "rb").read()) as...
[ { "content": "from __future__ import annotations\n\nimport functools\nimport logging\nimport typing\nimport warnings\nfrom types import TracebackType\nfrom urllib.parse import urljoin\n\nfrom ._collections import HTTPHeaderDict, RecentlyUsedContainer\nfrom ._request_methods import RequestMethods\nfrom .connecti...
[ { "content": "from __future__ import annotations\n\nimport functools\nimport logging\nimport typing\nimport warnings\nfrom types import TracebackType\nfrom urllib.parse import urljoin\n\nfrom ._collections import HTTPHeaderDict, RecentlyUsedContainer\nfrom ._request_methods import RequestMethods\nfrom .connecti...
diff --git a/changelog/3065.bugfix.rst b/changelog/3065.bugfix.rst new file mode 100644 index 0000000000..e9be364072 --- /dev/null +++ b/changelog/3065.bugfix.rst @@ -0,0 +1,3 @@ +Fixed an issue where it was not possible to pass the ca_cert_data keyword argument in a proxy context when making SSL +requests. Previously,...
CTFd__CTFd-1830
Potentially expose user standings in admin scoreboard This could let people give out awards for users who earn the most points or something like that. The issue with this is that user standings don't really mean anything. A user that earned all the points in a team might just have been the person to submit all the ...
[ { "content": "from flask import render_template\n\nfrom CTFd.admin import admin\nfrom CTFd.scoreboard import get_standings\nfrom CTFd.utils.decorators import admins_only\n\n\n@admin.route(\"/admin/scoreboard\")\n@admins_only\ndef scoreboard_listing():\n standings = get_standings(admin=True)\n return rende...
[ { "content": "from flask import render_template\n\nfrom CTFd.admin import admin\nfrom CTFd.utils.config import is_teams_mode\nfrom CTFd.utils.decorators import admins_only\nfrom CTFd.utils.scores import get_standings, get_user_standings\n\n\n@admin.route(\"/admin/scoreboard\")\n@admins_only\ndef scoreboard_list...
diff --git a/CTFd/admin/scoreboard.py b/CTFd/admin/scoreboard.py index b1c7374c4..c876814dd 100644 --- a/CTFd/admin/scoreboard.py +++ b/CTFd/admin/scoreboard.py @@ -1,12 +1,16 @@ from flask import render_template from CTFd.admin import admin -from CTFd.scoreboard import get_standings +from CTFd.utils.config import ...
mkdocs__mkdocs-2916
ConfigItems overwrites all data with last entry in the list of config items `ConfigItems` does not work as expected and results in a list of items that contains only the same values. ### Reproduciton `plugin.py` ```python class TestPlugin(BasePlugin): config_scheme = ( ( "items", mkdo...
[ { "content": "import os\nimport sys\nimport traceback\nfrom collections import namedtuple\nfrom collections.abc import Sequence\nfrom urllib.parse import urlsplit, urlunsplit\nimport ipaddress\nimport markdown\n\nfrom mkdocs import utils, theme, plugins\nfrom mkdocs.config.base import Config, ValidationError\n\...
[ { "content": "import os\nimport sys\nimport traceback\nfrom collections import namedtuple\nfrom collections.abc import Sequence\nfrom urllib.parse import urlsplit, urlunsplit\nimport ipaddress\nimport markdown\n\nfrom mkdocs import utils, theme, plugins\nfrom mkdocs.config.base import Config, ValidationError\n\...
diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py index aea40dd0c8..8bec5b42f1 100644 --- a/mkdocs/config/config_options.py +++ b/mkdocs/config/config_options.py @@ -49,19 +49,17 @@ def post_validation(self, config, key_name): """ -class SubConfig(BaseConfigOption, Config): +cl...
pypi__warehouse-578
Support CORS on JSON API Say I want to show project stats like monthly downloads on the project page. Fetching this from client side JavaScript allows me to retain a completely static project page (can be hosted on a CDN). However, the JSON API does not set `Access-Control-Allow-Origin` header - no CORS support. Test...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
diff --git a/tests/unit/legacy/api/test_json.py b/tests/unit/legacy/api/test_json.py index 4427a9b854d6..d5521496eeb3 100644 --- a/tests/unit/legacy/api/test_json.py +++ b/tests/unit/legacy/api/test_json.py @@ -141,6 +141,13 @@ def test_detail_renders(self, pyramid_config, db_request): headers = db_request.r...
scikit-hep__awkward-2194
Schema is not preserved when reading an empty `RecordArray` from parquet ### Version of Awkward Array 2.0.6 ### Description and code to reproduce Hi! I ran into what looks like a bug (or rather a non-implemented feature) when reading an `ak.RecordArray` stored in a Parquet file. The schema/type is not preserved w...
[ { "content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\n\nimport json\nfrom collections.abc import Iterable, Sized\n\nimport awkward as ak\nfrom awkward._nplikes.numpy import Numpy\nfrom awkward._nplikes.numpylike import NumpyMetadata\n\nnp = NumpyMetadata.instance...
[ { "content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\n\nimport json\nfrom collections.abc import Iterable, Sized\n\nimport awkward as ak\nfrom awkward._nplikes.numpy import Numpy\nfrom awkward._nplikes.numpylike import NumpyMetadata\n\nnp = NumpyMetadata.instance...
diff --git a/src/awkward/_connect/pyarrow.py b/src/awkward/_connect/pyarrow.py index 146063b07d..f049af61b2 100644 --- a/src/awkward/_connect/pyarrow.py +++ b/src/awkward/_connect/pyarrow.py @@ -1001,8 +1001,11 @@ def handle_arrow(obj, generate_bitmasks=False, pass_empty_field=False): elif isinstance(obj, pyarrow....
Lightning-AI__torchmetrics-1587
PearsonCorrCoef UnboundLocalError using ddp I want to use PearsonCorrCoef in my pytorch lightning code with ddp strategy. My num_outputs > 1 In x_step_end, I use CorrCoef.update(preds, targets) In x_epoch_end, I use CorrCoef.compute().mean() Always received ``` File "/home/xx/Documents/anconda3/envs/xx/lib/py...
[ { "content": "# Copyright The Lightning team.\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 appli...
[ { "content": "# Copyright The Lightning team.\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 appli...
diff --git a/CHANGELOG.md b/CHANGELOG.md index d1a55c77ce7..9f6dc80500e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,6 +102,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed evaluation of `R2Score` with near constant target ([#1576](https://github.com/Lightning-AI/me...
digitalfabrik__integreat-cms-285
Remove save button on disabled forms Even if objects are archived and the corresponding forms are disabled, the save buttons are still visible, leading to errors when submitting. Remove the buttons for: - [ ] Pages - [ ] Events - [x] POIs
[ { "content": "\"\"\"\n\nReturns:\n [type]: [description]\n\"\"\"\nimport logging\n\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.mixins import PermissionRequiredMixin\nfrom django.core.exceptions import PermissionDenied\nfrom django....
[ { "content": "\"\"\"\n\nReturns:\n [type]: [description]\n\"\"\"\nimport logging\n\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.mixins import PermissionRequiredMixin\nfrom django.core.exceptions import PermissionDenied\nfrom django....
diff --git a/backend/cms/templates/events/event_form.html b/backend/cms/templates/events/event_form.html index 431967c67b..c4c46f4006 100644 --- a/backend/cms/templates/events/event_form.html +++ b/backend/cms/templates/events/event_form.html @@ -59,15 +59,15 @@ <h2 class="heading font-normal"> </div> ...
openstates__openstates-scrapers-2922
KY failing since at least 2019-03-17 KY has been failing since 2019-03-17 Based on automated runs it appears that KY has not run successfully in 2 days (2019-03-17). ``` 06:08:01 INFO scrapelib: GET - https://apps.legislature.ky.gov/record/19RS/sr178.html 06:08:02 INFO pupa: save bill sr178 in 2019RS as bill_3045e...
[ { "content": "import re\nimport datetime\nfrom collections import defaultdict\nfrom pytz import timezone\n\nfrom pupa.scrape import Scraper, Bill\nfrom openstates.utils import LXMLMixin\n\n\ndef chamber_abbr(chamber):\n if chamber == 'upper':\n return 'S'\n else:\n return 'H'\n\n\ndef sessio...
[ { "content": "import re\nimport datetime\nimport scrapelib\nfrom collections import defaultdict\nfrom pytz import timezone\n\nfrom pupa.scrape import Scraper, Bill\nfrom openstates.utils import LXMLMixin\n\n\ndef chamber_abbr(chamber):\n if chamber == 'upper':\n return 'S'\n else:\n return '...
diff --git a/openstates/ky/bills.py b/openstates/ky/bills.py index 9bf918157d..764a66ae67 100644 --- a/openstates/ky/bills.py +++ b/openstates/ky/bills.py @@ -1,5 +1,6 @@ import re import datetime +import scrapelib from collections import defaultdict from pytz import timezone @@ -122,7 +123,11 @@ def parse_bill_f...
ibis-project__ibis-4005
bug(exprs): chain mutate() for window op and non window op throws error for pyspark backend Currently, chain mutate() for window will fail for pyspark backend: ``` table = client.table('time_indexed_table') context = ( pd.Timestamp('20170102 07:00:00', tz='UTC'), pd.Timestamp('20170105', tz='UT...
[ { "content": "from __future__ import annotations\n\nimport collections\nimport functools\nimport operator\nfrom collections import Counter\nfrom typing import Sequence\n\nimport toolz\n\nimport ibis.expr.lineage as lin\nimport ibis.expr.operations as ops\nimport ibis.expr.types as ir\nfrom ibis import util\nfro...
[ { "content": "from __future__ import annotations\n\nimport collections\nimport functools\nimport operator\nfrom collections import Counter\nfrom typing import Sequence\n\nimport toolz\n\nimport ibis.expr.lineage as lin\nimport ibis.expr.operations as ops\nimport ibis.expr.types as ir\nfrom ibis import util\nfro...
diff --git a/ibis/backends/impala/tests/test_sql.py b/ibis/backends/impala/tests/test_sql.py index 83be26e7a266..37c103eb3150 100644 --- a/ibis/backends/impala/tests/test_sql.py +++ b/ibis/backends/impala/tests/test_sql.py @@ -196,16 +196,19 @@ def test_nested_join_multiple_ctes(): WHERE t2.`movieid` IN ( SELECT `m...
yt-dlp__yt-dlp-5681
swearnet extractor fails to download some episodes ### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE - [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field ### Checklist - [X] I'm reporting a broken site - [X] I've verified that I'm running yt-dlp version **2022.11.11** ([update in...
[ { "content": "from .common import InfoExtractor\nfrom ..utils import int_or_none, traverse_obj\n\n\nclass SwearnetEpisodeIE(InfoExtractor):\n _VALID_URL = r'https?://www\\.swearnet\\.com/shows/(?P<id>[\\w-]+)/seasons/(?P<season_num>\\d+)/episodes/(?P<episode_num>\\d+)'\n _TESTS = [{\n 'url': 'https...
[ { "content": "from .common import InfoExtractor\nfrom ..utils import int_or_none, traverse_obj\n\n\nclass SwearnetEpisodeIE(InfoExtractor):\n _VALID_URL = r'https?://www\\.swearnet\\.com/shows/(?P<id>[\\w-]+)/seasons/(?P<season_num>\\d+)/episodes/(?P<episode_num>\\d+)'\n _TESTS = [{\n 'url': 'https...
diff --git a/yt_dlp/extractor/swearnet.py b/yt_dlp/extractor/swearnet.py index 86a303ec73d0..6e216a2a56a6 100644 --- a/yt_dlp/extractor/swearnet.py +++ b/yt_dlp/extractor/swearnet.py @@ -62,7 +62,7 @@ def _real_extract(self, url): 'id': str(json_data['videoId']), 'title': json_data.get('name')...
zestedesavoir__zds-site-5879
La demande d'aide sur un contenu ne déclenche rien **Description du bug** Cliquez sur un type d'aide dans la sidebar ne semble pas déclencher de demande d'aide. **Comment reproduire ?** La liste des étapes qui permet de reproduire le bug : 1. Allez sur le site '...' 2. Connectez vous avec le compte '....' ...
[ { "content": "from django.urls import path, re_path\nfrom django.views.generic.base import RedirectView\n\nfrom zds.tutorialv2.views.contents import (DisplayContent, CreateContent, EditContent, EditContentLicense,\n DeleteContent, CreateContainer, DisplayContainer, Edit...
[ { "content": "from django.urls import path, re_path\nfrom django.views.generic.base import RedirectView\n\nfrom zds.tutorialv2.views.contents import (DisplayContent, CreateContent, EditContent, EditContentLicense,\n DeleteContent, CreateContainer, DisplayContainer, Edit...
diff --git a/zds/tutorialv2/urls/urls_contents.py b/zds/tutorialv2/urls/urls_contents.py index 362454f169..f66079f1b5 100644 --- a/zds/tutorialv2/urls/urls_contents.py +++ b/zds/tutorialv2/urls/urls_contents.py @@ -40,7 +40,7 @@ path('tribunes/<int:pk>/', RedirectOldContentOfAuthor.as_view(type='OPINION')), ...
zalando__patroni-420
No election after loss of leader I am trying to get patroni setup in Kubernetes (well minikube right now) by [adapting](https://github.com/abkfenris/atomicdb) @jberkus [atomicbd](https://github.com/jberkus/atomicdb/tree/master/patroni_petset). When I kill the leader pod it will restart fast enough that it reacquires...
[ { "content": "import datetime\nimport functools\nimport json\nimport logging\nimport psycopg2\nimport requests\nimport sys\nimport time\n\nfrom collections import namedtuple\nfrom multiprocessing.pool import ThreadPool\nfrom patroni.async_executor import AsyncExecutor\nfrom patroni.exceptions import DCSError, P...
[ { "content": "import datetime\nimport functools\nimport json\nimport logging\nimport psycopg2\nimport requests\nimport sys\nimport time\n\nfrom collections import namedtuple\nfrom multiprocessing.pool import ThreadPool\nfrom patroni.async_executor import AsyncExecutor\nfrom patroni.exceptions import DCSError, P...
diff --git a/patroni/ha.py b/patroni/ha.py index a03c71cb0..c7cbe3c80 100644 --- a/patroni/ha.py +++ b/patroni/ha.py @@ -886,6 +886,11 @@ def _run_cycle(self): # is data directory empty? if self.state_handler.data_directory_empty(): + # is this instance the leader? + ...
ansible-collections__community.general-7452
icinga2_host - ip should not be required ### Summary Hi all, as one can see in https://icinga.com/docs/icinga-2/latest/doc/09-object-types/#host the address variable is not mandatory, so IP should be optional in the plugin, too. ### Issue Type Bug Report ### Component Name icinga2_host ### Ansible ...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# This module is proudly sponsored by CGI (www.cgi.com) and\n# KPN (www.kpn.com).\n# Copyright (c) Ansible project\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Ident...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# This module is proudly sponsored by CGI (www.cgi.com) and\n# KPN (www.kpn.com).\n# Copyright (c) Ansible project\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Ident...
diff --git a/changelogs/fragments/7452-fix-icinga2_host-requiring-ip-key.yml b/changelogs/fragments/7452-fix-icinga2_host-requiring-ip-key.yml new file mode 100644 index 00000000000..b5d612033e4 --- /dev/null +++ b/changelogs/fragments/7452-fix-icinga2_host-requiring-ip-key.yml @@ -0,0 +1,2 @@ +minor_changes: + - icin...
scikit-hep__awkward-2120
Add a "field does not exist" `IndexError` subclass ### Description of new feature This will enable framework authors to identify problems with typetracer usage leading to loss of important fields.
[ { "content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\nfrom __future__ import annotations\n\nimport threading\nimport warnings\nfrom collections.abc import Mapping, Sequence\n\nfrom awkward import _nplikes\n\nnp = _nplikes.NumpyMetadata.instance()\n\n\nclass Parti...
[ { "content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\nfrom __future__ import annotations\n\nimport threading\nimport warnings\nfrom collections.abc import Mapping, Sequence\n\nfrom awkward import _nplikes\n\nnp = _nplikes.NumpyMetadata.instance()\n\n\nclass Parti...
diff --git a/src/awkward/_errors.py b/src/awkward/_errors.py index 7aa22559a9..ecfe3b7caa 100644 --- a/src/awkward/_errors.py +++ b/src/awkward/_errors.py @@ -352,3 +352,7 @@ def deprecate( version, date, will_be, message ) warnings.warn(warning, category, stacklevel=stacklevel + 1) + + +class FieldN...
unionai-oss__pandera-1538
Pandas backend: `check_nullable` is inefficient when a column schema has `nullable=True` `check_nullable` in the pandas backend seems to compute the null values mask by calling `isna()` even when not needed. https://github.com/unionai-oss/pandera/blob/9c484a92cc6e63ba11652444e9e6df9e587d668e/pandera/backends/pandas/...
[ { "content": "\"\"\"Pandera array backends.\"\"\"\n\nfrom typing import cast, List, Optional\n\nimport pandas as pd\nfrom multimethod import DispatchError\nfrom pandera.api.base.error_handler import ErrorHandler\n\nfrom pandera.api.pandas.types import is_field\nfrom pandera.backends.base import CoreCheckResult\...
[ { "content": "\"\"\"Pandera array backends.\"\"\"\n\nfrom typing import cast, List, Optional\n\nimport pandas as pd\nfrom multimethod import DispatchError\nfrom pandera.api.base.error_handler import ErrorHandler\n\nfrom pandera.api.pandas.types import is_field\nfrom pandera.backends.base import CoreCheckResult\...
diff --git a/pandera/backends/pandas/array.py b/pandera/backends/pandas/array.py index a02880a71..cea755b64 100644 --- a/pandera/backends/pandas/array.py +++ b/pandera/backends/pandas/array.py @@ -194,8 +194,16 @@ def check_name(self, check_obj: pd.Series, schema) -> CoreCheckResult: @validate_scope(scope=Valida...
Lightning-AI__pytorch-lightning-1571
Trainer.add_argparse_args bool type ## 🐛 Bug The boolean arguments added using `Trainer.add_argparse_args` always evaluate to True. This is caused by the following lines of the add_argparse_args fucntion: ```python if isinstance(allowed_type, bool): def allowed_type(x): return bool(distutils.util....
[ { "content": "import distutils\nimport inspect\nimport os\nimport sys\nfrom argparse import ArgumentParser\nfrom typing import Union, Optional, List, Dict, Tuple, Iterable, Any\n\nimport torch\nimport torch.distributed as torch_distrib\nimport torch.multiprocessing as mp\nfrom torch.utils.data import DataLoader...
[ { "content": "import distutils\nimport inspect\nimport os\nimport sys\nfrom argparse import ArgumentParser\nfrom typing import Union, Optional, List, Dict, Tuple, Iterable, Any\n\nimport torch\nimport torch.distributed as torch_distrib\nimport torch.multiprocessing as mp\nfrom torch.utils.data import DataLoader...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a24046201819..1ce2fe73c1fc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed a bug that caused the `callbacks` Trainer argument to reference a global variable ([#1534]...
Azure__azure-cli-extensions-444
add timeout support in image copy command - If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at [Azure/azure-cli](https://github.com/Azure/azure-cli/issues) ### Extension name (the extension in question) image-copy-extension ### Description of issue (in as much detail as possible) sr...
[ { "content": "# --------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for license information.\n# -------------------------------------------...
[ { "content": "# --------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for license information.\n# -------------------------------------------...
diff --git a/src/image-copy/azext_imagecopy/create_target.py b/src/image-copy/azext_imagecopy/create_target.py index d2cdc2f4ce0..2a200ce70d9 100644 --- a/src/image-copy/azext_imagecopy/create_target.py +++ b/src/image-copy/azext_imagecopy/create_target.py @@ -168,6 +168,9 @@ def wait_for_blob_copy_operation(blob_name,...
DDMAL__CantusDB-156
need to have fields of chant and sequence models synced or else, it'll lead to errors, such as not being able to retrieve chants from /chant-search please fix
[ { "content": "from django.contrib.postgres.search import SearchVectorField\nfrom django.db import models\nfrom main_app.models import BaseModel\nfrom users.models import User\n\n\nclass Sequence(BaseModel):\n visible_status = models.CharField(max_length=1, blank=True, null=True)\n title = models.CharField...
[ { "content": "from django.contrib.postgres.search import SearchVectorField\nfrom django.db import models\nfrom main_app.models import BaseModel\nfrom users.models import User\n\n\nclass Sequence(BaseModel):\n visible_status = models.CharField(max_length=1, blank=True, null=True)\n title = models.CharField...
diff --git a/django/cantusdb_project/main_app/models/sequence.py b/django/cantusdb_project/main_app/models/sequence.py index 28688d96e..11cf99581 100644 --- a/django/cantusdb_project/main_app/models/sequence.py +++ b/django/cantusdb_project/main_app/models/sequence.py @@ -41,6 +41,7 @@ class Sequence(BaseModel): f...
getnikola__nikola-2070
post.section_link ignores languages In [11]: site.timeline[30].section_link('pl') Out[11]: '/nieskategoryzowane/' The correct output should be '/pl/nieskategoryzowane/'. I’m using sections from metadata, but I think this is a problem with the path-based implementation, too. I’ll attempt to fix it by myself.
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2015 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2015 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
diff --git a/CHANGES.txt b/CHANGES.txt index e52f5006db..e896fa932e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,7 @@ New in master Features -------- + * Support UTF-8 paths and encoded links when the ``USE_SLUGIFY`` option is disabled. (Issue #2037) * Per-document hyphenation using "hyphenate" metada...
tobymao__sqlglot-1806
Snowflake: TOP <n> is not supported Copying recent issue #1798, Snowflake supports the same Teradata syntax for [Top N](https://docs.snowflake.com/en/sql-reference/constructs/top_n). The below fails in sqlglot ``` import sqlglot sqlglot.transpile("select top 10 column1 from table1.column1", identity=True, read=...
[ { "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 date_trunc_to_time,\n datestrtodate_sql,\n format_time_lambda,\n inline_array_sql,\n max_or_greatest,\n ...
[ { "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 date_trunc_to_time,\n datestrtodate_sql,\n format_time_lambda,\n inline_array_sql,\n max_or_greatest,\n ...
diff --git a/sqlglot/dialects/snowflake.py b/sqlglot/dialects/snowflake.py index 8d6b496bf0..d488d7d323 100644 --- a/sqlglot/dialects/snowflake.py +++ b/sqlglot/dialects/snowflake.py @@ -285,11 +285,12 @@ class Tokenizer(tokens.Tokenizer): "NCHAR VARYING": TokenType.VARCHAR, "PUT": TokenType.C...
streamlit__streamlit-1909
st.dataframe does not handle StringDtype in Pandas >= 1.0.0 # Summary Displaying a DataFrame with a 'string' or StringArray dtype column fails with a NotImplementedError. This dtype is new in Pandas 1.0.0. # Steps to reproduce Run this app: ```python import pandas as pd import streamlit as st st.header...
[ { "content": "# Copyright 2018-2020 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
[ { "content": "# Copyright 2018-2020 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
diff --git a/lib/streamlit/elements/data_frame_proto.py b/lib/streamlit/elements/data_frame_proto.py index a5525b614f2e..52d3f3b2755c 100644 --- a/lib/streamlit/elements/data_frame_proto.py +++ b/lib/streamlit/elements/data_frame_proto.py @@ -388,6 +388,11 @@ def _marshall_any_array(pandas_array, proto_array): ...
ethereum__consensus-specs-1491
Signing root problems ## Quick definition - `hash_tree_root` merkleizes all fields - `signing_root` merkleizes all fields except the last. ### Example: ```python class BeaconBlock(Container): slot: Slot parent_root: Hash state_root: Hash body: BeaconBlockBody signature: BLSSignature `...
[ { "content": "import re\nfrom function_puller import (\n get_spec,\n SpecObject,\n)\nfrom argparse import ArgumentParser\nfrom typing import (\n Dict,\n Optional,\n)\n\n\nPHASE0_IMPORTS = '''from typing import (\n Any, Dict, Set, Sequence, Tuple, Optional\n)\n\nfrom dataclasses import (\n data...
[ { "content": "import re\nfrom function_puller import (\n get_spec,\n SpecObject,\n)\nfrom argparse import ArgumentParser\nfrom typing import (\n Dict,\n Optional,\n)\n\n\nPHASE0_IMPORTS = '''from typing import (\n Any, Dict, Set, Sequence, Tuple, Optional\n)\n\nfrom dataclasses import (\n data...
diff --git a/scripts/build_spec.py b/scripts/build_spec.py index 549357cd75..c38d0bd65f 100644 --- a/scripts/build_spec.py +++ b/scripts/build_spec.py @@ -19,10 +19,7 @@ field, ) -from eth2spec.utils.ssz.ssz_impl import ( - hash_tree_root, - signing_root, -) +from eth2spec.utils.ssz.ssz_impl import hash_t...
holoviz__hvplot-247
Run more tests on CI I just realized that we haven't been running all our unit tests on CI. I think we should at least have one job that has `xarray, rasterio, geoviews, cartopy, dask, pandas, and streamz` This will probably also help with our coverage. Subset from https://travis-ci.org/pyviz/hvplot/jobs/5600282...
[ { "content": "import os\nimport sys\nimport shutil\nfrom collections import defaultdict\nfrom setuptools import setup, find_packages\n\n\n########## autover ##########\n\ndef embed_version(basepath, ref='v0.2.2'):\n \"\"\"\n Autover is purely a build time dependency in all cases (conda and\n pip) excep...
[ { "content": "import os\nimport sys\nimport shutil\nfrom collections import defaultdict\nfrom setuptools import setup, find_packages\n\n\n########## autover ##########\n\ndef embed_version(basepath, ref='v0.2.2'):\n \"\"\"\n Autover is purely a build time dependency in all cases (conda and\n pip) excep...
diff --git a/.travis.yml b/.travis.yml index 9e4a24d99..e98954a39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,6 +53,16 @@ jobs: script: - bokeh sampledata - doit test_all_recommended + + - <<: *default + stage: test + env: DESC="dev test with extra dependencies" + instal...
pypi__warehouse-1491
[requires.io] dependency update on master branch
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
diff --git a/requirements/main.in b/requirements/main.in index 8005a4068c40..479e12bc7829 100644 --- a/requirements/main.in +++ b/requirements/main.in @@ -2,7 +2,7 @@ alembic>=0.7.0 Babel bcrypt boto3 -celery>=3.1 +celery>=4 certifi click disposable-email-domains diff --git a/requirements/main.txt b/requirements/...
pallets__werkzeug-1530
Failing style check for B011 and B009 When running style check, the following error occurs: ``` B011 Do not call assert False since python -O removes these calls. Instead callers should raise AssertionError(). src/werkzeug/debug/__init__.py:144:42: B009 Do not call getattr with a constant attribute value, it is no...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.debug\n ~~~~~~~~~~~~~~\n\n WSGI application traceback debugger.\n\n :copyright: 2007 Pallets\n :license: BSD-3-Clause\n\"\"\"\nimport getpass\nimport hashlib\nimport json\nimport mimetypes\nimport os\nimport pkgutil\nimport re\nimport sys\n...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.debug\n ~~~~~~~~~~~~~~\n\n WSGI application traceback debugger.\n\n :copyright: 2007 Pallets\n :license: BSD-3-Clause\n\"\"\"\nimport getpass\nimport hashlib\nimport json\nimport mimetypes\nimport os\nimport pkgutil\nimport re\nimport sys\n...
diff --git a/src/werkzeug/debug/__init__.py b/src/werkzeug/debug/__init__.py index 1bb374eaf..c5e4d2d5b 100644 --- a/src/werkzeug/debug/__init__.py +++ b/src/werkzeug/debug/__init__.py @@ -156,7 +156,7 @@ def get_pin_and_cookie_name(app): else: num = pin - modname = getattr(app, "__module__",...
pyro-ppl__pyro-2682
Init signature does not appear for distribution class Currently, when creating an instance of `dist.Normal` in jupyter, the docstring will say ``` Init signature: dist.Normal(*args, **kwargs) ``` That infomation is not helpful. This new behavior happens because we define `DistributionMeta.__call__` for collapse mes...
[ { "content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom abc import ABCMeta, abstractmethod\n\nfrom pyro.distributions.score_parts import ScoreParts\n\nCOERCIONS = []\n\n\nclass DistributionMeta(ABCMeta):\n def __call__(cls, *args, **kwargs):\n for...
[ { "content": "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport functools\nfrom abc import ABCMeta, abstractmethod\n\nfrom pyro.distributions.score_parts import ScoreParts\n\nCOERCIONS = []\n\n\nclass DistributionMeta(ABCMeta):\n def __call__(cls, *args, **kwa...
diff --git a/pyro/distributions/distribution.py b/pyro/distributions/distribution.py index 42b1111215..5d18e37d9b 100644 --- a/pyro/distributions/distribution.py +++ b/pyro/distributions/distribution.py @@ -1,6 +1,7 @@ # Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 +import f...
mozilla__telemetry-analysis-service-587
Separate EMR bootstrap deploy for staging and production This will allow us to make changes to the bootstrap scripts and test them on ATMO staging easily before pushing to production. This involves updating the ansible playbook to deploy the bootstrap scripts to either a staging or production location on S3. And set...
[ { "content": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, you can obtain one at http://mozilla.org/MPL/2.0/.\n\"\"\"\nDjango settings for atmo project.\n\nFor more information on this file, see\nhttps://doc...
[ { "content": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, you can obtain one at http://mozilla.org/MPL/2.0/.\n\"\"\"\nDjango settings for atmo project.\n\nFor more information on this file, see\nhttps://doc...
diff --git a/atmo/settings.py b/atmo/settings.py index 5dab9762..2b2fbdbd 100644 --- a/atmo/settings.py +++ b/atmo/settings.py @@ -216,7 +216,9 @@ class AWS: ), 'SPARK_INSTANCE_PROFILE': 'telemetry-spark-cloudformation-' 'TelemetrySparkInstanceProfile-1SATUBVEXG7E3',...
watchdogpolska__feder-317
Dopisać tooltip z metadanymi na LetterDetailView ![zaznaczenie_418](https://cloud.githubusercontent.com/assets/3618479/9562630/74158af4-4e71-11e5-8c87-566c046f1840.png) http://giodo.gov.pl/1520221/id_art/8813/j/pl/
[ { "content": "import json\nfrom collections import OrderedDict\n\nfrom django.db import models\nfrom django.db.models import Count\nfrom django.urls import reverse\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom django.utils.translation import ugettext_lazy as _\nfrom jsonfield import JSONF...
[ { "content": "import json\nfrom collections import OrderedDict\n\nfrom django.db import models\nfrom django.db.models import Count\nfrom django.urls import reverse\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom django.utils.translation import ugettext_lazy as _\nfrom jsonfield import JSONF...
diff --git a/feder/assets/scss/style.scss b/feder/assets/scss/style.scss index 848b787fd..a37dba074 100644 --- a/feder/assets/scss/style.scss +++ b/feder/assets/scss/style.scss @@ -65,6 +65,40 @@ $gray: #F0F0F0; } } +.metadata-toggle { + background-image: none; // Reset unusual Firefox-on-Android default style; ...
hpcaitech__ColossalAI-3911
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "from types import MethodType\nfrom typing import Callable, Optional, Union\n\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\nfrom torch import Tensor\nfrom torch.utils._pytree import tree_map\n\nfrom colossalai._analyzer._subclasses import MetaTensor\nfrom colossalai.tensor...
[ { "content": "from types import MethodType\nfrom typing import Callable, Optional, Union\n\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\nfrom torch import Tensor\nfrom torch.utils._pytree import tree_map\n\nfrom colossalai._analyzer._subclasses import MetaTensor\nfrom colossalai.tensor...
diff --git a/colossalai/lazy/lazy_init.py b/colossalai/lazy/lazy_init.py index c1fda3c53865..76f550dc4392 100644 --- a/colossalai/lazy/lazy_init.py +++ b/colossalai/lazy/lazy_init.py @@ -37,7 +37,7 @@ # If your intent is to change the metadata of a Tensor (such as sizes / strides / storage / storage_offset) # without...
paperless-ngx__paperless-ngx-1645
[BUG] 1.9 OCR output mode "skip_noarchive" is not valid ### Description With version 1.9 the following env trow errors: ```ini PAPERLESS_OCR_MODE=skip_noarchive ``` ### Steps to reproduce 1. set above docker env variable 2. start container ### Webserver logs ```bash Paperless-ngx docker container starting... ...
[ { "content": "import grp\nimport os\nimport pwd\nimport shutil\nimport stat\n\nfrom django.conf import settings\nfrom django.core.checks import Error\nfrom django.core.checks import register\nfrom django.core.checks import Warning\n\nexists_message = \"{} is set but doesn't exist.\"\nexists_hint = \"Create a di...
[ { "content": "import grp\nimport os\nimport pwd\nimport shutil\nimport stat\n\nfrom django.conf import settings\nfrom django.core.checks import Error\nfrom django.core.checks import register\nfrom django.core.checks import Warning\n\nexists_message = \"{} is set but doesn't exist.\"\nexists_hint = \"Create a di...
diff --git a/src/paperless/checks.py b/src/paperless/checks.py index e592a5bf2e0..e5ab442ab69 100644 --- a/src/paperless/checks.py +++ b/src/paperless/checks.py @@ -127,10 +127,10 @@ def _ocrmypdf_settings_check(): Error(f'OCR output type "{settings.OCR_OUTPUT_TYPE}" is not valid'), ) - ...
mkdocs__mkdocs-565
in minimal mkdocs.yml file... "ERROR - Config value: pages" Congrats on 0.13 today! Am playing with the site navigation and have run directly into a wall. I was using the automatically generated navigation, which is working fine, but I want to reorder some of the automatic listing and then realized the only way to...
[ { "content": "import os\n\nimport six\n\nfrom mkdocs import utils, legacy\nfrom mkdocs.config.base import Config, ValidationError\n\n\nclass BaseConfigOption(object):\n\n def __init__(self):\n self.warnings = []\n self.default = None\n\n def is_required(self):\n return False\n\n de...
[ { "content": "import os\n\nimport six\n\nfrom mkdocs import utils, legacy\nfrom mkdocs.config.base import Config, ValidationError\n\n\nclass BaseConfigOption(object):\n\n def __init__(self):\n self.warnings = []\n self.default = None\n\n def is_required(self):\n return False\n\n de...
diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index 22f02d9ead..bff1e3438b 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -14,6 +14,12 @@ You can determine your currently installed version using `mkdocs --version`: mkdocs, version 0.13.0 +## Version 0.13....
hpcaitech__ColossalAI-4703
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "from typing import Dict, List, Optional, Tuple, Union\n\nimport torch\nfrom torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss\nfrom transformers.modeling_outputs import (\n BaseModelOutputWithPastAndCrossAttentions,\n CausalLMOutputWithCrossAttentions,\n QuestionAnsweringModelO...
[ { "content": "from typing import Dict, List, Optional, Tuple, Union\n\nimport torch\nfrom torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss\nfrom transformers.modeling_outputs import (\n BaseModelOutputWithPastAndCrossAttentions,\n CausalLMOutputWithCrossAttentions,\n QuestionAnsweringModelO...
diff --git a/colossalai/shardformer/modeling/gpt2.py b/colossalai/shardformer/modeling/gpt2.py index bc99be4cc391..84deafefeadd 100644 --- a/colossalai/shardformer/modeling/gpt2.py +++ b/colossalai/shardformer/modeling/gpt2.py @@ -94,9 +94,9 @@ def gpt2_model_forward( if hidden_states is None: ...
freqtrade__freqtrade-2452
Stoploss on exchange calculation ## Describe your environment * Python Version: Python 3.7.0 (`python -V`) * Branch: Develop * Last Commit ID: 0d152eb90745241ad294ec65f7cbd52012f44305 ## Describe the problem: I think the calculation of stoploss_on_exchange should be changed, or at least a warning s...
[ { "content": "\"\"\"\nFreqtrade is the main module of this bot. It contains the class Freqtrade()\n\"\"\"\nimport copy\nimport logging\nimport traceback\nfrom datetime import datetime\nfrom math import isclose\nfrom os import getpid\nfrom typing import Any, Dict, List, Optional, Tuple\n\nimport arrow\nfrom requ...
[ { "content": "\"\"\"\nFreqtrade is the main module of this bot. It contains the class Freqtrade()\n\"\"\"\nimport copy\nimport logging\nimport traceback\nfrom datetime import datetime\nfrom math import isclose\nfrom os import getpid\nfrom typing import Any, Dict, List, Optional, Tuple\n\nimport arrow\nfrom requ...
diff --git a/docs/configuration.md b/docs/configuration.md index 1ad13c87aaa..217e9f37bec 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -215,6 +215,11 @@ If this is configured, the following 4 values (`buy`, `sell`, `stoploss` and `emergencysell` is an optional value, which defaults to `market` and...
python-poetry__poetry-3583
--short has no effect when `poetry version` is passed a new version <!-- Hi there! Thank you for discovering and submitting an issue. Before you submit this; let's make sure of a few things. Please make sure the following boxes are ticked if they are correct. If not, please try and fulfill these first. -...
[ { "content": "from cleo import argument\nfrom cleo import option\n\nfrom .command import Command\n\n\nclass VersionCommand(Command):\n\n name = \"version\"\n description = (\n \"Shows the version of the project or bumps it when a valid \"\n \"bump rule is provided.\"\n )\n\n arguments ...
[ { "content": "from cleo import argument\nfrom cleo import option\n\nfrom .command import Command\n\n\nclass VersionCommand(Command):\n\n name = \"version\"\n description = (\n \"Shows the version of the project or bumps it when a valid \"\n \"bump rule is provided.\"\n )\n\n arguments ...
diff --git a/poetry/console/commands/version.py b/poetry/console/commands/version.py index 21ed676f54f..5ac5c666afb 100644 --- a/poetry/console/commands/version.py +++ b/poetry/console/commands/version.py @@ -48,11 +48,14 @@ def handle(self): self.poetry.package.pretty_version, version ) ...
cisagov__manage.get.gov-282
Build Domain Submission Landing Page **User Story** As a user submitting a domain request I want to know my domain was successfully submitted so I can prepare for future steps **Acceptance Criteria** - Domain Request form has a landing page that aligns with wireframes **Wireframe** https://www.figma.com/proto/ninN...
[ { "content": "\"\"\"Forms Wizard for creating a new domain application.\"\"\"\n\nimport logging\n\nfrom django import forms\nfrom django.shortcuts import redirect\n\nfrom django.contrib.auth.mixins import LoginRequiredMixin\n\nfrom formtools.wizard.views import NamedUrlSessionWizardView # type: ignore\n\nfrom ...
[ { "content": "\"\"\"Forms Wizard for creating a new domain application.\"\"\"\n\nimport logging\n\nfrom django import forms\nfrom django.shortcuts import render\n\nfrom django.contrib.auth.mixins import LoginRequiredMixin\n\nfrom formtools.wizard.views import NamedUrlSessionWizardView # type: ignore\n\nfrom re...
diff --git a/src/.pa11yci b/src/.pa11yci index 49b33779b..72d14bd93 100644 --- a/src/.pa11yci +++ b/src/.pa11yci @@ -17,6 +17,7 @@ "http://app:8080/register/security_email/", "http://app:8080/register/anything_else/", "http://app:8080/register/requirements/", - "http://app:8080/registe...
getsentry__sentry-python-264
username and email deesn't get included even though send_default_pii=True I am running Flask app with Flask-Login. According to https://docs.sentry.io/platforms/python/flask/: > If you use flask-login and have set send_default_pii=True in your call to init, user data (current user id, > email address, username) is ...
[ { "content": "from __future__ import absolute_import\n\nimport weakref\n\nfrom sentry_sdk.hub import Hub, _should_send_default_pii\nfrom sentry_sdk.utils import capture_internal_exceptions, event_from_exception\nfrom sentry_sdk.integrations import Integration\nfrom sentry_sdk.integrations.wsgi import SentryWsgi...
[ { "content": "from __future__ import absolute_import\n\nimport weakref\n\nfrom sentry_sdk.hub import Hub, _should_send_default_pii\nfrom sentry_sdk.utils import capture_internal_exceptions, event_from_exception\nfrom sentry_sdk.integrations import Integration\nfrom sentry_sdk.integrations.wsgi import SentryWsgi...
diff --git a/sentry_sdk/integrations/flask.py b/sentry_sdk/integrations/flask.py index 9f2d88b0c8..fe5bafb3a7 100644 --- a/sentry_sdk/integrations/flask.py +++ b/sentry_sdk/integrations/flask.py @@ -174,3 +174,20 @@ def _add_user_to_event(event): # - flask_login is not configured # - no user i...
benoitc__gunicorn-1684
glogging._get_user() fails to catch malformed authorization header I have a client that abuses the HTTP authorization header, passing "Basic (token)" where token is a random alphanumeric string. This causes the gunicorn logger to choke because, although it is a valid base64 string of data, it does not represent base64 ...
[ { "content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport base64\nimport binascii\nimport time\nimport logging\nlogging.Logger.manager.emittedNoHandlerWarning = 1\nfrom logging.config import fileConfig\ntry:\n fro...
[ { "content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport base64\nimport binascii\nimport time\nimport logging\nlogging.Logger.manager.emittedNoHandlerWarning = 1\nfrom logging.config import fileConfig\ntry:\n fro...
diff --git a/gunicorn/glogging.py b/gunicorn/glogging.py index 88f0c1336..e876aac87 100644 --- a/gunicorn/glogging.py +++ b/gunicorn/glogging.py @@ -471,10 +471,7 @@ def _get_user(self, environ): if PY3: # b64decode returns a byte string in Python 3 auth = auth.decode('utf...
python__peps-2981
Superseded-By And Replaces link is bugged See for example https://peps.python.org/pep-0509/. The link to PEP 699 in the header points to a link relative to the the same document (which does not exist), instead of a link to another PEP. Similarly, the `Replaces` link is bugged too https://peps.python.org/pep-0699/...
[ { "content": "from pathlib import Path\nimport re\n\nfrom docutils import nodes\nfrom docutils import transforms\nfrom sphinx import errors\n\nfrom pep_sphinx_extensions.pep_processor.transforms import pep_zero\nfrom pep_sphinx_extensions.pep_processor.transforms.pep_zero import _mask_email\nfrom pep_sphinx_ext...
[ { "content": "from pathlib import Path\nimport re\n\nfrom docutils import nodes\nfrom docutils import transforms\nfrom sphinx import errors\n\nfrom pep_sphinx_extensions.pep_processor.transforms import pep_zero\nfrom pep_sphinx_extensions.pep_processor.transforms.pep_zero import _mask_email\nfrom pep_sphinx_ext...
diff --git a/pep_sphinx_extensions/pep_processor/transforms/pep_headers.py b/pep_sphinx_extensions/pep_processor/transforms/pep_headers.py index 57997c6b019..125966e10e0 100644 --- a/pep_sphinx_extensions/pep_processor/transforms/pep_headers.py +++ b/pep_sphinx_extensions/pep_processor/transforms/pep_headers.py @@ -131...
vllm-project__vllm-2318
GPTQ models don't support CUDA graph Got the following error while running `python examples/llm_engine_example.py --model TheBloke/Mixtral-8x7B-v0.1-GPTQ --dtype half`: ``` File "/home/wskwon/workspace/vllm/vllm/model_executor/layers/sampler.py", line 396, in _random_sample random_samples = torch.multinomial(p...
[ { "content": "from typing import Optional, Union\nimport os\n\nimport torch\nfrom transformers import PretrainedConfig\n\nfrom vllm.logger import init_logger\nfrom vllm.transformers_utils.config import get_config\nfrom vllm.utils import get_cpu_memory, is_hip\n\nlogger = init_logger(__name__)\n\n_GB = 1 << 30\n...
[ { "content": "from typing import Optional, Union\nimport os\n\nimport torch\nfrom transformers import PretrainedConfig\n\nfrom vllm.logger import init_logger\nfrom vllm.transformers_utils.config import get_config\nfrom vllm.utils import get_cpu_memory, is_hip\n\nlogger = init_logger(__name__)\n\n_GB = 1 << 30\n...
diff --git a/csrc/quantization/gptq/q_gemm.cu b/csrc/quantization/gptq/q_gemm.cu index eb0d75f1293..a5d2345f1e7 100644 --- a/csrc/quantization/gptq/q_gemm.cu +++ b/csrc/quantization/gptq/q_gemm.cu @@ -287,7 +287,8 @@ void gemm_half_q_half_cuda_part fp_gemm_half_q_half_gptq_kernel kernel = pick_gemm_half_q_half_g...
huggingface__text-generation-inference-1260
PEFT support does not work with local directories ### System Info text-generation-inference version: main branch The rest of the system info is probably not relevant. ### Information - [X] Docker - [X] The CLI directly ### Tasks - [X] An officially supported command - [ ] My own modifications ### Reproduction ...
[ { "content": "import os\nimport sys\nimport typer\n\nfrom pathlib import Path\nfrom loguru import logger\nfrom typing import Optional\nfrom enum import Enum\nfrom huggingface_hub import hf_hub_download\n\n\napp = typer.Typer()\n\n\nclass Quantization(str, Enum):\n bitsandbytes = \"bitsandbytes\"\n bitsand...
[ { "content": "import os\nimport sys\nimport typer\n\nfrom pathlib import Path\nfrom loguru import logger\nfrom typing import Optional\nfrom enum import Enum\nfrom huggingface_hub import hf_hub_download\n\n\napp = typer.Typer()\n\n\nclass Quantization(str, Enum):\n bitsandbytes = \"bitsandbytes\"\n bitsand...
diff --git a/server/text_generation_server/cli.py b/server/text_generation_server/cli.py index 301acb6be02..b741a84cfbd 100644 --- a/server/text_generation_server/cli.py +++ b/server/text_generation_server/cli.py @@ -150,6 +150,17 @@ def download_weights( if not extension == ".safetensors" or not auto_conv...
mathesar-foundation__mathesar-2791
Modify page routing to allow for any database name ## Current behavior - Many of our pages have URLs that begin with the database name. - We also have routes that begin with things like `administration` and `auth`. - Those routing rules produce an ambiguous routing grammar making it impossible to use Mathesar with...
[ { "content": "from django.contrib.auth.views import LoginView\nfrom django.urls import include, path, re_path\nfrom rest_framework_nested import routers\n\nfrom mathesar import views\nfrom mathesar.api.db import viewsets as db_viewsets\nfrom mathesar.api.ui import viewsets as ui_viewsets\nfrom mathesar.users.pa...
[ { "content": "from django.contrib.auth.views import LoginView\nfrom django.urls import include, path, re_path\nfrom rest_framework_nested import routers\n\nfrom mathesar import views\nfrom mathesar.api.db import viewsets as db_viewsets\nfrom mathesar.api.ui import viewsets as ui_viewsets\nfrom mathesar.users.pa...
diff --git a/mathesar/urls.py b/mathesar/urls.py index 6f776359e4..931556ab67 100644 --- a/mathesar/urls.py +++ b/mathesar/urls.py @@ -46,9 +46,10 @@ path('administration/users/', views.admin_home, name='admin_users_home'), path('administration/users/<user_id>/', views.admin_home, name='admin_users_edit'), ...
xorbitsai__inference-297
BUG: UnicodeDecodeError caused by xinference/model/llm/llm_family.json ### Describe the bug Windows cmd runned xinference found Error: "**UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 8905: illegal multibyte sequence**" ### To Reproduce To help us to reproduce this bug, please provide informat...
[ { "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/model/llm/__init__.py b/xinference/model/llm/__init__.py index 04ca9a2413..0f6dc82135 100644 --- a/xinference/model/llm/__init__.py +++ b/xinference/model/llm/__init__.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. ...
mindsdb__mindsdb-1311
Reject predict(POST) API call if JSON payload is not properly wrapped by WHEN **Is your feature request related to a problem? Please describe.** The MindsDB Predict API returns predictions even when the JSON payload is not properly following the specification. (https://apidocs.mindsdb.com/#acaf5684-c1bb-4df7-bae0-3a...
[ { "content": "import os\nimport time\n\nfrom dateutil.parser import parse as parse_datetime\nfrom flask import request\nfrom flask_restx import Resource, abort\nfrom flask import current_app as ca\n\nfrom mindsdb.utilities.log import log\nfrom mindsdb.api.http.utils import http_error\nfrom mindsdb.api.http.name...
[ { "content": "import os\nimport time\n\nfrom dateutil.parser import parse as parse_datetime\nfrom flask import request\nfrom flask_restx import Resource, abort\nfrom flask import current_app as ca\n\nfrom mindsdb.utilities.log import log\nfrom mindsdb.api.http.utils import http_error\nfrom mindsdb.api.http.name...
diff --git a/mindsdb/api/http/namespaces/predictor.py b/mindsdb/api/http/namespaces/predictor.py index 564514a2d8e..5871c4cd952 100644 --- a/mindsdb/api/http/namespaces/predictor.py +++ b/mindsdb/api/http/namespaces/predictor.py @@ -182,12 +182,12 @@ class PredictorPredict2(Resource): def post(self, name): ...
pypa__cibuildwheel-1031
PyPy has released bug fixes and a python3.9 ### Description PyPy released version v7.3.8. It would be nice to be able to use it in cibuildwheel, including the newly released python3.9 ### Build log _No response_ ### CI config _No response_
[ { "content": "#!/usr/bin/env python3\n\nfrom __future__ import annotations\n\nimport copy\nimport difflib\nimport logging\nfrom pathlib import Path\nfrom typing import Any, Union\n\nimport click\nimport requests\nimport rich\nimport tomli\nfrom packaging.specifiers import Specifier\nfrom packaging.version impor...
[ { "content": "#!/usr/bin/env python3\n\nfrom __future__ import annotations\n\nimport copy\nimport difflib\nimport logging\nfrom pathlib import Path\nfrom typing import Any, Union\n\nimport click\nimport requests\nimport rich\nimport tomli\nfrom packaging.specifiers import Specifier\nfrom packaging.version impor...
diff --git a/README.md b/README.md index 41cb62037..702b9baad 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ What does it do? | CPython 3.10 | ✅ | ✅ | ✅ | ✅ | ✅² | ✅ | ✅ | ✅ | ✅ | ✅ | | PyPy 3.7 v7.3 | ✅ | N/A | ✅ | N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A | | PyPy 3.8 v7.3 | ✅ | N/A | ✅ | N/A | N/A ...
urllib3__urllib3-60
nosetests crashes under IPv4 (error: getsockaddrarg: bad family) Turns out tornado is really eager to use IPv6. Unless you expressly hand the server the address, it doesn't even check for socket IPv6 support. I'll submit a pull request for the one-line fix in dummyserver/server.py momentarily. Source: https://groups.g...
[ { "content": "#!/usr/bin/env python\n\n\"\"\"\nDummy server used for unit testing.\n\"\"\"\nfrom __future__ import print_function\n\nimport logging\nimport os\nimport sys\nimport threading\nimport socket\n\nimport tornado.wsgi\nimport tornado.httpserver\nimport tornado.ioloop\n\nfrom dummyserver.handlers import...
[ { "content": "#!/usr/bin/env python\n\n\"\"\"\nDummy server used for unit testing.\n\"\"\"\nfrom __future__ import print_function\n\nimport logging\nimport os\nimport sys\nimport threading\nimport socket\n\nimport tornado.wsgi\nimport tornado.httpserver\nimport tornado.ioloop\n\nfrom dummyserver.handlers import...
diff --git a/dummyserver/server.py b/dummyserver/server.py index 529850f480..6c0943c062 100755 --- a/dummyserver/server.py +++ b/dummyserver/server.py @@ -83,7 +83,7 @@ def _start_server(self): else: http_server = tornado.httpserver.HTTPServer(container) - http_server.listen(self.port) + ...
pyinstaller__pyinstaller-5230
MacOS onefile package, GUI does not display in High Resolution mode by default. Now it's 2019, so I suggest make the 'NSHighResolutionCapable' option a default. Hi dear developers, I found a small issue on mac os x, after running the command 'pyinstaller --onefile --noconsole myscript.py', there are 2 generated file...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2020, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2020, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
diff --git a/PyInstaller/building/osx.py b/PyInstaller/building/osx.py index 69c41a4081..5d3fa55c11 100644 --- a/PyInstaller/building/osx.py +++ b/PyInstaller/building/osx.py @@ -151,10 +151,14 @@ def assemble(self): } - # Setting EXE console=True implies LSBackgroundOnly=True. - ...
Project-MONAI__MONAI-660
Documentation improvements for Randomizable In here: https://docs.monai.io/en/latest/transforms.html#randomizable From the text description. I think it is not clear that this self.R is a class variable instead of an instance variable. And it is also not clear that self.R is of type np.random.RandomState
[ { "content": "# Copyright 2020 MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable l...
[ { "content": "# Copyright 2020 MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable l...
diff --git a/monai/transforms/compose.py b/monai/transforms/compose.py index f6e33ffaf6..0fcbb7c11b 100644 --- a/monai/transforms/compose.py +++ b/monai/transforms/compose.py @@ -72,8 +72,20 @@ def __call__(self, data: Any): class Randomizable(ABC): """ - An interface for handling local numpy random state. -...
joke2k__faker-757
Visa now supports 19 digits credit card length reference: https://www.freeformatter.com/credit-card-number-generator-validator.html
[ { "content": "# coding=utf-8\nfrom __future__ import unicode_literals\nfrom collections import OrderedDict\n\nfrom .. import BaseProvider\n\n\nclass CreditCard(object):\n\n def __init__(\n self,\n name,\n prefixes,\n length=16,\n security_code='CVC',\n ...
[ { "content": "# coding=utf-8\nfrom __future__ import unicode_literals\nfrom collections import OrderedDict\n\nfrom .. import BaseProvider\n\n\nclass CreditCard(object):\n\n def __init__(\n self,\n name,\n prefixes,\n length=16,\n security_code='CVC',\n ...
diff --git a/faker/providers/credit_card/__init__.py b/faker/providers/credit_card/__init__.py index 4bcb499a9e..7daab24fca 100644 --- a/faker/providers/credit_card/__init__.py +++ b/faker/providers/credit_card/__init__.py @@ -44,6 +44,7 @@ class Provider(BaseProvider): prefix_masterc...
lutris__lutris-3987
Installer didnt Start Errors in .py i want to install some stuff like kotor with steam but get everytime the same error. File "/usr/lib/python3.10/site-packages/lutris/gui/installerwindow.py", line 155, in on_installer_selected self.interpreter = interpreter.ScriptInterpreter( File "/usr/lib/python3.10/site-...
[ { "content": "\"\"\"Lutris installer class\"\"\"\nimport json\nimport os\nfrom gettext import gettext as _\n\nfrom lutris.config import LutrisConfig, write_game_config\nfrom lutris.database.games import add_or_update, get_game_by_field\nfrom lutris.game import Game\nfrom lutris.installer import AUTO_ELF_EXE, AU...
[ { "content": "\"\"\"Lutris installer class\"\"\"\nimport json\nimport os\nfrom gettext import gettext as _\n\nfrom lutris.config import LutrisConfig, write_game_config\nfrom lutris.database.games import add_or_update, get_game_by_field\nfrom lutris.game import Game\nfrom lutris.installer import AUTO_ELF_EXE, AU...
diff --git a/lutris/installer/installer.py b/lutris/installer/installer.py index a8e711198b..3e9217be91 100644 --- a/lutris/installer/installer.py +++ b/lutris/installer/installer.py @@ -44,12 +44,12 @@ def __init__(self, installer, interpreter, service, appid): def get_service(self, initial=None): if ini...
internetarchive__openlibrary-4123
Some pages with unicode characters rendering but displaying error Appeared after https://github.com/internetarchive/openlibrary/releases/tag/deploy-2020-11-17 ### Evidence / Screenshot (if possible) ![image](https://user-images.githubusercontent.com/6251786/99467710-fa436800-290c-11eb-98b0-cd6cc19cb73f.png) ### ...
[ { "content": "import web\nimport simplejson\nimport babel\nimport babel.core\nimport babel.dates\nfrom collections import defaultdict\nimport re\nimport random\nimport xml.etree.ElementTree as etree\nimport datetime\nimport logging\n\nimport six\nfrom six.moves import urllib\nfrom six.moves.collections_abc impo...
[ { "content": "import web\nimport simplejson\nimport babel\nimport babel.core\nimport babel.dates\nfrom collections import defaultdict\nimport re\nimport random\nimport xml.etree.ElementTree as etree\nimport datetime\nimport logging\n\nimport six\nfrom six import PY3\nfrom six.moves import urllib\nfrom six.moves...
diff --git a/openlibrary/plugins/upstream/utils.py b/openlibrary/plugins/upstream/utils.py index c10fb68fa71..9e4da3e7742 100644 --- a/openlibrary/plugins/upstream/utils.py +++ b/openlibrary/plugins/upstream/utils.py @@ -11,6 +11,7 @@ import logging import six +from six import PY3 from six.moves import urllib fro...
ansible__awx-13022
Genrated certificate in install bundle for Execution node is valid only for 10 days ### Please confirm the following - [X] I agree to follow this project's [code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html). - [X] I have checked the [current issues](https://github.com/ansible/...
[ { "content": "# Copyright (c) 2018 Red Hat, Inc.\n# All Rights Reserved.\n\nimport datetime\nimport io\nimport ipaddress\nimport os\nimport tarfile\n\nimport asn1\nfrom awx.api import serializers\nfrom awx.api.generics import GenericAPIView, Response\nfrom awx.api.permissions import IsSystemAdminOrAuditor\nfrom...
[ { "content": "# Copyright (c) 2018 Red Hat, Inc.\n# All Rights Reserved.\n\nimport datetime\nimport io\nimport ipaddress\nimport os\nimport tarfile\n\nimport asn1\nfrom awx.api import serializers\nfrom awx.api.generics import GenericAPIView, Response\nfrom awx.api.permissions import IsSystemAdminOrAuditor\nfrom...
diff --git a/awx/api/views/instance_install_bundle.py b/awx/api/views/instance_install_bundle.py index 9a0113b95ee2..9b2ac0563c47 100644 --- a/awx/api/views/instance_install_bundle.py +++ b/awx/api/views/instance_install_bundle.py @@ -178,7 +178,7 @@ def generate_receptor_tls(instance_obj): .public_key(csr.pub...
PlasmaPy__PlasmaPy-987
Drop Python 3.6 support for version 0.6.0 [NumPy Enhancement Proposal 29](https://numpy.org/neps/nep-0029-deprecation_policy.html) suggests that scientific Python projects support versions of Python released in the last 42 months. Python 3.6 was released more than 42 months ago, so this suggests that we no longer need...
[ { "content": "\"\"\"\nWelcome to the `plasmapy` package, an open source community-developed Python\npackage for the plasma community. Documentation is available in the docstrings\nand online at https://docs.plasmapy.org (accessible also using the\n:func:`~plasmapy.online_help` function).\n\"\"\"\n__all__ = [\n...
[ { "content": "\"\"\"\nWelcome to the `plasmapy` package, an open source community-developed Python\npackage for the plasma community. Documentation is available in the docstrings\nand online at https://docs.plasmapy.org (accessible also using the\n:func:`~plasmapy.online_help` function).\n\"\"\"\n__all__ = [\n...
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 465efb06af..1af83cce25 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -18,15 +18,10 @@ jobs: matrix: include: - - name: Python 3.6 with minimal dependencies + - name: P...
google__clusterfuzz-235
Infinite recursion/stack-overflow in stack_symbolizer.py:72 when starting new bot "thread" A couple times when I've left the local development server and a bot running for a while I see this issue happening repeatedly. See [bot-log.txt](https://github.com/google/clusterfuzz/files/2894457/bot-log.txt) ([server-log.txt...
[ { "content": "# 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# Unless required by applicab...
[ { "content": "# 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# Unless required by applicab...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ea4267383..f6c6b3fb7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ Change Log ## Next Version +- Bug fixes to improve local development. + ## Version 1.0.1 - Bug fixes to improve local development. diff --git a/src/python/crash_analysis/stack_pars...
certbot__certbot-9501
dns_common.py error message "Error parsing credentials configuration" could be more helpful I recently ran into this error message. The solution was just me being dumb, but I think this error message could be improved to help the user better troubleshoot the situation. The easiest thing that could already help a lot is...
[ { "content": "\"\"\"Common code for DNS Authenticator Plugins.\"\"\"\nimport abc\nimport logging\nfrom time import sleep\nfrom typing import Callable\nfrom typing import Iterable\nfrom typing import List\nfrom typing import Mapping\nfrom typing import Optional\nfrom typing import Type\n\nimport configobj\n\nfro...
[ { "content": "\"\"\"Common code for DNS Authenticator Plugins.\"\"\"\nimport abc\nimport logging\nfrom time import sleep\nfrom typing import Callable\nfrom typing import Iterable\nfrom typing import List\nfrom typing import Mapping\nfrom typing import Optional\nfrom typing import Type\n\nimport configobj\n\nfro...
diff --git a/certbot/certbot/plugins/dns_common.py b/certbot/certbot/plugins/dns_common.py index 9d5b2e61444..a8e6a5a4d0a 100644 --- a/certbot/certbot/plugins/dns_common.py +++ b/certbot/certbot/plugins/dns_common.py @@ -272,8 +272,18 @@ def __init__(self, filename: str, mapper: Callable[[str], str] = lambda x: x) -> ...
mlflow__mlflow-9994
Report disk usage during tests ### Summary To find tests that consume lots of disk space, make the following change to report the disk usage: ```diff diff --git a/conftest.py b/conftest.py index 6f56d52f4..2c399c000 100644 --- a/conftest.py +++ b/conftest.py @@ -66,9 +66,18 @@ def pytest_report_teststatus(re...
[ { "content": "import json\nimport os\nimport posixpath\nimport shutil\nimport subprocess\n\nimport click\nimport pytest\n\nfrom mlflow.environment_variables import _MLFLOW_TESTING, MLFLOW_TRACKING_URI\n\n\ndef pytest_addoption(parser):\n parser.addoption(\n \"--requires-ssh\",\n action=\"store_...
[ { "content": "import json\nimport os\nimport posixpath\nimport shutil\nimport subprocess\n\nimport click\nimport pytest\n\nfrom mlflow.environment_variables import _MLFLOW_TESTING, MLFLOW_TRACKING_URI\n\n\ndef pytest_addoption(parser):\n parser.addoption(\n \"--requires-ssh\",\n action=\"store_...
diff --git a/conftest.py b/conftest.py index 6f56d52f4953c..640680cb3dc2a 100644 --- a/conftest.py +++ b/conftest.py @@ -66,9 +66,22 @@ def pytest_report_teststatus(report, config): (*rest, result) = outcome.get_result() mem = psutil.virtual_memory() - used = mem.used / 1024**3 - total...
Rapptz__discord.py-5212
Embed.Empty functionality does not work as expected. ### Summary According to the documentation for `set_thumbnail` and `set_image`: > Changed in version 1.4: Passing Empty removes the thumbnail. This does not function as expected. `set_author` and `set_footer` do not share the same problem. ### Reproductio...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2020 Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, includin...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2020 Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, includin...
diff --git a/discord/embeds.py b/discord/embeds.py index 7bbe803056bf..aa1563e44cc0 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -286,7 +286,10 @@ def set_image(self, *, url): """ if url is EmptyEmbed: - del self._image + try: + del self._image + ...
oppia__oppia-11835
Add lint test to avoid inline comments in CODEOWNER file The CODEOWNER files don't work on GitHub if you add inline comments (or anything except filename followed by user/project name.). Through this issue, we wanted to add a check to avoid inline comments in the CODEOWNER file. Note: If we won't follow the expect...
[ { "content": "# coding: utf-8\n#\n# Copyright 2020 The Oppia Authors. 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/licen...
[ { "content": "# coding: utf-8\n#\n# Copyright 2020 The Oppia Authors. 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/licen...
diff --git a/scripts/linters/codeowner_linter.py b/scripts/linters/codeowner_linter.py index 1ef48facd62c6..56db1ca885092 100644 --- a/scripts/linters/codeowner_linter.py +++ b/scripts/linters/codeowner_linter.py @@ -211,6 +211,13 @@ def check_codeowner_file(self): inside_blanket_codeowners_section = F...
redis__redis-py-2019
Add support for CLUSTER LINKS
[ { "content": "from redis.crc import key_slot\nfrom redis.exceptions import RedisClusterException, RedisError\n\nfrom .core import (\n ACLCommands,\n DataAccessCommands,\n ManagementCommands,\n PubSubCommands,\n ScriptCommands,\n)\nfrom .helpers import list_or_args\nfrom .redismodules import Redis...
[ { "content": "from redis.crc import key_slot\nfrom redis.exceptions import RedisClusterException, RedisError\n\nfrom .core import (\n ACLCommands,\n DataAccessCommands,\n ManagementCommands,\n PubSubCommands,\n ScriptCommands,\n)\nfrom .helpers import list_or_args\nfrom .redismodules import Redis...
diff --git a/redis/commands/cluster.py b/redis/commands/cluster.py index 7342c0c482..8f88590c1f 100644 --- a/redis/commands/cluster.py +++ b/redis/commands/cluster.py @@ -398,6 +398,18 @@ def cluster_slots(self, target_nodes=None): """ return self.execute_command("CLUSTER SLOTS", target_nodes=target_n...
autogluon__autogluon-126
Missing best config after fit for object detection fit example After executing object detection example, it only produces: ``` INFO:autogluon.task.object_detection.object_detection:>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> finish model fitting INFO:autogluon.task.object_detection.object_detection:The best config: ``` ...
[ { "content": "import logging\n\nimport mxnet as mx\nfrom mxnet import gluon, nd\n\nfrom ...core.optimizer import *\nfrom ...core.optimizer import *\nfrom ...core import *\nfrom ...searcher import *\nfrom ...scheduler import *\nfrom ...scheduler.resource import get_cpu_count, get_gpu_count\nfrom ..base import Ba...
[ { "content": "import logging\n\nimport mxnet as mx\nfrom mxnet import gluon, nd\n\nfrom ...core.optimizer import *\nfrom ...core.optimizer import *\nfrom ...core import *\nfrom ...searcher import *\nfrom ...scheduler import *\nfrom ...scheduler.resource import get_cpu_count, get_gpu_count\nfrom ..base import Ba...
diff --git a/autogluon/task/object_detection/object_detection.py b/autogluon/task/object_detection/object_detection.py index 2665db6c6c15..15d75fad4f6d 100644 --- a/autogluon/task/object_detection/object_detection.py +++ b/autogluon/task/object_detection/object_detection.py @@ -178,7 +178,7 @@ def fit(dataset='voc', ...