in_source_id
string
before_files
list
after_files
list
pr_diff
string
issue
string
golden_diff
string
verification_info
string
prompt
string
aws__aws-cli-4397
[ { "content": "# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#...
[ { "content": "# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#...
diff --git a/.changes/next-release/enhancement-Shorthand-33683.json b/.changes/next-release/enhancement-Shorthand-33683.json new file mode 100644 index 000000000000..c9cb10e8e3ab --- /dev/null +++ b/.changes/next-release/enhancement-Shorthand-33683.json @@ -0,0 +1,5 @@ +{ + "category": "Shorthand", + "type": "enhanc...
codecommit: tag-resource does not permit `:` character in tag key The following command incorrectly returns an error even though colon characters (`:`) in tag keys are legal: ``` aws codecommit tag-resource --resource-arn <arn> --tags namespace:KeyName=value ``` Expected behavior: a new tag is applied to the re...
diff --git a/awscli/shorthand.py b/awscli/shorthand.py --- a/awscli/shorthand.py +++ b/awscli/shorthand.py @@ -163,7 +163,7 @@ def _key(self): # key = 1*(alpha / %x30-39 / %x5f / %x2e / %x23) ; [a-zA-Z0-9\-_.#/] - valid_chars = string.ascii_letters + string.digits + '-_.#/' + valid_chars ...
{"golden_diff": "diff --git a/awscli/shorthand.py b/awscli/shorthand.py\n--- a/awscli/shorthand.py\n+++ b/awscli/shorthand.py\n@@ -163,7 +163,7 @@\n \n def _key(self):\n # key = 1*(alpha / %x30-39 / %x5f / %x2e / %x23) ; [a-zA-Z0-9\\-_.#/]\n- valid_chars = string.ascii_letters + string.digits + '-_....
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- codecommit: tag-resource does not permit `:` character in tag key The following command incorrectly returns an error even though colon characters (`:`) in tag keys are legal: ``` aws codecommit tag-resour...
localstack__localstack-3366
[ { "content": "import os\nimport re\nimport sys\nimport glob\nimport json\nimport time\nimport logging\nimport threading\nimport subprocess\nimport six\nimport base64\nfrom multiprocessing import Process, Queue\ntry:\n from shlex import quote as cmd_quote\nexcept ImportError:\n from pipes import quote as c...
[ { "content": "import os\nimport re\nimport sys\nimport glob\nimport json\nimport time\nimport logging\nimport threading\nimport subprocess\nimport six\nimport base64\nfrom multiprocessing import Process, Queue\ntry:\n from shlex import quote as cmd_quote\nexcept ImportError:\n from pipes import quote as c...
diff --git a/localstack/services/awslambda/lambda_executors.py b/localstack/services/awslambda/lambda_executors.py index 5c41462270c7c..5a010fd746480 100644 --- a/localstack/services/awslambda/lambda_executors.py +++ b/localstack/services/awslambda/lambda_executors.py @@ -469,7 +469,7 @@ def prime_docker_container(self...
Usage of `docker inspect ..` is fragile, depends on how and what built the docker image [x] bug report [ ] feature request # Detailed description `lambda_executor.py` current retrieves the container entrypoint from the docker image via `docker inspect --format="{{ .ContainerConfig.Entrypoint }}" ..`. This is fragile a...
diff --git a/localstack/services/awslambda/lambda_executors.py b/localstack/services/awslambda/lambda_executors.py --- a/localstack/services/awslambda/lambda_executors.py +++ b/localstack/services/awslambda/lambda_executors.py @@ -469,7 +469,7 @@ LOG.debug('Getting the entrypoint for image: %s' % (docker_i...
{"golden_diff": "diff --git a/localstack/services/awslambda/lambda_executors.py b/localstack/services/awslambda/lambda_executors.py\n--- a/localstack/services/awslambda/lambda_executors.py\n+++ b/localstack/services/awslambda/lambda_executors.py\n@@ -469,7 +469,7 @@\n LOG.debug('Getting the entrypoint for i...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Usage of `docker inspect ..` is fragile, depends on how and what built the docker image [x] bug report [ ] feature request # Detailed description `lambda_executor.py` current retrieves the container entrypoi...
ckan__ckan-4249
[ { "content": "# encoding: utf-8\n\nfrom paste.deploy.converters import asbool\nfrom six import text_type\n\nimport ckan.model as model\nfrom ckan.common import g, request, config, session\nfrom ckan.lib.helpers import redirect_to as redirect\nimport ckan.plugins as p\n\nimport logging\nlog = logging.getLogger(_...
[ { "content": "# encoding: utf-8\n\nfrom paste.deploy.converters import asbool\nfrom six import text_type\n\nimport ckan.model as model\nfrom ckan.common import g, request, config, session\nfrom ckan.lib.helpers import redirect_to as redirect\nimport ckan.plugins as p\n\nimport logging\nlog = logging.getLogger(_...
diff --git a/ckan/views/__init__.py b/ckan/views/__init__.py index 164231b8bd3..15e95a86487 100644 --- a/ckan/views/__init__.py +++ b/ckan/views/__init__.py @@ -98,8 +98,11 @@ def identify_user(): if authenticators: for item in authenticators: item.identify() - if g.user: - ...
'_Globals' has no attribute 'user' : exception when using an IAuthenticator on CKAN 2.8.0 I'm putting together a new deployment based on the new CKAN v2.8.0 release. I'm using ckanext-ldap as an authenticator, though it looks like this bug would apply to any authenticator plugin. This exact setup worked fine on CKAN v...
diff --git a/ckan/views/__init__.py b/ckan/views/__init__.py --- a/ckan/views/__init__.py +++ b/ckan/views/__init__.py @@ -98,8 +98,11 @@ if authenticators: for item in authenticators: item.identify() - if g.user: - break + try: + if g.user:...
{"golden_diff": "diff --git a/ckan/views/__init__.py b/ckan/views/__init__.py\n--- a/ckan/views/__init__.py\n+++ b/ckan/views/__init__.py\n@@ -98,8 +98,11 @@\n if authenticators:\n for item in authenticators:\n item.identify()\n- if g.user:\n- break\n+ try:\n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- '_Globals' has no attribute 'user' : exception when using an IAuthenticator on CKAN 2.8.0 I'm putting together a new deployment based on the new CKAN v2.8.0 release. I'm using ckanext-ldap as an authenticator...
aio-libs__aiohttp-4040
[ { "content": "import asyncio\nimport codecs\nimport io\nimport re\nimport sys\nimport traceback\nimport warnings\nfrom hashlib import md5, sha1, sha256\nfrom http.cookies import CookieError, Morsel, SimpleCookie\nfrom types import MappingProxyType, TracebackType\nfrom typing import ( # noqa\n TYPE_CHECKING,...
[ { "content": "import asyncio\nimport codecs\nimport io\nimport re\nimport sys\nimport traceback\nimport warnings\nfrom hashlib import md5, sha1, sha256\nfrom http.cookies import CookieError, Morsel, SimpleCookie\nfrom types import MappingProxyType, TracebackType\nfrom typing import ( # noqa\n TYPE_CHECKING,...
diff --git a/CHANGES/4039.bugfix b/CHANGES/4039.bugfix new file mode 100644 index 00000000000..27c4cdc9682 --- /dev/null +++ b/CHANGES/4039.bugfix @@ -0,0 +1 @@ +For URLs like "unix://localhost/..." set Host HTTP header to "localhost" instead of "localhost:None". diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_r...
Client-sent Host header can include port as "None" ## Long story short <!-- Please describe your problem and why the fix is important. --> When the client forms the Host header, it is possible for it to include the port as "None". This came up for me when using `aiodocker` to try to connect to the Docker API con...
diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py --- a/aiohttp/client_reqrep.py +++ b/aiohttp/client_reqrep.py @@ -315,7 +315,7 @@ netloc = cast(str, self.url.raw_host) if helpers.is_ipv6_address(netloc): netloc = '[{}]'.format(netloc) - if not self.url.is_default_p...
{"golden_diff": "diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py\n--- a/aiohttp/client_reqrep.py\n+++ b/aiohttp/client_reqrep.py\n@@ -315,7 +315,7 @@\n netloc = cast(str, self.url.raw_host)\n if helpers.is_ipv6_address(netloc):\n netloc = '[{}]'.format(netloc)\n- if n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Client-sent Host header can include port as "None" ## Long story short <!-- Please describe your problem and why the fix is important. --> When the client forms the Host header, it is possible for it to i...
aws-cloudformation__cfn-lint-2466
[ { "content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport os\nimport logging\nfrom datetime import datetime\nimport importlib\nimport traceback\nfrom typing import Any, Dict, List, Optional, Tuple, Union\nfrom cfnlint.exceptions impo...
[ { "content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport os\nimport logging\nfrom datetime import datetime\nimport importlib\nimport traceback\nfrom typing import Any, Dict, List, Optional, Tuple, Union\nfrom cfnlint.exceptions impo...
diff --git a/src/cfnlint/rules/__init__.py b/src/cfnlint/rules/__init__.py index 34e8618524..5353bdb956 100644 --- a/src/cfnlint/rules/__init__.py +++ b/src/cfnlint/rules/__init__.py @@ -302,9 +302,7 @@ def extend(self, more): self.register(rule) def __repr__(self): - return '\n'.join( - ...
Cannot list all the rules ### CloudFormation Lint Version 0.70.0 ### What operating system are you using? Windows ### Describe the bug `cfn-lint --list-rules` throws below Error.(username is masked.) ``` Traceback (most recent call last): File "C:\Users\${username}\AppData\Local\Programs\Python\Python39\lib...
diff --git a/src/cfnlint/rules/__init__.py b/src/cfnlint/rules/__init__.py --- a/src/cfnlint/rules/__init__.py +++ b/src/cfnlint/rules/__init__.py @@ -302,9 +302,7 @@ self.register(rule) def __repr__(self): - return '\n'.join( - [rule.verbose() for rule in sorted(self.rules, key=la...
{"golden_diff": "diff --git a/src/cfnlint/rules/__init__.py b/src/cfnlint/rules/__init__.py\n--- a/src/cfnlint/rules/__init__.py\n+++ b/src/cfnlint/rules/__init__.py\n@@ -302,9 +302,7 @@\n self.register(rule)\n \n def __repr__(self):\n- return '\\n'.join(\n- [rule.verbose() for rule in...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cannot list all the rules ### CloudFormation Lint Version 0.70.0 ### What operating system are you using? Windows ### Describe the bug `cfn-lint --list-rules` throws below Error.(username is masked.) ...
flask-admin__flask-admin-434
[ { "content": "from wtforms import fields\n\nfrom peewee import (DateTimeField, DateField, TimeField,\n PrimaryKeyField, ForeignKeyField, BaseModel)\n\nfrom wtfpeewee.orm import ModelConverter, model_form\n\nfrom flask.ext.admin import form\nfrom flask.ext.admin._compat import iteritems, iterv...
[ { "content": "from wtforms import fields\n\nfrom peewee import (DateTimeField, DateField, TimeField,\n PrimaryKeyField, ForeignKeyField, BaseModel)\n\nfrom wtfpeewee.orm import ModelConverter, model_form\n\nfrom flask.ext.admin import form\nfrom flask.ext.admin._compat import iteritems, iterv...
diff --git a/flask_admin/contrib/peewee/form.py b/flask_admin/contrib/peewee/form.py index b071c3b53..806a67036 100644 --- a/flask_admin/contrib/peewee/form.py +++ b/flask_admin/contrib/peewee/form.py @@ -90,6 +90,8 @@ def __init__(self, view, additional=None): self.converters[DateField] = self.handle_date ...
form_overrides does not work with Peewee model backend I assume this is the same reason as the others -- that the Peewee backend's not quite as up-to-date? Looking through the code, it appears that form_overrides is not even checked in the Peewee backend, so it shouldn't be too hard for me to fix this. If you confirm...
diff --git a/flask_admin/contrib/peewee/form.py b/flask_admin/contrib/peewee/form.py --- a/flask_admin/contrib/peewee/form.py +++ b/flask_admin/contrib/peewee/form.py @@ -90,6 +90,8 @@ self.converters[DateField] = self.handle_date self.converters[TimeField] = self.handle_time + self.overrides...
{"golden_diff": "diff --git a/flask_admin/contrib/peewee/form.py b/flask_admin/contrib/peewee/form.py\n--- a/flask_admin/contrib/peewee/form.py\n+++ b/flask_admin/contrib/peewee/form.py\n@@ -90,6 +90,8 @@\n self.converters[DateField] = self.handle_date\n self.converters[TimeField] = self.handle_time\n \...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- form_overrides does not work with Peewee model backend I assume this is the same reason as the others -- that the Peewee backend's not quite as up-to-date? Looking through the code, it appears that form_over...
google__turbinia-323
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2017 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# U...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2017 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# U...
diff --git a/turbinia/client.py b/turbinia/client.py index 95d87e653..eb6d8c060 100644 --- a/turbinia/client.py +++ b/turbinia/client.py @@ -282,6 +282,8 @@ def format_task_status( task.get('name'), task.get('user'), task.get('worker_name'), success, status)) saved_paths = tas...
turbiniactl -a status breaks on local installations When running `turbiniactl -a status` with local tasks, there is an error, and a stack trace gets thrown here and `saved_paths` is incorrectly set to None: https://github.com/google/turbinia/blob/b65bc0d26f635655ad03ece4d65fae2e2e224915/turbinia/client.py#L250 FYI ...
diff --git a/turbinia/client.py b/turbinia/client.py --- a/turbinia/client.py +++ b/turbinia/client.py @@ -282,6 +282,8 @@ task.get('name'), task.get('user'), task.get('worker_name'), success, status)) saved_paths = task.get('saved_paths', []) + if saved_paths is None: ...
{"golden_diff": "diff --git a/turbinia/client.py b/turbinia/client.py\n--- a/turbinia/client.py\n+++ b/turbinia/client.py\n@@ -282,6 +282,8 @@\n task.get('name'), task.get('user'), task.get('worker_name'),\n success, status))\n saved_paths = task.get('saved_paths', [])\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- turbiniactl -a status breaks on local installations When running `turbiniactl -a status` with local tasks, there is an error, and a stack trace gets thrown here and `saved_paths` is incorrectly set to None: ...
akvo__akvo-rsr-1704
[ { "content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\n\nimport l...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\n\nimport l...
diff --git a/akvo/rsr/models/__init__.py b/akvo/rsr/models/__init__.py index 8f6e7071d2..04395819db 100644 --- a/akvo/rsr/models/__init__.py +++ b/akvo/rsr/models/__init__.py @@ -265,6 +265,7 @@ rules.add_perm('rsr.add_employment', is_rsr_admin) rules.add_perm('rsr.change_employment', is_rsr_admin | is_org_admin | ...
User permissions for deleting employments Currently the organisation Admins and User Managers do not have the right to delete an employment. As they are managing these employments, they should be able to do so. ## Test plan GIVEN the user management page WHEN logged in as an Organisation Admin or User Manager THEN the...
diff --git a/akvo/rsr/models/__init__.py b/akvo/rsr/models/__init__.py --- a/akvo/rsr/models/__init__.py +++ b/akvo/rsr/models/__init__.py @@ -265,6 +265,7 @@ rules.add_perm('rsr.add_employment', is_rsr_admin) rules.add_perm('rsr.change_employment', is_rsr_admin | is_org_admin | is_org_user_manager) +rules.add_perm...
{"golden_diff": "diff --git a/akvo/rsr/models/__init__.py b/akvo/rsr/models/__init__.py\n--- a/akvo/rsr/models/__init__.py\n+++ b/akvo/rsr/models/__init__.py\n@@ -265,6 +265,7 @@\n \n rules.add_perm('rsr.add_employment', is_rsr_admin)\n rules.add_perm('rsr.change_employment', is_rsr_admin | is_org_admin | is_org_user_m...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- User permissions for deleting employments Currently the organisation Admins and User Managers do not have the right to delete an employment. As they are managing these employments, they should be able to do s...
deis__deis-1332
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nData models for the Deis API.\n\"\"\"\n\nfrom __future__ import unicode_literals\nimport etcd\nimport importlib\nimport logging\nimport os\nimport subprocess\n\nfrom celery.canvas import group\nfrom django.conf import settings\nfrom django.contrib.auth.models imp...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nData models for the Deis API.\n\"\"\"\n\nfrom __future__ import unicode_literals\nimport etcd\nimport importlib\nimport logging\nimport os\nimport subprocess\n\nfrom celery.canvas import group\nfrom django.conf import settings\nfrom django.contrib.auth.models imp...
diff --git a/controller/api/models.py b/controller/api/models.py index 0e0e0c5704..0440a430a3 100644 --- a/controller/api/models.py +++ b/controller/api/models.py @@ -618,7 +618,12 @@ def _etcd_purge_key(**kwargs): def _etcd_purge_user(**kwargs): username = kwargs['instance'].username - _etcd_client.delete('...
deis auth:cancel doesn't delete the account steps to reproduce the issue ``` deis register http://deis.54.193.35.8.xip.io --username=Test --password=asdf1234 --email=test@test.co.nz Registered Test Logged in as Test sivarams-MacBook-Pro:integration ram$ deis auth:cancel Please log in again in order to cancel this ac...
diff --git a/controller/api/models.py b/controller/api/models.py --- a/controller/api/models.py +++ b/controller/api/models.py @@ -618,7 +618,12 @@ def _etcd_purge_user(**kwargs): username = kwargs['instance'].username - _etcd_client.delete('/deis/builder/users/{}'.format(username), dir=True, recursive=True)...
{"golden_diff": "diff --git a/controller/api/models.py b/controller/api/models.py\n--- a/controller/api/models.py\n+++ b/controller/api/models.py\n@@ -618,7 +618,12 @@\n \n def _etcd_purge_user(**kwargs):\n username = kwargs['instance'].username\n- _etcd_client.delete('/deis/builder/users/{}'.format(username), d...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- deis auth:cancel doesn't delete the account steps to reproduce the issue ``` deis register http://deis.54.193.35.8.xip.io --username=Test --password=asdf1234 --email=test@test.co.nz Registered Test Logged ...
xonsh__xonsh-5328
[ { "content": "import functools\nimport json\nimport re\nimport shutil\nimport subprocess\nimport textwrap\nfrom pathlib import Path\n\nfrom xonsh.built_ins import XSH\nfrom xonsh.completers.tools import RichCompletion, contextual_command_completer\nfrom xonsh.parsers.completion_context import CommandContext\n\n...
[ { "content": "import functools\nimport json\nimport re\nimport shutil\nimport subprocess\nimport textwrap\nfrom pathlib import Path\n\nfrom xonsh.built_ins import XSH\nfrom xonsh.completers.tools import RichCompletion, contextual_command_completer\nfrom xonsh.parsers.completion_context import CommandContext\n\n...
diff --git a/news/fix-abs-path-completions-on-keypress.rst b/news/fix-abs-path-completions-on-keypress.rst new file mode 100644 index 0000000000..8e7e072b3d --- /dev/null +++ b/news/fix-abs-path-completions-on-keypress.rst @@ -0,0 +1,23 @@ +**Added:** + +* <news item> + +**Changed:** + +* <news item> + +**Deprecated:**...
Unexpected exception while updating completions <!--- Provide a general summary of the issue in the Title above --> When I set $UPDATE_COMPLETIONS_ON_KEYPRESS = True and type for instance /usr/bin/ls -a in terminal, following exception is thrown: "Exception [Errno 13] Permission denied: '/usr/bin/ls.json'" <!--- If y...
diff --git a/xonsh/completers/man.py b/xonsh/completers/man.py --- a/xonsh/completers/man.py +++ b/xonsh/completers/man.py @@ -114,7 +114,7 @@ @functools.lru_cache(maxsize=10) def _parse_man_page_options(cmd: str) -> "dict[str, tuple[str, ...]]": - path = get_man_completions_path() / f"{cmd}.json" + path = ge...
{"golden_diff": "diff --git a/xonsh/completers/man.py b/xonsh/completers/man.py\n--- a/xonsh/completers/man.py\n+++ b/xonsh/completers/man.py\n@@ -114,7 +114,7 @@\n \n @functools.lru_cache(maxsize=10)\n def _parse_man_page_options(cmd: str) -> \"dict[str, tuple[str, ...]]\":\n- path = get_man_completions_path() / f\...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Unexpected exception while updating completions <!--- Provide a general summary of the issue in the Title above --> When I set $UPDATE_COMPLETIONS_ON_KEYPRESS = True and type for instance /usr/bin/ls -a in t...
dbt-labs__dbt-core-3351
[ { "content": "import json\nimport re\nfrom contextlib import contextmanager\nfrom dataclasses import dataclass\nfrom functools import lru_cache\nimport agate\nfrom requests.exceptions import ConnectionError\nfrom typing import Optional, Any, Dict, Tuple\n\nimport google.auth\nimport google.auth.exceptions\nimpo...
[ { "content": "import json\nimport re\nfrom contextlib import contextmanager\nfrom dataclasses import dataclass\nfrom functools import lru_cache\nimport agate\nfrom requests.exceptions import ConnectionError\nfrom typing import Optional, Any, Dict, Tuple\n\nimport google.auth\nimport google.auth.exceptions\nimpo...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 562a46b4ca6..bd672ed05f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Fix unique_id generation for generic tests so tests with the same FQN but different configuration will run. ([#3254](https://github.com/fishtown-analytics/dbt/issues/3254), [#3335](htt...
'NoneType' object has no attribute 'job_label' I am trying to configure the bigquery connection profile. Somehow get the following error message after "dbt debug". >'NoneType' object has no attribute 'job_label' Not sure how to debug this. Can someone give me a hint please? ![image](https://user-images.githubus...
diff --git a/plugins/bigquery/dbt/adapters/bigquery/connections.py b/plugins/bigquery/dbt/adapters/bigquery/connections.py --- a/plugins/bigquery/dbt/adapters/bigquery/connections.py +++ b/plugins/bigquery/dbt/adapters/bigquery/connections.py @@ -309,7 +309,7 @@ logger.debug('On {}: {}', conn.name, sql) - ...
{"golden_diff": "diff --git a/plugins/bigquery/dbt/adapters/bigquery/connections.py b/plugins/bigquery/dbt/adapters/bigquery/connections.py\n--- a/plugins/bigquery/dbt/adapters/bigquery/connections.py\n+++ b/plugins/bigquery/dbt/adapters/bigquery/connections.py\n@@ -309,7 +309,7 @@\n \n logger.debug('On {}: {}'...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- 'NoneType' object has no attribute 'job_label' I am trying to configure the bigquery connection profile. Somehow get the following error message after "dbt debug". >'NoneType' object has no attribute 'job...
dj-stripe__dj-stripe-980
[ { "content": "import stripe\nfrom django.db import models, transaction\nfrom stripe.error import InvalidRequestError\n\nfrom .. import enums\nfrom .. import settings as djstripe_settings\nfrom ..exceptions import StripeObjectManipulationException\nfrom ..fields import (\n JSONField,\n StripeCurrencyCodeFi...
[ { "content": "import stripe\nfrom django.db import models, transaction\nfrom stripe.error import InvalidRequestError\n\nfrom .. import enums\nfrom .. import settings as djstripe_settings\nfrom ..exceptions import StripeObjectManipulationException\nfrom ..fields import (\n JSONField,\n StripeCurrencyCodeFi...
diff --git a/djstripe/models/payment_methods.py b/djstripe/models/payment_methods.py index d6d9fd3d84..07634f9f14 100644 --- a/djstripe/models/payment_methods.py +++ b/djstripe/models/payment_methods.py @@ -527,6 +527,13 @@ class PaymentMethod(StripeModel): stripe_class = stripe.PaymentMethod + def _attach_...
PaymentMethod detachment doesn't work because it doesn't unset customer **Describe the bug** I'm using 4a828a48092a3904094917776ce725ec9aa3fce5 (after the #914 merge) and trying to set up an SCA complaint flow. As I said in #941, the events don't sync this model. Though even if I sync it manually (using sync_from_str...
diff --git a/djstripe/models/payment_methods.py b/djstripe/models/payment_methods.py --- a/djstripe/models/payment_methods.py +++ b/djstripe/models/payment_methods.py @@ -527,6 +527,13 @@ stripe_class = stripe.PaymentMethod + def _attach_objects_hook(self, cls, data): + customer = cls._stripe_object_...
{"golden_diff": "diff --git a/djstripe/models/payment_methods.py b/djstripe/models/payment_methods.py\n--- a/djstripe/models/payment_methods.py\n+++ b/djstripe/models/payment_methods.py\n@@ -527,6 +527,13 @@\n \n stripe_class = stripe.PaymentMethod\n \n+ def _attach_objects_hook(self, cls, data):\n+ custo...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- PaymentMethod detachment doesn't work because it doesn't unset customer **Describe the bug** I'm using 4a828a48092a3904094917776ce725ec9aa3fce5 (after the #914 merge) and trying to set up an SCA complaint fl...
ansible__ansible-modules-extras-3417
[ { "content": "#!/usr/bin/python\n# encoding: utf-8\n\n# (c) 2015, Jose Armesto <jose@armesto.net>\n#\n# This file is part of Ansible\n#\n# This module is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, ...
[ { "content": "#!/usr/bin/python\n# encoding: utf-8\n\n# (c) 2015, Jose Armesto <jose@armesto.net>\n#\n# This file is part of Ansible\n#\n# This module is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, ...
diff --git a/cloud/amazon/ec2_lc_find.py b/cloud/amazon/ec2_lc_find.py index f18bdfb42be..e5463e4ce80 100644 --- a/cloud/amazon/ec2_lc_find.py +++ b/cloud/amazon/ec2_lc_find.py @@ -184,7 +184,7 @@ def find_launch_configs(client, module): 'security_groups': lc['SecurityGroups'], 'kernel...
ec2_lc_find not returning AssociatePublicIpAddress ##### ISSUE TYPE Bug Report ##### COMPONENT NAME ec2_lc_find ##### ANSIBLE VERSION ``` ansible 2.2.0.0 config file = /home/centos/ansiblebase/ansible.cfg configured module search path = Default w/o overrides ``` ##### CONFIGURATION No significant c...
diff --git a/cloud/amazon/ec2_lc_find.py b/cloud/amazon/ec2_lc_find.py --- a/cloud/amazon/ec2_lc_find.py +++ b/cloud/amazon/ec2_lc_find.py @@ -184,7 +184,7 @@ 'security_groups': lc['SecurityGroups'], 'kernel_id': lc['KernelId'], 'ram_disk_id': lc['RamdiskId'], - ...
{"golden_diff": "diff --git a/cloud/amazon/ec2_lc_find.py b/cloud/amazon/ec2_lc_find.py\n--- a/cloud/amazon/ec2_lc_find.py\n+++ b/cloud/amazon/ec2_lc_find.py\n@@ -184,7 +184,7 @@\n 'security_groups': lc['SecurityGroups'],\n 'kernel_id': lc['KernelId'],\n 'ram_disk_id': lc...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ec2_lc_find not returning AssociatePublicIpAddress ##### ISSUE TYPE Bug Report ##### COMPONENT NAME ec2_lc_find ##### ANSIBLE VERSION ``` ansible 2.2.0.0 config file = /home/centos/ansiblebase/an...
zulip__zulip-5407
[ { "content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport logging\nimport re\nimport scrapy\n\nfrom scrapy import Request\nfrom scrapy.linkextractors import IGNORED_EXTENSIONS\nfrom scrapy.linkextractors.lxmlhtml import LxmlLinkExtractor\nfrom scrapy.utils.url import url_has_any_exten...
[ { "content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport logging\nimport re\nimport scrapy\n\nfrom scrapy import Request\nfrom scrapy.linkextractors import IGNORED_EXTENSIONS\nfrom scrapy.linkextractors.lxmlhtml import LxmlLinkExtractor\nfrom scrapy.utils.url import url_has_any_exten...
diff --git a/docs/fixing-commits.md b/docs/fixing-commits.md new file mode 100644 index 0000000000000..9bd258475a910 --- /dev/null +++ b/docs/fixing-commits.md @@ -0,0 +1,35 @@ +# Fixing Commits +This is mostly from +[here](https://help.github.com/articles/changing-a-commit-message/#rewriting-the-most-recent-commit-mes...
Pull GCI docs into main Zulip repo. Some of our assets, like git cheatsheets, currently live in the zulip-gci repo. We should move them to the main Zulip repo and link from appropriate places. cc @synicalsyntax @lonerz @tommyip
diff --git a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py b/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py --- a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py +++ b/tools/documentation_crawler/documentation_crawler/spiders/common/...
{"golden_diff": "diff --git a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py b/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py\n--- a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py\n+++ b/tools/documentation_crawler/documentation_craw...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pull GCI docs into main Zulip repo. Some of our assets, like git cheatsheets, currently live in the zulip-gci repo. We should move them to the main Zulip repo and link from appropriate places. cc @synical...
pre-commit__pre-commit-1113
[ { "content": "from __future__ import unicode_literals\n\nimport contextlib\nimport os.path\n\nimport toml\n\nimport pre_commit.constants as C\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.util import clean_path_on_...
[ { "content": "from __future__ import unicode_literals\n\nimport contextlib\nimport os.path\n\nimport toml\n\nimport pre_commit.constants as C\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.util import clean_path_on_...
diff --git a/pre_commit/languages/rust.py b/pre_commit/languages/rust.py index e09d0078f..4b25a9d10 100644 --- a/pre_commit/languages/rust.py +++ b/pre_commit/languages/rust.py @@ -73,7 +73,7 @@ def install_environment(prefix, version, additional_dependencies): _add_dependencies(prefix.path('Cargo.toml'), lib_...
rust hook requires `--path` attribute Cargo has changed how packages get installed and requires an extra `--path <destination>` attribute. Symptom: ``` [INFO] Initializing environment for https://github.com/nix-community/nixpkgs-fmt. [INFO] Installing environment for https://github.com/nix-community/nixpkgs-fmt. ...
diff --git a/pre_commit/languages/rust.py b/pre_commit/languages/rust.py --- a/pre_commit/languages/rust.py +++ b/pre_commit/languages/rust.py @@ -73,7 +73,7 @@ _add_dependencies(prefix.path('Cargo.toml'), lib_deps) with clean_path_on_failure(directory): - packages_to_install = {()} + pack...
{"golden_diff": "diff --git a/pre_commit/languages/rust.py b/pre_commit/languages/rust.py\n--- a/pre_commit/languages/rust.py\n+++ b/pre_commit/languages/rust.py\n@@ -73,7 +73,7 @@\n _add_dependencies(prefix.path('Cargo.toml'), lib_deps)\n \n with clean_path_on_failure(directory):\n- packages_to_inst...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- rust hook requires `--path` attribute Cargo has changed how packages get installed and requires an extra `--path <destination>` attribute. Symptom: ``` [INFO] Initializing environment for https://github....
statsmodels__statsmodels-3044
[ { "content": "from statsmodels.compat.numpy import recarray_select\nfrom statsmodels.compat.python import (range, StringIO, urlopen,\n HTTPError, URLError, lrange,\n cPickle, urljoin, BytesIO, long, PY3)\nimport sys\nimport shutil\nfrom...
[ { "content": "from statsmodels.compat.numpy import recarray_select\nfrom statsmodels.compat.python import (range, StringIO, urlopen,\n HTTPError, URLError, lrange,\n cPickle, urljoin, BytesIO, long, PY3)\nimport sys\nimport shutil\nfrom...
diff --git a/statsmodels/datasets/tests/test_utils.py b/statsmodels/datasets/tests/test_utils.py index 23115b5142f..35671743d9f 100644 --- a/statsmodels/datasets/tests/test_utils.py +++ b/statsmodels/datasets/tests/test_utils.py @@ -1,38 +1,48 @@ from statsmodels.compat.python import PY3 import os -from statsmodels.d...
TST disable test_webuse again see #2233 one file is being downloaded from sourceforge which has frequent connection problems the download from our source on github worked without problems But I want to get 0.7 out instead of being distracted by network problems
diff --git a/statsmodels/datasets/utils.py b/statsmodels/datasets/utils.py --- a/statsmodels/datasets/utils.py +++ b/statsmodels/datasets/utils.py @@ -329,10 +329,11 @@ data_home = get_data_home(data_home) shutil.rmtree(data_home) -def check_internet(): +def check_internet(url=None): """Check if intern...
{"golden_diff": "diff --git a/statsmodels/datasets/utils.py b/statsmodels/datasets/utils.py\n--- a/statsmodels/datasets/utils.py\n+++ b/statsmodels/datasets/utils.py\n@@ -329,10 +329,11 @@\n data_home = get_data_home(data_home)\n shutil.rmtree(data_home)\n \n-def check_internet():\n+def check_internet(url=None)...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- TST disable test_webuse again see #2233 one file is being downloaded from sourceforge which has frequent connection problems the download from our source on github worked without problems But I want to get...
geopandas__geopandas-94
[ { "content": "try:\n from collections import OrderedDict\nexcept ImportError:\n # Python 2.6\n from ordereddict import OrderedDict\nfrom collections import defaultdict\nimport json\nimport os\nimport sys\n\nimport numpy as np\nfrom pandas import DataFrame, Series\nfrom shapely.geometry import mapping, ...
[ { "content": "try:\n from collections import OrderedDict\nexcept ImportError:\n # Python 2.6\n from ordereddict import OrderedDict\nfrom collections import defaultdict\nimport json\nimport os\nimport sys\n\nimport numpy as np\nfrom pandas import DataFrame, Series\nfrom shapely.geometry import mapping, ...
diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py index 4c74bac174..988c8bd120 100644 --- a/geopandas/geodataframe.py +++ b/geopandas/geodataframe.py @@ -283,7 +283,10 @@ def to_file(self, filename, driver="ESRI Shapefile", **kwargs): def convert_type(in_type): if in_type == objec...
to_file(): 'long' isn't a valid Fiona property type The question http://gis.stackexchange.com/questions/89206/geopandas-error-when-writing-to-file-valueerror-long-is-not-in-list revealed a bug to me. If you pass schema={'geometry': 'Point', 'properties': {'foo': 'long'}} into fiona.open(), the type 'long' isn't found ...
diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py --- a/geopandas/geodataframe.py +++ b/geopandas/geodataframe.py @@ -283,7 +283,10 @@ def convert_type(in_type): if in_type == object: return 'str' - return type(np.asscalar(np.zeros(1, in_type))).__name_...
{"golden_diff": "diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py\n--- a/geopandas/geodataframe.py\n+++ b/geopandas/geodataframe.py\n@@ -283,7 +283,10 @@\n def convert_type(in_type):\n if in_type == object:\n return 'str'\n- return type(np.asscalar(np.zer...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- to_file(): 'long' isn't a valid Fiona property type The question http://gis.stackexchange.com/questions/89206/geopandas-error-when-writing-to-file-valueerror-long-is-not-in-list revealed a bug to me. If you ...
cloud-custodian__cloud-custodian-5339
[ { "content": "# Copyright 2016-2017 Capital One Services, 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 requi...
[ { "content": "# Copyright 2016-2017 Capital One Services, 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 requi...
diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py index 688df0d21f9..6536d1f3b48 100644 --- a/c7n/resources/cw.py +++ b/c7n/resources/cw.py @@ -196,7 +196,8 @@ def process(self, resources): client = local_session(self.manager.session_factory).client('logs') days = self.data['days'] for r...
Put retention days on Cloud Watch logs. with the TRaceback Here is the Policy that I'm running periodically. I'm getting throttling Errors. policies: - name: Custodian-loggroup-retention resource: log-group description: | Checks log groups weekely and sets the log retention for log groups that ...
diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py --- a/c7n/resources/cw.py +++ b/c7n/resources/cw.py @@ -196,7 +196,8 @@ client = local_session(self.manager.session_factory).client('logs') days = self.data['days'] for r in resources: - client.put_retention_policy( + ...
{"golden_diff": "diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py\n--- a/c7n/resources/cw.py\n+++ b/c7n/resources/cw.py\n@@ -196,7 +196,8 @@\n client = local_session(self.manager.session_factory).client('logs')\n days = self.data['days']\n for r in resources:\n- client.put_reten...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Put retention days on Cloud Watch logs. with the TRaceback Here is the Policy that I'm running periodically. I'm getting throttling Errors. policies: - name: Custodian-loggroup-retention resource: ...
ray-project__ray-8491
[ { "content": "from collections import deque, OrderedDict\nimport numpy as np\n\nfrom ray.rllib.utils import try_import_tf\n\ntf = try_import_tf()\n\n\ndef unflatten(vector, shapes):\n i = 0\n arrays = []\n for shape in shapes:\n size = np.prod(shape, dtype=np.int)\n array = vector[i:(i + ...
[ { "content": "from collections import deque, OrderedDict\nimport numpy as np\n\nfrom ray.rllib.utils import try_import_tf\n\ntf = try_import_tf()\n\n\ndef unflatten(vector, shapes):\n i = 0\n arrays = []\n for shape in shapes:\n size = np.prod(shape, dtype=np.int)\n array = vector[i:(i + ...
diff --git a/python/ray/experimental/tf_utils.py b/python/ray/experimental/tf_utils.py index bdddc6a96b5b..8fa0d455297a 100644 --- a/python/ray/experimental/tf_utils.py +++ b/python/ray/experimental/tf_utils.py @@ -161,10 +161,7 @@ def get_weights(self): Dictionary mapping variable names to their weights. ...
Time to initialize a policy grows linearly with the number of agents <!-- General questions should be asked on the mailing list ray-dev@googlegroups.com. Questions about how to use Ray should be asked on [StackOverflow](https://stackoverflow.com/questions/tagged/ray). Before submitting an issue, please fill out t...
diff --git a/python/ray/experimental/tf_utils.py b/python/ray/experimental/tf_utils.py --- a/python/ray/experimental/tf_utils.py +++ b/python/ray/experimental/tf_utils.py @@ -161,10 +161,7 @@ Dictionary mapping variable names to their weights. """ self._check_sess() - return { - ...
{"golden_diff": "diff --git a/python/ray/experimental/tf_utils.py b/python/ray/experimental/tf_utils.py\n--- a/python/ray/experimental/tf_utils.py\n+++ b/python/ray/experimental/tf_utils.py\n@@ -161,10 +161,7 @@\n Dictionary mapping variable names to their weights.\n \"\"\"\n self._check_ses...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Time to initialize a policy grows linearly with the number of agents <!-- General questions should be asked on the mailing list ray-dev@googlegroups.com. Questions about how to use Ray should be asked on [...
bookwyrm-social__bookwyrm-1639
[ { "content": "\"\"\"ISNI author checking utilities\"\"\"\nimport xml.etree.ElementTree as ET\nimport requests\n\nfrom bookwyrm import activitypub, models\n\n\ndef request_isni_data(search_index, search_term, max_records=5):\n \"\"\"Request data from the ISNI API\"\"\"\n\n search_string = f'{search_index}=...
[ { "content": "\"\"\"ISNI author checking utilities\"\"\"\nimport xml.etree.ElementTree as ET\nimport requests\n\nfrom bookwyrm import activitypub, models\n\n\ndef request_isni_data(search_index, search_term, max_records=5):\n \"\"\"Request data from the ISNI API\"\"\"\n\n search_string = f'{search_index}=...
diff --git a/bookwyrm/templates/directory/directory.html b/bookwyrm/templates/directory/directory.html index 9753c4c0f8..c3ddb3c5c4 100644 --- a/bookwyrm/templates/directory/directory.html +++ b/bookwyrm/templates/directory/directory.html @@ -18,7 +18,7 @@ <h1 class="title"> </p> <form name="directory" method...
Some translation strings missing/not applied **Describe the bug** Some translations are not being applied. **To Reproduce** change Bookwyrm language to other than English (tested with Lithuanian) https://ziurkes.group.lt/user/athinkingmeat/books/read https://ziurkes.group.lt/user/athinkingmeat/books/reading ...
diff --git a/bookwyrm/utils/isni.py b/bookwyrm/utils/isni.py --- a/bookwyrm/utils/isni.py +++ b/bookwyrm/utils/isni.py @@ -19,7 +19,7 @@ "recordPacking": "xml", "sortKeys": "RLV,pica,0,,", } - result = requests.get("http://isni.oclc.org/sru/", params=query_params, timeout=10) + result = req...
{"golden_diff": "diff --git a/bookwyrm/utils/isni.py b/bookwyrm/utils/isni.py\n--- a/bookwyrm/utils/isni.py\n+++ b/bookwyrm/utils/isni.py\n@@ -19,7 +19,7 @@\n \"recordPacking\": \"xml\",\n \"sortKeys\": \"RLV,pica,0,,\",\n }\n- result = requests.get(\"http://isni.oclc.org/sru/\", params=query_par...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Some translation strings missing/not applied **Describe the bug** Some translations are not being applied. **To Reproduce** change Bookwyrm language to other than English (tested with Lithuanian) ht...
edgedb__edgedb-6313
[ { "content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2008-present MagicStack Inc. and the EdgeDB authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy...
[ { "content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2008-present MagicStack Inc. and the EdgeDB authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy...
diff --git a/edb/pgsql/compiler/context.py b/edb/pgsql/compiler/context.py index 13319ab80ee..39ba9294d3b 100644 --- a/edb/pgsql/compiler/context.py +++ b/edb/pgsql/compiler/context.py @@ -420,6 +420,7 @@ def __init__( self.path_scope = collections.ChainMap() self.rel_hierarchy = {} ...
InternalServerError: missing FROM-clause entry for table "ins_contents~3" when access policies are applied <!-- Please search existing issues to avoid creating duplicates. --> The `InternalServerError: missing FROM-clause entry for table "ins_contents~3"` error sometimes occurs in deeply nested queries *only when ac...
diff --git a/edb/pgsql/compiler/context.py b/edb/pgsql/compiler/context.py --- a/edb/pgsql/compiler/context.py +++ b/edb/pgsql/compiler/context.py @@ -420,6 +420,7 @@ self.path_scope = collections.ChainMap() self.rel_hierarchy = {} self.scope_tree = prevlevel.scope_tre...
{"golden_diff": "diff --git a/edb/pgsql/compiler/context.py b/edb/pgsql/compiler/context.py\n--- a/edb/pgsql/compiler/context.py\n+++ b/edb/pgsql/compiler/context.py\n@@ -420,6 +420,7 @@\n self.path_scope = collections.ChainMap()\n self.rel_hierarchy = {}\n self.scope_tre...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- InternalServerError: missing FROM-clause entry for table "ins_contents~3" when access policies are applied <!-- Please search existing issues to avoid creating duplicates. --> The `InternalServerError: mis...
ivy-llc__ivy-23796
[ { "content": "# global\nimport ivy\nimport ivy.functional.frontends.tensorflow as tf_frontend\nfrom ivy.functional.frontends.tensorflow import check_tensorflow_casting\nfrom ivy.functional.frontends.tensorflow.func_wrapper import (\n to_ivy_arrays_and_back,\n map_raw_ops_alias,\n to_ivy_dtype,\n)\n\nfr...
[ { "content": "# global\nimport ivy\nimport ivy.functional.frontends.tensorflow as tf_frontend\nfrom ivy.functional.frontends.tensorflow import check_tensorflow_casting\nfrom ivy.functional.frontends.tensorflow.func_wrapper import (\n to_ivy_arrays_and_back,\n map_raw_ops_alias,\n to_ivy_dtype,\n)\n\nfr...
diff --git a/ivy/functional/frontends/tensorflow/raw_ops.py b/ivy/functional/frontends/tensorflow/raw_ops.py index 354afa54bdb71..5dbd860c52d63 100644 --- a/ivy/functional/frontends/tensorflow/raw_ops.py +++ b/ivy/functional/frontends/tensorflow/raw_ops.py @@ -170,6 +170,7 @@ ) ) ) +Mod = to_ivy_arrays_a...
mod
diff --git a/ivy/functional/frontends/tensorflow/raw_ops.py b/ivy/functional/frontends/tensorflow/raw_ops.py --- a/ivy/functional/frontends/tensorflow/raw_ops.py +++ b/ivy/functional/frontends/tensorflow/raw_ops.py @@ -170,6 +170,7 @@ ) ) ) +Mod = to_ivy_arrays_and_back(map_raw_ops_alias(tf_frontend.math...
{"golden_diff": "diff --git a/ivy/functional/frontends/tensorflow/raw_ops.py b/ivy/functional/frontends/tensorflow/raw_ops.py\n--- a/ivy/functional/frontends/tensorflow/raw_ops.py\n+++ b/ivy/functional/frontends/tensorflow/raw_ops.py\n@@ -170,6 +170,7 @@\n )\n )\n )\n+Mod = to_ivy_arrays_and_back(map_raw_op...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- mod --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `ivy/functional/frontends/tensorflow/raw_ops.py` Conten...
open-telemetry__opentelemetry-python-contrib-172
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/__init__.py b/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/__init__.py index 63f23ae79b..3419559319 100644 --- a/instrumentation/opentelemetry-instrumentation-jinja...
Remove unused import As per comment https://github.com/open-telemetry/opentelemetry-python-contrib/pull/107#discussion_r516262746, there appears to be an unused import in the jinja2 instrumentation
diff --git a/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/__init__.py b/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/__init__.py --- a/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/...
{"golden_diff": "diff --git a/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/__init__.py b/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/__init__.py\n--- a/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetr...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Remove unused import As per comment https://github.com/open-telemetry/opentelemetry-python-contrib/pull/107#discussion_r516262746, there appears to be an unused import in the jinja2 instrumentation --- END I...
carpentries__amy-932
[ { "content": "import re\n\nfrom django import forms\nfrom django.core.validators import RegexValidator\nfrom django.forms import (\n HiddenInput, CheckboxSelectMultiple, TextInput, modelformset_factory,\n RadioSelect,\n)\n\nfrom captcha.fields import ReCaptchaField\nfrom crispy_forms.helper import FormHel...
[ { "content": "import re\n\nfrom django import forms\nfrom django.core.validators import RegexValidator\nfrom django.forms import (\n HiddenInput, CheckboxSelectMultiple, TextInput, modelformset_factory,\n RadioSelect,\n)\n\nfrom captcha.fields import ReCaptchaField\nfrom crispy_forms.helper import FormHel...
diff --git a/workshops/forms.py b/workshops/forms.py index 362aab25c..3e0653d42 100644 --- a/workshops/forms.py +++ b/workshops/forms.py @@ -359,6 +359,7 @@ class Media: # thanks to this, {{ form.media }} in the template will generate # a <link href=""> (for CSS files) or <script src=""> (for JS files...
Date(?) stamp when updating record from url When updating an event from url, the list of instructors/helpers is recorded in the notes field with a heading that looks like a date but isn't. For example an update I made today has the heading "UPDATE 2016-5-4:" What is this heading supposed to be? Can we make it be the...
diff --git a/workshops/forms.py b/workshops/forms.py --- a/workshops/forms.py +++ b/workshops/forms.py @@ -359,6 +359,7 @@ # thanks to this, {{ form.media }} in the template will generate # a <link href=""> (for CSS files) or <script src=""> (for JS files) js = ( + 'date_yyyymmdd.j...
{"golden_diff": "diff --git a/workshops/forms.py b/workshops/forms.py\n--- a/workshops/forms.py\n+++ b/workshops/forms.py\n@@ -359,6 +359,7 @@\n # thanks to this, {{ form.media }} in the template will generate\n # a <link href=\"\"> (for CSS files) or <script src=\"\"> (for JS files)\n js = (\n+...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Date(?) stamp when updating record from url When updating an event from url, the list of instructors/helpers is recorded in the notes field with a heading that looks like a date but isn't. For example an upd...
pex-tool__pex-577
[ { "content": "# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\n__version__ = '1.4.7'\n\n# Versions 34.0.0 through 35.0.2 (last pre-36.0.0) de-vendored dependencies which causes problems\n# for pex code so we exclude that range...
[ { "content": "# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\n__version__ = '1.4.8'\n\n# Versions 34.0.0 through 35.0.2 (last pre-36.0.0) de-vendored dependencies which causes problems\n# for pex code so we exclude that range...
diff --git a/CHANGES.rst b/CHANGES.rst index e28be8891..eac2ee2dc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,40 @@ Release Notes ============= +1.4.8 +----- + +This release adds support for `-c` and `-m` pexfile runtime options that emulate the behavior of the +same arguments to `python` as well a fix fo...
Release 1.4.8 User facing issues on the docket: + non-zip_safe pex extraction has a race on renaming #557 + Execute pex archive at runtime with -m parameter #547 + OSX's python 2.7.10 interpreter reports a bad local platform, bdists fail to resolve #523 + `pex.resolver.resolve` does the wrong thing when given an `...
diff --git a/pex/version.py b/pex/version.py --- a/pex/version.py +++ b/pex/version.py @@ -1,7 +1,7 @@ # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -__version__ = '1.4.7' +__version__ = '1.4.8' # Versions 34.0.0 through 35.0.2 ...
{"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,7 +1,7 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = '1.4.7'\n+__version__ = '1.4.8'\n \n # Vers...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Release 1.4.8 User facing issues on the docket: + non-zip_safe pex extraction has a race on renaming #557 + Execute pex archive at runtime with -m parameter #547 + OSX's python 2.7.10 interpreter reports a...
sopel-irc__sopel-1527
[ { "content": "#!/usr/bin/env python2.7\n# coding=utf-8\n\"\"\"\nSopel - An IRC Bot\nCopyright 2008, Sean B. Palmer, inamidst.com\nCopyright © 2012-2014, Elad Alfassa <elad@fedoraproject.org>\nLicensed under the Eiffel Forum License 2.\n\nhttps://sopel.chat\n\"\"\"\nfrom __future__ import unicode_literals, absol...
[ { "content": "#!/usr/bin/env python2.7\n# coding=utf-8\n\"\"\"\nSopel - An IRC Bot\nCopyright 2008, Sean B. Palmer, inamidst.com\nCopyright © 2012-2014, Elad Alfassa <elad@fedoraproject.org>\nLicensed under the Eiffel Forum License 2.\n\nhttps://sopel.chat\n\"\"\"\nfrom __future__ import unicode_literals, absol...
diff --git a/sopel/cli/run.py b/sopel/cli/run.py index 867d0c8f4f..364b1922de 100755 --- a/sopel/cli/run.py +++ b/sopel/cli/run.py @@ -67,7 +67,11 @@ def signal_handler(sig, frame): tools.stderr('Got restart signal.') p.restart('Restarting') + # Define empty variable `p` for bot + p = ...
Broken interrupt handling when connection is inactive For the record, I'm testing on macOS today because that's what I have available. However, the same behavior occurs with identical or similar tracebacks on my Ubuntu machine at home, so I don't think it's related to the fact that I'm using Homebrew Python or anything...
diff --git a/sopel/cli/run.py b/sopel/cli/run.py --- a/sopel/cli/run.py +++ b/sopel/cli/run.py @@ -67,7 +67,11 @@ tools.stderr('Got restart signal.') p.restart('Restarting') + # Define empty variable `p` for bot + p = None while True: + if p and p.hasquit: # Check if `hasq...
{"golden_diff": "diff --git a/sopel/cli/run.py b/sopel/cli/run.py\n--- a/sopel/cli/run.py\n+++ b/sopel/cli/run.py\n@@ -67,7 +67,11 @@\n tools.stderr('Got restart signal.')\n p.restart('Restarting')\n \n+ # Define empty variable `p` for bot\n+ p = None\n while True:\n+ if p and p...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Broken interrupt handling when connection is inactive For the record, I'm testing on macOS today because that's what I have available. However, the same behavior occurs with identical or similar tracebacks on...
pallets__click-2714
[ { "content": "from pallets_sphinx_themes import get_version\nfrom pallets_sphinx_themes import ProjectLink\n\n# Project --------------------------------------------------------------\n\nproject = \"Click\"\ncopyright = \"2014 Pallets\"\nauthor = \"Pallets\"\nrelease, version = get_version(\"Click\")\n\n# Genera...
[ { "content": "from pallets_sphinx_themes import get_version\nfrom pallets_sphinx_themes import ProjectLink\n\n# Project --------------------------------------------------------------\n\nproject = \"Click\"\ncopyright = \"2014 Pallets\"\nauthor = \"Pallets\"\nrelease, version = get_version(\"Click\")\n\n# Genera...
diff --git a/docs/conf.py b/docs/conf.py index c579af52d..db253ea2c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,8 +23,8 @@ autodoc_typehints = "description" autodoc_preserve_defaults = True extlinks = { - "issue": ("https://github.com/pallets/flask/issues/%s", "#%s"), - "pr": ("https://github.com/palle...
Docs wrongly links PRs and Issues to flask ![image](https://github.com/pallets/click/assets/13086194/cc68ea55-7c69-4e24-a2dd-f296d54a9c61) Environment: - Python version: N/A - Click version: N/A Docs wrongly links PRs and Issues to flask ![image](https://github.com/pallets/click/assets/13086194/cc68ea55-7c69-4...
diff --git a/docs/conf.py b/docs/conf.py --- a/docs/conf.py +++ b/docs/conf.py @@ -23,8 +23,8 @@ autodoc_typehints = "description" autodoc_preserve_defaults = True extlinks = { - "issue": ("https://github.com/pallets/flask/issues/%s", "#%s"), - "pr": ("https://github.com/pallets/flask/pull/%s", "#%s"), + "i...
{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -23,8 +23,8 @@\n autodoc_typehints = \"description\"\n autodoc_preserve_defaults = True\n extlinks = {\n- \"issue\": (\"https://github.com/pallets/flask/issues/%s\", \"#%s\"),\n- \"pr\": (\"https://github.com/pal...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Docs wrongly links PRs and Issues to flask ![image](https://github.com/pallets/click/assets/13086194/cc68ea55-7c69-4e24-a2dd-f296d54a9c61) Environment: - Python version: N/A - Click version: N/A Docs...
python__mypy-3593
[ { "content": "\"\"\"Plugin system for extending mypy.\"\"\"\n\nfrom abc import abstractmethod\nfrom typing import Callable, List, Tuple, Optional, NamedTuple, TypeVar\n\nfrom mypy.nodes import Expression, StrExpr, IntExpr, UnaryExpr, Context\nfrom mypy.types import (\n Type, Instance, CallableType, TypedDict...
[ { "content": "\"\"\"Plugin system for extending mypy.\"\"\"\n\nfrom abc import abstractmethod\nfrom typing import Callable, List, Tuple, Optional, NamedTuple, TypeVar\n\nfrom mypy.nodes import Expression, StrExpr, IntExpr, UnaryExpr, Context\nfrom mypy.types import (\n Type, Instance, CallableType, TypedDict...
diff --git a/mypy/plugin.py b/mypy/plugin.py index f94790a06e96..97cc635e9ab4 100644 --- a/mypy/plugin.py +++ b/mypy/plugin.py @@ -247,7 +247,9 @@ def contextmanager_callback(ctx: FunctionContext) -> Type: return ctx.default_return_type.copy_modified( arg_types=arg_type.arg_types, ...
Typing for @contextmanager doesn't play well with generic functions ``` from contextlib import contextmanager from typing import TypeVar, Iterator _T = TypeVar('_T') @contextmanager def yield_id(item): # type: (_T) -> Iterator[_T] yield item with yield_id(1): pass ``` ... results in... ...
diff --git a/mypy/plugin.py b/mypy/plugin.py --- a/mypy/plugin.py +++ b/mypy/plugin.py @@ -247,7 +247,9 @@ return ctx.default_return_type.copy_modified( arg_types=arg_type.arg_types, arg_kinds=arg_type.arg_kinds, - arg_names=arg_type.arg_names) + ...
{"golden_diff": "diff --git a/mypy/plugin.py b/mypy/plugin.py\n--- a/mypy/plugin.py\n+++ b/mypy/plugin.py\n@@ -247,7 +247,9 @@\n return ctx.default_return_type.copy_modified(\n arg_types=arg_type.arg_types,\n arg_kinds=arg_type.arg_kinds,\n- arg_names=arg_type....
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Typing for @contextmanager doesn't play well with generic functions ``` from contextlib import contextmanager from typing import TypeVar, Iterator _T = TypeVar('_T') @contextmanager def yield_id(item...
koxudaxi__datamodel-code-generator-1669
[ { "content": "import re\nfrom abc import ABC, abstractmethod\nfrom enum import Enum, auto\nfrom functools import lru_cache\nfrom itertools import chain\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n ClassVar,\n Dict,\n FrozenSet,\n Iterable,\n Iterator,\n List,\n Optio...
[ { "content": "import re\nfrom abc import ABC, abstractmethod\nfrom enum import Enum, auto\nfrom functools import lru_cache\nfrom itertools import chain\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n ClassVar,\n Dict,\n FrozenSet,\n Iterable,\n Iterator,\n List,\n Optio...
diff --git a/datamodel_code_generator/types.py b/datamodel_code_generator/types.py index 04671484d..2d16919e1 100644 --- a/datamodel_code_generator/types.py +++ b/datamodel_code_generator/types.py @@ -129,7 +129,7 @@ def __get_pydantic_core_schema__( ) return core_schema.json_or_python_schema( - ...
Impossible to get the json schema of a json schema object **Describe the bug** ```python from datamodel_code_generator.parser.jsonschema import JsonSchemaObject if __name__ == "__main__": print(JsonSchemaObject.model_json_schema()) ``` Raises ``` pydantic.errors.PydanticInvalidForJsonSchema: Cannot ...
diff --git a/datamodel_code_generator/types.py b/datamodel_code_generator/types.py --- a/datamodel_code_generator/types.py +++ b/datamodel_code_generator/types.py @@ -129,7 +129,7 @@ ) return core_schema.json_or_python_schema( - json_schema=core_schema.no_info_plain_validator_function(cls...
{"golden_diff": "diff --git a/datamodel_code_generator/types.py b/datamodel_code_generator/types.py\n--- a/datamodel_code_generator/types.py\n+++ b/datamodel_code_generator/types.py\n@@ -129,7 +129,7 @@\n )\n \n return core_schema.json_or_python_schema(\n- json_schema=core_schema.no_info_plai...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Impossible to get the json schema of a json schema object **Describe the bug** ```python from datamodel_code_generator.parser.jsonschema import JsonSchemaObject if __name__ == "__main__": print(Js...
keras-team__keras-13342
[ { "content": "\"\"\"Training-related utilities.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport inspect\nimport collections\nimport copy\nimport numpy as np\nimport six\nimport warnings\nfrom collections import OrderedDict\n\nfrom...
[ { "content": "\"\"\"Training-related utilities.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport inspect\nimport collections\nimport copy\nimport numpy as np\nimport six\nimport warnings\nfrom collections import OrderedDict\n\nfrom...
diff --git a/keras/engine/training_utils.py b/keras/engine/training_utils.py index 4908d5c6be4e..ac42229b612d 100644 --- a/keras/engine/training_utils.py +++ b/keras/engine/training_utils.py @@ -1019,7 +1019,7 @@ def call_metric_function(metric_fn, mask=None): """Invokes metric function a...
NameError: name 'math_ops' is not defined **System information** - Have I written custom code (as opposed to using example directory): - OS Platform and Distribution (e.g., Linux Ubuntu 16.04): - TensorFlow backend (yes / no): - TensorFlow version: 1.14.0 - Keras version: 2.3.0 - Python version: - CU...
diff --git a/keras/engine/training_utils.py b/keras/engine/training_utils.py --- a/keras/engine/training_utils.py +++ b/keras/engine/training_utils.py @@ -1019,7 +1019,7 @@ mask=None): """Invokes metric function and returns the metric result tensor.""" if mask is not None: - m...
{"golden_diff": "diff --git a/keras/engine/training_utils.py b/keras/engine/training_utils.py\n--- a/keras/engine/training_utils.py\n+++ b/keras/engine/training_utils.py\n@@ -1019,7 +1019,7 @@\n mask=None):\n \"\"\"Invokes metric function and returns the metric result tensor.\"\"\"\n if...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- NameError: name 'math_ops' is not defined **System information** - Have I written custom code (as opposed to using example directory): - OS Platform and Distribution (e.g., Linux Ubuntu 16.04): - Ten...
aio-libs-abandoned__aioredis-py-658
[ { "content": "import types\nimport asyncio\nimport socket\nfrom functools import partial\nfrom collections import deque\nfrom contextlib import contextmanager\n\nfrom .util import (\n encode_command,\n wait_ok,\n _NOTSET,\n _set_result,\n _set_exception,\n coerced_keys_dict,\n decode,\n ...
[ { "content": "import types\nimport asyncio\nimport socket\nfrom functools import partial\nfrom collections import deque\nfrom contextlib import contextmanager\n\nfrom .util import (\n encode_command,\n wait_ok,\n _NOTSET,\n _set_result,\n _set_exception,\n coerced_keys_dict,\n decode,\n ...
diff --git a/CHANGES/657.bugfix b/CHANGES/657.bugfix new file mode 100644 index 000000000..a8e35977d --- /dev/null +++ b/CHANGES/657.bugfix @@ -0,0 +1 @@ +Fix transaction data decoding diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index dc5784709..ea3e2e37f 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -47...
Transaction data decoding is incorrect Transaction data always decoded two times if connection encoding was defined: Test case: ```python @pytest.mark.run_loop async def test_global_encoding(redis, create_redis, server, loop): redis = await create_redis( server.tcp_address, loop=loop, encod...
diff --git a/aioredis/connection.py b/aioredis/connection.py --- a/aioredis/connection.py +++ b/aioredis/connection.py @@ -336,6 +336,7 @@ cb = self._start_transaction elif command in ('EXEC', b'EXEC'): cb = partial(self._end_transaction, discard=False) + encoding = None ...
{"golden_diff": "diff --git a/aioredis/connection.py b/aioredis/connection.py\n--- a/aioredis/connection.py\n+++ b/aioredis/connection.py\n@@ -336,6 +336,7 @@\n cb = self._start_transaction\n elif command in ('EXEC', b'EXEC'):\n cb = partial(self._end_transaction, discard=False)\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Transaction data decoding is incorrect Transaction data always decoded two times if connection encoding was defined: Test case: ```python @pytest.mark.run_loop async def test_global_encoding(redis, crea...
google__personfinder-328
[ { "content": "#!/usr/bin/python2.7\n# Copyright 2010 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# Unle...
[ { "content": "#!/usr/bin/python2.7\n# Copyright 2010 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# Unle...
diff --git a/app/main.py b/app/main.py index 99879fd4ba..91a9766418 100644 --- a/app/main.py +++ b/app/main.py @@ -21,6 +21,9 @@ import mimetypes import re import os +import sys +sys.path.append(os.path.join(os.path.dirname(__file__), 'vendors')) + import urlparse from google.appengine.api import memcache @@ -59...
Load third party libraries with PIP We should probably follow "Using pip requirements files" section here to install third-party libraries: https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27 instead of directly putting third party library *.py files under "app" directory.
diff --git a/app/main.py b/app/main.py --- a/app/main.py +++ b/app/main.py @@ -21,6 +21,9 @@ import mimetypes import re import os +import sys +sys.path.append(os.path.join(os.path.dirname(__file__), 'vendors')) + import urlparse from google.appengine.api import memcache @@ -597,4 +600,4 @@ if __name__ == '__m...
{"golden_diff": "diff --git a/app/main.py b/app/main.py\n--- a/app/main.py\n+++ b/app/main.py\n@@ -21,6 +21,9 @@\n import mimetypes\n import re\n import os\n+import sys\n+sys.path.append(os.path.join(os.path.dirname(__file__), 'vendors'))\n+\n import urlparse\n \n from google.appengine.api import memcache\n@@ -597,4 +6...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Load third party libraries with PIP We should probably follow "Using pip requirements files" section here to install third-party libraries: https://cloud.google.com/appengine/docs/python/tools/using-libraries...
joke2k__faker-640
[ { "content": "import os\nfrom importlib import import_module\nimport pkgutil\n\n\ndef list_module(module):\n path = os.path.dirname(module.__file__)\n modules = [name for finder, name, is_pkg in pkgutil.iter_modules([path]) if is_pkg]\n if len(modules) > 0:\n return modules\n return [i for i ...
[ { "content": "import os\nfrom importlib import import_module\nimport pkgutil\n\n\ndef list_module(module):\n path = os.path.dirname(module.__file__)\n modules = [name for finder, name, is_pkg in pkgutil.iter_modules([path]) if is_pkg]\n return modules\n\n\ndef find_available_locales(providers):\n av...
diff --git a/README.rst b/README.rst index 700e437d45..b782515e3f 100644 --- a/README.rst +++ b/README.rst @@ -171,7 +171,7 @@ When installed, you can invoke faker from the command-line: faker [-h] [--version] [-o output] [-l {bg_BG,cs_CZ,...,zh_CN,zh_TW}] [-r REPEAT] [-s SEP] - [-i ...
MacOS 10.13 OSError: [Errno 24] Too many open files ```shell return [i for i in os.listdir(path) if os.path.isdir(os.path.join(path, i)) and not i.startswith('_')] OSError: [Errno 24] Too many open files: '/Users/abcdefg/.pyenv/versions/3.6.3/envs/weixin3/lib/python3.6/site-packages/faker/providers/address' ``` ...
diff --git a/faker/utils/loading.py b/faker/utils/loading.py --- a/faker/utils/loading.py +++ b/faker/utils/loading.py @@ -6,9 +6,7 @@ def list_module(module): path = os.path.dirname(module.__file__) modules = [name for finder, name, is_pkg in pkgutil.iter_modules([path]) if is_pkg] - if len(modules) > 0:...
{"golden_diff": "diff --git a/faker/utils/loading.py b/faker/utils/loading.py\n--- a/faker/utils/loading.py\n+++ b/faker/utils/loading.py\n@@ -6,9 +6,7 @@\n def list_module(module):\n path = os.path.dirname(module.__file__)\n modules = [name for finder, name, is_pkg in pkgutil.iter_modules([path]) if is_pkg]\n-...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- MacOS 10.13 OSError: [Errno 24] Too many open files ```shell return [i for i in os.listdir(path) if os.path.isdir(os.path.join(path, i)) and not i.startswith('_')] OSError: [Errno 24] Too many open file...
microsoft__AzureTRE-524
[ { "content": "import os\nimport sys\nimport json\nimport socket\nimport asyncio\nimport logging\nfrom shared.logging import disable_unwanted_loggers, initialize_logging # pylint: disable=import-error # noqa\nfrom resources import strings # pylint: disable=import-error # noqa\nfrom contextlib import asynccontex...
[ { "content": "import os\nimport sys\nimport json\nimport socket\nimport asyncio\nimport logging\nfrom shared.logging import disable_unwanted_loggers, initialize_logging # pylint: disable=import-error # noqa\nfrom resources import strings # pylint: disable=import-error # noqa\nfrom contextlib import asynccontex...
diff --git a/processor_function/vm_porter/runner.py b/processor_function/vm_porter/runner.py index 0f2b9cfb26..d4a42a9d35 100644 --- a/processor_function/vm_porter/runner.py +++ b/processor_function/vm_porter/runner.py @@ -33,7 +33,7 @@ async def receive_message(env_vars, service_bus_client): """ async with s...
[BUG] Service bus message times out on deployment of workspace template **Describe the bug** When deploying a template that takes > 10 minutes, although deployment is successful the status is not updated. **Steps to reproduce** 1. Register and deploy the `azureml_devtestlabs` workspace 2. Log on to the VMSS re...
diff --git a/processor_function/vm_porter/runner.py b/processor_function/vm_porter/runner.py --- a/processor_function/vm_porter/runner.py +++ b/processor_function/vm_porter/runner.py @@ -33,7 +33,7 @@ """ async with service_bus_client: q_name = env_vars["resource_request_queue"] - renewer = Au...
{"golden_diff": "diff --git a/processor_function/vm_porter/runner.py b/processor_function/vm_porter/runner.py\n--- a/processor_function/vm_porter/runner.py\n+++ b/processor_function/vm_porter/runner.py\n@@ -33,7 +33,7 @@\n \"\"\"\n async with service_bus_client:\n q_name = env_vars[\"resource_request_qu...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] Service bus message times out on deployment of workspace template **Describe the bug** When deploying a template that takes > 10 minutes, although deployment is successful the status is not updated. ...
pypa__pip-8124
[ { "content": "from __future__ import absolute_import\n\nimport logging\nimport os\nimport textwrap\n\nimport pip._internal.utils.filesystem as filesystem\nfrom pip._internal.cli.base_command import Command\nfrom pip._internal.cli.status_codes import ERROR, SUCCESS\nfrom pip._internal.exceptions import CommandEr...
[ { "content": "from __future__ import absolute_import\n\nimport logging\nimport os\nimport textwrap\n\nimport pip._internal.utils.filesystem as filesystem\nfrom pip._internal.cli.base_command import Command\nfrom pip._internal.cli.status_codes import ERROR, SUCCESS\nfrom pip._internal.exceptions import CommandEr...
diff --git a/news/8124.bugfix b/news/8124.bugfix new file mode 100644 index 00000000000..a859381e0d8 --- /dev/null +++ b/news/8124.bugfix @@ -0,0 +1 @@ +Abort pip cache commands early when cache is disabled. diff --git a/src/pip/_internal/commands/cache.py b/src/pip/_internal/commands/cache.py index 7e3f72e080b..3c345...
'pip cache info' fails when no-cache-dir set pip version: pip 20.1b1 Python version: CPython 3.8.1 OS: Win 10 64 Testing 20.1 beta, execute 'pip cache info' and crashes. I'm guessing it's due to pip.ini turning off caching. pip.ini: ``` [global] no-cache-dir = false ``` Command execution: ``` > pip ca...
diff --git a/src/pip/_internal/commands/cache.py b/src/pip/_internal/commands/cache.py --- a/src/pip/_internal/commands/cache.py +++ b/src/pip/_internal/commands/cache.py @@ -48,6 +48,11 @@ "purge": self.purge_cache, } + if not options.cache_dir: + logger.error("pip cache comma...
{"golden_diff": "diff --git a/src/pip/_internal/commands/cache.py b/src/pip/_internal/commands/cache.py\n--- a/src/pip/_internal/commands/cache.py\n+++ b/src/pip/_internal/commands/cache.py\n@@ -48,6 +48,11 @@\n \"purge\": self.purge_cache,\n }\n \n+ if not options.cache_dir:\n+ lo...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- 'pip cache info' fails when no-cache-dir set pip version: pip 20.1b1 Python version: CPython 3.8.1 OS: Win 10 64 Testing 20.1 beta, execute 'pip cache info' and crashes. I'm guessing it's due to pip.ini...
edgedb__edgedb-3087
[ { "content": "# Copyright (C) 2016-present MagicStack Inc. and the EdgeDB authors.\n# Copyright (C) 2016-present the asyncpg authors and contributors\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 co...
[ { "content": "# Copyright (C) 2016-present MagicStack Inc. and the EdgeDB authors.\n# Copyright (C) 2016-present the asyncpg authors and contributors\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 co...
diff --git a/edb/server/pgcluster.py b/edb/server/pgcluster.py index 642609d560d..1a1cc0760b8 100644 --- a/edb/server/pgcluster.py +++ b/edb/server/pgcluster.py @@ -678,8 +678,10 @@ def _connection_addr_from_pidfile(self) -> Tuple[str, int]: sockdir = os.path.normpath( os.path.join...
EdgeDB server doesn't always correctly recognize PostgreSQL server startup <!-- Please search existing issues to avoid creating duplicates. --> - EdgeDB Version: 1.0-rc.2+dev6093.d2021102414.gec7d60ef3.cv202110240000 - OS Version: Arch Linux under WSL2 When the EdgeDB server starts up during `edb server` or `edb t...
diff --git a/edb/server/pgcluster.py b/edb/server/pgcluster.py --- a/edb/server/pgcluster.py +++ b/edb/server/pgcluster.py @@ -678,8 +678,10 @@ sockdir = os.path.normpath( os.path.join(self._data_dir, sockdir)) host_str = sockdir - else: + elif hostaddr: ...
{"golden_diff": "diff --git a/edb/server/pgcluster.py b/edb/server/pgcluster.py\n--- a/edb/server/pgcluster.py\n+++ b/edb/server/pgcluster.py\n@@ -678,8 +678,10 @@\n sockdir = os.path.normpath(\n os.path.join(self._data_dir, sockdir))\n host_str = sockdir\n- else:\...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- EdgeDB server doesn't always correctly recognize PostgreSQL server startup <!-- Please search existing issues to avoid creating duplicates. --> - EdgeDB Version: 1.0-rc.2+dev6093.d2021102414.gec7d60ef3.cv202...
pydantic__pydantic-391
[ { "content": "import re\nfrom importlib.machinery import SourceFileLoader\nfrom pathlib import Path\nfrom setuptools import setup\n\n\nclass ReplaceLinks:\n def __init__(self):\n self.links = set()\n\n def replace_issues(self, m):\n id = m.group(1)\n self.links.add(f'.. _#{id}: https:...
[ { "content": "import re\nfrom importlib.machinery import SourceFileLoader\nfrom pathlib import Path\nfrom setuptools import setup\n\n\nclass ReplaceLinks:\n def __init__(self):\n self.links = set()\n\n def replace_issues(self, m):\n id = m.group(1)\n self.links.add(f'.. _#{id}: https:...
diff --git a/pydantic/py.typed b/pydantic/py.typed new file mode 100644 index 00000000000..e69de29bb2d diff --git a/setup.py b/setup.py index 12247aa67ea..df3480316f8 100644 --- a/setup.py +++ b/setup.py @@ -68,8 +68,9 @@ def extra(self): url='https://github.com/samuelcolvin/pydantic', license='MIT', pac...
Include a PEP 561 marker file # Feature Request Hi, The new version 0.19 has improved typing support which is great, but looks like it doesn't work out of the box. I had similar problems as described in #245 , but after adding the installation to MYPYPATH it works fine. I think a PEP 561 marker file `py.typed`...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -68,8 +68,9 @@ url='https://github.com/samuelcolvin/pydantic', license='MIT', packages=['pydantic'], + package_data={'pydantic': ['py.typed']}, python_requires='>=3.6', - zip_safe=True, + zip_safe=False, # https://mypy.readt...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -68,8 +68,9 @@\n url='https://github.com/samuelcolvin/pydantic',\n license='MIT',\n packages=['pydantic'],\n+ package_data={'pydantic': ['py.typed']},\n python_requires='>=3.6',\n- zip_safe=True,\n+ zip_safe=F...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Include a PEP 561 marker file # Feature Request Hi, The new version 0.19 has improved typing support which is great, but looks like it doesn't work out of the box. I had similar problems as described in...
e-valuation__EvaP-1241
[ { "content": "from datetime import datetime, date, timedelta\nimport logging\nimport random\nimport uuid\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.models import AbstractBaseUser, BaseUserManager, Group, PermissionsMixin\nfrom django.core.cache import cach...
[ { "content": "from datetime import datetime, date, timedelta\nimport logging\nimport random\nimport uuid\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.models import AbstractBaseUser, BaseUserManager, Group, PermissionsMixin\nfrom django.core.cache import cach...
diff --git a/evap/evaluation/models.py b/evap/evaluation/models.py index 91dcad791f..ebf6437694 100644 --- a/evap/evaluation/models.py +++ b/evap/evaluation/models.py @@ -446,7 +446,7 @@ def reopen_review(self): @transition(field=state, source='reviewed', target='published') def publish(self): - asse...
Single result publishing fails Single results can't be published because https://github.com/fsr-itse/EvaP/blob/master/evap/evaluation/models.py#L449 asserts `self._voter_count is None` which it is not for single results.
diff --git a/evap/evaluation/models.py b/evap/evaluation/models.py --- a/evap/evaluation/models.py +++ b/evap/evaluation/models.py @@ -446,7 +446,7 @@ @transition(field=state, source='reviewed', target='published') def publish(self): - assert self._voter_count is None and self._participant_count is N...
{"golden_diff": "diff --git a/evap/evaluation/models.py b/evap/evaluation/models.py\n--- a/evap/evaluation/models.py\n+++ b/evap/evaluation/models.py\n@@ -446,7 +446,7 @@\n \n @transition(field=state, source='reviewed', target='published')\n def publish(self):\n- assert self._voter_count is None and self...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Single result publishing fails Single results can't be published because https://github.com/fsr-itse/EvaP/blob/master/evap/evaluation/models.py#L449 asserts `self._voter_count is None` which it is not for sin...
analysiscenter__batchflow-593
[ { "content": "\"\"\" Pipeline decorators \"\"\"\nimport os\nimport traceback\nimport threading\nimport concurrent.futures as cf\nimport asyncio\nimport functools\nimport logging\nimport inspect\n\ntry:\n from numba import jit\nexcept ImportError:\n jit = None\n\nfrom .named_expr import P\nfrom .utils_rand...
[ { "content": "\"\"\" Pipeline decorators \"\"\"\nimport os\nimport traceback\nimport threading\nimport concurrent.futures as cf\nimport asyncio\nimport functools\nimport logging\nimport inspect\n\ntry:\n from numba import jit\nexcept ImportError:\n jit = None\n\nfrom .named_expr import P\nfrom .utils_rand...
diff --git a/batchflow/decorators.py b/batchflow/decorators.py index 64ffa46ee..b659baab2 100644 --- a/batchflow/decorators.py +++ b/batchflow/decorators.py @@ -334,7 +334,7 @@ def _make_args(self, iteration, init_args, args, kwargs, params=None): def make_random_seed(self): if getattr(self, 'rand...
Typo https://github.com/analysiscenter/batchflow/blob/cd9062150811665b5a4e51a1080da5855f1c4dcb/batchflow/decorators.py#L337 `random_stat` -> `random_state`
diff --git a/batchflow/decorators.py b/batchflow/decorators.py --- a/batchflow/decorators.py +++ b/batchflow/decorators.py @@ -334,7 +334,7 @@ def make_random_seed(self): if getattr(self, 'random_state', None) is None: return make_seed_sequence() - return self.random_st...
{"golden_diff": "diff --git a/batchflow/decorators.py b/batchflow/decorators.py\n--- a/batchflow/decorators.py\n+++ b/batchflow/decorators.py\n@@ -334,7 +334,7 @@\n def make_random_seed(self):\n if getattr(self, 'random_state', None) is None:\n return make_seed_sequence()\n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Typo https://github.com/analysiscenter/batchflow/blob/cd9062150811665b5a4e51a1080da5855f1c4dcb/batchflow/decorators.py#L337 `random_stat` -> `random_state` --- END ISSUE --- Below are some code segments,...
avocado-framework__avocado-2276
[ { "content": "# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope t...
[ { "content": "# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope t...
diff --git a/optional_plugins/runner_remote/avocado_runner_remote/__init__.py b/optional_plugins/runner_remote/avocado_runner_remote/__init__.py index 84bd1b7c4b..5ff38ca163 100644 --- a/optional_plugins/runner_remote/avocado_runner_remote/__init__.py +++ b/optional_plugins/runner_remote/avocado_runner_remote/__init__....
why this is "<" not ">" ? https://github.com/avocado-framework/avocado/blob/d1503a1dcfe684a1b6ab03fd79546eb0f2bfb511/optional_plugins/runner_remote/avocado_runner_remote/__init__.py#L107
diff --git a/optional_plugins/runner_remote/avocado_runner_remote/__init__.py b/optional_plugins/runner_remote/avocado_runner_remote/__init__.py --- a/optional_plugins/runner_remote/avocado_runner_remote/__init__.py +++ b/optional_plugins/runner_remote/avocado_runner_remote/__init__.py @@ -104,7 +104,7 @@ exce...
{"golden_diff": "diff --git a/optional_plugins/runner_remote/avocado_runner_remote/__init__.py b/optional_plugins/runner_remote/avocado_runner_remote/__init__.py\n--- a/optional_plugins/runner_remote/avocado_runner_remote/__init__.py\n+++ b/optional_plugins/runner_remote/avocado_runner_remote/__init__.py\n@@ -104,7 +10...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- why this is "<" not ">" ? https://github.com/avocado-framework/avocado/blob/d1503a1dcfe684a1b6ab03fd79546eb0f2bfb511/optional_plugins/runner_remote/avocado_runner_remote/__init__.py#L107 --- END ISSUE --- B...
chanzuckerberg__single-cell-curation-428
[ { "content": "import logging\nimport os\nimport sys\n\n\ndef set_log_level(log_level: str):\n \"\"\"\n :param log_level: the logging level (\"NOTSET\", \"DEBUG\", \"INFO\", \"WARN\", \"ERROR\", \"FATAL\")\n \"\"\"\n all_levels = logging._nameToLevel.keys()\n if log_level not in all_levels:\n ...
[ { "content": "import logging\nimport os\nimport sys\n\n\ndef set_log_level(log_level: str):\n \"\"\"\n :param log_level: the logging level (\"NOTSET\", \"DEBUG\", \"INFO\", \"WARN\", \"ERROR\", \"FATAL\")\n \"\"\"\n all_levels = logging._nameToLevel.keys()\n if log_level not in all_levels:\n ...
diff --git a/notebooks/curation_api/python/src/utils/logger.py b/notebooks/curation_api/python/src/utils/logger.py index f053a08af..4c1dbd10d 100644 --- a/notebooks/curation_api/python/src/utils/logger.py +++ b/notebooks/curation_api/python/src/utils/logger.py @@ -40,6 +40,8 @@ def failure(logger: logging.Logger, e, *m...
Feat(curation notebooks): display the x-request-id in the error response When an error occurs especially 500 errors, the only piece of debug information the user has is the x-request-id. Making this value visible to the users will help developer trouble shoot errors seen by the users in the future.
diff --git a/notebooks/curation_api/python/src/utils/logger.py b/notebooks/curation_api/python/src/utils/logger.py --- a/notebooks/curation_api/python/src/utils/logger.py +++ b/notebooks/curation_api/python/src/utils/logger.py @@ -40,6 +40,8 @@ logger.error("\n\033[1m\033[38;5;9mFAILED\033[0m\n") # 'FAILED' in bo...
{"golden_diff": "diff --git a/notebooks/curation_api/python/src/utils/logger.py b/notebooks/curation_api/python/src/utils/logger.py\n--- a/notebooks/curation_api/python/src/utils/logger.py\n+++ b/notebooks/curation_api/python/src/utils/logger.py\n@@ -40,6 +40,8 @@\n logger.error(\"\\n\\033[1m\\033[38;5;9mFAILED\\03...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Feat(curation notebooks): display the x-request-id in the error response When an error occurs especially 500 errors, the only piece of debug information the user has is the x-request-id. Making this value vis...
statsmodels__statsmodels-6518
[ { "content": "\"\"\"Analyze a set of multiple variables with a linear models\n\nmultiOLS:\n take a model and test it on a series of variables defined over a\n pandas dataset, returning a summary for each variable\n\nmultigroup:\n take a boolean vector and the definition of several groups of variables\n...
[ { "content": "\"\"\"Analyze a set of multiple variables with a linear models\n\nmultiOLS:\n take a model and test it on a series of variables defined over a\n pandas dataset, returning a summary for each variable\n\nmultigroup:\n take a boolean vector and the definition of several groups of variables\n...
diff --git a/statsmodels/sandbox/multilinear.py b/statsmodels/sandbox/multilinear.py index 73012273927..4ac86aff154 100644 --- a/statsmodels/sandbox/multilinear.py +++ b/statsmodels/sandbox/multilinear.py @@ -284,7 +284,7 @@ def multigroup(pvals, groups, exact=True, keep_all=True, alpha=0.05): >>> url = url + "Rda...
Fix simple typo: variuos -> various # Issue Type [x] Bug (Typo) # Steps to Replicate 1. Examine statsmodels/sandbox/multilinear.py. 2. Search for `variuos`. # Expected Behaviour 1. Should read `various`.
diff --git a/statsmodels/sandbox/multilinear.py b/statsmodels/sandbox/multilinear.py --- a/statsmodels/sandbox/multilinear.py +++ b/statsmodels/sandbox/multilinear.py @@ -284,7 +284,7 @@ >>> url = url + "Rdatasets/csv/HistData/Guerry.csv" >>> df = pd.read_csv(url, index_col='dept') - evaluate the relatio...
{"golden_diff": "diff --git a/statsmodels/sandbox/multilinear.py b/statsmodels/sandbox/multilinear.py\n--- a/statsmodels/sandbox/multilinear.py\n+++ b/statsmodels/sandbox/multilinear.py\n@@ -284,7 +284,7 @@\n >>> url = url + \"Rdatasets/csv/HistData/Guerry.csv\"\n >>> df = pd.read_csv(url, index_col='dept')\n \...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Fix simple typo: variuos -> various # Issue Type [x] Bug (Typo) # Steps to Replicate 1. Examine statsmodels/sandbox/multilinear.py. 2. Search for `variuos`. # Expected Behaviour 1. Should read `various`....
holoviz__panel-645
[ { "content": "\"\"\"\nUtilities for creating bokeh Server instances.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport signal\nimport threading\n\nfrom functools import partial\n\nfrom bokeh.server.server import Server\n\nfrom .state import state\n\n\n#-----------------------...
[ { "content": "\"\"\"\nUtilities for creating bokeh Server instances.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport signal\nimport threading\n\nfrom functools import partial\n\nfrom bokeh.server.server import Server\n\nfrom .state import state\n\n\n#-----------------------...
diff --git a/panel/io/server.py b/panel/io/server.py index 1231230592..784bbfc67c 100644 --- a/panel/io/server.py +++ b/panel/io/server.py @@ -122,6 +122,15 @@ def _check_stopped(self): if self.stopped: self._cb.stop() self.io_loop.stop() + + def run(self): + try: + ...
Port not being released after stopping threaded holoviz panel app server Closing a threaded panel app holds on to the port it started on. This is different behavior than closing an app initialized without threading. ``` usgs_logo = pn.panel('../assets/usgs_logo.png', height=130) column = pn.Column(usgs_logo) ...
diff --git a/panel/io/server.py b/panel/io/server.py --- a/panel/io/server.py +++ b/panel/io/server.py @@ -122,6 +122,15 @@ if self.stopped: self._cb.stop() self.io_loop.stop() + + def run(self): + try: + if self._target: + bokeh_server = self._...
{"golden_diff": "diff --git a/panel/io/server.py b/panel/io/server.py\n--- a/panel/io/server.py\n+++ b/panel/io/server.py\n@@ -122,6 +122,15 @@\n if self.stopped:\n self._cb.stop()\n self.io_loop.stop()\n+ \n+ def run(self):\n+ try:\n+ if self._target:\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Port not being released after stopping threaded holoviz panel app server Closing a threaded panel app holds on to the port it started on. This is different behavior than closing an app initialized without thr...
hylang__hy-2328
[ { "content": "\"Character reader for parsing Hy source.\"\n\nimport hy\nfrom hy.models import (\n Bytes,\n Complex,\n Dict,\n Expression,\n FComponent,\n Float,\n FString,\n Integer,\n Keyword,\n List,\n Set,\n String,\n Symbol,\n Tuple,\n as_model,\n)\n\nfrom .excep...
[ { "content": "\"Character reader for parsing Hy source.\"\n\nimport hy\nfrom hy.models import (\n Bytes,\n Complex,\n Dict,\n Expression,\n FComponent,\n Float,\n FString,\n Integer,\n Keyword,\n List,\n Set,\n String,\n Symbol,\n Tuple,\n as_model,\n)\n\nfrom .excep...
diff --git a/NEWS.rst b/NEWS.rst index 288169f3f..0df14fc63 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -15,6 +15,7 @@ Bug Fixes * `__file__` should now be set the same way as in Python. * Fixed a bug with `python -O` where assertions were still partly evaluated. +* `\N{…}` escape sequences are now recognized in f-str...
F-strings don't allow `\N{…}` ``` Hy 0.24.0 using CPython(default) 3.9.6 on Darwin => (print "\N{slightly smiling face}") 🙂 => (print f"\N{slightly smiling face}") Traceback (most recent call last): File "stdin-eda06fe2e57521e633661e996d6216e5bab61d9b", line 1 (print f"\N{slightly smiling face}") ...
diff --git a/hy/reader/hy_reader.py b/hy/reader/hy_reader.py --- a/hy/reader/hy_reader.py +++ b/hy/reader/hy_reader.py @@ -448,7 +448,7 @@ s = s[:-n_closing_chars] break # check if c is start of component - if is_fstring and c == "{": + if is_fstring ...
{"golden_diff": "diff --git a/hy/reader/hy_reader.py b/hy/reader/hy_reader.py\n--- a/hy/reader/hy_reader.py\n+++ b/hy/reader/hy_reader.py\n@@ -448,7 +448,7 @@\n s = s[:-n_closing_chars]\n break\n # check if c is start of component\n- if is_fstring and c == \"{\":\n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- F-strings don't allow `\N{…}` ``` Hy 0.24.0 using CPython(default) 3.9.6 on Darwin => (print "\N{slightly smiling face}") 🙂 => (print f"\N{slightly smiling face}") Traceback (most recent call last): ...
mosaicml__composer-182
[ { "content": "# Copyright 2021 MosaicML. All Rights Reserved.\n\nimport os\nimport sys\nimport textwrap\n\nimport setuptools\nfrom setuptools import setup\n\n\ndef package_files(directory: str):\n # from https://stackoverflow.com/a/36693250\n paths = []\n for (path, _, filenames) in os.walk(directory):...
[ { "content": "# Copyright 2021 MosaicML. All Rights Reserved.\n\nimport os\nimport site\nimport sys\nimport textwrap\n\nimport setuptools\nfrom setuptools import setup\n\n# From https://github.com/pypa/pip/issues/7953#issuecomment-645133255\nsite.ENABLE_USER_SITE = \"--user\" in sys.argv[1:]\n\n\ndef package_fi...
diff --git a/docker/Makefile b/docker/Makefile index ecbc390280..f37ff50afc 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -32,11 +32,11 @@ COMPOSER_EXTRA_DEPS ?= base # Resulting docker tag for the composer dockerimage COMPOSER_TAG ?= mosaicml/composer:$(COMPOSER_EXTRA_DEPS) -.PHONY: build +.PHONY: build py...
Add venv into docker image to enable editable `pip install` When trying to install composer with `pip install -e .` from within the docker image, we are seeing this error: ``` Traceback (most recent call last): File "/usr/bin/composer", line 33, in <module> sys.exit(load_entry_point('mosaicml', 'console_scrip...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -1,12 +1,16 @@ # Copyright 2021 MosaicML. All Rights Reserved. import os +import site import sys import textwrap import setuptools from setuptools import setup +# From https://github.com/pypa/pip/issues/7953#issuecomment-645133255 +site.ENABL...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,12 +1,16 @@\n # Copyright 2021 MosaicML. All Rights Reserved.\n \n import os\n+import site\n import sys\n import textwrap\n \n import setuptools\n from setuptools import setup\n \n+# From https://github.com/pypa/pip/issues/7953#iss...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add venv into docker image to enable editable `pip install` When trying to install composer with `pip install -e .` from within the docker image, we are seeing this error: ``` Traceback (most recent call la...
python__mypy-4106
[ { "content": "\"\"\"Type inference constraints.\"\"\"\n\nfrom typing import Iterable, List, Optional, Sequence\n\nfrom mypy import experiments\nfrom mypy.types import (\n CallableType, Type, TypeVisitor, UnboundType, AnyType, NoneTyp, TypeVarType, Instance,\n TupleType, TypedDictType, UnionType, Overloade...
[ { "content": "\"\"\"Type inference constraints.\"\"\"\n\nfrom typing import Iterable, List, Optional, Sequence\n\nfrom mypy import experiments\nfrom mypy.types import (\n CallableType, Type, TypeVisitor, UnboundType, AnyType, NoneTyp, TypeVarType, Instance,\n TupleType, TypedDictType, UnionType, Overloade...
diff --git a/mypy/constraints.py b/mypy/constraints.py index 4e7c2ecba269..0a79483b235b 100644 --- a/mypy/constraints.py +++ b/mypy/constraints.py @@ -506,6 +506,8 @@ def visit_type_type(self, template: TypeType) -> List[Constraint]: self.direction) elif isinstance(self.ac...
No constraint inferred for Any vs. Type[T] I'd expect the revealed type to be `Any` instead of `<nothing>` for this example: ```py from typing import Type, Any, TypeVar T = TypeVar('T') def f(c: Type[T]) -> T: ... x: Any reveal_type(f(x)) # <nothing> ``` It looks like constraint inference doesn't wor...
diff --git a/mypy/constraints.py b/mypy/constraints.py --- a/mypy/constraints.py +++ b/mypy/constraints.py @@ -506,6 +506,8 @@ self.direction) elif isinstance(self.actual, TypeType): return infer_constraints(template.item, self.actual.item, self.direction) + ...
{"golden_diff": "diff --git a/mypy/constraints.py b/mypy/constraints.py\n--- a/mypy/constraints.py\n+++ b/mypy/constraints.py\n@@ -506,6 +506,8 @@\n self.direction)\n elif isinstance(self.actual, TypeType):\n return infer_constraints(template.item, self.actual.it...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- No constraint inferred for Any vs. Type[T] I'd expect the revealed type to be `Any` instead of `<nothing>` for this example: ```py from typing import Type, Any, TypeVar T = TypeVar('T') def f(c: Typ...
elastic__helm-charts-516
[ { "content": "import tempfile\nimport yaml\nimport os\nimport json\nfrom subprocess import check_output\n\n\ndef helm_template(config):\n with tempfile.NamedTemporaryFile() as temp:\n with open(temp.name, \"w\") as values:\n values.write(config)\n helm_cmd = \"helm template -f {0} --...
[ { "content": "import tempfile\nimport yaml\nimport os\nimport json\nfrom subprocess import check_output\n\n\ndef helm_template(config):\n with tempfile.NamedTemporaryFile() as temp:\n with open(temp.name, \"w\") as values:\n values.write(config)\n helm_cmd = \"helm template release-n...
diff --git a/README.md b/README.md index d1e245f91..d40991f46 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ - [Support Matrix](#support-matrix) - [Kubernetes Versions](#kubernetes-versions) - [Helm versions](#helm-versions) - - [Helm 3 beta](#helm-3-beta) - [ECK](#eck) <!-- END doctoc generat...
helm upgrade fails due to 'cannot patch "elasticsearch-master" with kind StatefulSet' **Chart version:** 7.6.0 **Kubernetes version:** v1.14.9-eks-c0eccc **Kubernetes provider:** E.g. GKE (Google Kubernetes Engine) EKS **Helm Version:** v3.0.2 **`helm get release` output** <details> <summary>Output of...
diff --git a/helpers/helpers.py b/helpers/helpers.py --- a/helpers/helpers.py +++ b/helpers/helpers.py @@ -9,7 +9,7 @@ with tempfile.NamedTemporaryFile() as temp: with open(temp.name, "w") as values: values.write(config) - helm_cmd = "helm template -f {0} --namespace default ./".format...
{"golden_diff": "diff --git a/helpers/helpers.py b/helpers/helpers.py\n--- a/helpers/helpers.py\n+++ b/helpers/helpers.py\n@@ -9,7 +9,7 @@\n with tempfile.NamedTemporaryFile() as temp:\n with open(temp.name, \"w\") as values:\n values.write(config)\n- helm_cmd = \"helm template -f {0} --n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- helm upgrade fails due to 'cannot patch "elasticsearch-master" with kind StatefulSet' **Chart version:** 7.6.0 **Kubernetes version:** v1.14.9-eks-c0eccc **Kubernetes provider:** E.g. GKE (Google Kube...
pre-commit__pre-commit-1709
[ { "content": "import os.path\nimport re\nfrom typing import Any\nfrom typing import Dict\nfrom typing import List\nfrom typing import NamedTuple\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Tuple\n\nimport pre_commit.constants as C\nfrom pre_commit import git\nfrom pre_commit im...
[ { "content": "import os.path\nimport re\nfrom typing import Any\nfrom typing import Dict\nfrom typing import List\nfrom typing import NamedTuple\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Tuple\n\nimport pre_commit.constants as C\nfrom pre_commit import git\nfrom pre_commit im...
diff --git a/pre_commit/commands/autoupdate.py b/pre_commit/commands/autoupdate.py index 7320bb426..33a347302 100644 --- a/pre_commit/commands/autoupdate.py +++ b/pre_commit/commands/autoupdate.py @@ -79,8 +79,8 @@ def _check_hooks_still_exist_at_rev( hooks_missing = hooks - {hook['id'] for hook in manifest} ...
running `pre-commit autoupdate` fails because tip of HEAD is missing hook Hello 👋 I'm setting up `pre-commit` on a project and came across an issue when adding hook `destroyed-symlinks`. The error message suggested running `pre-commit autoupdate`. I ran that and saw that it cannot update because the tip of HEAD is m...
diff --git a/pre_commit/commands/autoupdate.py b/pre_commit/commands/autoupdate.py --- a/pre_commit/commands/autoupdate.py +++ b/pre_commit/commands/autoupdate.py @@ -79,8 +79,8 @@ hooks_missing = hooks - {hook['id'] for hook in manifest} if hooks_missing: raise RepositoryCannotBeUpdatedError( - ...
{"golden_diff": "diff --git a/pre_commit/commands/autoupdate.py b/pre_commit/commands/autoupdate.py\n--- a/pre_commit/commands/autoupdate.py\n+++ b/pre_commit/commands/autoupdate.py\n@@ -79,8 +79,8 @@\n hooks_missing = hooks - {hook['id'] for hook in manifest}\n if hooks_missing:\n raise RepositoryCanno...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- running `pre-commit autoupdate` fails because tip of HEAD is missing hook Hello 👋 I'm setting up `pre-commit` on a project and came across an issue when adding hook `destroyed-symlinks`. The error message ...
secdev__scapy-1007
[ { "content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## Modified by Maxence Tury <maxence.tury@ssi.gouv.fr>\n## Acknowledgment: Ralph Broenink\n## This program is published under a GPLv2 license\n\n\"\...
[ { "content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## Modified by Maxence Tury <maxence.tury@ssi.gouv.fr>\n## Acknowledgment: Ralph Broenink\n## This program is published under a GPLv2 license\n\n\"\...
diff --git a/scapy/asn1/ber.py b/scapy/asn1/ber.py index c2b0cf3a5cd..deadf770f5e 100644 --- a/scapy/asn1/ber.py +++ b/scapy/asn1/ber.py @@ -337,7 +337,8 @@ class BERcodec_STRING(BERcodec_Object): tag = ASN1_Class_UNIVERSAL.STRING @classmethod def enc(cls,s): - return chb(hash(cls.tag))+BER_len_en...
BERcodec_STRING With RandString cause length incorrect Scapy Version: 2.3.3.dev929 System: OSX 10.13.1 Python Version: 2.7.13 Using RandString with ASN1_STRING will cause length enc incorrect. This code can reappear that problem. ```python from scapy.all import * for i in range(10): data = str(ASN1_ST...
diff --git a/scapy/asn1/ber.py b/scapy/asn1/ber.py --- a/scapy/asn1/ber.py +++ b/scapy/asn1/ber.py @@ -337,7 +337,8 @@ tag = ASN1_Class_UNIVERSAL.STRING @classmethod def enc(cls,s): - return chb(hash(cls.tag))+BER_len_enc(len(s))+raw(s) # Be sure we are encoding bytes + s = raw(s) + ...
{"golden_diff": "diff --git a/scapy/asn1/ber.py b/scapy/asn1/ber.py\n--- a/scapy/asn1/ber.py\n+++ b/scapy/asn1/ber.py\n@@ -337,7 +337,8 @@\n tag = ASN1_Class_UNIVERSAL.STRING\n @classmethod\n def enc(cls,s):\n- return chb(hash(cls.tag))+BER_len_enc(len(s))+raw(s) # Be sure we are encoding bytes\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- BERcodec_STRING With RandString cause length incorrect Scapy Version: 2.3.3.dev929 System: OSX 10.13.1 Python Version: 2.7.13 Using RandString with ASN1_STRING will cause length enc incorrect. This code...
pytorch__audio-1339
[ { "content": "class AudioMetaData:\n \"\"\"Return type of ``torchaudio.info`` function.\n\n This class is used by :ref:`\"sox_io\" backend<sox_io_backend>` and\n :ref:`\"soundfile\" backend with the new interface<soundfile_backend>`.\n\n :ivar int sample_rate: Sample rate\n :ivar int num_frames: ...
[ { "content": "class AudioMetaData:\n \"\"\"Return type of ``torchaudio.info`` function.\n\n This class is used by :ref:`\"sox_io\" backend<sox_io_backend>` and\n :ref:`\"soundfile\" backend with the new interface<soundfile_backend>`.\n\n :ivar int sample_rate: Sample rate\n :ivar int num_frames: ...
diff --git a/torchaudio/backend/common.py b/torchaudio/backend/common.py index 722ce75879..f944b23d74 100644 --- a/torchaudio/backend/common.py +++ b/torchaudio/backend/common.py @@ -38,3 +38,14 @@ def __init__( self.num_channels = num_channels self.bits_per_sample = bits_per_sample self.enco...
Making `AudioMetaData` print friendly `AudioMetaData` class reports meta-data of audio source. It is however not print friendly. ```python print(torchaudio.info(src)) >>> <torchaudio.backend.common.AudioMetaData object at 0x7f1bc5cd2890> ``` It is nice if we can simply print the attributes like `dataclass` obj...
diff --git a/torchaudio/backend/common.py b/torchaudio/backend/common.py --- a/torchaudio/backend/common.py +++ b/torchaudio/backend/common.py @@ -38,3 +38,14 @@ self.num_channels = num_channels self.bits_per_sample = bits_per_sample self.encoding = encoding + + def __str__(self): + ...
{"golden_diff": "diff --git a/torchaudio/backend/common.py b/torchaudio/backend/common.py\n--- a/torchaudio/backend/common.py\n+++ b/torchaudio/backend/common.py\n@@ -38,3 +38,14 @@\n self.num_channels = num_channels\n self.bits_per_sample = bits_per_sample\n self.encoding = encoding\n+\n+ de...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Making `AudioMetaData` print friendly `AudioMetaData` class reports meta-data of audio source. It is however not print friendly. ```python print(torchaudio.info(src)) >>> <torchaudio.backend.common.Audio...
cython__cython-2497
[ { "content": "#\n# Cython -- Things that don't belong\n# anywhere else in particular\n#\n\nfrom __future__ import absolute_import\n\ntry:\n from __builtin__ import basestring\nexcept ImportError:\n basestring = str\n\nimport os\nimport sys\nimport re\nimport io\nimport codecs\nimport shutil\n...
[ { "content": "#\n# Cython -- Things that don't belong\n# anywhere else in particular\n#\n\nfrom __future__ import absolute_import\n\ntry:\n from __builtin__ import basestring\nexcept ImportError:\n basestring = str\n\nimport os\nimport sys\nimport re\nimport io\nimport codecs\nimport shutil\n...
diff --git a/Cython/Utils.py b/Cython/Utils.py index b3af7865135..1808e64fcce 100644 --- a/Cython/Utils.py +++ b/Cython/Utils.py @@ -491,5 +491,5 @@ def wrapper(cls): def raise_error_if_module_name_forbidden(full_module_name): #it is bad idea to call the pyx-file cython.pyx, so fail early - if full_module_na...
submodule with name "cython.pyx" doesn't build The[ fix for #2422](https://github.com/cython/cython/commit/6c91bf8e5bc99b625405919f9318d5626ecfa782#diff-26945d164aa2d5cb24bbe2cb4b8903ed) introduced a regression: submodules called cython.pyx are no longer built, i.e. for such a test case: ``` ######## my_module/__in...
diff --git a/Cython/Utils.py b/Cython/Utils.py --- a/Cython/Utils.py +++ b/Cython/Utils.py @@ -491,5 +491,5 @@ def raise_error_if_module_name_forbidden(full_module_name): #it is bad idea to call the pyx-file cython.pyx, so fail early - if full_module_name == 'cython' or full_module_name.endswith('.cython'):...
{"golden_diff": "diff --git a/Cython/Utils.py b/Cython/Utils.py\n--- a/Cython/Utils.py\n+++ b/Cython/Utils.py\n@@ -491,5 +491,5 @@\n \n def raise_error_if_module_name_forbidden(full_module_name):\n #it is bad idea to call the pyx-file cython.pyx, so fail early\n- if full_module_name == 'cython' or full_module_n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- submodule with name "cython.pyx" doesn't build The[ fix for #2422](https://github.com/cython/cython/commit/6c91bf8e5bc99b625405919f9318d5626ecfa782#diff-26945d164aa2d5cb24bbe2cb4b8903ed) introduced a regressi...
vyperlang__vyper-1465
[ { "content": "import hashlib\n\nfrom vyper import ast\nfrom vyper.exceptions import (\n ConstancyViolationException,\n InvalidLiteralException,\n ParserException,\n StructureException,\n TypeMismatchException,\n)\nfrom vyper.parser.expr import (\n Expr,\n)\nfrom vyper.parser.parser_utils impor...
[ { "content": "import hashlib\n\nfrom vyper import ast\nfrom vyper.exceptions import (\n ConstancyViolationException,\n InvalidLiteralException,\n ParserException,\n StructureException,\n TypeMismatchException,\n)\nfrom vyper.parser.expr import (\n Expr,\n)\nfrom vyper.parser.parser_utils impor...
diff --git a/tests/parser/functions/test_concat.py b/tests/parser/functions/test_concat.py index 60a2b0b9d2..f7156c4bf5 100644 --- a/tests/parser/functions/test_concat.py +++ b/tests/parser/functions/test_concat.py @@ -1,3 +1,8 @@ +from vyper.exceptions import ( + TypeMismatchException, +) + + def test_concat(get_c...
Vyper treats strings as having length 32 ### Version Information * vyper Version: 0.1.0b9 * OS: osx ### What's your issue about? When using `concat` Vyper treats all strings as having length 32. Therefore this ``` @public def conc(a: string[33], b: string[33]) -> string[64]: c: string[64] = concat(a, b...
diff --git a/vyper/functions/functions.py b/vyper/functions/functions.py --- a/vyper/functions/functions.py +++ b/vyper/functions/functions.py @@ -232,7 +232,7 @@ # Maximum length of the output total_maxlen = sum([ - arg.typ.maxlen if isinstance(arg.typ, ByteArrayType) else 32 for arg in args + ...
{"golden_diff": "diff --git a/vyper/functions/functions.py b/vyper/functions/functions.py\n--- a/vyper/functions/functions.py\n+++ b/vyper/functions/functions.py\n@@ -232,7 +232,7 @@\n \n # Maximum length of the output\n total_maxlen = sum([\n- arg.typ.maxlen if isinstance(arg.typ, ByteArrayType) else 32...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Vyper treats strings as having length 32 ### Version Information * vyper Version: 0.1.0b9 * OS: osx ### What's your issue about? When using `concat` Vyper treats all strings as having length 32. The...
python-discord__bot-822
[ { "content": "import asyncio\nimport difflib\nimport itertools\nimport logging\nimport typing as t\nfrom datetime import datetime\nfrom itertools import zip_longest\n\nimport discord\nfrom dateutil.relativedelta import relativedelta\nfrom deepdiff import DeepDiff\nfrom discord import Colour\nfrom discord.abc im...
[ { "content": "import asyncio\nimport difflib\nimport itertools\nimport logging\nimport typing as t\nfrom datetime import datetime\nfrom itertools import zip_longest\n\nimport discord\nfrom dateutil.relativedelta import relativedelta\nfrom deepdiff import DeepDiff\nfrom discord import Colour\nfrom discord.abc im...
diff --git a/bot/cogs/moderation/modlog.py b/bot/cogs/moderation/modlog.py index 59ae6b587f..81d95298db 100644 --- a/bot/cogs/moderation/modlog.py +++ b/bot/cogs/moderation/modlog.py @@ -67,7 +67,7 @@ async def upload_log( 'embeds': [embed.to_dict() for embed in message.embeds], ...
!clean command returns malformed API request Since we added attachments to the deleted message logs the clean command was not updated to store this. When running a clean command the following error is returned: ``` web_1 | Bad Request: /bot/deleted-messages web_1 | "POST /bot/deleted-messages HTTP/1.1...
diff --git a/bot/cogs/moderation/modlog.py b/bot/cogs/moderation/modlog.py --- a/bot/cogs/moderation/modlog.py +++ b/bot/cogs/moderation/modlog.py @@ -67,7 +67,7 @@ 'embeds': [embed.to_dict() for embed in message.embeds], 'attachments': attachment, ...
{"golden_diff": "diff --git a/bot/cogs/moderation/modlog.py b/bot/cogs/moderation/modlog.py\n--- a/bot/cogs/moderation/modlog.py\n+++ b/bot/cogs/moderation/modlog.py\n@@ -67,7 +67,7 @@\n 'embeds': [embed.to_dict() for embed in message.embeds],\n 'attachments': attachment,...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- !clean command returns malformed API request Since we added attachments to the deleted message logs the clean command was not updated to store this. When running a clean command the following error is retu...
beetbox__beets-3905
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in...
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in...
diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 125d1330d5..f0290f74a8 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -437,8 +437,14 @@ def parse_search_results(self, html): except HTMLParseError: return None - song_row = html.find("div", class_="content"). \ -...
Lyrics plugin crashing on tekstowo.pl I just found it crashing while searching tekstowo.pl (I'm on https://github.com/beetbox/beets/commit/afc072801c4a254e6b4114d89133d6bebc3e34b9). These are the relevant lines of error. ``` return html.find("div", class_="song-text").get_text() AttributeError: 'NoneType' o...
diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -437,8 +437,14 @@ except HTMLParseError: return None - song_row = html.find("div", class_="content"). \ - find_all("div", class_="box-przeboje")[0] + song_rows =...
{"golden_diff": "diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py\n--- a/beetsplug/lyrics.py\n+++ b/beetsplug/lyrics.py\n@@ -437,8 +437,14 @@\n except HTMLParseError:\n return None\n \n- song_row = html.find(\"div\", class_=\"content\"). \\\n- find_all(\"div\", class_=\"box-p...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Lyrics plugin crashing on tekstowo.pl I just found it crashing while searching tekstowo.pl (I'm on https://github.com/beetbox/beets/commit/afc072801c4a254e6b4114d89133d6bebc3e34b9). These are the relevant ...
getredash__redash-3323
[ { "content": "import cStringIO\nimport csv\nimport datetime\nimport calendar\nimport functools\nimport hashlib\nimport itertools\nimport logging\nimport time\nimport pytz\nfrom functools import reduce\n\nimport xlsxwriter\nfrom six import python_2_unicode_compatible, text_type\nfrom sqlalchemy import distinct, ...
[ { "content": "import cStringIO\nimport csv\nimport datetime\nimport calendar\nimport functools\nimport hashlib\nimport itertools\nimport logging\nimport time\nimport pytz\nfrom functools import reduce\n\nimport xlsxwriter\nfrom six import python_2_unicode_compatible, text_type\nfrom sqlalchemy import distinct, ...
diff --git a/redash/models/__init__.py b/redash/models/__init__.py index a59bb25f28..73ff622bd3 100644 --- a/redash/models/__init__.py +++ b/redash/models/__init__.py @@ -351,7 +351,7 @@ def make_excel_content(self): for (r, row) in enumerate(query_data['rows']): for (c, name) in enumerate(column_...
Exporting to Excel file fails when one of the columns is a dictionary <!-- We use GitHub only for bug reports 🐛 Anything else should be posted to https://discuss.redash.io 👫 🚨For support, help & questions use https://discuss.redash.io/c/support 💡For feature requests & ideas use https://discuss.redash.io/c...
diff --git a/redash/models/__init__.py b/redash/models/__init__.py --- a/redash/models/__init__.py +++ b/redash/models/__init__.py @@ -351,7 +351,7 @@ for (r, row) in enumerate(query_data['rows']): for (c, name) in enumerate(column_names): v = row.get(name) - if isi...
{"golden_diff": "diff --git a/redash/models/__init__.py b/redash/models/__init__.py\n--- a/redash/models/__init__.py\n+++ b/redash/models/__init__.py\n@@ -351,7 +351,7 @@\n for (r, row) in enumerate(query_data['rows']):\n for (c, name) in enumerate(column_names):\n v = row.get(name)\...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Exporting to Excel file fails when one of the columns is a dictionary <!-- We use GitHub only for bug reports 🐛 Anything else should be posted to https://discuss.redash.io 👫 🚨For support, help & q...
jschneier__django-storages-762
[ { "content": "# Dropbox storage class for Django pluggable storage system.\n# Author: Anthony Monthe <anthony.monthe@gmail.com>\n# License: BSD\n#\n# Usage:\n#\n# Add below to settings.py:\n# DROPBOX_OAUTH2_TOKEN = 'YourOauthToken'\n# DROPBOX_ROOT_PATH = '/dir/'\n\nfrom __future__ import absolute_import\n\nfrom...
[ { "content": "# Dropbox storage class for Django pluggable storage system.\n# Author: Anthony Monthe <anthony.monthe@gmail.com>\n# License: BSD\n#\n# Usage:\n#\n# Add below to settings.py:\n# DROPBOX_OAUTH2_TOKEN = 'YourOauthToken'\n# DROPBOX_ROOT_PATH = '/dir/'\n\nfrom __future__ import absolute_import\n\nfrom...
diff --git a/storages/backends/dropbox.py b/storages/backends/dropbox.py index 0640d1cf3..39be1ab9a 100644 --- a/storages/backends/dropbox.py +++ b/storages/backends/dropbox.py @@ -96,6 +96,10 @@ def exists(self, name): def listdir(self, path): directories, files = [], [] full_path = self._full_p...
Dropbox base path / should be an empty string Using `django-storages` `1.7.2`, a base path (`'/`) is provided, the Dropbox API is rejecting it: ``` File "/usr/local/lib/python3.7/site-packages/dbbackup/storage.py", line 78, in list_directory return self.storage.listdir(path)[1] File "/usr/local/lib/python...
diff --git a/storages/backends/dropbox.py b/storages/backends/dropbox.py --- a/storages/backends/dropbox.py +++ b/storages/backends/dropbox.py @@ -96,6 +96,10 @@ def listdir(self, path): directories, files = [], [] full_path = self._full_path(path) + + if full_path == '/': + ful...
{"golden_diff": "diff --git a/storages/backends/dropbox.py b/storages/backends/dropbox.py\n--- a/storages/backends/dropbox.py\n+++ b/storages/backends/dropbox.py\n@@ -96,6 +96,10 @@\n def listdir(self, path):\n directories, files = [], []\n full_path = self._full_path(path)\n+\n+ if full_path...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Dropbox base path / should be an empty string Using `django-storages` `1.7.2`, a base path (`'/`) is provided, the Dropbox API is rejecting it: ``` File "/usr/local/lib/python3.7/site-packages/dbbackup/...
getnikola__nikola-2593
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2016 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-2016 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/nikola/plugins/task/archive.py b/nikola/plugins/task/archive.py index 74c28c2451..40baf9e168 100644 --- a/nikola/plugins/task/archive.py +++ b/nikola/plugins/task/archive.py @@ -97,7 +97,7 @@ def get_classification_friendly_name(self, classification, lang, only_last_compo elif len(classification) ...
Archives (CREATE_MONTHLY_ARCHIVE = True) think all months are "None" https://irclogs.getnikola.com/2015/ To reproduce locally: get https://github.com/getnikola/irclogs-site create any random files in `posts/*.rst`.
diff --git a/nikola/plugins/task/archive.py b/nikola/plugins/task/archive.py --- a/nikola/plugins/task/archive.py +++ b/nikola/plugins/task/archive.py @@ -97,7 +97,7 @@ elif len(classification) == 1: return classification[0] elif len(classification) == 2: - nikola.utils.LocaleB...
{"golden_diff": "diff --git a/nikola/plugins/task/archive.py b/nikola/plugins/task/archive.py\n--- a/nikola/plugins/task/archive.py\n+++ b/nikola/plugins/task/archive.py\n@@ -97,7 +97,7 @@\n elif len(classification) == 1:\n return classification[0]\n elif len(classification) == 2:\n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Archives (CREATE_MONTHLY_ARCHIVE = True) think all months are "None" https://irclogs.getnikola.com/2015/ To reproduce locally: get https://github.com/getnikola/irclogs-site create any random files in `post...
microsoft__DeepSpeed-5134
[ { "content": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nimport torch\n\nfrom .abstract_accelerator import DeepSpeedAccelerator\n\n# During setup stage torch may not be installed, pass on no torch will\n# allow op builder related API to be executed.\ntry...
[ { "content": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nimport torch\n\nfrom .abstract_accelerator import DeepSpeedAccelerator\n\n# During setup stage torch may not be installed, pass on no torch will\n# allow op builder related API to be executed.\ntry...
diff --git a/accelerator/mps_accelerator.py b/accelerator/mps_accelerator.py index f6303cf9890f..972b33caece1 100644 --- a/accelerator/mps_accelerator.py +++ b/accelerator/mps_accelerator.py @@ -24,6 +24,15 @@ def __init__(self): def is_synchronized_device(self): return False + def use_host_timers(se...
[BUG] TypeError: Can't instantiate abstract class MPS_Accelerator with abstract methods **Describe the bug** TypeError: Can't instantiate abstract class MPS_Accelerator with abstract methods handles_memory_backpressure, resolves_data_dependency, use_host_timers **To Reproduce** Steps to reproduce the behavior: 1....
diff --git a/accelerator/mps_accelerator.py b/accelerator/mps_accelerator.py --- a/accelerator/mps_accelerator.py +++ b/accelerator/mps_accelerator.py @@ -24,6 +24,15 @@ def is_synchronized_device(self): return False + def use_host_timers(self): + return self.is_synchronized_device() + + de...
{"golden_diff": "diff --git a/accelerator/mps_accelerator.py b/accelerator/mps_accelerator.py\n--- a/accelerator/mps_accelerator.py\n+++ b/accelerator/mps_accelerator.py\n@@ -24,6 +24,15 @@\n def is_synchronized_device(self):\n return False\n \n+ def use_host_timers(self):\n+ return self.is_synchr...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] TypeError: Can't instantiate abstract class MPS_Accelerator with abstract methods **Describe the bug** TypeError: Can't instantiate abstract class MPS_Accelerator with abstract methods handles_memory_b...
kovidgoyal__kitty-5932
[ { "content": "#!/usr/bin/env python3\n# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>\n\nimport fnmatch\nimport glob\nimport io\nimport json\nimport os\nimport re\nimport secrets\nimport shlex\nimport shutil\nimport stat\nimport subprocess\nimport sys\nimport tarfile\nimport tempfile\ni...
[ { "content": "#!/usr/bin/env python3\n# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>\n\nimport fnmatch\nimport glob\nimport io\nimport json\nimport os\nimport re\nimport secrets\nimport shlex\nimport shutil\nimport stat\nimport subprocess\nimport sys\nimport tarfile\nimport tempfile\ni...
diff --git a/kittens/ssh/main.py b/kittens/ssh/main.py index 7140379b4ac..cacc60ff0b0 100644 --- a/kittens/ssh/main.py +++ b/kittens/ssh/main.py @@ -50,9 +50,6 @@ def read_data_from_shared_memory(shm_name: str) -> Any: shm.unlink() if shm.stats.st_uid != os.geteuid() or shm.stats.st_gid != os.getegid(...
Permission Error when using SSH kitten on FreeBSD Good morning. I was hoping you or someone could point me in the right direction, or is this possibly a bug? When attempting to use the SSH kitten on FreeBSD I am getting this error: ```bash $ kitty +kitten ssh test-host [Errno 13] Permission denied: '/kssh-3704...
diff --git a/kittens/ssh/main.py b/kittens/ssh/main.py --- a/kittens/ssh/main.py +++ b/kittens/ssh/main.py @@ -50,9 +50,6 @@ shm.unlink() if shm.stats.st_uid != os.geteuid() or shm.stats.st_gid != os.getegid(): raise ValueError('Incorrect owner on pwfile') - mode = stat.S_IMODE(shm...
{"golden_diff": "diff --git a/kittens/ssh/main.py b/kittens/ssh/main.py\n--- a/kittens/ssh/main.py\n+++ b/kittens/ssh/main.py\n@@ -50,9 +50,6 @@\n shm.unlink()\n if shm.stats.st_uid != os.geteuid() or shm.stats.st_gid != os.getegid():\n raise ValueError('Incorrect owner on pwfile')\n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Permission Error when using SSH kitten on FreeBSD Good morning. I was hoping you or someone could point me in the right direction, or is this possibly a bug? When attempting to use the SSH kitten on FreeB...
django-oscar__django-oscar-1766
[ { "content": "from django.utils.translation import ugettext_lazy as _\n\n\nclass Base(object):\n \"\"\"\n Base availability policy.\n \"\"\"\n\n #: Availability code. This is used for HTML classes\n code = ''\n\n #: A description of the availability of a product. This is shown on the\n #:...
[ { "content": "from django.utils.translation import ugettext_lazy as _\n\n\nclass Base(object):\n \"\"\"\n Base availability policy.\n \"\"\"\n\n #: Availability code. This is used for HTML classes\n code = ''\n\n #: A description of the availability of a product. This is shown on the\n #:...
diff --git a/src/oscar/apps/partner/availability.py b/src/oscar/apps/partner/availability.py index a999f2dce96..eaa3b6e9a17 100644 --- a/src/oscar/apps/partner/availability.py +++ b/src/oscar/apps/partner/availability.py @@ -83,7 +83,7 @@ def __init__(self, num_available): self.num_available = num_available ...
In cases where the stock is lower than the number of allocated products incorrect message appears To reproduce: 1. Add 2 products to basket 2. On one of them set num of allocated products as 1 and stock as 0. 3. On the basket page try to do an operation on the one that is still in stock. The message that appears is "a ...
diff --git a/src/oscar/apps/partner/availability.py b/src/oscar/apps/partner/availability.py --- a/src/oscar/apps/partner/availability.py +++ b/src/oscar/apps/partner/availability.py @@ -83,7 +83,7 @@ self.num_available = num_available def is_purchase_permitted(self, quantity): - if self.num_avai...
{"golden_diff": "diff --git a/src/oscar/apps/partner/availability.py b/src/oscar/apps/partner/availability.py\n--- a/src/oscar/apps/partner/availability.py\n+++ b/src/oscar/apps/partner/availability.py\n@@ -83,7 +83,7 @@\n self.num_available = num_available\n \n def is_purchase_permitted(self, quantity):\n-...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- In cases where the stock is lower than the number of allocated products incorrect message appears To reproduce: 1. Add 2 products to basket 2. On one of them set num of allocated products as 1 and stock as 0....
readthedocs__readthedocs.org-3693
[ { "content": "\"\"\"Git-related utilities.\"\"\"\n\nfrom __future__ import absolute_import\n\nimport csv\nimport logging\nimport os\nimport re\n\nfrom builtins import str\nfrom six import StringIO\n\nfrom readthedocs.projects.exceptions import RepositoryError\nfrom readthedocs.vcs_support.base import BaseVCS, V...
[ { "content": "\"\"\"Git-related utilities.\"\"\"\n\nfrom __future__ import absolute_import\n\nimport csv\nimport logging\nimport os\nimport re\n\nfrom builtins import str\nfrom six import StringIO\n\nfrom readthedocs.projects.exceptions import RepositoryError\nfrom readthedocs.vcs_support.base import BaseVCS, V...
diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py index 77673907ec5..afb1d7ed6e3 100644 --- a/readthedocs/vcs_support/backends/git.py +++ b/readthedocs/vcs_support/backends/git.py @@ -122,8 +122,8 @@ def parse_tags(self, data): @property def branches(self): ...
After build is triggered, state is shown as failed To reproduce, fire off a new build, make sure to catch the build list page while VCS operations are happening. Build will be in a failure state. This is a regression where we are setting the state of the build to failed without checking that the build has completed. Th...
diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py --- a/readthedocs/vcs_support/backends/git.py +++ b/readthedocs/vcs_support/backends/git.py @@ -122,8 +122,8 @@ @property def branches(self): # Only show remote branches - retcode, stdout, _ = self.r...
{"golden_diff": "diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py\n--- a/readthedocs/vcs_support/backends/git.py\n+++ b/readthedocs/vcs_support/backends/git.py\n@@ -122,8 +122,8 @@\n @property\n def branches(self):\n # Only show remote branches\n- ret...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- After build is triggered, state is shown as failed To reproduce, fire off a new build, make sure to catch the build list page while VCS operations are happening. Build will be in a failure state. This is a re...
canonical__microk8s-3573
[ { "content": "import getpass\nimport json\nimport os\nimport platform\nimport subprocess\nimport sys\nimport time\nfrom pathlib import Path\nimport logging\n\nimport click\nimport yaml\n\nLOG = logging.getLogger(__name__)\n\nKUBECTL = os.path.expandvars(\"$SNAP/microk8s-kubectl.wrapper\")\n\n\ndef get_group():\...
[ { "content": "import getpass\nimport json\nimport os\nimport platform\nimport subprocess\nimport sys\nimport time\nfrom pathlib import Path\nimport logging\n\nimport click\nimport yaml\n\nLOG = logging.getLogger(__name__)\n\nKUBECTL = os.path.expandvars(\"$SNAP/microk8s-kubectl.wrapper\")\n\n\ndef get_group():\...
diff --git a/microk8s-resources/actions/common/utils.sh b/microk8s-resources/actions/common/utils.sh index 84ecaf5e90..8bb2001383 100644 --- a/microk8s-resources/actions/common/utils.sh +++ b/microk8s-resources/actions/common/utils.sh @@ -18,7 +18,7 @@ exit_if_no_permissions() { echo "You can either try again with...
microk8s suggests command hiding error info <!-- Thank you for submitting an issue. Please fill in the template below information about the bug you encountered. --> #### Summary <!-- Please explain the bug in a few short sentences --> When you try to run microk8s with insufficient permissions, you get a...
diff --git a/scripts/wrappers/common/utils.py b/scripts/wrappers/common/utils.py --- a/scripts/wrappers/common/utils.py +++ b/scripts/wrappers/common/utils.py @@ -197,7 +197,7 @@ ) print("") print(" sudo usermod -a -G microk8s {}".format(user)) - print(" sudo chown -f -R $USER ~/...
{"golden_diff": "diff --git a/scripts/wrappers/common/utils.py b/scripts/wrappers/common/utils.py\n--- a/scripts/wrappers/common/utils.py\n+++ b/scripts/wrappers/common/utils.py\n@@ -197,7 +197,7 @@\n )\n print(\"\")\n print(\" sudo usermod -a -G microk8s {}\".format(user))\n- print(\"...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- microk8s suggests command hiding error info <!-- Thank you for submitting an issue. Please fill in the template below information about the bug you encountered. --> #### Summary <!-- Please expla...
Flexget__Flexget-3648
[ { "content": "import datetime\nimport hashlib\nimport logging\nimport os\nimport struct\n\nfrom apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore\nfrom apscheduler.schedulers.background import BackgroundScheduler\nfrom apscheduler.triggers.cron import CronTrigger\nfrom loguru import logger\n\nfrom flex...
[ { "content": "import hashlib\nimport logging\nimport os\nimport struct\n\nfrom apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore\nfrom apscheduler.schedulers.background import BackgroundScheduler\nfrom apscheduler.triggers.cron import CronTrigger\nfrom loguru import logger\n\nfrom flexget.config_schema...
diff --git a/flexget/components/scheduler/scheduler.py b/flexget/components/scheduler/scheduler.py index df8419f9d1..e097cb2e74 100644 --- a/flexget/components/scheduler/scheduler.py +++ b/flexget/components/scheduler/scheduler.py @@ -1,4 +1,3 @@ -import datetime import hashlib import logging import os @@ -126,7 +12...
Error on scheduler: Only timezones from the pytz library are supported ### Steps to reproduce: - Step 1: `flexget -L verbose daemon start` #### Config: ```yaml schedules: - tasks: ['some-task'] interval: hours: 1 ``` #### Backtrace: ``` File "/home/pi/.local/lib/python3.9/site-package...
diff --git a/flexget/components/scheduler/scheduler.py b/flexget/components/scheduler/scheduler.py --- a/flexget/components/scheduler/scheduler.py +++ b/flexget/components/scheduler/scheduler.py @@ -1,4 +1,3 @@ -import datetime import hashlib import logging import os @@ -126,7 +125,6 @@ scheduler = BackgroundSc...
{"golden_diff": "diff --git a/flexget/components/scheduler/scheduler.py b/flexget/components/scheduler/scheduler.py\n--- a/flexget/components/scheduler/scheduler.py\n+++ b/flexget/components/scheduler/scheduler.py\n@@ -1,4 +1,3 @@\n-import datetime\n import hashlib\n import logging\n import os\n@@ -126,7 +125,6 @@\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Error on scheduler: Only timezones from the pytz library are supported ### Steps to reproduce: - Step 1: `flexget -L verbose daemon start` #### Config: ```yaml schedules: - tasks: ['some-task'] ...
ray-project__ray-3109
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport sys\n\nif \"pyarrow\" in sys.modules:\n raise ImportError(\"Ray must be imported before pyarrow because Ray \"\n \"requires a specific version...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport sys\n\nif \"pyarrow\" in sys.modules:\n raise ImportError(\"Ray must be imported before pyarrow because Ray \"\n \"requires a specific version...
diff --git a/.gitignore b/.gitignore index f8130b3a2f85e..91189b6f9c41a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ /src/ray/object_manager/format/*_generated.h /src/ray/raylet/format/*_generated.h +# Modin source files +/python/ray/modin + # Redis temporary files *dump.rdb diff --git a/.travis.y...
Ship Modin with Ray ### Describe the problem <!-- Describe the problem clearly here. --> I think it makes sense to ship Modin with Ray. I suggest doing this similar to how pyarrow is shipped with Ray. We don't need to rely on the dependencies of Modin, but some of the Modin source will have to be updated to make s...
diff --git a/python/ray/__init__.py b/python/ray/__init__.py --- a/python/ray/__init__.py +++ b/python/ray/__init__.py @@ -46,6 +46,9 @@ e.args += (helpful_message, ) raise +modin_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "modin") +sys.path.insert(0, modin_path) + from ray.ray...
{"golden_diff": "diff --git a/python/ray/__init__.py b/python/ray/__init__.py\n--- a/python/ray/__init__.py\n+++ b/python/ray/__init__.py\n@@ -46,6 +46,9 @@\n e.args += (helpful_message, )\n raise\n \n+modin_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), \"modin\")\n+sys.path.insert(0, ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Ship Modin with Ray ### Describe the problem <!-- Describe the problem clearly here. --> I think it makes sense to ship Modin with Ray. I suggest doing this similar to how pyarrow is shipped with Ray. We...
web2py__web2py-1871
[ { "content": "#!/usr/bin/env python\n\nfrom setuptools import setup\nfrom gluon.fileutils import tar, untar, read_file, write_file\nimport tarfile\nimport sys\n\n\ndef tar(file, filelist, expression='^.+$'):\n \"\"\"\n tars dir/files into file, only tars file that match expression\n \"\"\"\n\n tar =...
[ { "content": "#!/usr/bin/env python\n\nfrom setuptools import setup\nfrom gluon.fileutils import tar, untar, read_file, write_file\nimport tarfile\nimport sys\n\n\ndef tar(file, filelist, expression='^.+$'):\n \"\"\"\n tars dir/files into file, only tars file that match expression\n \"\"\"\n\n tar =...
diff --git a/gluon/tests/test_dal.py b/gluon/tests/test_dal.py index d4e09df3a..52701641e 100644 --- a/gluon/tests/test_dal.py +++ b/gluon/tests/test_dal.py @@ -107,11 +107,3 @@ def test_mysql(self): os.environ["DB"] = "mysql://root:@localhost/pydal" result = self._run_tests() sel...
contrib/pg8000 is old and causes weird postgres errors Please update the contrib/pg8000 driver to the current version. Otherwise errors like Broken Pipe, Operationalerror,.. occur, - at least for postgres 9.6, - especially for long running task (ie. scheduler, where they are not properly handled (scheduler workers w...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -63,7 +63,6 @@ 'gluon/contrib/pymysql', 'gluon/contrib/pyrtf', 'gluon/contrib/pysimplesoap', - 'gluon/contrib/pg8000', 'gluon/contrib/plural_rules', ...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -63,7 +63,6 @@\n 'gluon/contrib/pymysql',\n 'gluon/contrib/pyrtf',\n 'gluon/contrib/pysimplesoap',\n- 'gluon/contrib/pg8000',\n 'gluon/...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- contrib/pg8000 is old and causes weird postgres errors Please update the contrib/pg8000 driver to the current version. Otherwise errors like Broken Pipe, Operationalerror,.. occur, - at least for postgres 9...
holoviz__panel-1044
[ { "content": "\"\"\"\nContains Image panes including renderers for PNG, SVG, GIF and JPG\nfile types.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport base64\n\nfrom io import BytesIO\nfrom six import string_types\n\nimport param\n\nfrom .markup import escape, DivPaneBase\nf...
[ { "content": "\"\"\"\nContains Image panes including renderers for PNG, SVG, GIF and JPG\nfile types.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport base64\n\nfrom io import BytesIO\nfrom six import string_types\n\nimport param\n\nfrom .markup import escape, DivPaneBase\nf...
diff --git a/panel/pane/image.py b/panel/pane/image.py index eae3441a97..547ad17c4d 100644 --- a/panel/pane/image.py +++ b/panel/pane/image.py @@ -114,7 +114,7 @@ def _get_properties(self): w, h = '%spx' % width, '%spx' % height elif smode == 'stretch_both': w, h = '100%', '100%' - ...
Support src urls and alt texts on Images #### My Pain I would like to use images in Panel via `pn.pane.Markdown` and/ or `pn.pane.PNG`. Currently the Bokeh layout engine does not layout markdown with images well. See https://github.com/holoviz/panel/issues/835. So I need to stick to `pn.pane.PNG` for images. ...
diff --git a/panel/pane/image.py b/panel/pane/image.py --- a/panel/pane/image.py +++ b/panel/pane/image.py @@ -114,7 +114,7 @@ w, h = '%spx' % width, '%spx' % height elif smode == 'stretch_both': w, h = '100%', '100%' - elif smode == 'stretch_height': + elif smode == 'st...
{"golden_diff": "diff --git a/panel/pane/image.py b/panel/pane/image.py\n--- a/panel/pane/image.py\n+++ b/panel/pane/image.py\n@@ -114,7 +114,7 @@\n w, h = '%spx' % width, '%spx' % height\n elif smode == 'stretch_both':\n w, h = '100%', '100%'\n- elif smode == 'stretch_height':\n+...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Support src urls and alt texts on Images #### My Pain I would like to use images in Panel via `pn.pane.Markdown` and/ or `pn.pane.PNG`. Currently the Bokeh layout engine does not layout markdown with im...
quantumlib__Cirq-423
[ { "content": "# Copyright 2018 The Cirq Developers\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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright 2018 The Cirq Developers\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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/cirq/google/merge_interactions.py b/cirq/google/merge_interactions.py index 0af943cba29..b293038adba 100644 --- a/cirq/google/merge_interactions.py +++ b/cirq/google/merge_interactions.py @@ -95,9 +95,9 @@ def _op_to_matrix(self, if op.qubits == (q2, q1): return MergeInteractions._fli...
MergeInteractions optimization is creating bad circuits Not sure how this made it past the tests yet. ```python def main(): circuit = make_inefficient_circuit() print("BEFORE:") print(circuit.to_unitary_matrix().round(3)) print() cirq.google.MergeInteractions().optimize_circuit(circuit) ...
diff --git a/cirq/google/merge_interactions.py b/cirq/google/merge_interactions.py --- a/cirq/google/merge_interactions.py +++ b/cirq/google/merge_interactions.py @@ -95,9 +95,9 @@ if op.qubits == (q2, q1): return MergeInteractions._flip_kron_order(m), True if op.qubits == (q1,): - ...
{"golden_diff": "diff --git a/cirq/google/merge_interactions.py b/cirq/google/merge_interactions.py\n--- a/cirq/google/merge_interactions.py\n+++ b/cirq/google/merge_interactions.py\n@@ -95,9 +95,9 @@\n if op.qubits == (q2, q1):\n return MergeInteractions._flip_kron_order(m), True\n if op.qu...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- MergeInteractions optimization is creating bad circuits Not sure how this made it past the tests yet. ```python def main(): circuit = make_inefficient_circuit() print("BEFORE:") print(circu...
kivy__kivy-4584
[ { "content": "'''\nWidget class\n============\n\nThe :class:`Widget` class is the base class required for creating Widgets.\nThis widget class was designed with a couple of principles in mind:\n\n* *Event Driven*\n\n Widget interaction is built on top of events that occur. If a property\n changes, the widget ...
[ { "content": "'''\nWidget class\n============\n\nThe :class:`Widget` class is the base class required for creating Widgets.\nThis widget class was designed with a couple of principles in mind:\n\n* *Event Driven*\n\n Widget interaction is built on top of events that occur. If a property\n changes, the widget ...
diff --git a/kivy/uix/widget.py b/kivy/uix/widget.py index 5b53db1828..31dbb4c38e 100644 --- a/kivy/uix/widget.py +++ b/kivy/uix/widget.py @@ -546,7 +546,7 @@ def add_widget(self, widget, index=0, canvas=None): children = self.children if index >= len(children): index = len(ch...
Remove and Re-add of Highest Widget in a Layout leaves the Widget Invisible I have noticed that adding widgets to a Layout Manager does not seem to work correctly. I have tested with BoxLayout, GridLayout, and FloatLayout. I have tested with 3 widgets, and with 4 widgets. I am using Kivy 1.9.0 with Python 2.7 on Fedora...
diff --git a/kivy/uix/widget.py b/kivy/uix/widget.py --- a/kivy/uix/widget.py +++ b/kivy/uix/widget.py @@ -546,7 +546,7 @@ children = self.children if index >= len(children): index = len(children) - next_index = 0 + next_index = canvas.indexof(chi...
{"golden_diff": "diff --git a/kivy/uix/widget.py b/kivy/uix/widget.py\n--- a/kivy/uix/widget.py\n+++ b/kivy/uix/widget.py\n@@ -546,7 +546,7 @@\n children = self.children\n if index >= len(children):\n index = len(children)\n- next_index = 0\n+ next_i...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Remove and Re-add of Highest Widget in a Layout leaves the Widget Invisible I have noticed that adding widgets to a Layout Manager does not seem to work correctly. I have tested with BoxLayout, GridLayout, an...
oppia__oppia-14800
[ { "content": "# Copyright 2014 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/licenses/LICENSE-2.0\n#\n...
[ { "content": "# Copyright 2014 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/licenses/LICENSE-2.0\n#\n...
diff --git a/core/controllers/creator_dashboard.py b/core/controllers/creator_dashboard.py index fde5748fb4fdd..c2a7440daa2b2 100644 --- a/core/controllers/creator_dashboard.py +++ b/core/controllers/creator_dashboard.py @@ -352,7 +352,7 @@ class UploadExplorationHandler(base.BaseHandler): @acl_decorators.can_uplo...
Schema validation error on uploading an exploration YAML <!-- - Thanks for taking the time to report a bug in the Oppia project. - Before filing a new issue, please do a quick search to check that it hasn't - already been filed on the [issue tracker](https://github.com/oppia/oppia/issues)._ --> **Describ...
diff --git a/core/controllers/creator_dashboard.py b/core/controllers/creator_dashboard.py --- a/core/controllers/creator_dashboard.py +++ b/core/controllers/creator_dashboard.py @@ -352,7 +352,7 @@ @acl_decorators.can_upload_exploration def post(self): """Handles POST requests.""" - yaml_cont...
{"golden_diff": "diff --git a/core/controllers/creator_dashboard.py b/core/controllers/creator_dashboard.py\n--- a/core/controllers/creator_dashboard.py\n+++ b/core/controllers/creator_dashboard.py\n@@ -352,7 +352,7 @@\n @acl_decorators.can_upload_exploration\n def post(self):\n \"\"\"Handles POST reque...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Schema validation error on uploading an exploration YAML <!-- - Thanks for taking the time to report a bug in the Oppia project. - Before filing a new issue, please do a quick search to check that it ha...
google__pytype-807
[ { "content": "\"\"\"Match pytd types against each other.\n\n\"Matching\" x against y means roughly: If we have a function f(param: y) and\na type x, would we be able to pass (an instance of) x to f. (I.e.,\n\"execute f(x)\"). So for example, str would \"match\" against basestring, and\nlist[int] would match aga...
[ { "content": "\"\"\"Match pytd types against each other.\n\n\"Matching\" x against y means roughly: If we have a function f(param: y) and\na type x, would we be able to pass (an instance of) x to f. (I.e.,\n\"execute f(x)\"). So for example, str would \"match\" against basestring, and\nlist[int] would match aga...
diff --git a/pytype/pytd/type_match.py b/pytype/pytd/type_match.py index f5ecd1928..35f639b31 100644 --- a/pytype/pytd/type_match.py +++ b/pytype/pytd/type_match.py @@ -347,6 +347,8 @@ def _match_type_against_type(self, t1, t2, subst): return booleq.FALSE else: return booleq.Eq(t1.name, t2.name...
AssertionError: Don't know how to match <class 'pytype.pytd.pytd.Name… …dType'> against <class 'pytype.pytd.pytd.Literal'> I opened an issue for this error. If this a possible fix for this issue, feel free to merge the fix. Issue = https://github.com/google/pytype/issues/802
diff --git a/pytype/pytd/type_match.py b/pytype/pytd/type_match.py --- a/pytype/pytd/type_match.py +++ b/pytype/pytd/type_match.py @@ -347,6 +347,8 @@ return booleq.FALSE else: return booleq.Eq(t1.name, t2.name) + elif isinstance(t1, pytd.NamedType) and isinstance(t2, pytd.Literal): + r...
{"golden_diff": "diff --git a/pytype/pytd/type_match.py b/pytype/pytd/type_match.py\n--- a/pytype/pytd/type_match.py\n+++ b/pytype/pytd/type_match.py\n@@ -347,6 +347,8 @@\n return booleq.FALSE\n else:\n return booleq.Eq(t1.name, t2.name)\n+ elif isinstance(t1, pytd.NamedType) and isinstance(t2,...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- AssertionError: Don't know how to match <class 'pytype.pytd.pytd.Name… …dType'> against <class 'pytype.pytd.pytd.Literal'> I opened an issue for this error. If this a possible fix for this issue, feel free...
electricitymaps__electricitymaps-contrib-2656
[ { "content": "#!/usr/bin/env python3\n\nimport logging\nfrom arrow import get\nfrom requests import Session\nfrom ree import (Formentera, Ibiza,\n Mallorca, Menorca,\n BalearicIslands)\n# package \"ree\" is used to parse data from www.ree.es // maintained on github by @hectorespe...
[ { "content": "#!/usr/bin/env python3\n\nimport logging\nfrom arrow import get\nfrom requests import Session\nfrom ree import (Formentera, Ibiza,\n Mallorca, Menorca,\n BalearicIslands)\n# package \"ree\" is used to parse data from www.ree.es // maintained on github by @hectorespe...
diff --git a/parsers/ES_IB.py b/parsers/ES_IB.py index 116587d597..93dfe140c9 100644 --- a/parsers/ES_IB.py +++ b/parsers/ES_IB.py @@ -160,7 +160,7 @@ def fetch_exchange(zone_key1, zone_key2, session=None, target_datetime=None, log for response in responses: if sorted_zone_keys == 'ES-IB-MA->ES-IB-ME': ...
The import/export between Menorca and Mallorca appears reversed Our data is showing the export going one way, but our data source is showing the reverse according to one user. See screenshots: ![IMG_9768](https://user-images.githubusercontent.com/8129157/86447078-17d4b400-bd15-11ea-87da-15f44842d645.PNG) ![image](htt...
diff --git a/parsers/ES_IB.py b/parsers/ES_IB.py --- a/parsers/ES_IB.py +++ b/parsers/ES_IB.py @@ -160,7 +160,7 @@ for response in responses: if sorted_zone_keys == 'ES-IB-MA->ES-IB-ME': - net_flow = response.link['ma_me'] + net_flow = -1 * response.link['ma_me'] elif sort...
{"golden_diff": "diff --git a/parsers/ES_IB.py b/parsers/ES_IB.py\n--- a/parsers/ES_IB.py\n+++ b/parsers/ES_IB.py\n@@ -160,7 +160,7 @@\n for response in responses:\n \n if sorted_zone_keys == 'ES-IB-MA->ES-IB-ME':\n- net_flow = response.link['ma_me']\n+ net_flow = -1 * response.link['m...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- The import/export between Menorca and Mallorca appears reversed Our data is showing the export going one way, but our data source is showing the reverse according to one user. See screenshots: ![IMG_9768](ht...
pypi__warehouse-6337
[ { "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/forklift/test_legacy.py b/tests/unit/forklift/test_legacy.py index 003610d8d508..ad3a28a33366 100644 --- a/tests/unit/forklift/test_legacy.py +++ b/tests/unit/forklift/test_legacy.py @@ -155,7 +155,8 @@ def test_validate_legacy_non_dist_req_list(self, monkeypatch): assert validator.call...
Upload to PyPI fails when dependency version contains * **Describe the bug** PyPI raises `400 Client error` when uploading a package that specifies requirement using `== 2.*`. This is a valid version specifier referred to [PEP 440](https://www.python.org/dev/peps/pep-0440/#compatible-release). The whole error is: ...
diff --git a/warehouse/forklift/legacy.py b/warehouse/forklift/legacy.py --- a/warehouse/forklift/legacy.py +++ b/warehouse/forklift/legacy.py @@ -252,11 +252,6 @@ "Can't have direct dependency: {!r}".format(requirement) ) - if any(packaging.version.Version(spec.version).local for spec in req...
{"golden_diff": "diff --git a/warehouse/forklift/legacy.py b/warehouse/forklift/legacy.py\n--- a/warehouse/forklift/legacy.py\n+++ b/warehouse/forklift/legacy.py\n@@ -252,11 +252,6 @@\n \"Can't have direct dependency: {!r}\".format(requirement)\n )\n \n- if any(packaging.version.Version(spec.vers...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Upload to PyPI fails when dependency version contains * **Describe the bug** PyPI raises `400 Client error` when uploading a package that specifies requirement using `== 2.*`. This is a valid version specifi...
pypa__pip-10029
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2016-2018 Julien Danjou\n# Copyright 2017 Elisey Zanko\n# Copyright 2016 Étienne Bersac\n# Copyright 2016 Joshua Harlow\n# Copyright 2013-2014 Ray Holder\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2016-2018 Julien Danjou\n# Copyright 2017 Elisey Zanko\n# Copyright 2016 Étienne Bersac\n# Copyright 2016 Joshua Harlow\n# Copyright 2013-2014 Ray Holder\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except...
diff --git a/news/10020.bugfix.rst b/news/10020.bugfix.rst new file mode 100644 index 00000000000..9425626fb07 --- /dev/null +++ b/news/10020.bugfix.rst @@ -0,0 +1 @@ +Remove unused optional ``tornado`` import in vendored ``tenacity`` to prevent old versions of Tornado from breaking pip. diff --git a/src/pip/_vendor/te...
Vendoring of `tenacity` is leaky ### Description Tenacity contains a [conditional import of tornado](https://github.com/pypa/pip/blob/88eb4f092e58f3aee1d389ad4f9047df46e44bb4/src/pip/_vendor/tenacity/__init__.py#L25-L28). This makes the behavior of `pip` sensitive to third-party packages outside of its vendor director...
diff --git a/src/pip/_vendor/tenacity/__init__.py b/src/pip/_vendor/tenacity/__init__.py --- a/src/pip/_vendor/tenacity/__init__.py +++ b/src/pip/_vendor/tenacity/__init__.py @@ -22,10 +22,12 @@ except ImportError: iscoroutinefunction = None -try: - import tornado -except ImportError: - tornado = None +# ...
{"golden_diff": "diff --git a/src/pip/_vendor/tenacity/__init__.py b/src/pip/_vendor/tenacity/__init__.py\n--- a/src/pip/_vendor/tenacity/__init__.py\n+++ b/src/pip/_vendor/tenacity/__init__.py\n@@ -22,10 +22,12 @@\n except ImportError:\n iscoroutinefunction = None\n \n-try:\n- import tornado\n-except ImportErro...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Vendoring of `tenacity` is leaky ### Description Tenacity contains a [conditional import of tornado](https://github.com/pypa/pip/blob/88eb4f092e58f3aee1d389ad4f9047df46e44bb4/src/pip/_vendor/tenacity/__init_...
spotify__luigi-2323
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#...
diff --git a/luigi/contrib/hive.py b/luigi/contrib/hive.py index a310677b12..91c84e320f 100644 --- a/luigi/contrib/hive.py +++ b/luigi/contrib/hive.py @@ -68,7 +68,7 @@ def run_hive(args, check_return_code=True): if check_return_code and p.returncode != 0: raise HiveCommandError("Hive command: {0} failed ...
TypeError: 'str' does not support the buffer interface in luigi.contrib.hive Hi, I'm running luigi task with python3.4 and trying call print(HiveTableTarget(table = "tbl", database = "db").exists()). I'm getting error the following stacktrace: ``` Traceback (most recent call last): File "/usr/local/lib/python3.4/di...
diff --git a/luigi/contrib/hive.py b/luigi/contrib/hive.py --- a/luigi/contrib/hive.py +++ b/luigi/contrib/hive.py @@ -68,7 +68,7 @@ if check_return_code and p.returncode != 0: raise HiveCommandError("Hive command: {0} failed with error code: {1}".format(" ".join(cmd), p.returncode), ...
{"golden_diff": "diff --git a/luigi/contrib/hive.py b/luigi/contrib/hive.py\n--- a/luigi/contrib/hive.py\n+++ b/luigi/contrib/hive.py\n@@ -68,7 +68,7 @@\n if check_return_code and p.returncode != 0:\n raise HiveCommandError(\"Hive command: {0} failed with error code: {1}\".format(\" \".join(cmd), p.returnco...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- TypeError: 'str' does not support the buffer interface in luigi.contrib.hive Hi, I'm running luigi task with python3.4 and trying call print(HiveTableTarget(table = "tbl", database = "db").exists()). I'm get...
kivy__kivy-3066
[ { "content": "# found a way to include it more easily.\n'''\nSDL2 Window\n===========\n\nWindowing provider directly based on our own wrapped version of SDL.\n\nTODO:\n - fix keys\n - support scrolling\n - clean code\n - manage correctly all sdl events\n\n'''\n\n__all__ = ('WindowSDL2', )\n\nfrom os...
[ { "content": "# found a way to include it more easily.\n'''\nSDL2 Window\n===========\n\nWindowing provider directly based on our own wrapped version of SDL.\n\nTODO:\n - fix keys\n - support scrolling\n - clean code\n - manage correctly all sdl events\n\n'''\n\n__all__ = ('WindowSDL2', )\n\nfrom os...
diff --git a/kivy/core/window/window_sdl2.py b/kivy/core/window/window_sdl2.py index cfcbe44faf..96d7e94d70 100644 --- a/kivy/core/window/window_sdl2.py +++ b/kivy/core/window/window_sdl2.py @@ -99,6 +99,7 @@ class WindowSDL(WindowBase): def __init__(self, **kwargs): self._win = _WindowSDL2Storage() ...
SDL2 window crash on (atleast) Windows Run the following ``` python from kivy.app import App from kivy.uix.label import Label class TestApp(App): def build(self): return Label(text='Use scroll wheel without having the mouse touch the kivy window first') TestApp().run() ``` The new window gets focus, witho...
diff --git a/kivy/core/window/window_sdl2.py b/kivy/core/window/window_sdl2.py --- a/kivy/core/window/window_sdl2.py +++ b/kivy/core/window/window_sdl2.py @@ -99,6 +99,7 @@ def __init__(self, **kwargs): self._win = _WindowSDL2Storage() super(WindowSDL, self).__init__() + self._mouse_x = se...
{"golden_diff": "diff --git a/kivy/core/window/window_sdl2.py b/kivy/core/window/window_sdl2.py\n--- a/kivy/core/window/window_sdl2.py\n+++ b/kivy/core/window/window_sdl2.py\n@@ -99,6 +99,7 @@\n def __init__(self, **kwargs):\n self._win = _WindowSDL2Storage()\n super(WindowSDL, self).__init__()\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- SDL2 window crash on (atleast) Windows Run the following ``` python from kivy.app import App from kivy.uix.label import Label class TestApp(App): def build(self): return Label(text='Use scroll wh...
conda__conda-5426
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom collections import OrderedDict\nfrom genericpath import exists\nfrom glob import glob\nfrom logging import getLogger\nimport sys\n\nfrom .compat import iteritems, on_win\nfrom .._ven...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom collections import OrderedDict\nfrom genericpath import exists\nfrom glob import glob\nfrom logging import getLogger\nimport sys\n\nfrom .compat import iteritems, on_win\nfrom .._ven...
diff --git a/conda/common/platform.py b/conda/common/platform.py index 17eced7c47c..3d4cf40105e 100644 --- a/conda/common/platform.py +++ b/conda/common/platform.py @@ -19,12 +19,12 @@ def is_admin_on_windows(): # pragma: unix no cover return False try: from ctypes import windll - return ...
Launching navigator via prompt warnings appear _From @RidaZubair on May 24, 2017 9:47_ **OS:** Windows **Anaconda: 4.4.0** **Actual:** On launching navigator via prompt following warning appears on prompt ![2](https://cloud.githubusercontent.com/assets/27444898/26396930/175ef622-408e-11e7-8e75-e9c2218e15de.png) ...
diff --git a/conda/common/platform.py b/conda/common/platform.py --- a/conda/common/platform.py +++ b/conda/common/platform.py @@ -19,12 +19,12 @@ return False try: from ctypes import windll - return windll.shell32.IsUserAnAdmin()() != 0 + return windll.shell32.IsUserAnAdmin() != 0 ...
{"golden_diff": "diff --git a/conda/common/platform.py b/conda/common/platform.py\n--- a/conda/common/platform.py\n+++ b/conda/common/platform.py\n@@ -19,12 +19,12 @@\n return False\n try:\n from ctypes import windll\n- return windll.shell32.IsUserAnAdmin()() != 0\n+ return windll.shel...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Launching navigator via prompt warnings appear _From @RidaZubair on May 24, 2017 9:47_ **OS:** Windows **Anaconda: 4.4.0** **Actual:** On launching navigator via prompt following warning appears on prom...
modin-project__modin-3390
[ { "content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ...
[ { "content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ...
diff --git a/asv_bench/benchmarks/utils/data_shapes.py b/asv_bench/benchmarks/utils/data_shapes.py index a5987cf7be1..cea86d67703 100644 --- a/asv_bench/benchmarks/utils/data_shapes.py +++ b/asv_bench/benchmarks/utils/data_shapes.py @@ -30,7 +30,6 @@ ], "small": [ [[250, 250], [250, 250]], - [...
Do not check ASV benchmarks on test data, where the number of rows is much less than the number of columns These sizes can be removed because such cases are not used in benchmarking: https://github.com/modin-project/modin/blob/dd91a78ad3f4b8e3e569215e9c8e540ad099d4a8/asv_bench/benchmarks/utils/data_shapes.py#L33 and ht...
diff --git a/asv_bench/benchmarks/utils/data_shapes.py b/asv_bench/benchmarks/utils/data_shapes.py --- a/asv_bench/benchmarks/utils/data_shapes.py +++ b/asv_bench/benchmarks/utils/data_shapes.py @@ -30,7 +30,6 @@ ], "small": [ [[250, 250], [250, 250]], - [[20, 10_000], [10, 25_000]], ...
{"golden_diff": "diff --git a/asv_bench/benchmarks/utils/data_shapes.py b/asv_bench/benchmarks/utils/data_shapes.py\n--- a/asv_bench/benchmarks/utils/data_shapes.py\n+++ b/asv_bench/benchmarks/utils/data_shapes.py\n@@ -30,7 +30,6 @@\n ],\n \"small\": [\n [[250, 250], [250, 250]],\n- [[20, 10_000]...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Do not check ASV benchmarks on test data, where the number of rows is much less than the number of columns These sizes can be removed because such cases are not used in benchmarking: https://github.com/modin-...
gratipay__gratipay.com-1750
[ { "content": "import os\n\nfrom gittip import NotSane\nfrom aspen.utils import typecheck\nfrom psycopg2 import IntegrityError\n\n\n# Exceptions\n# ==========\n\nclass UnknownPlatform(Exception): pass\n\nclass NeedConfirmation(Exception):\n \"\"\"Represent the case where we need user confirmation during a mer...
[ { "content": "import os\n\nfrom gittip import NotSane\nfrom aspen.utils import typecheck\nfrom psycopg2 import IntegrityError\n\n\n# Exceptions\n# ==========\n\nclass UnknownPlatform(Exception): pass\n\nclass NeedConfirmation(Exception):\n \"\"\"Represent the case where we need user confirmation during a mer...
diff --git a/gittip/models/_mixin_elsewhere.py b/gittip/models/_mixin_elsewhere.py index 2074dc1aa4..7a82337d0b 100644 --- a/gittip/models/_mixin_elsewhere.py +++ b/gittip/models/_mixin_elsewhere.py @@ -413,11 +413,12 @@ def take_over(self, account_elsewhere, have_confirmation=False): # Utter Hack # ========== -def...
regression w/ unglobalizing of gittip.db We fixed a bunch (!m). I'm seeing one more on community pages: https://www.gittip.com/for/python/ ``` Traceback (most recent call last): File "aspen/website.py", line 81, in handle_safely response = self.handle(request) File "aspen/website.py", line 114, in handle ...
diff --git a/gittip/models/_mixin_elsewhere.py b/gittip/models/_mixin_elsewhere.py --- a/gittip/models/_mixin_elsewhere.py +++ b/gittip/models/_mixin_elsewhere.py @@ -413,11 +413,12 @@ # Utter Hack # ========== -def utter_hack(records): +def utter_hack(db, records): for rec in records: - yield UtterHack...
{"golden_diff": "diff --git a/gittip/models/_mixin_elsewhere.py b/gittip/models/_mixin_elsewhere.py\n--- a/gittip/models/_mixin_elsewhere.py\n+++ b/gittip/models/_mixin_elsewhere.py\n@@ -413,11 +413,12 @@\n # Utter Hack\n # ==========\n \n-def utter_hack(records):\n+def utter_hack(db, records):\n for rec in records...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- regression w/ unglobalizing of gittip.db We fixed a bunch (!m). I'm seeing one more on community pages: https://www.gittip.com/for/python/ ``` Traceback (most recent call last): File "aspen/website.py", l...
cloudtools__troposphere-605
[ { "content": "# Copyright (c) 2012-2013, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty\nfrom .validators import integer, boolean, status\nfrom .validators import iam_path, iam_role_name, iam_group_name, iam_user_name\n\ntry:\n ...
[ { "content": "# Copyright (c) 2012-2013, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty\nfrom .validators import integer, boolean, status\nfrom .validators import iam_path, iam_role_name, iam_group_name, iam_user_name\n\ntry:\n ...
diff --git a/troposphere/iam.py b/troposphere/iam.py index 472fe2a3d..980d6a4b8 100644 --- a/troposphere/iam.py +++ b/troposphere/iam.py @@ -50,9 +50,6 @@ class Policy(AWSProperty): class Group(AWSObject): - def validate_title(self): - iam_group_name(self.title) - resource_type = "AWS::IAM::Group" ...
BUG: IAM Role title should not be validated The title specified in troposphere is not the actual physical resource name and should be validated as such (https://github.com/cloudtools/troposphere/blob/fe72f7d3f7b0711a22173c1240134173aafef574/troposphere/iam.py#L75-L77). The next snippet was created today using `troposp...
diff --git a/troposphere/iam.py b/troposphere/iam.py --- a/troposphere/iam.py +++ b/troposphere/iam.py @@ -50,9 +50,6 @@ class Group(AWSObject): - def validate_title(self): - iam_group_name(self.title) - resource_type = "AWS::IAM::Group" props = { @@ -73,9 +70,6 @@ class Role(AWSObject):...
{"golden_diff": "diff --git a/troposphere/iam.py b/troposphere/iam.py\n--- a/troposphere/iam.py\n+++ b/troposphere/iam.py\n@@ -50,9 +50,6 @@\n \n \n class Group(AWSObject):\n- def validate_title(self):\n- iam_group_name(self.title)\n-\n resource_type = \"AWS::IAM::Group\"\n \n props = {\n@@ -73,9 +70,...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- BUG: IAM Role title should not be validated The title specified in troposphere is not the actual physical resource name and should be validated as such (https://github.com/cloudtools/troposphere/blob/fe72f7d3...
mne-tools__mne-bids-pipeline-139
[ { "content": "\"\"\"Set the configuration parameters for the study.\n\nYou need to define an environment variable `BIDS_ROOT` to point to the root\nof your BIDS dataset to be analyzed.\n\n\"\"\"\nimport importlib\nimport functools\nimport os\nfrom collections import defaultdict\nimport copy\nimport coloredlogs\...
[ { "content": "\"\"\"Set the configuration parameters for the study.\n\nYou need to define an environment variable `BIDS_ROOT` to point to the root\nof your BIDS dataset to be analyzed.\n\n\"\"\"\nimport importlib\nimport functools\nimport os\nfrom collections import defaultdict\nimport copy\nimport coloredlogs\...
diff --git a/config.py b/config.py index 17301ec1b..239d32a44 100644 --- a/config.py +++ b/config.py @@ -461,17 +461,6 @@ tmax = 0.5 -# ``trigger_time_shift`` : float | None -# If float it specifies the offset for the trigger and the stimulus -# (in seconds). You need to measure this value for your specific ...
config.trigger_time_shift is currently unused And also lacks clarification of what exactly it is supposed to do.
diff --git a/config.py b/config.py --- a/config.py +++ b/config.py @@ -461,17 +461,6 @@ tmax = 0.5 -# ``trigger_time_shift`` : float | None -# If float it specifies the offset for the trigger and the stimulus -# (in seconds). You need to measure this value for your specific -# experiment/setup. -# -# Exam...
{"golden_diff": "diff --git a/config.py b/config.py\n--- a/config.py\n+++ b/config.py\n@@ -461,17 +461,6 @@\n \n tmax = 0.5\n \n-# ``trigger_time_shift`` : float | None\n-# If float it specifies the offset for the trigger and the stimulus\n-# (in seconds). You need to measure this value for your specific\n-# e...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- config.trigger_time_shift is currently unused And also lacks clarification of what exactly it is supposed to do. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of the...
plone__Products.CMFPlone-3093
[ { "content": "# -*- coding: utf-8 -*-\nfrom AccessControl import ClassSecurityInfo\nfrom AccessControl.class_init import InitializeClass\nfrom App.special_dtml import DTMLFile\nfrom OFS.Folder import Folder\nfrom OFS.PropertyManager import PropertyManager\nfrom Products.CMFCore.ActionInformation import ActionIn...
[ { "content": "# -*- coding: utf-8 -*-\nfrom AccessControl import ClassSecurityInfo\nfrom AccessControl.class_init import InitializeClass\nfrom App.special_dtml import DTMLFile\nfrom OFS.Folder import Folder\nfrom OFS.PropertyManager import PropertyManager\nfrom Products.CMFCore.ActionInformation import ActionIn...
diff --git a/Products/CMFPlone/PloneControlPanel.py b/Products/CMFPlone/PloneControlPanel.py index b749d2d51f..9e97d7c58b 100644 --- a/Products/CMFPlone/PloneControlPanel.py +++ b/Products/CMFPlone/PloneControlPanel.py @@ -143,9 +143,10 @@ def enumConfiglets(self, group=None): a['title'] = translate(ti...
sorting in control panel The items of the control panel are completely unsorted (should be sorted in alphabetical order (depending on the current language in Plone). ![screenshot-dev1 veit-schiele de 8080 2015-07-18 13-35-44](https://cloud.githubusercontent.com/assets/594239/8761438/07d76bf4-2d52-11e5-8540-82fd53932690...
diff --git a/Products/CMFPlone/PloneControlPanel.py b/Products/CMFPlone/PloneControlPanel.py --- a/Products/CMFPlone/PloneControlPanel.py +++ b/Products/CMFPlone/PloneControlPanel.py @@ -143,9 +143,10 @@ a['title'] = translate(title, context=self.REQUEST) - ...
{"golden_diff": "diff --git a/Products/CMFPlone/PloneControlPanel.py b/Products/CMFPlone/PloneControlPanel.py\n--- a/Products/CMFPlone/PloneControlPanel.py\n+++ b/Products/CMFPlone/PloneControlPanel.py\n@@ -143,9 +143,10 @@\n a['title'] = translate(title,\n context...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- sorting in control panel The items of the control panel are completely unsorted (should be sorted in alphabetical order (depending on the current language in Plone). ![screenshot-dev1 veit-schiele de 8080 201...
bridgecrewio__checkov-5936
[ { "content": "from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\nfrom checkov.common.models.enums import CheckCategories\n\n\nclass CloudSqlMajorVersion(BaseResourceValueCheck):\n def __init__(self):\n name = \"Ensure SQL database is using latest Major vers...
[ { "content": "from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\nfrom checkov.common.models.enums import CheckCategories\n\n\nclass CloudSqlMajorVersion(BaseResourceValueCheck):\n def __init__(self):\n name = \"Ensure SQL database is using latest Major vers...
diff --git a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py index 96bf503c3e..4df7105ccd 100644 --- a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py +++ b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py @@ -14,8 ...
CKV_GCP_79 SQL Server latest version is 2022 instead of 2019 **Describe the issue** The `CKV_GCP_79` about SQL server is pinned at 2019 but 2022 is the latest version : https://learn.microsoft.com/en-us/troubleshoot/sql/releases/download-and-install-latest-updates **Examples** Related to this files : https:/...
diff --git a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py --- a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py +++ b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py @@ -14,8 +14,8 @@ return 'database_v...
{"golden_diff": "diff --git a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py\n--- a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py\n+++ b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py\n@@ -14,8 +14,8 @@\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- CKV_GCP_79 SQL Server latest version is 2022 instead of 2019 **Describe the issue** The `CKV_GCP_79` about SQL server is pinned at 2019 but 2022 is the latest version : https://learn.microsoft.com/en-us/tr...
freedomofpress__securedrop-3429
[ { "content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as...
[ { "content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as...
diff --git a/admin/securedrop_admin/__init__.py b/admin/securedrop_admin/__init__.py index 000b059d0b..5757fa0e93 100755 --- a/admin/securedrop_admin/__init__.py +++ b/admin/securedrop_admin/__init__.py @@ -588,7 +588,8 @@ def check_for_updates(args): sdlog.info("Checking for SecureDrop updates...") # Deter...
[QA] Tails GUI updater reporting new versions # Bug ## Description The 0.7.0 GUI updater reports new versions even when it's running the latest. Just ran a pre-flight check with the 0.7.0 tag, checked out inside a Tails VM. The install portion completed fine. So did `./securedrop-admin tailsconfig`. However, afte...
diff --git a/admin/securedrop_admin/__init__.py b/admin/securedrop_admin/__init__.py --- a/admin/securedrop_admin/__init__.py +++ b/admin/securedrop_admin/__init__.py @@ -588,7 +588,8 @@ sdlog.info("Checking for SecureDrop updates...") # Determine what branch we are on - current_tag = subprocess.check_ou...
{"golden_diff": "diff --git a/admin/securedrop_admin/__init__.py b/admin/securedrop_admin/__init__.py\n--- a/admin/securedrop_admin/__init__.py\n+++ b/admin/securedrop_admin/__init__.py\n@@ -588,7 +588,8 @@\n sdlog.info(\"Checking for SecureDrop updates...\")\n \n # Determine what branch we are on\n- current...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [QA] Tails GUI updater reporting new versions # Bug ## Description The 0.7.0 GUI updater reports new versions even when it's running the latest. Just ran a pre-flight check with the 0.7.0 tag, checked o...
vyperlang__vyper-2513
[ { "content": "# -*- coding: utf-8 -*-\n\nimport os\nimport subprocess\n\nfrom setuptools import find_packages, setup\n\n__version__ = \"0.3.0\"\n\nextras_require = {\n \"test\": [\n \"pytest>=5.4,<6.0\",\n \"pytest-cov>=2.10,<3.0\",\n \"pytest-instafail>=0.4,<1.0\",\n \"pytest-xdi...
[ { "content": "# -*- coding: utf-8 -*-\n\nimport os\nimport subprocess\n\nfrom setuptools import find_packages, setup\n\n__version__ = \"0.3.0\"\n\nextras_require = {\n \"test\": [\n \"pytest>=5.4,<6.0\",\n \"pytest-cov>=2.10,<3.0\",\n \"pytest-instafail>=0.4,<1.0\",\n \"pytest-xdi...
diff --git a/setup.py b/setup.py index 3231e310d5..44f27fa37f 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ "pytest-xdist>=1.32,<2.0", "eth-tester[py-evm]>=0.5.0b1,<0.6", "py-evm==0.4.0a4", # NOTE: temporarily pinned until we have support for py-evm 0.5.0a0+ - "web3==5.12.3",...
test fail with web3.py 5.21.0 ### Version Information * vyper Version (output of `vyper --version`): latest master (cff69d63) * OS: macos * Python Version (output of `python --version`): 3.9.6 ### What's your issue about? tests fail tests/cli/vyper_json/test_parse_args_vyperjson.py::test_pretty_json - jso...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ "pytest-xdist>=1.32,<2.0", "eth-tester[py-evm]>=0.5.0b1,<0.6", "py-evm==0.4.0a4", # NOTE: temporarily pinned until we have support for py-evm 0.5.0a0+ - "web3==5.12.3", + "web3==5.21.0", "...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -15,7 +15,7 @@\n \"pytest-xdist>=1.32,<2.0\",\n \"eth-tester[py-evm]>=0.5.0b1,<0.6\",\n \"py-evm==0.4.0a4\", # NOTE: temporarily pinned until we have support for py-evm 0.5.0a0+\n- \"web3==5.12.3\",\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- test fail with web3.py 5.21.0 ### Version Information * vyper Version (output of `vyper --version`): latest master (cff69d63) * OS: macos * Python Version (output of `python --version`): 3.9.6 ### Wha...
fossasia__open-event-server-5151
[ { "content": "import base64\n\nfrom flask import Blueprint, request, jsonify, abort, make_response\nfrom flask_jwt import current_identity as current_user\nfrom flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\n\nfrom app import get_settings\nfrom app.api.bootstrap import api\nfrom a...
[ { "content": "import base64\n\nfrom flask import Blueprint, request, jsonify, abort, make_response\nfrom flask_jwt import current_identity as current_user\nfrom flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship\n\nfrom app import get_settings\nfrom app.api.bootstrap import api\nfrom a...
diff --git a/app/api/users.py b/app/api/users.py index cba8d5ccc8..3be87cb7d3 100644 --- a/app/api/users.py +++ b/app/api/users.py @@ -183,7 +183,7 @@ def before_update_object(self, user, data, view_kwargs): if data.get('email') and data['email'] != user.email: view_kwargs['email_changed'] = user....
For the edit action button in admin/users the super admin should be allowed to make the users as an admin. **Describe the bug** <!-- A clear and concise description of what the bug is. --> The patch for the users is working but is_admin is a readonly property even for the super user. Used the patch request for users ...
diff --git a/app/api/users.py b/app/api/users.py --- a/app/api/users.py +++ b/app/api/users.py @@ -183,7 +183,7 @@ if data.get('email') and data['email'] != user.email: view_kwargs['email_changed'] = user.email - if data.get('is_admin') != user.is_admin: + if has_access('is_super_a...
{"golden_diff": "diff --git a/app/api/users.py b/app/api/users.py\n--- a/app/api/users.py\n+++ b/app/api/users.py\n@@ -183,7 +183,7 @@\n if data.get('email') and data['email'] != user.email:\n view_kwargs['email_changed'] = user.email\n \n- if data.get('is_admin') != user.is_admin:\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- For the edit action button in admin/users the super admin should be allowed to make the users as an admin. **Describe the bug** <!-- A clear and concise description of what the bug is. --> The patch for the...
feast-dev__feast-3588
[ { "content": "import contextlib\nimport os\nimport uuid\nimport warnings\nfrom datetime import datetime\nfrom functools import reduce\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n ContextManager,\n Dict,\n Iterator,\n List,\n Optional,\n Tuple,\...
[ { "content": "import contextlib\nimport os\nimport uuid\nimport warnings\nfrom datetime import datetime\nfrom functools import reduce\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n ContextManager,\n Dict,\n Iterator,\n List,\n Optional,\n Tuple,\...
diff --git a/sdk/python/feast/infra/offline_stores/snowflake.py b/sdk/python/feast/infra/offline_stores/snowflake.py index 1dc18256fa4..847e0733810 100644 --- a/sdk/python/feast/infra/offline_stores/snowflake.py +++ b/sdk/python/feast/infra/offline_stores/snowflake.py @@ -556,7 +556,7 @@ def to_remote_storage(self) -> ...
to_remote_storage() resulting in undeleted temporary tables in Snowflake ## Expected Behavior When calling get_historical_features.to_remote_storage(), any temporary tables created in Snowflake are deleted after the Snowflake session ends. ## Current Behavior When calling get_historical_features.to_remote_storage()...
diff --git a/sdk/python/feast/infra/offline_stores/snowflake.py b/sdk/python/feast/infra/offline_stores/snowflake.py --- a/sdk/python/feast/infra/offline_stores/snowflake.py +++ b/sdk/python/feast/infra/offline_stores/snowflake.py @@ -556,7 +556,7 @@ ) table = f"temporary_{uuid.uuid4().hex}" - ...
{"golden_diff": "diff --git a/sdk/python/feast/infra/offline_stores/snowflake.py b/sdk/python/feast/infra/offline_stores/snowflake.py\n--- a/sdk/python/feast/infra/offline_stores/snowflake.py\n+++ b/sdk/python/feast/infra/offline_stores/snowflake.py\n@@ -556,7 +556,7 @@\n )\n \n table = f\"temporary...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- to_remote_storage() resulting in undeleted temporary tables in Snowflake ## Expected Behavior When calling get_historical_features.to_remote_storage(), any temporary tables created in Snowflake are deleted ...
kubeflow__pipelines-4187
[ { "content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/samples/core/loop_parallelism/loop_parallelism.py b/samples/core/loop_parallelism/loop_parallelism.py index 5a594face2e..995e31e9c84 100644 --- a/samples/core/loop_parallelism/loop_parallelism.py +++ b/samples/core/loop_parallelism/loop_parallelism.py @@ -21,9 +21,9 @@ def print_op(s: str): print(s) ...
allow output artifact store configuration (vs hard coded) it seems like the output artifacts are always stored in a specific minio service, port, namespace, bucket, secrets, etc (`minio-service.kubeflow:9000`). see: https://github.com/kubeflow/pipelines/blob/f40a22a3f4a8e06d20cf3e3f425b5058d5c87e0b/sdk/python/kfp/c...
diff --git a/samples/core/loop_parallelism/loop_parallelism.py b/samples/core/loop_parallelism/loop_parallelism.py --- a/samples/core/loop_parallelism/loop_parallelism.py +++ b/samples/core/loop_parallelism/loop_parallelism.py @@ -21,9 +21,9 @@ print(s) @dsl.pipeline(name='my-pipeline') -def pipeline2(my_pipe_p...
{"golden_diff": "diff --git a/samples/core/loop_parallelism/loop_parallelism.py b/samples/core/loop_parallelism/loop_parallelism.py\n--- a/samples/core/loop_parallelism/loop_parallelism.py\n+++ b/samples/core/loop_parallelism/loop_parallelism.py\n@@ -21,9 +21,9 @@\n print(s)\n \n @dsl.pipeline(name='my-pipeline')\n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- allow output artifact store configuration (vs hard coded) it seems like the output artifacts are always stored in a specific minio service, port, namespace, bucket, secrets, etc (`minio-service.kubeflow:9000`...
mitmproxy__mitmproxy-6866
[ { "content": "from __future__ import annotations\n\nimport binascii\nimport weakref\nfrom abc import ABC\nfrom abc import abstractmethod\nfrom collections.abc import MutableMapping\nfrom typing import Optional\n\nimport ldap3\nimport passlib.apache\n\nfrom mitmproxy import connection\nfrom mitmproxy import ctx\...
[ { "content": "from __future__ import annotations\n\nimport binascii\nimport weakref\nfrom abc import ABC\nfrom abc import abstractmethod\nfrom collections.abc import MutableMapping\nfrom typing import Optional\n\nimport ldap3\nimport passlib.apache\n\nfrom mitmproxy import connection\nfrom mitmproxy import ctx\...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 830fc1d7da..4f662f2deb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ ([#6819](https://github.com/mitmproxy/mitmproxy/pull/6819), @mhils) * Set the `unbuffered` (stdout/stderr) flag for the `mitmdump` PyInstaller build. ([#6821](https://github.com/mi...
httpauth is not attached to replay request #### Problem Description I set mitmproxy to run in reverse mode as a proxy to real server, and then protect mitmproxy with a pair of user:pass in the proxyauth option. A regular request would go through, but a reply of that same request would return 401 Unauthorized #### ...
diff --git a/mitmproxy/addons/proxyauth.py b/mitmproxy/addons/proxyauth.py --- a/mitmproxy/addons/proxyauth.py +++ b/mitmproxy/addons/proxyauth.py @@ -76,6 +76,8 @@ # Is this connection authenticated by a previous HTTP CONNECT? if f.client_conn in self.authenticated: f.metadat...
{"golden_diff": "diff --git a/mitmproxy/addons/proxyauth.py b/mitmproxy/addons/proxyauth.py\n--- a/mitmproxy/addons/proxyauth.py\n+++ b/mitmproxy/addons/proxyauth.py\n@@ -76,6 +76,8 @@\n # Is this connection authenticated by a previous HTTP CONNECT?\n if f.client_conn in self.authenticated:\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- httpauth is not attached to replay request #### Problem Description I set mitmproxy to run in reverse mode as a proxy to real server, and then protect mitmproxy with a pair of user:pass in the proxyauth opt...
bridgecrewio__checkov-2740
[ { "content": "from checkov.common.models.consts import ANY_VALUE\nfrom checkov.common.models.enums import CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\n\n\nclass AzureFrontDoorEnablesWAF(BaseResourceValueCheck):\n def __init__(self):\n ...
[ { "content": "from checkov.common.models.consts import ANY_VALUE\nfrom checkov.common.models.enums import CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\n\n\nclass AzureFrontDoorEnablesWAF(BaseResourceValueCheck):\n def __init__(self):\n ...
diff --git a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py index 435d45350b..f94cc72870 100644 --- a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py +++ b/checkov/terraform/checks/resource/azure/AzureFrontDoo...
Check Azure Front Door WAF enabled fails even when a WAF is correctly assigned **Describe the issue** [`CKV_AZURE_121`](https://github.com/bridgecrewio/checkov/blob/master/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py) fails despite a Web Application Firewall policy being correctly applied. W...
diff --git a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py --- a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py +++ b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py @@ -12,7 +12,7 @@ ...
{"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py\n--- a/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py\n+++ b/checkov/terraform/checks/resource/azure/AzureFrontDoorEnablesWAF.py\n@...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Check Azure Front Door WAF enabled fails even when a WAF is correctly assigned **Describe the issue** [`CKV_AZURE_121`](https://github.com/bridgecrewio/checkov/blob/master/checkov/terraform/checks/resource/a...
data-for-change__anyway-1244
[ { "content": "# -*- coding: utf-8 -*-\nimport logging\nimport datetime\nimport json\nimport pandas as pd\nfrom collections import defaultdict\nfrom sqlalchemy import func\nfrom sqlalchemy import cast, Numeric\nfrom sqlalchemy import desc\nfrom flask import Response\nfrom .constants import CONST\nfrom .models im...
[ { "content": "# -*- coding: utf-8 -*-\nimport logging\nimport datetime\nimport json\nimport pandas as pd\nfrom collections import defaultdict\nfrom sqlalchemy import func\nfrom sqlalchemy import cast, Numeric\nfrom sqlalchemy import desc\nfrom flask import Response\nfrom .constants import CONST\nfrom .models im...
diff --git a/anyway/infographics_utils.py b/anyway/infographics_utils.py index 672a3170e..62280da41 100644 --- a/anyway/infographics_utils.py +++ b/anyway/infographics_utils.py @@ -338,6 +338,9 @@ def extract_news_flash_obj(news_flash_id): def sum_road_accidents_by_specific_type(road_data, field_name): dict_mer...
Set default values of 0 to elements in head_on_collisions_comparison Example for the element that is missing ![image](https://user-images.githubusercontent.com/58947331/81738603-9f830c80-94a2-11ea-8dd3-798dc5356a1a.png)
diff --git a/anyway/infographics_utils.py b/anyway/infographics_utils.py --- a/anyway/infographics_utils.py +++ b/anyway/infographics_utils.py @@ -338,6 +338,9 @@ def sum_road_accidents_by_specific_type(road_data, field_name): dict_merge = defaultdict(int) + dict_merge[field_name] = 0 + dict_merge['תאונות...
{"golden_diff": "diff --git a/anyway/infographics_utils.py b/anyway/infographics_utils.py\n--- a/anyway/infographics_utils.py\n+++ b/anyway/infographics_utils.py\n@@ -338,6 +338,9 @@\n \n def sum_road_accidents_by_specific_type(road_data, field_name):\n dict_merge = defaultdict(int)\n+ dict_merge[field_name] = 0...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Set default values of 0 to elements in head_on_collisions_comparison Example for the element that is missing ![image](https://user-images.githubusercontent.com/58947331/81738603-9f830c80-94a2-11ea-8dd3-798...
pyca__cryptography-7406
[ { "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\nimport getpass\nimport glob\nimport io\nimport os\nimport subprocess\nimport time\nimport zipfile\n\nimport click...
[ { "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\nimport getpass\nimport glob\nimport io\nimport os\nimport subprocess\nimport time\nimport zipfile\n\nimport click...
diff --git a/release.py b/release.py index 5bc996aab02e..70b4e106051f 100644 --- a/release.py +++ b/release.py @@ -103,6 +103,11 @@ def release(version): """ ``version`` should be a string like '0.4' or '1.0'. """ + print( + f"Create a new GH PAT at: " + f"https://github.com/settings/tok...
release.py should link to GH create PAT page We can pre-fill what permissions are needed to improve the UX of doing a release. Example URL: https://github.com/settings/tokens/new?description=foo&scopes=repo,workflow @reaperhulk do you know what scopes are required?
diff --git a/release.py b/release.py --- a/release.py +++ b/release.py @@ -103,6 +103,11 @@ """ ``version`` should be a string like '0.4' or '1.0'. """ + print( + f"Create a new GH PAT at: " + f"https://github.com/settings/tokens/new?" + f"description={version}&scopes=repo" + )...
{"golden_diff": "diff --git a/release.py b/release.py\n--- a/release.py\n+++ b/release.py\n@@ -103,6 +103,11 @@\n \"\"\"\n ``version`` should be a string like '0.4' or '1.0'.\n \"\"\"\n+ print(\n+ f\"Create a new GH PAT at: \"\n+ f\"https://github.com/settings/tokens/new?\"\n+ f\"des...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- release.py should link to GH create PAT page We can pre-fill what permissions are needed to improve the UX of doing a release. Example URL: https://github.com/settings/tokens/new?description=foo&scopes=repo,w...
Project-MONAI__MONAI-2375
[ { "content": "# Copyright 2020 - 2021 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 appli...
[ { "content": "# Copyright 2020 - 2021 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 appli...
diff --git a/monai/data/dataset.py b/monai/data/dataset.py index fef086f320..76c879e3a6 100644 --- a/monai/data/dataset.py +++ b/monai/data/dataset.py @@ -168,7 +168,7 @@ def __init__( self.hash_func = hash_func if self.cache_dir is not None: if not self.cache_dir.exists(): - ...
error in multi-process accessing of the same non-exist persistent cache **Is your feature request related to a problem? Please describe.** the persistent dataset will first check the existence of a cache directory and the create a new one if needed: https://github.com/Project-MONAI/MONAI/blob/feb3a334b7bbf302b13a6da8...
diff --git a/monai/data/dataset.py b/monai/data/dataset.py --- a/monai/data/dataset.py +++ b/monai/data/dataset.py @@ -168,7 +168,7 @@ self.hash_func = hash_func if self.cache_dir is not None: if not self.cache_dir.exists(): - self.cache_dir.mkdir(parents=True) + ...
{"golden_diff": "diff --git a/monai/data/dataset.py b/monai/data/dataset.py\n--- a/monai/data/dataset.py\n+++ b/monai/data/dataset.py\n@@ -168,7 +168,7 @@\n self.hash_func = hash_func\n if self.cache_dir is not None:\n if not self.cache_dir.exists():\n- self.cache_dir.mkdir(pa...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- error in multi-process accessing of the same non-exist persistent cache **Is your feature request related to a problem? Please describe.** the persistent dataset will first check the existence of a cache dir...
nonebot__nonebot2-61
[ { "content": "\"\"\"\n事件处理\n========\n\nNoneBot 内部处理并按优先级分发事件给所有事件响应器,提供了多个插槽以进行事件的预处理等。\n\"\"\"\n\nimport asyncio\nfrom datetime import datetime\n\nfrom nonebot.log import logger\nfrom nonebot.rule import TrieRule\nfrom nonebot.utils import escape_tag\nfrom nonebot.matcher import matchers, Matcher\nfrom nonebo...
[ { "content": "\"\"\"\n事件处理\n========\n\nNoneBot 内部处理并按优先级分发事件给所有事件响应器,提供了多个插槽以进行事件的预处理等。\n\"\"\"\n\nimport asyncio\nfrom datetime import datetime\n\nfrom nonebot.log import logger\nfrom nonebot.rule import TrieRule\nfrom nonebot.utils import escape_tag\nfrom nonebot.matcher import matchers, Matcher\nfrom nonebo...
diff --git a/archive/2.0.0a5/README.md b/archive/2.0.0a6/README.md similarity index 100% rename from archive/2.0.0a5/README.md rename to archive/2.0.0a6/README.md diff --git a/archive/2.0.0a6/advanced/README.md b/archive/2.0.0a6/advanced/README.md new file mode 100644 index 000000000000..92c6af3eb19f --- /dev/null +++ ...
修复阻止事件传递信号无效的问题 抛出的异常应为 StopPropagation 的一个实例
diff --git a/nonebot/message.py b/nonebot/message.py --- a/nonebot/message.py +++ b/nonebot/message.py @@ -244,7 +244,7 @@ results = await asyncio.gather(*pending_tasks, return_exceptions=True) for result in results: - if result is StopPropagation: + if isinstance(result, StopP...
{"golden_diff": "diff --git a/nonebot/message.py b/nonebot/message.py\n--- a/nonebot/message.py\n+++ b/nonebot/message.py\n@@ -244,7 +244,7 @@\n results = await asyncio.gather(*pending_tasks, return_exceptions=True)\n \n for result in results:\n- if result is StopPropagation:\n+ if...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- 修复阻止事件传递信号无效的问题 抛出的异常应为 StopPropagation 的一个实例 --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `nonebot/messa...
cisagov__manage.get.gov-1551
[ { "content": "from django.db import models\n\nfrom phonenumber_field.modelfields import PhoneNumberField # type: ignore\n\nfrom .utility.time_stamped_model import TimeStampedModel\n\n\nclass Contact(TimeStampedModel):\n\n \"\"\"Contact information follows a similar pattern for each contact.\"\"\"\n\n use...
[ { "content": "from django.db import models\n\nfrom phonenumber_field.modelfields import PhoneNumberField # type: ignore\n\nfrom .utility.time_stamped_model import TimeStampedModel\n\n\nclass Contact(TimeStampedModel):\n\n \"\"\"Contact information follows a similar pattern for each contact.\"\"\"\n\n use...
diff --git a/src/registrar/models/contact.py b/src/registrar/models/contact.py index 6b3b6ddb2..06cf83887 100644 --- a/src/registrar/models/contact.py +++ b/src/registrar/models/contact.py @@ -64,7 +64,7 @@ def save(self, *args, **kwargs): super().save(*args, **kwargs) # Update the related User obje...
User/Contact bug: Signals double saving, overwriting data for test cases ### Current Behavior A bug was introduced [with a PR](https://github.com/cisagov/manage.get.gov/pull/1491) that fixed our oidc login clearing out user information. To fix this, the Contact object was linked to the User object, such that they wo...
diff --git a/src/registrar/models/contact.py b/src/registrar/models/contact.py --- a/src/registrar/models/contact.py +++ b/src/registrar/models/contact.py @@ -64,7 +64,7 @@ super().save(*args, **kwargs) # Update the related User object's first_name and last_name - if self.user: + if se...
{"golden_diff": "diff --git a/src/registrar/models/contact.py b/src/registrar/models/contact.py\n--- a/src/registrar/models/contact.py\n+++ b/src/registrar/models/contact.py\n@@ -64,7 +64,7 @@\n super().save(*args, **kwargs)\n \n # Update the related User object's first_name and last_name\n- if s...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- User/Contact bug: Signals double saving, overwriting data for test cases ### Current Behavior A bug was introduced [with a PR](https://github.com/cisagov/manage.get.gov/pull/1491) that fixed our oidc login...
mars-project__mars-679
[ { "content": "# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless...
[ { "content": "# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless...
diff --git a/mars/web/server.py b/mars/web/server.py index a15a26a93e..7497815a66 100644 --- a/mars/web/server.py +++ b/mars/web/server.py @@ -214,6 +214,7 @@ def _try_start_web_server(self): handlers, allow_websocket_origin=['*'], address='0.0.0.0', port=use_port, ...
[BUG] Web session doesn't work with large data source **Describe the bug** The default `max_buffer_size` of tornado HTTP server is 100M, when constructing dataframes from large pandas dataframes it will raise `Content-Length too long`.
diff --git a/mars/web/server.py b/mars/web/server.py --- a/mars/web/server.py +++ b/mars/web/server.py @@ -214,6 +214,7 @@ handlers, allow_websocket_origin=['*'], address='0.0.0.0', port=use_port, extra_patterns=extra_patterns, + http_ser...
{"golden_diff": "diff --git a/mars/web/server.py b/mars/web/server.py\n--- a/mars/web/server.py\n+++ b/mars/web/server.py\n@@ -214,6 +214,7 @@\n handlers, allow_websocket_origin=['*'],\n address='0.0.0.0', port=use_port,\n extra_patterns=extra_patterns,\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] Web session doesn't work with large data source **Describe the bug** The default `max_buffer_size` of tornado HTTP server is 100M, when constructing dataframes from large pandas dataframes it will ra...
mozmeao__snippets-service-1017
[ { "content": "import re\n\nfrom django.contrib import admin, messages\nfrom django.db import transaction\nfrom django.db.models import TextField, Q\nfrom django.template.loader import get_template\nfrom django.utils.safestring import mark_safe\n\nfrom reversion.admin import VersionAdmin\nfrom django_ace import ...
[ { "content": "import re\n\nfrom django.contrib import admin, messages\nfrom django.db import transaction\nfrom django.db.models import TextField, Q\nfrom django.template.loader import get_template\nfrom django.utils.safestring import mark_safe\n\nfrom reversion.admin import VersionAdmin\nfrom django_ace import ...
diff --git a/snippets/base/admin/adminmodels.py b/snippets/base/admin/adminmodels.py index 69a041dbd..1bf6f83ed 100644 --- a/snippets/base/admin/adminmodels.py +++ b/snippets/base/admin/adminmodels.py @@ -142,8 +142,8 @@ def save_model(self, request, obj, form, change): super().save_model(request, obj, form, c...
Create a preview with background (light and dark) for Icons
diff --git a/snippets/base/admin/adminmodels.py b/snippets/base/admin/adminmodels.py --- a/snippets/base/admin/adminmodels.py +++ b/snippets/base/admin/adminmodels.py @@ -142,8 +142,8 @@ super().save_model(request, obj, form, change) def preview(self, obj): - text = f'<img style="max-width:120px;...
{"golden_diff": "diff --git a/snippets/base/admin/adminmodels.py b/snippets/base/admin/adminmodels.py\n--- a/snippets/base/admin/adminmodels.py\n+++ b/snippets/base/admin/adminmodels.py\n@@ -142,8 +142,8 @@\n super().save_model(request, obj, form, change)\n \n def preview(self, obj):\n- text = f'<img...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Create a preview with background (light and dark) for Icons --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path...
awslabs__gluonts-1132
[ { "content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. 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# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICE...
[ { "content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. 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# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICE...
diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 895376dc03..e436802f33 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,7 +1,7 @@ holidays>=0.9 matplotlib~=3.0 numpy~=1.16 -pandas>=1.0,<1.1 +pandas>=1.0 pydantic~=1.1,<1.7 tqdm~=4.23 toolz~=0.10 ...
Update pandas dependency As documented in #967, pandas will be fixing the breaking change that led us to fix the dependency to `<1.1`, see pandas-dev/pandas#37267 Once that is resolved, we could remove the constraint. *Edit:* we should also make sure to find a solution to #965 first
diff --git a/src/gluonts/time_feature/_base.py b/src/gluonts/time_feature/_base.py --- a/src/gluonts/time_feature/_base.py +++ b/src/gluonts/time_feature/_base.py @@ -136,8 +136,8 @@ """ features_by_offsets = { - offsets.YearOffset: [], - offsets.MonthOffset: [MonthOfYear], + offsets.Ye...
{"golden_diff": "diff --git a/src/gluonts/time_feature/_base.py b/src/gluonts/time_feature/_base.py\n--- a/src/gluonts/time_feature/_base.py\n+++ b/src/gluonts/time_feature/_base.py\n@@ -136,8 +136,8 @@\n \"\"\"\n \n features_by_offsets = {\n- offsets.YearOffset: [],\n- offsets.MonthOffset: [Month...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update pandas dependency As documented in #967, pandas will be fixing the breaking change that led us to fix the dependency to `<1.1`, see pandas-dev/pandas#37267 Once that is resolved, we could remove the...
holoviz__panel-956
[ { "content": "\"\"\"\nThe input widgets generally allow entering arbitrary information into\na text field or similar.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport ast\n\nfrom base64 import b64decode\nfrom datetime import datetime\nfrom six import string_types\n\nimport p...
[ { "content": "\"\"\"\nThe input widgets generally allow entering arbitrary information into\na text field or similar.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport ast\n\nfrom base64 import b64decode\nfrom datetime import datetime\nfrom six import string_types\n\nimport p...
diff --git a/panel/tests/widgets/test_input.py b/panel/tests/widgets/test_input.py index 9423b971ad..0f034e2770 100644 --- a/panel/tests/widgets/test_input.py +++ b/panel/tests/widgets/test_input.py @@ -59,10 +59,11 @@ def test_file_input(document, comm): assert isinstance(widget, BkFileInput) - file_input....
Fileinput widget always returns `None` for name of uploaded file As of panel 0.7.0 (with bokeh 1.4.0), the Fileinput widget does not set the name of the uploaded file. E.g. in the following code ```python import panel as pn inp = pn.widgets.FileInput(name='Upload') btn = pn.widgets.Button(name='Upload', button...
diff --git a/panel/widgets/input.py b/panel/widgets/input.py --- a/panel/widgets/input.py +++ b/panel/widgets/input.py @@ -72,7 +72,7 @@ def _filter_properties(self, properties): properties = super(FileInput, self)._filter_properties(properties) - return properties + ['value', 'mime_type'] + ...
{"golden_diff": "diff --git a/panel/widgets/input.py b/panel/widgets/input.py\n--- a/panel/widgets/input.py\n+++ b/panel/widgets/input.py\n@@ -72,7 +72,7 @@\n \n def _filter_properties(self, properties):\n properties = super(FileInput, self)._filter_properties(properties)\n- return properties + ['val...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Fileinput widget always returns `None` for name of uploaded file As of panel 0.7.0 (with bokeh 1.4.0), the Fileinput widget does not set the name of the uploaded file. E.g. in the following code ```python...
electricitymaps__electricitymaps-contrib-3796
[ { "content": "#!/usr/bin/env python3\n\nimport json\n\n# The arrow library is used to handle datetimes consistently with other parsers\nimport arrow\n\n# The request library is used to fetch content through HTTP\nimport requests\n\n\ntimezone = 'Canada/Atlantic'\n\n\ndef _find_pei_key(pei_list, sought_key):\n ...
[ { "content": "#!/usr/bin/env python3\n\nimport json\n\n# The arrow library is used to handle datetimes consistently with other parsers\nimport arrow\n\n# The request library is used to fetch content through HTTP\nimport requests\n\n\ntimezone = 'Canada/Atlantic'\n\n\ndef _find_pei_key(pei_list, sought_key):\n ...
diff --git a/parsers/CA_PE.py b/parsers/CA_PE.py index efc0a1c9e3..6a66e5f401 100644 --- a/parsers/CA_PE.py +++ b/parsers/CA_PE.py @@ -24,7 +24,7 @@ def _find_pei_key(pei_list, sought_key): def _get_pei_info(requests_obj): - url = 'https://wdf.princeedwardisland.ca/workflow' + url = 'https://wdf.princeedward...
CA-PE production parser down ## Description This is an automatic error report generated for Canada Prince Edward Island (CA-PE). Issues: - No recent data found for `production` parser ## Suggestions - Try running the parser locally using the command `poetry run test_parser CA-PE production` - <a href="https://storag...
diff --git a/parsers/CA_PE.py b/parsers/CA_PE.py --- a/parsers/CA_PE.py +++ b/parsers/CA_PE.py @@ -24,7 +24,7 @@ def _get_pei_info(requests_obj): - url = 'https://wdf.princeedwardisland.ca/workflow' + url = 'https://wdf.princeedwardisland.ca/api/workflow' request = {'featureName': 'WindEnergy', 'queryNa...
{"golden_diff": "diff --git a/parsers/CA_PE.py b/parsers/CA_PE.py\n--- a/parsers/CA_PE.py\n+++ b/parsers/CA_PE.py\n@@ -24,7 +24,7 @@\n \n \n def _get_pei_info(requests_obj):\n- url = 'https://wdf.princeedwardisland.ca/workflow'\n+ url = 'https://wdf.princeedwardisland.ca/api/workflow'\n request = {'featureNam...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- CA-PE production parser down ## Description This is an automatic error report generated for Canada Prince Edward Island (CA-PE). Issues: - No recent data found for `production` parser ## Suggestions - Try ...
openshift__openshift-ansible-8921
[ { "content": "'''\n---\nmodule: openshift_logging_facts\nversion_added: \"\"\nshort_description: Gather facts about the OpenShift logging stack\ndescription:\n - Determine the current facts about the OpenShift logging stack (e.g. cluster size)\noptions:\nauthor: Red Hat, Inc\n'''\n\nimport copy\nimport json\n\...
[ { "content": "'''\n---\nmodule: openshift_logging_facts\nversion_added: \"\"\nshort_description: Gather facts about the OpenShift logging stack\ndescription:\n - Determine the current facts about the OpenShift logging stack (e.g. cluster size)\noptions:\nauthor: Red Hat, Inc\n'''\n\nimport copy\nimport json\n\...
diff --git a/roles/openshift_logging/library/openshift_logging_facts.py b/roles/openshift_logging/library/openshift_logging_facts.py index b535c800cb2..b3c434602b4 100644 --- a/roles/openshift_logging/library/openshift_logging_facts.py +++ b/roles/openshift_logging/library/openshift_logging_facts.py @@ -76,6 +76,7 @@ d...
installation of Logging fails on "Gather OpenShift Logging Facts" #### Description On a developer setup, using Fedora 25 as the OS and executing `cd ${GOPATH}/src/github.com/openshift/origin/_output/local/bin/linux/amd64 && sudo ./openshift start` for an OpenShift cluster, the Ansible Playbook for Logging fails duri...
diff --git a/roles/openshift_logging/library/openshift_logging_facts.py b/roles/openshift_logging/library/openshift_logging_facts.py --- a/roles/openshift_logging/library/openshift_logging_facts.py +++ b/roles/openshift_logging/library/openshift_logging_facts.py @@ -76,6 +76,7 @@ try: process = Po...
{"golden_diff": "diff --git a/roles/openshift_logging/library/openshift_logging_facts.py b/roles/openshift_logging/library/openshift_logging_facts.py\n--- a/roles/openshift_logging/library/openshift_logging_facts.py\n+++ b/roles/openshift_logging/library/openshift_logging_facts.py\n@@ -76,6 +76,7 @@\n try:\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- installation of Logging fails on "Gather OpenShift Logging Facts" #### Description On a developer setup, using Fedora 25 as the OS and executing `cd ${GOPATH}/src/github.com/openshift/origin/_output/local/...