problem_id
stringlengths
18
21
source
stringclasses
1 value
task_type
stringclasses
1 value
in_source_id
stringlengths
13
54
prompt
stringlengths
1.28k
64.2k
golden_diff
stringlengths
166
811
verification_info
stringlengths
604
118k
gh_patches_debug_400
rasdani/github-patches
git_diff
ansible__ansible-modules-extras-1133
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- FirewallD Module Fails with backtrace when firewalld cannot be contacted **Issue Type:** Bug Report **Ansible Version**: ``` ansible 2.0.0 (devel 6b419db9fa) last updated 2015/10/21 13:15:31 (GMT +200) li...
diff --git a/system/firewalld.py b/system/firewalld.py --- a/system/firewalld.py +++ b/system/firewalld.py @@ -97,7 +97,10 @@ from firewall.client import FirewallClient fw = FirewallClient() - HAS_FIREWALLD = True + if not fw.connected: + HAS_FIREWALLD = False + else: + HAS_FIREWALLD ...
{"golden_diff": "diff --git a/system/firewalld.py b/system/firewalld.py\n--- a/system/firewalld.py\n+++ b/system/firewalld.py\n@@ -97,7 +97,10 @@\n \n from firewall.client import FirewallClient\n fw = FirewallClient()\n- HAS_FIREWALLD = True\n+ if not fw.connected:\n+ HAS_FIREWALLD = False\n+ el...
gh_patches_debug_401
rasdani/github-patches
git_diff
Cog-Creators__Red-DiscordBot-2780
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Docs] Code that is supposed to be equivalent isn't [docs for `Value.__call__`](https://red-discordbot.readthedocs.io/en/v3-develop/framework_config.html#redbot.core.config.Value.__call__) [Docs] Code that is...
diff --git a/redbot/core/config.py b/redbot/core/config.py --- a/redbot/core/config.py +++ b/redbot/core/config.py @@ -119,7 +119,7 @@ # Is equivalent to this group_obj = conf.guild(some_guild) - value_obj = conf.foo + value_obj = group_obj.foo foo = await ...
{"golden_diff": "diff --git a/redbot/core/config.py b/redbot/core/config.py\n--- a/redbot/core/config.py\n+++ b/redbot/core/config.py\n@@ -119,7 +119,7 @@\n # Is equivalent to this\n \n group_obj = conf.guild(some_guild)\n- value_obj = conf.foo\n+ value_obj = group_obj.foo\...
gh_patches_debug_402
rasdani/github-patches
git_diff
coreruleset__coreruleset-3500
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Google link/crawler blocked at PL2 ### Description Hello everyone, Here is another false positive found in our production. The `ARGS:gclid` contains a token in URL when someone visits a website by clicki...
diff --git a/util/find-rules-without-test/find-rules-without-test.py b/util/find-rules-without-test/find-rules-without-test.py --- a/util/find-rules-without-test/find-rules-without-test.py +++ b/util/find-rules-without-test/find-rules-without-test.py @@ -23,7 +23,7 @@ import msc_pyparser import argparse -EXCLUSION_...
{"golden_diff": "diff --git a/util/find-rules-without-test/find-rules-without-test.py b/util/find-rules-without-test/find-rules-without-test.py\n--- a/util/find-rules-without-test/find-rules-without-test.py\n+++ b/util/find-rules-without-test/find-rules-without-test.py\n@@ -23,7 +23,7 @@\n import msc_pyparser\n import ...
gh_patches_debug_403
rasdani/github-patches
git_diff
liqd__adhocracy4-723
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- add test for module property module_starting_time_left #720 --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path...
diff --git a/adhocracy4/modules/models.py b/adhocracy4/modules/models.py --- a/adhocracy4/modules/models.py +++ b/adhocracy4/modules/models.py @@ -285,7 +285,7 @@ def index_in_cluster(self): try: return self.module_cluster.index(self) - except IndexError: + except (IndexError, V...
{"golden_diff": "diff --git a/adhocracy4/modules/models.py b/adhocracy4/modules/models.py\n--- a/adhocracy4/modules/models.py\n+++ b/adhocracy4/modules/models.py\n@@ -285,7 +285,7 @@\n def index_in_cluster(self):\n try:\n return self.module_cluster.index(self)\n- except IndexError:\n+ ...
gh_patches_debug_404
rasdani/github-patches
git_diff
mindsdb__mindsdb-1620
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add option to list tables in MySQL integration :bookmark_tabs: When users create a connection to the MySQL database it will be useful to show them tips with a list of tables. To be able to do this we need a ...
diff --git a/mindsdb/integrations/mysql/mysql.py b/mindsdb/integrations/mysql/mysql.py --- a/mindsdb/integrations/mysql/mysql.py +++ b/mindsdb/integrations/mysql/mysql.py @@ -197,3 +197,10 @@ FROM ({query}) as query;""" result = self._query(q) return result[0]['count'] + + def get_...
{"golden_diff": "diff --git a/mindsdb/integrations/mysql/mysql.py b/mindsdb/integrations/mysql/mysql.py\n--- a/mindsdb/integrations/mysql/mysql.py\n+++ b/mindsdb/integrations/mysql/mysql.py\n@@ -197,3 +197,10 @@\n FROM ({query}) as query;\"\"\"\n result = self._query(q)\n return result[0]['c...
gh_patches_debug_405
rasdani/github-patches
git_diff
ansible__ansible-modules-extras-3368
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Jira modules failes with "dictionary update sequence element #0 has length 1; 2 is required" in Ansible 2.0.2.0 <!--- Verify first that your issue/request is not already reported in GitHub --> ##### ISSUE TYP...
diff --git a/web_infrastructure/jira.py b/web_infrastructure/jira.py --- a/web_infrastructure/jira.py +++ b/web_infrastructure/jira.py @@ -311,7 +311,7 @@ comment=dict(), status=dict(), assignee=dict(), - fields=dict(default={}) + fields=dict(default={}, type...
{"golden_diff": "diff --git a/web_infrastructure/jira.py b/web_infrastructure/jira.py\n--- a/web_infrastructure/jira.py\n+++ b/web_infrastructure/jira.py\n@@ -311,7 +311,7 @@\n comment=dict(),\n status=dict(),\n assignee=dict(),\n- fields=dict(default={})\n+ fie...
gh_patches_debug_406
rasdani/github-patches
git_diff
pyjanitor-devs__pyjanitor-574
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [INF] Allow `import_message()` to be Python distribution flexible # Brief Description <!-- Please provide a brief description of what you'd like to propose. --> Currently, if a user attempts to user a f...
diff --git a/janitor/spark/functions.py b/janitor/spark/functions.py --- a/janitor/spark/functions.py +++ b/janitor/spark/functions.py @@ -11,7 +11,7 @@ try: from pyspark.sql import DataFrame except ImportError: - import_message( + janitor_utils.import_message( submodule="spark", package=...
{"golden_diff": "diff --git a/janitor/spark/functions.py b/janitor/spark/functions.py\n--- a/janitor/spark/functions.py\n+++ b/janitor/spark/functions.py\n@@ -11,7 +11,7 @@\n try:\n from pyspark.sql import DataFrame\n except ImportError:\n- import_message(\n+ janitor_utils.import_message(\n submodule=...
gh_patches_debug_407
rasdani/github-patches
git_diff
weni-ai__bothub-engine-87
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Example retrieve need user authenticated AnonUser can't retireve example infos. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BE...
diff --git a/bothub/api/views.py b/bothub/api/views.py --- a/bothub/api/views.py +++ b/bothub/api/views.py @@ -453,7 +453,6 @@ queryset = RepositoryExample.objects serializer_class = RepositoryExampleSerializer permission_classes = [ - permissions.IsAuthenticated, RepositoryExamplePermiss...
{"golden_diff": "diff --git a/bothub/api/views.py b/bothub/api/views.py\n--- a/bothub/api/views.py\n+++ b/bothub/api/views.py\n@@ -453,7 +453,6 @@\n queryset = RepositoryExample.objects\n serializer_class = RepositoryExampleSerializer\n permission_classes = [\n- permissions.IsAuthenticated,\n ...
gh_patches_debug_408
rasdani/github-patches
git_diff
pyodide__pyodide-1306
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Use new Javascript GC apis to leak less memory @phorward has discussed here #693 the fact that we leak lots of memory. With `FinalizationRegistry` and `WeakRef` we can do better. We must still leak general Py...
diff --git a/conftest.py b/conftest.py --- a/conftest.py +++ b/conftest.py @@ -318,7 +318,7 @@ options = Options() options.add_argument("--headless") options.add_argument("--no-sandbox") - + options.add_argument("--js-flags=--expose-gc") return Chrome(options=options)
{"golden_diff": "diff --git a/conftest.py b/conftest.py\n--- a/conftest.py\n+++ b/conftest.py\n@@ -318,7 +318,7 @@\n options = Options()\n options.add_argument(\"--headless\")\n options.add_argument(\"--no-sandbox\")\n-\n+ options.add_argument(\"--js-flags=--expose-gc\")\n return ...
gh_patches_debug_409
rasdani/github-patches
git_diff
angr__angr-4105
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Duplicate member docs on subclasses ### Description e.g. the documentation on SimCC's members is also present on SimCCUsercall. This is a huge problem considering that the api docs page is already fucking gi...
diff --git a/docs/conf.py b/docs/conf.py --- a/docs/conf.py +++ b/docs/conf.py @@ -37,7 +37,6 @@ autodoc_default_options = { "members": True, "member-order": "bysource", - "inherited-members": True, "show-inheritance": True, "special-members": "__init__", "undoc-members": True,
{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -37,7 +37,6 @@\n autodoc_default_options = {\n \"members\": True,\n \"member-order\": \"bysource\",\n- \"inherited-members\": True,\n \"show-inheritance\": True,\n \"special-members\": \"__init__\",\...
gh_patches_debug_410
rasdani/github-patches
git_diff
conda__conda-4729
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- cannot import conda.fetch.cache_fn_url I'm using conda 4.3.2, and the function `conda.fetch.cache_fn_url` does not exist anymore. What to do? --- END ISSUE --- Below are some code segments, each from a rel...
diff --git a/conda/exports.py b/conda/exports.py --- a/conda/exports.py +++ b/conda/exports.py @@ -125,3 +125,6 @@ from .gateways.subprocess import ACTIVE_SUBPROCESSES, subprocess_call # NOQA ACTIVE_SUBPROCESSES, subprocess_call = ACTIVE_SUBPROCESSES, subprocess_call + +from .core.repodata import cache_fn_url # N...
{"golden_diff": "diff --git a/conda/exports.py b/conda/exports.py\n--- a/conda/exports.py\n+++ b/conda/exports.py\n@@ -125,3 +125,6 @@\n \n from .gateways.subprocess import ACTIVE_SUBPROCESSES, subprocess_call # NOQA\n ACTIVE_SUBPROCESSES, subprocess_call = ACTIVE_SUBPROCESSES, subprocess_call\n+\n+from .core.repodata...
gh_patches_debug_411
rasdani/github-patches
git_diff
conda__conda-6470
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- conda 4.4 rc2: failure in conda list when editable install has been moved `conda list` for my root environment is working nicely using conda 4.3, but when upgrading with canary to conda 4.4.0 rc2, the `conda ...
diff --git a/conda/egg_info.py b/conda/egg_info.py --- a/conda/egg_info.py +++ b/conda/egg_info.py @@ -75,7 +75,7 @@ """ installed_pkgs = linked_data(prefix) sp_dir = get_site_packages_dir(installed_pkgs) - if sp_dir is None: + if sp_dir is None or not isdir(join(prefix, sp_dir)): return s...
{"golden_diff": "diff --git a/conda/egg_info.py b/conda/egg_info.py\n--- a/conda/egg_info.py\n+++ b/conda/egg_info.py\n@@ -75,7 +75,7 @@\n \"\"\"\n installed_pkgs = linked_data(prefix)\n sp_dir = get_site_packages_dir(installed_pkgs)\n- if sp_dir is None:\n+ if sp_dir is None or not isdir(join(prefix,...
gh_patches_debug_412
rasdani/github-patches
git_diff
holoviz__panel-2759
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Sync location does not work with checkbox #### ALL software version info (this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc) ``` yaml panel 0.13.0a5.post8+g80a6...
diff --git a/panel/util.py b/panel/util.py --- a/panel/util.py +++ b/panel/util.py @@ -295,6 +295,8 @@ query[k] = float(v) elif v.startswith('[') or v.startswith('{'): query[k] = json.loads(v) + elif v.lower() in ("true", "false"): + query[k] = v.lower() == "true" ...
{"golden_diff": "diff --git a/panel/util.py b/panel/util.py\n--- a/panel/util.py\n+++ b/panel/util.py\n@@ -295,6 +295,8 @@\n query[k] = float(v)\n elif v.startswith('[') or v.startswith('{'):\n query[k] = json.loads(v)\n+ elif v.lower() in (\"true\", \"false\"):\n+ quer...
gh_patches_debug_413
rasdani/github-patches
git_diff
OpenMined__PySyft-4752
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Comparison between FPT and AST doesn't always works ## Description Some cases of handling comparison between FixedPrecision and AdditiveSharingTensor are supported, but some are not. We should systematize th...
diff --git a/syft/frameworks/torch/tensors/interpreters/additive_shared.py b/syft/frameworks/torch/tensors/interpreters/additive_shared.py --- a/syft/frameworks/torch/tensors/interpreters/additive_shared.py +++ b/syft/frameworks/torch/tensors/interpreters/additive_shared.py @@ -929,7 +929,7 @@ @crypto_protocol("...
{"golden_diff": "diff --git a/syft/frameworks/torch/tensors/interpreters/additive_shared.py b/syft/frameworks/torch/tensors/interpreters/additive_shared.py\n--- a/syft/frameworks/torch/tensors/interpreters/additive_shared.py\n+++ b/syft/frameworks/torch/tensors/interpreters/additive_shared.py\n@@ -929,7 +929,7 @@\n \n ...
gh_patches_debug_414
rasdani/github-patches
git_diff
opendatacube__datacube-core-603
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Dataset path incorrect for mapped network drive (Windows) ### Expected behaviour Being able to load data with `dc.load('product_name')`. ### Actual behaviour Rasterio cannot find the file, as it is o...
diff --git a/datacube/utils/__init__.py b/datacube/utils/__init__.py --- a/datacube/utils/__init__.py +++ b/datacube/utils/__init__.py @@ -658,6 +658,12 @@ path = url2pathname(components.path) + if components.netloc: + if os.name == 'nt': + path = '//{}{}'.format(components.netloc, path) +...
{"golden_diff": "diff --git a/datacube/utils/__init__.py b/datacube/utils/__init__.py\n--- a/datacube/utils/__init__.py\n+++ b/datacube/utils/__init__.py\n@@ -658,6 +658,12 @@\n \n path = url2pathname(components.path)\n \n+ if components.netloc:\n+ if os.name == 'nt':\n+ path = '//{}{}'.format(...
gh_patches_debug_415
rasdani/github-patches
git_diff
buildbot__buildbot-808
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Replace xrange() with range() for Python 3 compatibility xrange() is gone in Python 3. In Python 3, range() returns a view, not a list, so in a few places where we really need a list, we need to wrap it with ...
diff --git a/master/buildbot/process/buildstep.py b/master/buildbot/process/buildstep.py --- a/master/buildbot/process/buildstep.py +++ b/master/buildbot/process/buildstep.py @@ -785,6 +785,7 @@ self.step_status.addURL(name, url) def runCommand(self, c): + self.cmd = c c.buildslave = sel...
{"golden_diff": "diff --git a/master/buildbot/process/buildstep.py b/master/buildbot/process/buildstep.py\n--- a/master/buildbot/process/buildstep.py\n+++ b/master/buildbot/process/buildstep.py\n@@ -785,6 +785,7 @@\n self.step_status.addURL(name, url)\n \n def runCommand(self, c):\n+ self.cmd = c\n ...
gh_patches_debug_416
rasdani/github-patches
git_diff
nltk__nltk-2998
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- CHILDES Corpus Reader doesn't parse data correctly ### Steps to reproduce 1. Download and unpack the CHILDES dataset 2. Follow the instructions at [Sample usage of childes](https://www.nltk.org/howto/childe...
diff --git a/nltk/corpus/reader/childes.py b/nltk/corpus/reader/childes.py --- a/nltk/corpus/reader/childes.py +++ b/nltk/corpus/reader/childes.py @@ -20,7 +20,7 @@ from nltk.util import LazyConcatenation, LazyMap, flatten # to resolve the namespace issue -NS = "https://www.talkbank.org/ns/talkbank" +NS = "http://w...
{"golden_diff": "diff --git a/nltk/corpus/reader/childes.py b/nltk/corpus/reader/childes.py\n--- a/nltk/corpus/reader/childes.py\n+++ b/nltk/corpus/reader/childes.py\n@@ -20,7 +20,7 @@\n from nltk.util import LazyConcatenation, LazyMap, flatten\n \n # to resolve the namespace issue\n-NS = \"https://www.talkbank.org/ns/...
gh_patches_debug_417
rasdani/github-patches
git_diff
pytorch__ignite-484
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Metrics] add indexing synthetic sugar Idea is to improve the current implementation of `Metric` and to be able to do the following: ``` # A custom class ConfusionMatrix cm = ConfusionMatrix(num_classes=3,...
diff --git a/ignite/metrics/metric.py b/ignite/metrics/metric.py --- a/ignite/metrics/metric.py +++ b/ignite/metrics/metric.py @@ -142,3 +142,7 @@ def wrapper(*args, **kwargs): return MetricsLambda(fn, self, *args, **kwargs) return wrapper + + def __getitem__(self, index): + fro...
{"golden_diff": "diff --git a/ignite/metrics/metric.py b/ignite/metrics/metric.py\n--- a/ignite/metrics/metric.py\n+++ b/ignite/metrics/metric.py\n@@ -142,3 +142,7 @@\n def wrapper(*args, **kwargs):\n return MetricsLambda(fn, self, *args, **kwargs)\n return wrapper\n+\n+ def __getitem__(s...
gh_patches_debug_418
rasdani/github-patches
git_diff
huggingface__transformers-12963
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `Trainer.evaluate()` crashes when using only tensorboardX ## Environment info - `transformers` version: 4.9.1 - Platform: Linux-3.10.0-1160.31.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core - Python versi...
diff --git a/src/transformers/integrations.py b/src/transformers/integrations.py --- a/src/transformers/integrations.py +++ b/src/transformers/integrations.py @@ -401,6 +401,7 @@ def on_train_end(self, args, state, control, **kwargs): if self.tb_writer: self.tb_writer.close() + sel...
{"golden_diff": "diff --git a/src/transformers/integrations.py b/src/transformers/integrations.py\n--- a/src/transformers/integrations.py\n+++ b/src/transformers/integrations.py\n@@ -401,6 +401,7 @@\n def on_train_end(self, args, state, control, **kwargs):\n if self.tb_writer:\n self.tb_writer.c...
gh_patches_debug_419
rasdani/github-patches
git_diff
django-cms__django-cms-2208
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Fixture loading in Postgres Get the following error when loading json fixtures with Postgres and django 1.3.1 IntegrityError: duplicate key value violates unique constraint "cms_placeholder_pkey" Forked rep...
diff --git a/cms/signals.py b/cms/signals.py --- a/cms/signals.py +++ b/cms/signals.py @@ -229,7 +229,8 @@ def update_placeholders(instance, **kwargs): - instance.rescan_placeholders() + if not kwargs.get('raw'): + instance.rescan_placeholders() def invalidate_menu_cache(instance, **kwargs): m...
{"golden_diff": "diff --git a/cms/signals.py b/cms/signals.py\n--- a/cms/signals.py\n+++ b/cms/signals.py\n@@ -229,7 +229,8 @@\n \n \n def update_placeholders(instance, **kwargs):\n- instance.rescan_placeholders()\n+ if not kwargs.get('raw'):\n+ instance.rescan_placeholders()\n \n def invalidate_menu_cache...
gh_patches_debug_420
rasdani/github-patches
git_diff
fossasia__open-event-server-5202
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Charging user with stripe token throws internal server error when sending email to attendees **Describe the bug** Charging user with stripe token sends 500 (Internal Server Error). **Expected behavior** ...
diff --git a/app/api/helpers/ticketing.py b/app/api/helpers/ticketing.py --- a/app/api/helpers/ticketing.py +++ b/app/api/helpers/ticketing.py @@ -1,6 +1,6 @@ from datetime import datetime -from flask_login import current_user +from flask_jwt import current_identity as current_user from app.api.helpers.db import ...
{"golden_diff": "diff --git a/app/api/helpers/ticketing.py b/app/api/helpers/ticketing.py\n--- a/app/api/helpers/ticketing.py\n+++ b/app/api/helpers/ticketing.py\n@@ -1,6 +1,6 @@\n from datetime import datetime\n \n-from flask_login import current_user\n+from flask_jwt import current_identity as current_user\n \n from ...
gh_patches_debug_421
rasdani/github-patches
git_diff
bokeh__bokeh-8634
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Stocks Example is not working properly https://github.com/bokeh/bokeh/tree/master/examples/app/stocks The example suppose to change the stats according to the selected points. For some reason ...
diff --git a/examples/app/stocks/main.py b/examples/app/stocks/main.py --- a/examples/app/stocks/main.py +++ b/examples/app/stocks/main.py @@ -130,7 +130,7 @@ data = data.iloc[selected, :] update_stats(data, t1, t2) -source.on_change('selected', selection_change) +source.selected.on_change('indices', se...
{"golden_diff": "diff --git a/examples/app/stocks/main.py b/examples/app/stocks/main.py\n--- a/examples/app/stocks/main.py\n+++ b/examples/app/stocks/main.py\n@@ -130,7 +130,7 @@\n data = data.iloc[selected, :]\n update_stats(data, t1, t2)\n \n-source.on_change('selected', selection_change)\n+source.selecte...
gh_patches_debug_422
rasdani/github-patches
git_diff
openai__gym-2683
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- py.typed not bundled in release The latest pypi package [gym==0.23.0](https://pypi.org/project/gym/0.23.0/) does not include `py.typed`, resulting in failed `mypy` checks. Reproduce by `pip install gym` an...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -58,6 +58,7 @@ "envs/classic_control/assets/*.png", "envs/toy_text/font/*.ttf", "envs/toy_text/img/*.png", + "py.typed", ] }, tests_require=["pytest", "mock"],
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -58,6 +58,7 @@\n \"envs/classic_control/assets/*.png\",\n \"envs/toy_text/font/*.ttf\",\n \"envs/toy_text/img/*.png\",\n+ \"py.typed\",\n ]\n },\n tests_require=[\"pytest\...
gh_patches_debug_423
rasdani/github-patches
git_diff
pypi__warehouse-11897
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pass the project name to the basic-auth-with-2fa email. Closes #11859 --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES...
diff --git a/warehouse/email/__init__.py b/warehouse/email/__init__.py --- a/warehouse/email/__init__.py +++ b/warehouse/email/__init__.py @@ -305,7 +305,7 @@ repeat_window=datetime.timedelta(days=1), ) def send_basic_auth_with_two_factor_email(request, user, *, project_name): - return {} + return {"projec...
{"golden_diff": "diff --git a/warehouse/email/__init__.py b/warehouse/email/__init__.py\n--- a/warehouse/email/__init__.py\n+++ b/warehouse/email/__init__.py\n@@ -305,7 +305,7 @@\n repeat_window=datetime.timedelta(days=1),\n )\n def send_basic_auth_with_two_factor_email(request, user, *, project_name):\n- return...
gh_patches_debug_424
rasdani/github-patches
git_diff
translate__pootle-4187
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Change icons for v-folders To better distinguish virtual folders (or "goals") from regular folders, let's use the following icon: ![icon](https://cloud.githubusercontent.com/assets/1728158/11135103/d40161b6-...
diff --git a/pootle/core/browser.py b/pootle/core/browser.py --- a/pootle/core/browser.py +++ b/pootle/core/browser.py @@ -199,7 +199,7 @@ 'code': vfolder_treeitem.code, 'priority': vfolder_treeitem.vfolder.priority, 'is_grayed': not vfolder_treeitem.is_visible, - 'icon': 'folder', + ...
{"golden_diff": "diff --git a/pootle/core/browser.py b/pootle/core/browser.py\n--- a/pootle/core/browser.py\n+++ b/pootle/core/browser.py\n@@ -199,7 +199,7 @@\n 'code': vfolder_treeitem.code,\n 'priority': vfolder_treeitem.vfolder.priority,\n 'is_grayed': not vfolder_treeitem.is_visible,\n- ...
gh_patches_debug_425
rasdani/github-patches
git_diff
fossasia__open-event-server-3946
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Make all query params accept the dasherized version of the attribute names. Currently the query params, such as - [x] sort - [ ] include - [ ] filter - [ ] sparse fieldsets require the attribute names...
diff --git a/config.py b/config.py --- a/config.py +++ b/config.py @@ -56,6 +56,7 @@ DATABASE_QUERY_TIMEOUT = 0.1 SOFT_DELETE = True PROPOGATE_ERROR = False + DASHERIZE_API = True if not SQLALCHEMY_DATABASE_URI: print('`DATABASE_URL` either not exported or empty')
{"golden_diff": "diff --git a/config.py b/config.py\n--- a/config.py\n+++ b/config.py\n@@ -56,6 +56,7 @@\n DATABASE_QUERY_TIMEOUT = 0.1\n SOFT_DELETE = True\n PROPOGATE_ERROR = False\n+ DASHERIZE_API = True\n \n if not SQLALCHEMY_DATABASE_URI:\n print('`DATABASE_URL` either not exported or em...
gh_patches_debug_426
rasdani/github-patches
git_diff
quantumlib__Cirq-5458
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Automerge bot can't handle empty PR description **Description of the issue** If the description of the PR is empty, automerge.py throws this exception: ``` Traceback (most recent call last): File "/...
diff --git a/dev_tools/pr_monitor.py b/dev_tools/pr_monitor.py --- a/dev_tools/pr_monitor.py +++ b/dev_tools/pr_monitor.py @@ -772,7 +772,7 @@ ) data = { 'commit_title': f'{pr.title} (#{pr.pull_id})', - 'commit_message': pr.body, + 'commit_message': pr.body or '', 'sha': pr.bra...
{"golden_diff": "diff --git a/dev_tools/pr_monitor.py b/dev_tools/pr_monitor.py\n--- a/dev_tools/pr_monitor.py\n+++ b/dev_tools/pr_monitor.py\n@@ -772,7 +772,7 @@\n )\n data = {\n 'commit_title': f'{pr.title} (#{pr.pull_id})',\n- 'commit_message': pr.body,\n+ 'commit_message': pr.body or '...
gh_patches_debug_427
rasdani/github-patches
git_diff
WordPress__openverse-api-800
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Make `ALLOWED_HOSTS` configurable via environment ## Problem <!-- Describe a problem solved by this feature; or delete the section entirely. --> Certain environments should be able to have more relaxed or e...
diff --git a/api/catalog/settings.py b/api/catalog/settings.py --- a/api/catalog/settings.py +++ b/api/catalog/settings.py @@ -44,9 +44,7 @@ ENVIRONMENT = config("ENVIRONMENT", default="local") -ALLOWED_HOSTS = [ - "api-dev.openverse.engineering", - "api.openverse.engineering", +ALLOWED_HOSTS = config("ALLOW...
{"golden_diff": "diff --git a/api/catalog/settings.py b/api/catalog/settings.py\n--- a/api/catalog/settings.py\n+++ b/api/catalog/settings.py\n@@ -44,9 +44,7 @@\n \n ENVIRONMENT = config(\"ENVIRONMENT\", default=\"local\")\n \n-ALLOWED_HOSTS = [\n- \"api-dev.openverse.engineering\",\n- \"api.openverse.engineering...
gh_patches_debug_428
rasdani/github-patches
git_diff
fedora-infra__bodhi-268
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- requests not shown on updates page The https://bodhi.fedoraproject.org/updates/?user=xxx page show all updates and their status, but not the requests (e.g. "submitted to stable") made for an update. --- END...
diff --git a/bodhi/services/updates.py b/bodhi/services/updates.py --- a/bodhi/services/updates.py +++ b/bodhi/services/updates.py @@ -262,7 +262,8 @@ rows_per_page=rows_per_page, total=total, chrome=data.get('chrome'), - display_user=data.get('display_user'), + display_user=dat...
{"golden_diff": "diff --git a/bodhi/services/updates.py b/bodhi/services/updates.py\n--- a/bodhi/services/updates.py\n+++ b/bodhi/services/updates.py\n@@ -262,7 +262,8 @@\n rows_per_page=rows_per_page,\n total=total,\n chrome=data.get('chrome'),\n- display_user=data.get('display_user'),\n...
gh_patches_debug_429
rasdani/github-patches
git_diff
fossasia__open-event-server-4398
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Attendee : user/<id>/attendee gives Error 400 **I'm submitting a ...** (check one with "x") - [x] bug report - [ ] feature request - [ ] support request => Please do not submit support requests here, inst...
diff --git a/app/api/attendees.py b/app/api/attendees.py --- a/app/api/attendees.py +++ b/app/api/attendees.py @@ -36,10 +36,6 @@ """ List Attendees """ - def before_get(self, args, kwargs): - if kwargs.get('user_id'): - self.schema = AttendeeSchemaPublic - def query(self, view_...
{"golden_diff": "diff --git a/app/api/attendees.py b/app/api/attendees.py\n--- a/app/api/attendees.py\n+++ b/app/api/attendees.py\n@@ -36,10 +36,6 @@\n \"\"\"\n List Attendees\n \"\"\"\n- def before_get(self, args, kwargs):\n- if kwargs.get('user_id'):\n- self.schema = AttendeeSchemaPub...
gh_patches_debug_430
rasdani/github-patches
git_diff
great-expectations__great_expectations-3803
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Use cleaner solution for non-truncating division in python 2 Prefer `from __future__ import division` to `1.*x/y` --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of th...
diff --git a/great_expectations/core/usage_statistics/anonymizers/anonymizer.py b/great_expectations/core/usage_statistics/anonymizers/anonymizer.py --- a/great_expectations/core/usage_statistics/anonymizers/anonymizer.py +++ b/great_expectations/core/usage_statistics/anonymizers/anonymizer.py @@ -35,6 +35,7 @@ "{str(...
{"golden_diff": "diff --git a/great_expectations/core/usage_statistics/anonymizers/anonymizer.py b/great_expectations/core/usage_statistics/anonymizers/anonymizer.py\n--- a/great_expectations/core/usage_statistics/anonymizers/anonymizer.py\n+++ b/great_expectations/core/usage_statistics/anonymizers/anonymizer.py\n@@ -3...
gh_patches_debug_431
rasdani/github-patches
git_diff
Kinto__kinto-1184
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Swagger spec still invalid The Swagger spec is still invalid it seems Extract: ```json /{prefix}/{api_ver:\\d+}/{application_guid}/{application_ver}/{metrics:.*}": { "parameters": [ { ...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ 'bcrypt', 'colander >= 1.3.2', 'cornice >= 2.4', - 'cornice_swagger >= 0.5', + 'cornice_swagger >= 0.5.1', 'jsonschema', 'jsonpatch', 'logging-color-formatter >= 1.0.1', # Message interpolations.
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -20,7 +20,7 @@\n 'bcrypt',\n 'colander >= 1.3.2',\n 'cornice >= 2.4',\n- 'cornice_swagger >= 0.5',\n+ 'cornice_swagger >= 0.5.1',\n 'jsonschema',\n 'jsonpatch',\n 'logging-color-formatter >= 1.0.1', # Me...
gh_patches_debug_432
rasdani/github-patches
git_diff
ansible__awx-7270
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Tower settings fails with stacktrace - expected to exit gracefully ##### ISSUE TYPE - Bug Report ##### SUMMARY Running awx.awx.settings module throws `AttributeError: 'NoneType' object has no attribute ...
diff --git a/awx_collection/plugins/modules/tower_settings.py b/awx_collection/plugins/modules/tower_settings.py --- a/awx_collection/plugins/modules/tower_settings.py +++ b/awx_collection/plugins/modules/tower_settings.py @@ -82,6 +82,10 @@ def coerce_type(module, value): + # If our value is already None we ca...
{"golden_diff": "diff --git a/awx_collection/plugins/modules/tower_settings.py b/awx_collection/plugins/modules/tower_settings.py\n--- a/awx_collection/plugins/modules/tower_settings.py\n+++ b/awx_collection/plugins/modules/tower_settings.py\n@@ -82,6 +82,10 @@\n \n \n def coerce_type(module, value):\n+ # If our val...
gh_patches_debug_433
rasdani/github-patches
git_diff
nltk__nltk-400
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Can't train a TnT tagger in Python 3 If you do: ``` python from nltk.tag import tnt tnt.demo() ``` ... then it fails during training with an error like this, at least in Python 3: ``` Traceback (most recen...
diff --git a/nltk/tag/tnt.py b/nltk/tag/tnt.py --- a/nltk/tag/tnt.py +++ b/nltk/tag/tnt.py @@ -140,7 +140,7 @@ self._unk.train(data) for sent in data: - history = ['BOS', 'BOS'] + history = [('BOS',False), ('BOS',False)] for w, t in sent: # i...
{"golden_diff": "diff --git a/nltk/tag/tnt.py b/nltk/tag/tnt.py\n--- a/nltk/tag/tnt.py\n+++ b/nltk/tag/tnt.py\n@@ -140,7 +140,7 @@\n self._unk.train(data)\n \n for sent in data:\n- history = ['BOS', 'BOS']\n+ history = [('BOS',False), ('BOS',False)]\n for w, t in se...
gh_patches_debug_434
rasdani/github-patches
git_diff
StackStorm__st2-5306
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add a CI lint task to check st2client's README.md We need to make sure that the st2client `README.rst` file is acceptable to PyPI, since any syntax errors in it will cause the `push_st2client` task of the `st...
diff --git a/st2client/setup.py b/st2client/setup.py --- a/st2client/setup.py +++ b/st2client/setup.py @@ -45,6 +45,7 @@ "automation platform." ), long_description=readme, + long_description_content_type="text/x-rst", author="StackStorm", author_email="info@stackstorm.com", url="htt...
{"golden_diff": "diff --git a/st2client/setup.py b/st2client/setup.py\n--- a/st2client/setup.py\n+++ b/st2client/setup.py\n@@ -45,6 +45,7 @@\n \"automation platform.\"\n ),\n long_description=readme,\n+ long_description_content_type=\"text/x-rst\",\n author=\"StackStorm\",\n author_email=\"in...
gh_patches_debug_435
rasdani/github-patches
git_diff
pyca__cryptography-8319
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Incorrect docstrings in x25519 and x448 `.public_key()` methods See: https://github.com/pyca/cryptography/blob/127a2860740c77f45362e68e0ed7d2d108a39033/src/cryptography/hazmat/primitives/asymmetric/x25519....
diff --git a/src/cryptography/hazmat/primitives/asymmetric/x448.py b/src/cryptography/hazmat/primitives/asymmetric/x448.py --- a/src/cryptography/hazmat/primitives/asymmetric/x448.py +++ b/src/cryptography/hazmat/primitives/asymmetric/x448.py @@ -60,7 +60,7 @@ @abc.abstractmethod def public_key(self) -> X448P...
{"golden_diff": "diff --git a/src/cryptography/hazmat/primitives/asymmetric/x448.py b/src/cryptography/hazmat/primitives/asymmetric/x448.py\n--- a/src/cryptography/hazmat/primitives/asymmetric/x448.py\n+++ b/src/cryptography/hazmat/primitives/asymmetric/x448.py\n@@ -60,7 +60,7 @@\n @abc.abstractmethod\n def pub...
gh_patches_debug_436
rasdani/github-patches
git_diff
googleapis__google-cloud-python-8227
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Logging: issues with out-of-sync clocks I have a couple of related issues with timestamps for Stackdriver logging. I want to log data from devices that might have unreliable clocks but the `receiveTimestamp` ...
diff --git a/logging/google/cloud/logging/handlers/transports/background_thread.py b/logging/google/cloud/logging/handlers/transports/background_thread.py --- a/logging/google/cloud/logging/handlers/transports/background_thread.py +++ b/logging/google/cloud/logging/handlers/transports/background_thread.py @@ -267,6 +26...
{"golden_diff": "diff --git a/logging/google/cloud/logging/handlers/transports/background_thread.py b/logging/google/cloud/logging/handlers/transports/background_thread.py\n--- a/logging/google/cloud/logging/handlers/transports/background_thread.py\n+++ b/logging/google/cloud/logging/handlers/transports/background_thre...
gh_patches_debug_437
rasdani/github-patches
git_diff
InstaPy__InstaPy-5052
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Save login info causes: Unable to login to Instagram! You will find more information in the logs above. Hi, i was trying to setup Instapy on DigitalOcean in headless mode but it always stopped with the inf...
diff --git a/instapy/login_util.py b/instapy/login_util.py --- a/instapy/login_util.py +++ b/instapy/login_util.py @@ -466,6 +466,9 @@ except NoSuchElementException: pass + if "instagram.com/accounts/onetap" in browser.current_url: + browser.get("https://instagram.com") + # wait until pag...
{"golden_diff": "diff --git a/instapy/login_util.py b/instapy/login_util.py\n--- a/instapy/login_util.py\n+++ b/instapy/login_util.py\n@@ -466,6 +466,9 @@\n except NoSuchElementException:\n pass\n \n+ if \"instagram.com/accounts/onetap\" in browser.current_url:\n+ browser.get(\"https://instagram.c...
gh_patches_debug_438
rasdani/github-patches
git_diff
netbox-community__netbox-14612
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Attaching a cloneable multi selection custom field with custom field choices breaks the Clone function ### NetBox version v3.6.3 ### Python version 3.9 ### Steps to Reproduce 1. Create a custom field cho...
diff --git a/netbox/utilities/forms/fields/dynamic.py b/netbox/utilities/forms/fields/dynamic.py --- a/netbox/utilities/forms/fields/dynamic.py +++ b/netbox/utilities/forms/fields/dynamic.py @@ -43,7 +43,7 @@ if data is not None: self.choices = [ - choice for choice in self.choice...
{"golden_diff": "diff --git a/netbox/utilities/forms/fields/dynamic.py b/netbox/utilities/forms/fields/dynamic.py\n--- a/netbox/utilities/forms/fields/dynamic.py\n+++ b/netbox/utilities/forms/fields/dynamic.py\n@@ -43,7 +43,7 @@\n \n if data is not None:\n self.choices = [\n- choice f...
gh_patches_debug_439
rasdani/github-patches
git_diff
elastic__apm-agent-python-1952
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- FastApi / Starlette setup without client argument not working **Describe the bug**: The `ElasticAPM` middleware for Starlette appears to be missing a default value for the `client` parameter, resulting in...
diff --git a/elasticapm/contrib/starlette/__init__.py b/elasticapm/contrib/starlette/__init__.py --- a/elasticapm/contrib/starlette/__init__.py +++ b/elasticapm/contrib/starlette/__init__.py @@ -105,7 +105,7 @@ >>> elasticapm.capture_message('hello, world!') """ - def __init__(self, app: ASGIApp, client:...
{"golden_diff": "diff --git a/elasticapm/contrib/starlette/__init__.py b/elasticapm/contrib/starlette/__init__.py\n--- a/elasticapm/contrib/starlette/__init__.py\n+++ b/elasticapm/contrib/starlette/__init__.py\n@@ -105,7 +105,7 @@\n >>> elasticapm.capture_message('hello, world!')\n \"\"\"\n \n- def __init__(...
gh_patches_debug_440
rasdani/github-patches
git_diff
django-extensions__django-extensions-1446
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- manage.py command reset_db doesn't work with mysql.connector.django It says that there is an unknown engine when trying to reset the database. I recommend adding ``` 'mysql.connector.django', ``` to l...
diff --git a/django_extensions/settings.py b/django_extensions/settings.py --- a/django_extensions/settings.py +++ b/django_extensions/settings.py @@ -13,6 +13,7 @@ DEFAULT_MYSQL_ENGINES = ( 'django.db.backends.mysql', 'django.contrib.gis.db.backends.mysql', + 'mysql.connector.django', ) DEFAULT_POSTGRE...
{"golden_diff": "diff --git a/django_extensions/settings.py b/django_extensions/settings.py\n--- a/django_extensions/settings.py\n+++ b/django_extensions/settings.py\n@@ -13,6 +13,7 @@\n DEFAULT_MYSQL_ENGINES = (\n 'django.db.backends.mysql',\n 'django.contrib.gis.db.backends.mysql',\n+ 'mysql.connector.djan...
gh_patches_debug_441
rasdani/github-patches
git_diff
mdn__kuma-7119
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- T - Remove all non essential URLs from robots.txt **Summary** In the past we have added pages we didn't want to be indexed to robots.txt, but that means that Google can't crawl them to see that we don't want...
diff --git a/kuma/landing/views.py b/kuma/landing/views.py --- a/kuma/landing/views.py +++ b/kuma/landing/views.py @@ -69,7 +69,6 @@ Disallow: /*/files/ Disallow: /media Disallow: /*profiles*/edit -Disallow: /*users/ """ + "\n".join( "Disallow: /{locale}/search".format(locale=locale) for locale in setting...
{"golden_diff": "diff --git a/kuma/landing/views.py b/kuma/landing/views.py\n--- a/kuma/landing/views.py\n+++ b/kuma/landing/views.py\n@@ -69,7 +69,6 @@\n Disallow: /*/files/\n Disallow: /media\n Disallow: /*profiles*/edit\n-Disallow: /*users/\n \"\"\" + \"\\n\".join(\n \"Disallow: /{locale}/search\".format(locale=...
gh_patches_debug_442
rasdani/github-patches
git_diff
Pyomo__pyomo-973
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- pyomo.dae error, ncp=1, second-order, numpy It popped up while trying to generate the second-order lagrange-radau discretization equations using a single collocation point: ```bash ERROR: Constructing com...
diff --git a/pyomo/dae/plugins/colloc.py b/pyomo/dae/plugins/colloc.py --- a/pyomo/dae/plugins/colloc.py +++ b/pyomo/dae/plugins/colloc.py @@ -213,7 +213,7 @@ pder = numpy.polyder(p, order) arow = [] for j in range(len(cp)): - arow.append(numpy.polyval(pder, cp[j])) + ar...
{"golden_diff": "diff --git a/pyomo/dae/plugins/colloc.py b/pyomo/dae/plugins/colloc.py\n--- a/pyomo/dae/plugins/colloc.py\n+++ b/pyomo/dae/plugins/colloc.py\n@@ -213,7 +213,7 @@\n pder = numpy.polyder(p, order)\n arow = []\n for j in range(len(cp)):\n- arow.append(numpy.polyval(pder,...
gh_patches_debug_443
rasdani/github-patches
git_diff
wagtail__wagtail-1873
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Migrating to 1.1 Migration File Errors I am attempting to migrate to 1.1 and I am getting an error involving the migration files. ``` Migration wagtailcore.0017_change_edit_page_permission_description depend...
diff --git a/wagtail/wagtailcore/migrations/0017_change_edit_page_permission_description.py b/wagtail/wagtailcore/migrations/0017_change_edit_page_permission_description.py --- a/wagtail/wagtailcore/migrations/0017_change_edit_page_permission_description.py +++ b/wagtail/wagtailcore/migrations/0017_change_edit_page_per...
{"golden_diff": "diff --git a/wagtail/wagtailcore/migrations/0017_change_edit_page_permission_description.py b/wagtail/wagtailcore/migrations/0017_change_edit_page_permission_description.py\n--- a/wagtail/wagtailcore/migrations/0017_change_edit_page_permission_description.py\n+++ b/wagtail/wagtailcore/migrations/0017_c...
gh_patches_debug_444
rasdani/github-patches
git_diff
sublimelsp__LSP-2401
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `KeyError` in LSP plugin when trying to open Preferences My ST4 setup: version: 4169 osx arm64 channel: stable LSP v1.27.0 I see this trace in the console whenever I try to open Settings/Preferences (it...
diff --git a/plugin/core/windows.py b/plugin/core/windows.py --- a/plugin/core/windows.py +++ b/plugin/core/windows.py @@ -545,7 +545,7 @@ def discard(self, window: sublime.Window) -> None: wm = self._windows.pop(window.id(), None) if wm: - wm.destroy() + sublime.set_timeout...
{"golden_diff": "diff --git a/plugin/core/windows.py b/plugin/core/windows.py\n--- a/plugin/core/windows.py\n+++ b/plugin/core/windows.py\n@@ -545,7 +545,7 @@\n def discard(self, window: sublime.Window) -> None:\n wm = self._windows.pop(window.id(), None)\n if wm:\n- wm.destroy()\n+ ...
gh_patches_debug_445
rasdani/github-patches
git_diff
fidals__shopelectro-995
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Resolve stuck tests CI fails because of stuck tests. They are working at the local and relevant code looks like they should pass https://ci.fidals.com/fidals/shopelectro/1727/9 --- END ISSUE --- Below are ...
diff --git a/shopelectro/settings/drone.py b/shopelectro/settings/drone.py --- a/shopelectro/settings/drone.py +++ b/shopelectro/settings/drone.py @@ -5,6 +5,15 @@ DEBUG = True +# Header categories menu uses cache in templates. +# Disable cache to avoid stale menu testing. +# See #991 for details. +CACHES = { + ...
{"golden_diff": "diff --git a/shopelectro/settings/drone.py b/shopelectro/settings/drone.py\n--- a/shopelectro/settings/drone.py\n+++ b/shopelectro/settings/drone.py\n@@ -5,6 +5,15 @@\n \n DEBUG = True\n \n+# Header categories menu uses cache in templates.\n+# Disable cache to avoid stale menu testing.\n+# See #991 for...
gh_patches_debug_446
rasdani/github-patches
git_diff
ansible__ansible-modules-core-4646
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- replace.py is failing with an UnboundLocalError ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME replace ##### ANSIBLE VERSION ``` ansible 2.2.0 (devel d99c58ee55) last updated 2016/09/01 10:10:05 (GMT -7...
diff --git a/files/replace.py b/files/replace.py --- a/files/replace.py +++ b/files/replace.py @@ -131,6 +131,7 @@ params = module.params dest = os.path.expanduser(params['dest']) + diff = dict() if os.path.isdir(dest): module.fail_json(rc=256, msg='Destination %s is a directory !' % dest...
{"golden_diff": "diff --git a/files/replace.py b/files/replace.py\n--- a/files/replace.py\n+++ b/files/replace.py\n@@ -131,6 +131,7 @@\n \n params = module.params\n dest = os.path.expanduser(params['dest'])\n+ diff = dict()\n \n if os.path.isdir(dest):\n module.fail_json(rc=256, msg='Destination ...
gh_patches_debug_447
rasdani/github-patches
git_diff
buildbot__buildbot-3814
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Two mail.MailNotifier instances with the same auto-generated name Thank you guys, BuildBot is great! I have found something like a bug. I have **two** mail.MailNotifiers in my master.cfg with only **two d...
diff --git a/master/buildbot/config.py b/master/buildbot/config.py --- a/master/buildbot/config.py +++ b/master/buildbot/config.py @@ -848,6 +848,10 @@ continue + if _service.name in self.services: + error('Duplicate service name %r' % _service.name) + conti...
{"golden_diff": "diff --git a/master/buildbot/config.py b/master/buildbot/config.py\n--- a/master/buildbot/config.py\n+++ b/master/buildbot/config.py\n@@ -848,6 +848,10 @@\n \n continue\n \n+ if _service.name in self.services:\n+ error('Duplicate service name %r' % _service.nam...
gh_patches_debug_448
rasdani/github-patches
git_diff
scoutapp__scout_apm_python-489
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Installation seems to be broken on python3.6.4 <img width="1125" alt="Screen Shot 2020-02-26 at 12 31 00 PM" src="https://user-images.githubusercontent.com/17484350/75380353-e2224900-58a4-11ea-96b3-2629b94c71...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -23,7 +23,9 @@ if compile_extensions: ext_modules = [ Extension( - str("scout_apm.core._objtrace"), [str("src/scout_apm/core/_objtrace.c")] + name=str("scout_apm.core._objtrace"), + sources=[str("src/scout_...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -23,7 +23,9 @@\n if compile_extensions:\n ext_modules = [\n Extension(\n- str(\"scout_apm.core._objtrace\"), [str(\"src/scout_apm/core/_objtrace.c\")]\n+ name=str(\"scout_apm.core._objtrace\"),\n+ ...
gh_patches_debug_449
rasdani/github-patches
git_diff
fonttools__fonttools-500
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- How bad is OTLOffsetOverflowError? I discovered a warning from ttx with the last release of Mozilla's Fira - https://github.com/mozilla/Fira/issues/146 - and this is the warning: ``` WARNING: Attempting to f...
diff --git a/Lib/fontTools/ttLib/tables/otBase.py b/Lib/fontTools/ttLib/tables/otBase.py --- a/Lib/fontTools/ttLib/tables/otBase.py +++ b/Lib/fontTools/ttLib/tables/otBase.py @@ -95,7 +95,7 @@ raise # Oh well... overflowRecord = e.value - log.warning("Attempting to fix OTLOffsetOverflowError %s", e) + ...
{"golden_diff": "diff --git a/Lib/fontTools/ttLib/tables/otBase.py b/Lib/fontTools/ttLib/tables/otBase.py\n--- a/Lib/fontTools/ttLib/tables/otBase.py\n+++ b/Lib/fontTools/ttLib/tables/otBase.py\n@@ -95,7 +95,7 @@\n \t\t\t\t\traise # Oh well...\n \n \t\t\t\toverflowRecord = e.value\n-\t\t\t\tlog.warning(\"Attempting to ...
gh_patches_debug_450
rasdani/github-patches
git_diff
streamlit__streamlit-5583
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Emojis are not valid if they have a variant selector character attached ### Summary Emojis are not valid if they are prefixed with a variant selector character. This is a hidden character that is used as p...
diff --git a/lib/streamlit/string_util.py b/lib/streamlit/string_util.py --- a/lib/streamlit/string_util.py +++ b/lib/streamlit/string_util.py @@ -43,7 +43,7 @@ def is_emoji(text: str) -> bool: """Check if input string is a valid emoji.""" - return text in ALL_EMOJIS + return text.replace("\U0000FE0F", ""...
{"golden_diff": "diff --git a/lib/streamlit/string_util.py b/lib/streamlit/string_util.py\n--- a/lib/streamlit/string_util.py\n+++ b/lib/streamlit/string_util.py\n@@ -43,7 +43,7 @@\n \n def is_emoji(text: str) -> bool:\n \"\"\"Check if input string is a valid emoji.\"\"\"\n- return text in ALL_EMOJIS\n+ retur...
gh_patches_debug_451
rasdani/github-patches
git_diff
scikit-image__scikit-image-5128
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- filters.farid missing from skimage.filters documentation ## Description The `filters.farid{,_h,_v}` functions are missing from the [`skimage.filters` documentation](https://scikit-image.org/docs/dev/api/sk...
diff --git a/skimage/filters/__init__.py b/skimage/filters/__init__.py --- a/skimage/filters/__init__.py +++ b/skimage/filters/__init__.py @@ -43,6 +43,9 @@ 'roberts_pos_diag', 'roberts_neg_diag', 'laplace', + 'farid', + 'farid_h', + 'farid_v', ...
{"golden_diff": "diff --git a/skimage/filters/__init__.py b/skimage/filters/__init__.py\n--- a/skimage/filters/__init__.py\n+++ b/skimage/filters/__init__.py\n@@ -43,6 +43,9 @@\n 'roberts_pos_diag',\n 'roberts_neg_diag',\n 'laplace',\n+ 'farid',\n+ 'farid_h',\n+ ...
gh_patches_debug_452
rasdani/github-patches
git_diff
aws__aws-cli-416
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- S3 - RequestTimeout during large files I'm trying to upload a large file (9 GB) and getting a RequestTimeout error using `aws s3 mv ...` I haven't fully tested it yet, but it seems like if I run the command ...
diff --git a/awscli/customizations/s3/utils.py b/awscli/customizations/s3/utils.py --- a/awscli/customizations/s3/utils.py +++ b/awscli/customizations/s3/utils.py @@ -216,6 +216,10 @@ self._amount_read += actual_amount return data + def seek(self, where): + self._fileobj.seek(self....
{"golden_diff": "diff --git a/awscli/customizations/s3/utils.py b/awscli/customizations/s3/utils.py\n--- a/awscli/customizations/s3/utils.py\n+++ b/awscli/customizations/s3/utils.py\n@@ -216,6 +216,10 @@\n self._amount_read += actual_amount\n return data\n \n+ def seek(self, where):\n+ ...
gh_patches_debug_453
rasdani/github-patches
git_diff
open-telemetry__opentelemetry-python-contrib-1439
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- System metrics instrumentation not working with custom defined configuration System metric instrumentation is not functional if configuration on which metrics to be exported is explicitly provided. As a minim...
diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instr...
{"golden_diff": "diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py\n--- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py\n+++ b/opentelemetry-instrumentation/src/...
gh_patches_debug_454
rasdani/github-patches
git_diff
wright-group__WrightTools-650
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Spelling error default https://github.com/wright-group/WrightTools/blob/6943ce95436f054836a8c6c871957ed8b7698b51/WrightTools/artists/_colors.py#L108 --- END ISSUE --- Below are some code segments, each from...
diff --git a/WrightTools/artists/_colors.py b/WrightTools/artists/_colors.py --- a/WrightTools/artists/_colors.py +++ b/WrightTools/artists/_colors.py @@ -105,7 +105,7 @@ name : string (optional) A name for the colormap plot : boolean (optional) - Use to generate a plot of the colormap (Defalu...
{"golden_diff": "diff --git a/WrightTools/artists/_colors.py b/WrightTools/artists/_colors.py\n--- a/WrightTools/artists/_colors.py\n+++ b/WrightTools/artists/_colors.py\n@@ -105,7 +105,7 @@\n name : string (optional)\n A name for the colormap\n plot : boolean (optional)\n- Use to generate a plot...
gh_patches_debug_455
rasdani/github-patches
git_diff
zulip__zulip-13843
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Rename `subject_links` to `topic_links` in our API This is an element of the broader `subject` -> `topic` migration (see #1192) that should be straightforward to change, because I believe the mobile apps don'...
diff --git a/zerver/lib/topic.py b/zerver/lib/topic.py --- a/zerver/lib/topic.py +++ b/zerver/lib/topic.py @@ -23,7 +23,7 @@ # Only use these constants for events. ORIG_TOPIC = "orig_subject" TOPIC_NAME = "subject" -TOPIC_LINKS = "subject_links" +TOPIC_LINKS = "topic_links" MATCH_TOPIC = "match_subject" # This c...
{"golden_diff": "diff --git a/zerver/lib/topic.py b/zerver/lib/topic.py\n--- a/zerver/lib/topic.py\n+++ b/zerver/lib/topic.py\n@@ -23,7 +23,7 @@\n # Only use these constants for events.\n ORIG_TOPIC = \"orig_subject\"\n TOPIC_NAME = \"subject\"\n-TOPIC_LINKS = \"subject_links\"\n+TOPIC_LINKS = \"topic_links\"\n MATCH_T...
gh_patches_debug_456
rasdani/github-patches
git_diff
jazzband__django-axes-421
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update author, contributor, and licence information Currently we have some outdated and mismatching author and copyright information in a few different places for the Axes project: - the [LICENSE file](htt...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -21,7 +21,6 @@ 'Camilo Nova', 'Aleksi Hakli', ]), - author_email='codekoala@gmail.com', maintainer='Jazzband', maintainer_email='security@jazzband.co', url='https://github.com/jazzband/django-axes',
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -21,7 +21,6 @@\n 'Camilo Nova',\n 'Aleksi Hakli',\n ]),\n- author_email='codekoala@gmail.com',\n maintainer='Jazzband',\n maintainer_email='security@jazzband.co',\n url='https://github.com/jazzband/d...
gh_patches_debug_457
rasdani/github-patches
git_diff
mars-project__mars-954
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] TypeError: copy() got an unexpected keyword argument 'order' <!-- Thank you for your contribution! Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an i...
diff --git a/mars/tensor/indexing/nonzero.py b/mars/tensor/indexing/nonzero.py --- a/mars/tensor/indexing/nonzero.py +++ b/mars/tensor/indexing/nonzero.py @@ -47,7 +47,7 @@ def tile(cls, op): from ..datasource import arange - in_tensor = op.input + in_tensor = astensor(op.input) ...
{"golden_diff": "diff --git a/mars/tensor/indexing/nonzero.py b/mars/tensor/indexing/nonzero.py\n--- a/mars/tensor/indexing/nonzero.py\n+++ b/mars/tensor/indexing/nonzero.py\n@@ -47,7 +47,7 @@\n def tile(cls, op):\n from ..datasource import arange\n \n- in_tensor = op.input\n+ in_tensor = aste...
gh_patches_debug_458
rasdani/github-patches
git_diff
scikit-hep__pyhf-1044
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Missing tensorlib conversion for Model.main_model.expected_data # Description This is the same issue as #1027, but for `Model.main_model.expected_data` instead. I missed it earlier due to the workaround I ...
diff --git a/src/pyhf/pdf.py b/src/pyhf/pdf.py --- a/src/pyhf/pdf.py +++ b/src/pyhf/pdf.py @@ -514,6 +514,7 @@ """ tensorlib, _ = get_backend() + pars = tensorlib.astensor(pars) deltas, factors = self._modifications(pars) allsum = tensorlib.concatenate(deltas + [self.nomin...
{"golden_diff": "diff --git a/src/pyhf/pdf.py b/src/pyhf/pdf.py\n--- a/src/pyhf/pdf.py\n+++ b/src/pyhf/pdf.py\n@@ -514,6 +514,7 @@\n \n \"\"\"\n tensorlib, _ = get_backend()\n+ pars = tensorlib.astensor(pars)\n deltas, factors = self._modifications(pars)\n \n allsum = tensorlib.co...
gh_patches_debug_459
rasdani/github-patches
git_diff
inventree__InvenTree-3995
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Logout Redirect URL for Remote Login Configuration ### Please verify that this bug has NOT been raised before. - [X] I checked and didn't find similar issue ### Describe the bug* Hi, Currently I am test...
diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -584,7 +584,7 @@ # database user sessions SESSION_ENGINE = 'user_sessions.backends.db' -LOGOUT_REDIRECT_URL = 'index' +LOGOUT_REDIRECT_URL = get_setting('INVE...
{"golden_diff": "diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py\n--- a/InvenTree/InvenTree/settings.py\n+++ b/InvenTree/InvenTree/settings.py\n@@ -584,7 +584,7 @@\n \n # database user sessions\n SESSION_ENGINE = 'user_sessions.backends.db'\n-LOGOUT_REDIRECT_URL = 'index'\n+LOGOUT_REDIREC...
gh_patches_debug_460
rasdani/github-patches
git_diff
pypa__pip-9636
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- The --target option clashes with other command line flags and config files The ``--target`` option clashes with several other command like flags and config files like ``--user`` and distutils setup. Ideally w...
diff --git a/src/pip/_internal/utils/setuptools_build.py b/src/pip/_internal/utils/setuptools_build.py --- a/src/pip/_internal/utils/setuptools_build.py +++ b/src/pip/_internal/utils/setuptools_build.py @@ -103,7 +103,7 @@ if prefix: args += ["--prefix", prefix] if home is not None: - args += ...
{"golden_diff": "diff --git a/src/pip/_internal/utils/setuptools_build.py b/src/pip/_internal/utils/setuptools_build.py\n--- a/src/pip/_internal/utils/setuptools_build.py\n+++ b/src/pip/_internal/utils/setuptools_build.py\n@@ -103,7 +103,7 @@\n if prefix:\n args += [\"--prefix\", prefix]\n if home is no...
gh_patches_debug_461
rasdani/github-patches
git_diff
pre-commit__pre-commit-1022
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Good old 'utf-8' codec error on Windows Howdy, I'm unable to run `tox -re linting` on pytest anymore. I'm getting this error: ``` λ tox -re linting linting recreate: c:\pytest\.tox\linting linting in...
diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py --- a/pre_commit/languages/python.py +++ b/pre_commit/languages/python.py @@ -140,6 +140,7 @@ 'python', '-c', 'import ctypes, datetime, io, os, ssl, weakref', retcode=None, + en...
{"golden_diff": "diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py\n--- a/pre_commit/languages/python.py\n+++ b/pre_commit/languages/python.py\n@@ -140,6 +140,7 @@\n 'python', '-c',\n 'import ctypes, datetime, io, os, ssl, weakref',\n retcode=No...
gh_patches_debug_462
rasdani/github-patches
git_diff
pwndbg__pwndbg-1619
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Disable search-memory-packet back only on broken GDB version Tl;dr: Use the workaround from https://github.com/pwndbg/pwndbg/pull/322/files only for broken gdb versions Disable search-memory-packet back only ...
diff --git a/pwndbg/__init__.py b/pwndbg/__init__.py --- a/pwndbg/__init__.py +++ b/pwndbg/__init__.py @@ -54,6 +54,10 @@ pwndbg.ui.get_window_size()[1] ) +# See https://github.com/pwndbg/pwndbg/issues/808 +if int(getattr(gdb, "VERSION", "0.0").split(".")[0]) <= 9: + pre_commands += "\nset remote search-memo...
{"golden_diff": "diff --git a/pwndbg/__init__.py b/pwndbg/__init__.py\n--- a/pwndbg/__init__.py\n+++ b/pwndbg/__init__.py\n@@ -54,6 +54,10 @@\n pwndbg.ui.get_window_size()[1]\n )\n \n+# See https://github.com/pwndbg/pwndbg/issues/808\n+if int(getattr(gdb, \"VERSION\", \"0.0\").split(\".\")[0]) <= 9:\n+ pre_comma...
gh_patches_debug_463
rasdani/github-patches
git_diff
netbox-community__netbox-14368
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Custom Validation does not work for DataSource ### NetBox version v3.6.5 ### Python version 3.10 ### Steps to Reproduce 1. Add this snippet to your configuration.py ``` from extras.validators import ...
diff --git a/netbox/core/models/data.py b/netbox/core/models/data.py --- a/netbox/core/models/data.py +++ b/netbox/core/models/data.py @@ -122,6 +122,7 @@ ) def clean(self): + super().clean() # Ensure URL scheme matches selected type if self.type == DataSourceTypeChoices.LOCAL...
{"golden_diff": "diff --git a/netbox/core/models/data.py b/netbox/core/models/data.py\n--- a/netbox/core/models/data.py\n+++ b/netbox/core/models/data.py\n@@ -122,6 +122,7 @@\n )\n \n def clean(self):\n+ super().clean()\n \n # Ensure URL scheme matches selected type\n if self.type == ...
gh_patches_debug_464
rasdani/github-patches
git_diff
lnbits__lnbits-2283
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Feature request] Add server url to "API keys and API docs" section **Is your feature request related to a problem? Please describe.** When linking lnbits with external services, (e.g. [zaprite](https://zapr...
diff --git a/tools/i18n-ai-tool.py b/tools/i18n-ai-tool.py --- a/tools/i18n-ai-tool.py +++ b/tools/i18n-ai-tool.py @@ -64,6 +64,7 @@ "cs": "Czech", "sk": "Slovak", "kr": "Korean", + "fi": "Finnish", }[lang_to] assert os.getenv("OPENAI_API_KEY"), "OPENAI_API_KEY env var not se...
{"golden_diff": "diff --git a/tools/i18n-ai-tool.py b/tools/i18n-ai-tool.py\n--- a/tools/i18n-ai-tool.py\n+++ b/tools/i18n-ai-tool.py\n@@ -64,6 +64,7 @@\n \"cs\": \"Czech\",\n \"sk\": \"Slovak\",\n \"kr\": \"Korean\",\n+ \"fi\": \"Finnish\",\n }[lang_to]\n assert os.getenv(\"OPENA...
gh_patches_debug_465
rasdani/github-patches
git_diff
saleor__saleor-5248
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Populatedb fail when running second or next time Populatedb shouldn't failed when it's run more than ones. ### Steps to reproduce the problem 1. Run populateb 2. Run populatedb again ### Screenshots ...
diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.py --- a/saleor/core/utils/random_data.py +++ b/saleor/core/utils/random_data.py @@ -585,7 +585,7 @@ def create_group(name, permissions, users): - group = Group.objects.create(name=name) + group, _ = Group.objects.get_or_create(nam...
{"golden_diff": "diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.py\n--- a/saleor/core/utils/random_data.py\n+++ b/saleor/core/utils/random_data.py\n@@ -585,7 +585,7 @@\n \n \n def create_group(name, permissions, users):\n- group = Group.objects.create(name=name)\n+ group, _ = Group....
gh_patches_debug_466
rasdani/github-patches
git_diff
encode__django-rest-framework-4379
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- @choices representation of RelatedField can we change https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/relations.py#L154 from ``` return OrderedDict([ ( ...
diff --git a/rest_framework/relations.py b/rest_framework/relations.py --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -168,7 +168,7 @@ return OrderedDict([ ( - six.text_type(self.to_representation(item)), + self.to_representation(item), ...
{"golden_diff": "diff --git a/rest_framework/relations.py b/rest_framework/relations.py\n--- a/rest_framework/relations.py\n+++ b/rest_framework/relations.py\n@@ -168,7 +168,7 @@\n \n return OrderedDict([\n (\n- six.text_type(self.to_representation(item)),\n+ self.to_re...
gh_patches_debug_467
rasdani/github-patches
git_diff
ipython__ipython-3338
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- find_cmd test failure on Windows I think this is caused by #3301. The [Windows implementation of find_cmd](https://github.com/ipython/ipython/blob/master/IPython/utils/_process_win32.py#L74) expects a command...
diff --git a/IPython/utils/_process_win32.py b/IPython/utils/_process_win32.py --- a/IPython/utils/_process_win32.py +++ b/IPython/utils/_process_win32.py @@ -83,7 +83,7 @@ path = None for ext in extensions: try: - path = SearchPath(PATH, cmd + ext)[0] + path...
{"golden_diff": "diff --git a/IPython/utils/_process_win32.py b/IPython/utils/_process_win32.py\n--- a/IPython/utils/_process_win32.py\n+++ b/IPython/utils/_process_win32.py\n@@ -83,7 +83,7 @@\n path = None\n for ext in extensions:\n try:\n- path = SearchPath(PATH, cmd + ext)[...
gh_patches_debug_468
rasdani/github-patches
git_diff
python__mypy-12828
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Regression: Stub generator no longer generates `__members__` for enum class <!-- If you're new to mypy and you're not sure whether what you're experiencing is a mypy bug, please see the "Question and Help"...
diff --git a/mypy/stubgenc.py b/mypy/stubgenc.py --- a/mypy/stubgenc.py +++ b/mypy/stubgenc.py @@ -288,7 +288,7 @@ return None # Ignore special properties/attributes. - if name.startswith('__') and name.endswith('__'): + if is_skipped_attribute(name): return inferred = infer_pr...
{"golden_diff": "diff --git a/mypy/stubgenc.py b/mypy/stubgenc.py\n--- a/mypy/stubgenc.py\n+++ b/mypy/stubgenc.py\n@@ -288,7 +288,7 @@\n return None\n \n # Ignore special properties/attributes.\n- if name.startswith('__') and name.endswith('__'):\n+ if is_skipped_attribute(name):\n return\...
gh_patches_debug_469
rasdani/github-patches
git_diff
secdev__scapy-1244
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- in6_addrtovendor issue when manufdb is None ``` >>> in6_addrtovendor("fe80::40d2:67ff:fe05:8083") --------------------------------------------------------------------------- AttributeError ...
diff --git a/scapy/utils6.py b/scapy/utils6.py --- a/scapy/utils6.py +++ b/scapy/utils6.py @@ -250,7 +250,7 @@ is returned on error, "UNKNOWN" if the vendor is unknown. """ mac = in6_addrtomac(addr) - if mac is None: + if mac is None or conf.manufdb is None: return None res = conf.m...
{"golden_diff": "diff --git a/scapy/utils6.py b/scapy/utils6.py\n--- a/scapy/utils6.py\n+++ b/scapy/utils6.py\n@@ -250,7 +250,7 @@\n is returned on error, \"UNKNOWN\" if the vendor is unknown.\n \"\"\"\n mac = in6_addrtomac(addr)\n- if mac is None:\n+ if mac is None or conf.manufdb is None:\n ...
gh_patches_debug_470
rasdani/github-patches
git_diff
privacyidea__privacyidea-2003
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- url_decode does padding incorrectly https://github.com/privacyidea/privacyidea/blob/master/privacyidea/lib/tokens/u2f.py#L53 adds padding to a string containing base64. Th padding should get the message lengt...
diff --git a/privacyidea/lib/tokens/u2f.py b/privacyidea/lib/tokens/u2f.py --- a/privacyidea/lib/tokens/u2f.py +++ b/privacyidea/lib/tokens/u2f.py @@ -50,7 +50,7 @@ :return: the decoded string :rtype: bytes """ - pad_len = len(url) % 4 + pad_len = -len(url) % 4 padding = pad_len * "=" res...
{"golden_diff": "diff --git a/privacyidea/lib/tokens/u2f.py b/privacyidea/lib/tokens/u2f.py\n--- a/privacyidea/lib/tokens/u2f.py\n+++ b/privacyidea/lib/tokens/u2f.py\n@@ -50,7 +50,7 @@\n :return: the decoded string\n :rtype: bytes\n \"\"\"\n- pad_len = len(url) % 4\n+ pad_len = -len(url) % 4\n pad...
gh_patches_debug_471
rasdani/github-patches
git_diff
paperless-ngx__paperless-ngx-246
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] Auto-detected date is day before receipt date **Describe the bug** When the system automatically detects the date on the receipt, the "Date Created" field is set to the day before. **To Reproduce** ...
diff --git a/src/documents/parsers.py b/src/documents/parsers.py --- a/src/documents/parsers.py +++ b/src/documents/parsers.py @@ -224,6 +224,7 @@ "DATE_ORDER": date_order, "PREFER_DAY_OF_MONTH": "first", "RETURN_AS_TIMEZONE_AWARE": True, + "TIMEZONE": s...
{"golden_diff": "diff --git a/src/documents/parsers.py b/src/documents/parsers.py\n--- a/src/documents/parsers.py\n+++ b/src/documents/parsers.py\n@@ -224,6 +224,7 @@\n \"DATE_ORDER\": date_order,\n \"PREFER_DAY_OF_MONTH\": \"first\",\n \"RETURN_AS_TIMEZONE_AWARE\": True,...
gh_patches_debug_472
rasdani/github-patches
git_diff
optuna__optuna-1231
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Out of bounds error when using CmaEsSampler I cannot run the sample code for the CME-ES algorithm provided [here](https://optuna.readthedocs.io/en/stable/reference/samplers.html). It runs for one trial and th...
diff --git a/optuna/samplers/cmaes.py b/optuna/samplers/cmaes.py --- a/optuna/samplers/cmaes.py +++ b/optuna/samplers/cmaes.py @@ -248,7 +248,7 @@ mean=mean, sigma=sigma0, bounds=bounds, - seed=self._cma_rng.randint(1, 2 ** 32), + seed=self._cma_rng.randint(1...
{"golden_diff": "diff --git a/optuna/samplers/cmaes.py b/optuna/samplers/cmaes.py\n--- a/optuna/samplers/cmaes.py\n+++ b/optuna/samplers/cmaes.py\n@@ -248,7 +248,7 @@\n mean=mean,\n sigma=sigma0,\n bounds=bounds,\n- seed=self._cma_rng.randint(1, 2 ** 32),\n+ see...
gh_patches_debug_473
rasdani/github-patches
git_diff
python-telegram-bot__python-telegram-bot-2132
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add support for Py 3.9 With Py 3.9 out, we should add it to the tests at some point. Maybe that can wait, until 3.9.x, x>0 is out, though Need to check, if all the job thingies work out, as APS doesn't sup...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -64,4 +64,5 @@ 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ],)
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -64,4 +64,5 @@\n 'Programming Language :: Python :: 3.6',\n 'Programming Language :: Python :: 3.7',\n 'Programming Language :: Python :: 3.8',\n+ 'Programming Language :: Python ...
gh_patches_debug_474
rasdani/github-patches
git_diff
qtile__qtile-2926
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Systray icon disappears with restart As reported on IRC: ``` [08:11] < elcaven> this morning I updated qtile from the qtile-git package from the AUR and since then it seems that my systray widget resets ...
diff --git a/libqtile/widget/systray.py b/libqtile/widget/systray.py --- a/libqtile/widget/systray.py +++ b/libqtile/widget/systray.py @@ -247,3 +247,11 @@ xcffib.CurrentTime, ) self.hide() + + root = self.qtile.core._root.wid + for wid in self.icons: + self.conn....
{"golden_diff": "diff --git a/libqtile/widget/systray.py b/libqtile/widget/systray.py\n--- a/libqtile/widget/systray.py\n+++ b/libqtile/widget/systray.py\n@@ -247,3 +247,11 @@\n xcffib.CurrentTime,\n )\n self.hide()\n+\n+ root = self.qtile.core._root.wid\n+ for wid in self.icon...
gh_patches_debug_475
rasdani/github-patches
git_diff
wagtail__wagtail-840
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Paginator and search pagination expect different parameters for page The Paginator (as in `django.core.paginator`) used pretty much everywhere uses `page` as the query parameter. The search view, however, [ex...
diff --git a/wagtail/wagtailsearch/views/frontend.py b/wagtail/wagtailsearch/views/frontend.py --- a/wagtail/wagtailsearch/views/frontend.py +++ b/wagtail/wagtailsearch/views/frontend.py @@ -37,7 +37,7 @@ # Get query string and page from GET paramters query_string = request.GET.get('q', '') - page = requ...
{"golden_diff": "diff --git a/wagtail/wagtailsearch/views/frontend.py b/wagtail/wagtailsearch/views/frontend.py\n--- a/wagtail/wagtailsearch/views/frontend.py\n+++ b/wagtail/wagtailsearch/views/frontend.py\n@@ -37,7 +37,7 @@\n \n # Get query string and page from GET paramters\n query_string = request.GET.get('q...
gh_patches_debug_476
rasdani/github-patches
git_diff
ibis-project__ibis-4551
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- bug: `ibis.connect` not registering csv files correctly As noted in #4542 , the pattern `con = ibis.connect('./local.csv')` doesn't do the expected thing, which would be to throw it into `duckdb` and then ret...
diff --git a/ibis/backends/base/__init__.py b/ibis/backends/base/__init__.py --- a/ibis/backends/base/__init__.py +++ b/ibis/backends/base/__init__.py @@ -760,4 +760,6 @@ >>> con = ibis.connect("relative/path/to/data.csv") >>> con = ibis.connect("relative/path/to/more/data.parquet") """ - return _conn...
{"golden_diff": "diff --git a/ibis/backends/base/__init__.py b/ibis/backends/base/__init__.py\n--- a/ibis/backends/base/__init__.py\n+++ b/ibis/backends/base/__init__.py\n@@ -760,4 +760,6 @@\n >>> con = ibis.connect(\"relative/path/to/data.csv\")\n >>> con = ibis.connect(\"relative/path/to/more/data.parquet\")\...
gh_patches_debug_477
rasdani/github-patches
git_diff
spack__spack-12972
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Automatically use Python 3 if available As discussed during today's BoF, some people would like Spack to use Python 3 if available. Since we cannot depend on any version of Python being available on all syste...
diff --git a/lib/spack/spack/cmd/license.py b/lib/spack/spack/cmd/license.py --- a/lib/spack/spack/cmd/license.py +++ b/lib/spack/spack/cmd/license.py @@ -22,7 +22,7 @@ git = which('git') #: SPDX license id must appear in the first <license_lines> lines of a file -license_lines = 6 +license_lines = 7 #: Spack's ...
{"golden_diff": "diff --git a/lib/spack/spack/cmd/license.py b/lib/spack/spack/cmd/license.py\n--- a/lib/spack/spack/cmd/license.py\n+++ b/lib/spack/spack/cmd/license.py\n@@ -22,7 +22,7 @@\n git = which('git')\n \n #: SPDX license id must appear in the first <license_lines> lines of a file\n-license_lines = 6\n+license...
gh_patches_debug_478
rasdani/github-patches
git_diff
django-json-api__django-rest-framework-json-api-690
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Use "ObjectDoesNotExist" from model_class Fixes # ```python File "/home/anton/.virtualenvs/epantry/lib/python3.6/site-packages/rest_framework/serializers.py", line 748, in is_valid self._validated_da...
diff --git a/rest_framework_json_api/serializers.py b/rest_framework_json_api/serializers.py --- a/rest_framework_json_api/serializers.py +++ b/rest_framework_json_api/serializers.py @@ -1,4 +1,5 @@ import inflection +from django.core.exceptions import ObjectDoesNotExist from django.db.models.query import QuerySet f...
{"golden_diff": "diff --git a/rest_framework_json_api/serializers.py b/rest_framework_json_api/serializers.py\n--- a/rest_framework_json_api/serializers.py\n+++ b/rest_framework_json_api/serializers.py\n@@ -1,4 +1,5 @@\n import inflection\n+from django.core.exceptions import ObjectDoesNotExist\n from django.db.models.q...
gh_patches_debug_479
rasdani/github-patches
git_diff
ansible__ansible-modules-extras-3141
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- lvg fails if pvs option omitted when state=absent ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME `lvg` module ##### ANSIBLE VERSION ``` ansible 2.1.2.0 config file = /Users/jsok/workspace/ansible.cfg ...
diff --git a/system/lvg.py b/system/lvg.py --- a/system/lvg.py +++ b/system/lvg.py @@ -131,6 +131,7 @@ pesize = module.params['pesize'] vgoptions = module.params['vg_options'].split() + dev_list = [] if module.params['pvs']: dev_list = module.params['pvs'] elif state == 'present':
{"golden_diff": "diff --git a/system/lvg.py b/system/lvg.py\n--- a/system/lvg.py\n+++ b/system/lvg.py\n@@ -131,6 +131,7 @@\n pesize = module.params['pesize']\n vgoptions = module.params['vg_options'].split()\n \n+ dev_list = []\n if module.params['pvs']:\n dev_list = module.params['pvs']\n el...
gh_patches_debug_480
rasdani/github-patches
git_diff
mitmproxy__mitmproxy-4066
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Mitmweb fails with addons/options-configure.py example. I am new to learn it, but i follow official [demo][1], it can't working? ```python Proxy server listening at http://*:8888 ERROR:tornado.application:...
diff --git a/mitmproxy/utils/typecheck.py b/mitmproxy/utils/typecheck.py --- a/mitmproxy/utils/typecheck.py +++ b/mitmproxy/utils/typecheck.py @@ -81,6 +81,8 @@ t = 'optional str' elif typespec == typing.Sequence[str]: t = 'sequence of str' + elif typespec == typing.Optional[int]: + t =...
{"golden_diff": "diff --git a/mitmproxy/utils/typecheck.py b/mitmproxy/utils/typecheck.py\n--- a/mitmproxy/utils/typecheck.py\n+++ b/mitmproxy/utils/typecheck.py\n@@ -81,6 +81,8 @@\n t = 'optional str'\n elif typespec == typing.Sequence[str]:\n t = 'sequence of str'\n+ elif typespec == typing.Opt...
gh_patches_debug_481
rasdani/github-patches
git_diff
archlinux__archinstall-285
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Why is argon2i used? Referring to: https://github.com/archlinux/archinstall/blob/master/archinstall/lib/luks.py#L73 I read that argon2id gives better security, so is there any reason against it? --- END I...
diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py --- a/archinstall/lib/luks.py +++ b/archinstall/lib/luks.py @@ -70,7 +70,7 @@ '--batch-mode', '--verbose', '--type', 'luks2', - '--pbkdf', 'argon2i', + '--pbkdf', 'argon2id', '--hash', hash_type, '--key-size', str(key_size), '--i...
{"golden_diff": "diff --git a/archinstall/lib/luks.py b/archinstall/lib/luks.py\n--- a/archinstall/lib/luks.py\n+++ b/archinstall/lib/luks.py\n@@ -70,7 +70,7 @@\n \t\t\t'--batch-mode',\n \t\t\t'--verbose',\n \t\t\t'--type', 'luks2',\n-\t\t\t'--pbkdf', 'argon2i',\n+\t\t\t'--pbkdf', 'argon2id',\n \t\t\t'--hash', hash_typ...
gh_patches_debug_482
rasdani/github-patches
git_diff
nonebot__nonebot2-131
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bug: 事件响应器异常 **描述问题:** 任意事件响应器 ``` from nonebot import on_message message = on_message() ``` 对于任何消息都会引发异常 ``` 01-01 14:57:55 [DEBUG] nonebot | CQHTTP | Event Parser Error Traceback (most recent cal...
diff --git a/nonebot/adapters/cqhttp/event.py b/nonebot/adapters/cqhttp/event.py --- a/nonebot/adapters/cqhttp/event.py +++ b/nonebot/adapters/cqhttp/event.py @@ -184,7 +184,7 @@ __event__ = "message.group" message_type: Literal["group"] group_id: int - anonymous: Anonymous + anonymous: Optional[An...
{"golden_diff": "diff --git a/nonebot/adapters/cqhttp/event.py b/nonebot/adapters/cqhttp/event.py\n--- a/nonebot/adapters/cqhttp/event.py\n+++ b/nonebot/adapters/cqhttp/event.py\n@@ -184,7 +184,7 @@\n __event__ = \"message.group\"\n message_type: Literal[\"group\"]\n group_id: int\n- anonymous: Anonymous...
gh_patches_debug_483
rasdani/github-patches
git_diff
dotkom__onlineweb4-1652
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Application for extending membership marks field of study as guest When someone applies to get their membership prolonged their field of study is set to "guest" instead of what they previously were registered...
diff --git a/apps/approval/views.py b/apps/approval/views.py --- a/apps/approval/views.py +++ b/apps/approval/views.py @@ -101,6 +101,7 @@ application = MembershipApproval( applicant=request.user, + field_of_study=request.user.field_of_study, new_expiry_date=new_expiratio...
{"golden_diff": "diff --git a/apps/approval/views.py b/apps/approval/views.py\n--- a/apps/approval/views.py\n+++ b/apps/approval/views.py\n@@ -101,6 +101,7 @@\n \n application = MembershipApproval(\n applicant=request.user,\n+ field_of_study=request.user.field_of_study,\n new_...
gh_patches_debug_484
rasdani/github-patches
git_diff
wagtail__wagtail-9240
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- MultiFieldPanel and InlinePanel help_text no longer renders in 4.0 ### Issue Summary In Wagtail 4.0, the `help_text` argument in the MultiFieldPanel is no longer rendered, whereas it was rendered in 2.x an...
diff --git a/wagtail/admin/panels.py b/wagtail/admin/panels.py --- a/wagtail/admin/panels.py +++ b/wagtail/admin/panels.py @@ -717,7 +717,7 @@ else: self.heading = self.bound_field.label - self.help_text = self.bound_field.help_text + self.help_text = self.panel.hel...
{"golden_diff": "diff --git a/wagtail/admin/panels.py b/wagtail/admin/panels.py\n--- a/wagtail/admin/panels.py\n+++ b/wagtail/admin/panels.py\n@@ -717,7 +717,7 @@\n else:\n self.heading = self.bound_field.label\n \n- self.help_text = self.bound_field.help_text\n+ self.h...
gh_patches_debug_485
rasdani/github-patches
git_diff
jazzband__django-oauth-toolkit-783
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- access token detail page in admin very slow We upgrade django-oauth-toolkit recently, and can't open access token detail page in admin now, because source_refresh_token is not in raw_id_fields, and can be a v...
diff --git a/oauth2_provider/admin.py b/oauth2_provider/admin.py --- a/oauth2_provider/admin.py +++ b/oauth2_provider/admin.py @@ -23,7 +23,7 @@ class AccessTokenAdmin(admin.ModelAdmin): list_display = ("token", "user", "application", "expires") - raw_id_fields = ("user", ) + raw_id_fields = ("user", "sou...
{"golden_diff": "diff --git a/oauth2_provider/admin.py b/oauth2_provider/admin.py\n--- a/oauth2_provider/admin.py\n+++ b/oauth2_provider/admin.py\n@@ -23,7 +23,7 @@\n \n class AccessTokenAdmin(admin.ModelAdmin):\n list_display = (\"token\", \"user\", \"application\", \"expires\")\n- raw_id_fields = (\"user\", )\...
gh_patches_debug_486
rasdani/github-patches
git_diff
Project-MONAI__MONAI-646
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Jaccard (IOU) loss issue **Describe the bug** I'm using dice loss and Jaccard (IOU) loss for segmentation tasks. However, I found the Jaccard(IOU) loss is lower than 0.0 , when I check the code at 'monai/los...
diff --git a/monai/losses/dice.py b/monai/losses/dice.py --- a/monai/losses/dice.py +++ b/monai/losses/dice.py @@ -128,7 +128,7 @@ denominator = ground_o + pred_o if self.jaccard: - denominator -= intersection + denominator = 2.0 * (denominator - intersection) f = 1....
{"golden_diff": "diff --git a/monai/losses/dice.py b/monai/losses/dice.py\n--- a/monai/losses/dice.py\n+++ b/monai/losses/dice.py\n@@ -128,7 +128,7 @@\n denominator = ground_o + pred_o\n \n if self.jaccard:\n- denominator -= intersection\n+ denominator = 2.0 * (denominator - inters...
gh_patches_debug_487
rasdani/github-patches
git_diff
yt-project__yt-3627
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- rootonly does not broadcast the function result ### Bug report **Bug summary** The description for `yt.funcs.rootonly` states > This is a decorator that, when used, will only call the function o...
diff --git a/yt/funcs.py b/yt/funcs.py --- a/yt/funcs.py +++ b/yt/funcs.py @@ -220,8 +220,7 @@ def rootonly(func): """ This is a decorator that, when used, will only call the function on the - root processor and then broadcast the results of the function to all other - processors. + root processor. ...
{"golden_diff": "diff --git a/yt/funcs.py b/yt/funcs.py\n--- a/yt/funcs.py\n+++ b/yt/funcs.py\n@@ -220,8 +220,7 @@\n def rootonly(func):\n \"\"\"\n This is a decorator that, when used, will only call the function on the\n- root processor and then broadcast the results of the function to all other\n- proce...
gh_patches_debug_488
rasdani/github-patches
git_diff
gammapy__gammapy-1622
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cryptic error from MapMaker / make_counts_image I accidentally typed this: ```python import astropy.units as u from gammapy.maps import WcsGeom from gammapy.cube import MapMaker from gammapy.data import ...
diff --git a/gammapy/cube/make.py b/gammapy/cube/make.py --- a/gammapy/cube/make.py +++ b/gammapy/cube/make.py @@ -32,6 +32,9 @@ """ def __init__(self, geom, offset_max, cutout_mode="trim"): + if geom.is_image: + raise ValueError('MapMaker only works with geom with an energy axis') + ...
{"golden_diff": "diff --git a/gammapy/cube/make.py b/gammapy/cube/make.py\n--- a/gammapy/cube/make.py\n+++ b/gammapy/cube/make.py\n@@ -32,6 +32,9 @@\n \"\"\"\n \n def __init__(self, geom, offset_max, cutout_mode=\"trim\"):\n+ if geom.is_image:\n+ raise ValueError('MapMaker only works with geom...
gh_patches_debug_489
rasdani/github-patches
git_diff
pytorch__torchdynamo-394
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- isinstance test on dtype causes graph break ``` diff --git a/tests/test_repros.py b/tests/test_repros.py index 4d590f7..3ede478 100755 --- a/tests/test_repros.py +++ b/tests/test_repros.py @@ -1246,3 +12...
diff --git a/torchdynamo/allowed_functions.py b/torchdynamo/allowed_functions.py --- a/torchdynamo/allowed_functions.py +++ b/torchdynamo/allowed_functions.py @@ -91,6 +91,11 @@ torch.autograd.profiler.profile, warnings.warn, ] + # extract all dtypes from torch + dtypes = [ + obj for...
{"golden_diff": "diff --git a/torchdynamo/allowed_functions.py b/torchdynamo/allowed_functions.py\n--- a/torchdynamo/allowed_functions.py\n+++ b/torchdynamo/allowed_functions.py\n@@ -91,6 +91,11 @@\n torch.autograd.profiler.profile,\n warnings.warn,\n ]\n+ # extract all dtypes from torch\n+ dt...
gh_patches_debug_490
rasdani/github-patches
git_diff
Gallopsled__pwntools-480
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- pwnlib.elf.ELF.checksec incorrectly reports an NX stack for pwnable.kr tiny_easy Here is the binary: https://drive.google.com/file/d/0B_3U7vX-2nJITC15NHBjbVVyaVU/view?usp=sharing ``` $ file tiny_easy tiny_ea...
diff --git a/pwnlib/elf/__init__.py b/pwnlib/elf/__init__.py --- a/pwnlib/elf/__init__.py +++ b/pwnlib/elf/__init__.py @@ -531,6 +531,8 @@ @property def nx(self): + if not any('GNU_STACK' in seg.header.p_type for seg in self.segments): + return False return not any('GNU_STACK' in ...
{"golden_diff": "diff --git a/pwnlib/elf/__init__.py b/pwnlib/elf/__init__.py\n--- a/pwnlib/elf/__init__.py\n+++ b/pwnlib/elf/__init__.py\n@@ -531,6 +531,8 @@\n \n @property\n def nx(self):\n+ if not any('GNU_STACK' in seg.header.p_type for seg in self.segments):\n+ return False\n retu...
gh_patches_debug_491
rasdani/github-patches
git_diff
uclapi__uclapi-883
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- AMP Doesn't Return STUDENT_TYPE I am an idiot. https://github.com/uclapi/uclapi/blob/69f0d3240d8ec6cf2a3b018897dc247aa58cb1bf/backend/uclapi/timetable/amp.py#L31 --- END ISSUE --- Below are some code seg...
diff --git a/backend/uclapi/timetable/amp.py b/backend/uclapi/timetable/amp.py --- a/backend/uclapi/timetable/amp.py +++ b/backend/uclapi/timetable/amp.py @@ -31,7 +31,8 @@ def get_delivery(self): return { "fheq_level": self.fheq_level, - "is_undergraduate": self.undergraduate ...
{"golden_diff": "diff --git a/backend/uclapi/timetable/amp.py b/backend/uclapi/timetable/amp.py\n--- a/backend/uclapi/timetable/amp.py\n+++ b/backend/uclapi/timetable/amp.py\n@@ -31,7 +31,8 @@\n def get_delivery(self):\r\n return {\r\n \"fheq_level\": self.fheq_level,\r\n- \"is_underg...
gh_patches_debug_492
rasdani/github-patches
git_diff
CTFd__CTFd-1921
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Stub issue for ctfcli #13 https://github.com/CTFd/ctfcli/issues/13 This needs to be resolved in CTFd most likely. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of...
diff --git a/CTFd/plugins/dynamic_challenges/__init__.py b/CTFd/plugins/dynamic_challenges/__init__.py --- a/CTFd/plugins/dynamic_challenges/__init__.py +++ b/CTFd/plugins/dynamic_challenges/__init__.py @@ -22,7 +22,7 @@ def __init__(self, *args, **kwargs): super(DynamicChallenge, self).__init__(**kwarg...
{"golden_diff": "diff --git a/CTFd/plugins/dynamic_challenges/__init__.py b/CTFd/plugins/dynamic_challenges/__init__.py\n--- a/CTFd/plugins/dynamic_challenges/__init__.py\n+++ b/CTFd/plugins/dynamic_challenges/__init__.py\n@@ -22,7 +22,7 @@\n \n def __init__(self, *args, **kwargs):\n super(DynamicChallenge,...
gh_patches_debug_493
rasdani/github-patches
git_diff
celery__celery-6774
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Events command always fails when camera is specified <!-- Please fill this template entirely and do not erase parts of it. We reserve the right to close without a response bug reports which are incomplete....
diff --git a/celery/events/snapshot.py b/celery/events/snapshot.py --- a/celery/events/snapshot.py +++ b/celery/events/snapshot.py @@ -84,7 +84,8 @@ def evcam(camera, freq=1.0, maxrate=None, loglevel=0, - logfile=None, pidfile=None, timer=None, app=None): + logfile=None, pidfile=None, timer=None,...
{"golden_diff": "diff --git a/celery/events/snapshot.py b/celery/events/snapshot.py\n--- a/celery/events/snapshot.py\n+++ b/celery/events/snapshot.py\n@@ -84,7 +84,8 @@\n \n \n def evcam(camera, freq=1.0, maxrate=None, loglevel=0,\n- logfile=None, pidfile=None, timer=None, app=None):\n+ logfile=None, ...
gh_patches_debug_494
rasdani/github-patches
git_diff
Nitrate__Nitrate-1096
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Social Auth Provider requires URLS According to the [python-social-auth documentation](https://python-social-auth.readthedocs.io/en/latest/configuration/django.html#urls-entries), the url patterns have to be ...
diff --git a/src/tcms/urls.py b/src/tcms/urls.py --- a/src/tcms/urls.py +++ b/src/tcms/urls.py @@ -39,6 +39,10 @@ path("jsi18n/", JavaScriptCatalog.as_view(), name="javascript-catalog"), ] +# Python Social Core / Django Social Auth +if "SOCIAL" in settings.ENABLED_AUTH_BACKENDS: + urlpatterns += [path("", in...
{"golden_diff": "diff --git a/src/tcms/urls.py b/src/tcms/urls.py\n--- a/src/tcms/urls.py\n+++ b/src/tcms/urls.py\n@@ -39,6 +39,10 @@\n path(\"jsi18n/\", JavaScriptCatalog.as_view(), name=\"javascript-catalog\"),\n ]\n \n+# Python Social Core / Django Social Auth\n+if \"SOCIAL\" in settings.ENABLED_AUTH_BACKENDS:\n...
gh_patches_debug_495
rasdani/github-patches
git_diff
ultrabug__py3status-659
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- mpd_status' max_width bogus? `max_width` doesn't seem to do what it is supposed to do. When displaying a long title (like `Georg Danzer - Ballade von verstecken Tschurifetzen - Re-Mastered`), the title ge...
diff --git a/py3status/modules/mpd_status.py b/py3status/modules/mpd_status.py --- a/py3status/modules/mpd_status.py +++ b/py3status/modules/mpd_status.py @@ -220,7 +220,7 @@ c.disconnect() if len(text) > self.max_width: - text = text[:-self.max_width - 3] + '...' + text = ...
{"golden_diff": "diff --git a/py3status/modules/mpd_status.py b/py3status/modules/mpd_status.py\n--- a/py3status/modules/mpd_status.py\n+++ b/py3status/modules/mpd_status.py\n@@ -220,7 +220,7 @@\n c.disconnect()\n \n if len(text) > self.max_width:\n- text = text[:-self.max_width - 3] + '....
gh_patches_debug_496
rasdani/github-patches
git_diff
biolab__orange3-text-524
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- text processing module with slow internet conection [textprocessingerr.txt](https://github.com/biolab/orange3-text/files/4551540/textprocessingerr.txt) <!-- This is an issue template. Please fill in the rel...
diff --git a/orangecontrib/text/preprocess/normalize.py b/orangecontrib/text/preprocess/normalize.py --- a/orangecontrib/text/preprocess/normalize.py +++ b/orangecontrib/text/preprocess/normalize.py @@ -103,7 +103,7 @@ class UDPipeModels: - server_url = "http://file.biolab.si/files/udpipe/" + server_url = "h...
{"golden_diff": "diff --git a/orangecontrib/text/preprocess/normalize.py b/orangecontrib/text/preprocess/normalize.py\n--- a/orangecontrib/text/preprocess/normalize.py\n+++ b/orangecontrib/text/preprocess/normalize.py\n@@ -103,7 +103,7 @@\n \n \n class UDPipeModels:\n- server_url = \"http://file.biolab.si/files/udpi...
gh_patches_debug_497
rasdani/github-patches
git_diff
google__turbinia-944
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Recipe validation fails When trying to submit a recipe over turbiniactl, the recipe validation fails: turbiniactl -P ./temp/recipe.yaml googleclouddisk -d disk-name 2021-11-19 09:48:04 [INFO] Turbinia v...
diff --git a/turbinia/task_utils.py b/turbinia/task_utils.py --- a/turbinia/task_utils.py +++ b/turbinia/task_utils.py @@ -79,7 +79,7 @@ Returns: bool: True if task with the given name exists, else False """ - for task in TASK_LIST: + for task in self.TASK_LIST: if task.lower() == task_nam...
{"golden_diff": "diff --git a/turbinia/task_utils.py b/turbinia/task_utils.py\n--- a/turbinia/task_utils.py\n+++ b/turbinia/task_utils.py\n@@ -79,7 +79,7 @@\n Returns:\n bool: True if task with the given name exists, else False\n \"\"\"\n- for task in TASK_LIST:\n+ for task in self.TASK_LIST:\n ...
gh_patches_debug_498
rasdani/github-patches
git_diff
aws-cloudformation__cfn-lint-985
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- cfn-lint is failing because of `pkg_resources.ContextualVersionConflict: (jsonschema 2.6.0)`. *cfn-lint version: (`0.21.6`)* *Description of issue.* cfn-lint(python2) requires jsonschema 2.6.0 but aws-sa...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ 'requests>=2.15.0', 'aws-sam-translator>=1.10.0', 'jsonpatch', - 'jsonschema~=2.6', + 'jsonschema~=3.0', 'pathlib2>=2.3.0;python_version<"3.4"', 'setuptools', ],
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -78,7 +78,7 @@\n 'requests>=2.15.0',\n 'aws-sam-translator>=1.10.0',\n 'jsonpatch',\n- 'jsonschema~=2.6',\n+ 'jsonschema~=3.0',\n 'pathlib2>=2.3.0;python_version<\"3.4\"',\n 'setup...
gh_patches_debug_499
rasdani/github-patches
git_diff
open-mmlab__mmpose-271
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pylint: R1710 ```bash mmpose/apis/test.py:142:0: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) mmpose/datasets/datas...
diff --git a/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py b/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py --- a/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py +++ b/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py @@ -45,3 +45,4 @@ self.datasets[i]) / self.length index...
{"golden_diff": "diff --git a/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py b/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py\n--- a/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py\n+++ b/mmpose/datasets/datasets/mesh/mesh_mix_dataset.py\n@@ -45,3 +45,4 @@\n self.datasets[i]) / self.length\n...