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_1600 | rasdani/github-patches | git_diff | searx__searx-2132 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Chromium-based browsers (Android) don't detect searx
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `searx... | diff --git a/searx/webapp.py b/searx/webapp.py
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -463,6 +463,9 @@
request.errors = []
preferences = Preferences(themes, list(categories.keys()), engines, plugins)
+ user_agent = request.headers.get('User-Agent', '').lower()
+ if 'webkit' in user_agent and '... | {"golden_diff": "diff --git a/searx/webapp.py b/searx/webapp.py\n--- a/searx/webapp.py\n+++ b/searx/webapp.py\n@@ -463,6 +463,9 @@\n request.errors = []\n \n preferences = Preferences(themes, list(categories.keys()), engines, plugins)\n+ user_agent = request.headers.get('User-Agent', '').lower()\n+ if 'we... |
gh_patches_debug_1601 | rasdani/github-patches | git_diff | sanic-org__sanic-2452 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error Handler mismatch warning
The warning for error handler mismatch is triggering on v22.3 accidentally when setting `FALLBACK_ERROR_FORMAT`.
```python
app.config.FALLBACK_ERROR_FORMAT = "text"
@ap... | diff --git a/sanic/handlers.py b/sanic/handlers.py
--- a/sanic/handlers.py
+++ b/sanic/handlers.py
@@ -78,7 +78,7 @@
@classmethod
def _get_fallback_value(cls, error_handler: ErrorHandler, config: Config):
if error_handler._fallback is not _default:
- if config._FALLBACK_ERROR_FORMAT is _de... | {"golden_diff": "diff --git a/sanic/handlers.py b/sanic/handlers.py\n--- a/sanic/handlers.py\n+++ b/sanic/handlers.py\n@@ -78,7 +78,7 @@\n @classmethod\n def _get_fallback_value(cls, error_handler: ErrorHandler, config: Config):\n if error_handler._fallback is not _default:\n- if config._FALL... |
gh_patches_debug_1602 | rasdani/github-patches | git_diff | microsoft__knossos-ksc-1027 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: Segmentation fault in sqrl_pytorch-PyTorch CUDA
Just saw this while working on something else. I haven't done a lot to debug it, but note that it's in copydown, on a fairly innocuous operation (aten::s... | diff --git a/examples/dl-capsule/sqrl.py b/examples/dl-capsule/sqrl.py
--- a/examples/dl-capsule/sqrl.py
+++ b/examples/dl-capsule/sqrl.py
@@ -23,12 +23,12 @@
# run-bench: PyTorch "fast" implementation
def sqrl_pytorch(x: torch.Tensor):
- return sqrl(x)
+ return sqrl.raw_f(x)
# run-bench: PyTorch "nice" ... | {"golden_diff": "diff --git a/examples/dl-capsule/sqrl.py b/examples/dl-capsule/sqrl.py\n--- a/examples/dl-capsule/sqrl.py\n+++ b/examples/dl-capsule/sqrl.py\n@@ -23,12 +23,12 @@\n \n # run-bench: PyTorch \"fast\" implementation\n def sqrl_pytorch(x: torch.Tensor):\n- return sqrl(x)\n+ return sqrl.raw_f(x)\n \n \... |
gh_patches_debug_1603 | rasdani/github-patches | git_diff | learningequality__kolibri-7238 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
import footer styling regression
### Observed behavior

### Expected behavior
button a... | diff --git a/kolibri/core/content/utils/channels.py b/kolibri/core/content/utils/channels.py
--- a/kolibri/core/content/utils/channels.py
+++ b/kolibri/core/content/utils/channels.py
@@ -123,7 +123,7 @@
"id": channel.id,
"name": channel.name,
"description": channel.description,
- ... | {"golden_diff": "diff --git a/kolibri/core/content/utils/channels.py b/kolibri/core/content/utils/channels.py\n--- a/kolibri/core/content/utils/channels.py\n+++ b/kolibri/core/content/utils/channels.py\n@@ -123,7 +123,7 @@\n \"id\": channel.id,\n \"name\": channel.name,\n \"descripti... |
gh_patches_debug_1604 | rasdani/github-patches | git_diff | cocotb__cocotb-2079 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Hierarchy access for generate statement
When we instantiate some block with generate statement.
How to access that hierarchical module?
example) When I want to access "SubBlock[3].u_SubModule.a".
genva... | diff --git a/cocotb/handle.py b/cocotb/handle.py
--- a/cocotb/handle.py
+++ b/cocotb/handle.py
@@ -249,6 +249,10 @@
except KeyError:
pass
+ if not self._discovered:
+ self._discover_all()
+ return self.__get_sub_handle_by_name(name)
+
# Cache to avoid a call... | {"golden_diff": "diff --git a/cocotb/handle.py b/cocotb/handle.py\n--- a/cocotb/handle.py\n+++ b/cocotb/handle.py\n@@ -249,6 +249,10 @@\n except KeyError:\n pass\n \n+ if not self._discovered:\n+ self._discover_all()\n+ return self.__get_sub_handle_by_name(name)\n+\n ... |
gh_patches_debug_1605 | rasdani/github-patches | git_diff | hylang__hy-92 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow (raise)
That's actually valid in Python to re-raise the last catched exception.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.... | diff --git a/hy/compiler.py b/hy/compiler.py
--- a/hy/compiler.py
+++ b/hy/compiler.py
@@ -167,10 +167,10 @@
@builds("throw")
@builds("raise")
- @checkargs(min=1)
+ @checkargs(max=1)
def compile_throw_expression(self, expr):
expr.pop(0)
- exc = self.compile(expr.pop(0))
+ e... | {"golden_diff": "diff --git a/hy/compiler.py b/hy/compiler.py\n--- a/hy/compiler.py\n+++ b/hy/compiler.py\n@@ -167,10 +167,10 @@\n \n @builds(\"throw\")\n @builds(\"raise\")\n- @checkargs(min=1)\n+ @checkargs(max=1)\n def compile_throw_expression(self, expr):\n expr.pop(0)\n- exc = self... |
gh_patches_debug_1606 | rasdani/github-patches | git_diff | zulip__zulip-14678 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: 'LogRecord' object has no attribute 'status_code'
I have a development environment with the latest Git version. After performing many requests, I get blocked because of rate limiting. Then, th... | diff --git a/zerver/lib/logging_util.py b/zerver/lib/logging_util.py
--- a/zerver/lib/logging_util.py
+++ b/zerver/lib/logging_util.py
@@ -119,7 +119,7 @@
# Apparently, `status_code` is added by Django and is not an actual
# attribute of LogRecord; as a result, mypy throws an error if we
# access the `st... | {"golden_diff": "diff --git a/zerver/lib/logging_util.py b/zerver/lib/logging_util.py\n--- a/zerver/lib/logging_util.py\n+++ b/zerver/lib/logging_util.py\n@@ -119,7 +119,7 @@\n # Apparently, `status_code` is added by Django and is not an actual\n # attribute of LogRecord; as a result, mypy throws an error if we... |
gh_patches_debug_1607 | rasdani/github-patches | git_diff | mkdocs__mkdocs-2800 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
jinja2 3.1.0 breaks mkdocs
since the jinja2 3.1.0 release mkdocs does not work any more:
```
admin@host ui % pip install jinja2==3.1.0
Collecting jinja2==3.1.0
Using cached Jinja2-3.1.0-py3-none-any.w... | diff --git a/mkdocs/utils/filters.py b/mkdocs/utils/filters.py
--- a/mkdocs/utils/filters.py
+++ b/mkdocs/utils/filters.py
@@ -1,9 +1,12 @@
-import jinja2
+try:
+ from jinja2 import pass_context as contextfilter
+except ImportError:
+ from jinja2 import contextfilter
from mkdocs.utils import normalize_url
... | {"golden_diff": "diff --git a/mkdocs/utils/filters.py b/mkdocs/utils/filters.py\n--- a/mkdocs/utils/filters.py\n+++ b/mkdocs/utils/filters.py\n@@ -1,9 +1,12 @@\n-import jinja2\n+try:\n+ from jinja2 import pass_context as contextfilter\n+except ImportError:\n+ from jinja2 import contextfilter\n \n from mkdocs.util... |
gh_patches_debug_1608 | rasdani/github-patches | git_diff | cloud-custodian__cloud-custodian-4194 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't filter log-group using creationTime age
I'm trying, but failing to filter log groups that were created more than 30 days ago using the following filter:
```
policies:
- name: OldLogGroups
resour... | diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py
--- a/c7n/resources/cw.py
+++ b/c7n/resources/cw.py
@@ -163,7 +163,11 @@
dimension = 'LogGroupName'
date = 'creationTime'
- augment = universal_augment
+ def augment(self, resources):
+ resources = universal_augment(self, resources)... | {"golden_diff": "diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py\n--- a/c7n/resources/cw.py\n+++ b/c7n/resources/cw.py\n@@ -163,7 +163,11 @@\n dimension = 'LogGroupName'\n date = 'creationTime'\n \n- augment = universal_augment\n+ def augment(self, resources):\n+ resources = universa... |
gh_patches_debug_1609 | rasdani/github-patches | git_diff | gratipay__gratipay.com-302 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Show how many total fundees and the donation amount they're in for.
As a reciever of money I'd like to know how diversified my $13/wk is so that I know how volatile my income is likely to be.
How I see this ... | diff --git a/gittip/__init__.py b/gittip/__init__.py
--- a/gittip/__init__.py
+++ b/gittip/__init__.py
@@ -215,6 +215,17 @@
return tips, total
+def get_histogram_of_giving(user):
+ SQL = """
+ SELECT amount, count(amount) num_contributing FROM tips t WHERE
+ tippee=%s GROUP BY (amount)
+ """
+ r... | {"golden_diff": "diff --git a/gittip/__init__.py b/gittip/__init__.py\n--- a/gittip/__init__.py\n+++ b/gittip/__init__.py\n@@ -215,6 +215,17 @@\n return tips, total\n \n \n+def get_histogram_of_giving(user):\n+ SQL = \"\"\"\n+ SELECT amount, count(amount) num_contributing FROM tips t WHERE\n+ tippee=%s GRO... |
gh_patches_debug_1610 | rasdani/github-patches | git_diff | chainer__chainer-3129 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ChainList doesn't warn self.init_scope()
The following code has a bug. Chainer doesn't warn the usage of `with self.init_scope()` in the subclass of ChainList. Could you add a warning message for such mista... | diff --git a/chainer/link.py b/chainer/link.py
--- a/chainer/link.py
+++ b/chainer/link.py
@@ -820,6 +820,13 @@
for link in links:
self.add_link(link)
+ def __setattr__(self, name, value):
+ if self.within_init_scope and isinstance(value, Link):
+ raise TypeError(
+ ... | {"golden_diff": "diff --git a/chainer/link.py b/chainer/link.py\n--- a/chainer/link.py\n+++ b/chainer/link.py\n@@ -820,6 +820,13 @@\n for link in links:\n self.add_link(link)\n \n+ def __setattr__(self, name, value):\n+ if self.within_init_scope and isinstance(value, Link):\n+ r... |
gh_patches_debug_1611 | rasdani/github-patches | git_diff | fonttools__fonttools-1715 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ascender and ascent
The [opentype spec ](https://docs.microsoft.com/en-gb/typography/opentype/spec/hhea) calls the first two substantive entries in the `hhea` table "`ascender`" and "`descender`". fonttools c... | diff --git a/Lib/fontTools/ttLib/tables/_h_h_e_a.py b/Lib/fontTools/ttLib/tables/_h_h_e_a.py
--- a/Lib/fontTools/ttLib/tables/_h_h_e_a.py
+++ b/Lib/fontTools/ttLib/tables/_h_h_e_a.py
@@ -35,6 +35,19 @@
dependencies = ['hmtx', 'glyf', 'CFF ']
+ # OpenType spec renamed these, add aliases for compatibility
+ @proper... | {"golden_diff": "diff --git a/Lib/fontTools/ttLib/tables/_h_h_e_a.py b/Lib/fontTools/ttLib/tables/_h_h_e_a.py\n--- a/Lib/fontTools/ttLib/tables/_h_h_e_a.py\n+++ b/Lib/fontTools/ttLib/tables/_h_h_e_a.py\n@@ -35,6 +35,19 @@\n \n \tdependencies = ['hmtx', 'glyf', 'CFF ']\n \n+\t# OpenType spec renamed these, add aliases f... |
gh_patches_debug_1612 | rasdani/github-patches | git_diff | celery__celery-7553 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use callable in utils.functional.head_from_fun
After the discussion in #3952, we should investigate whether an improvement can be applied using the builtin `callable` instead of `hasattr(fun, '__call__')`.
h... | diff --git a/celery/utils/functional.py b/celery/utils/functional.py
--- a/celery/utils/functional.py
+++ b/celery/utils/functional.py
@@ -311,7 +311,7 @@
# with an empty body, meaning it has the same performance as
# as just calling a function.
is_function = inspect.isfunction(fun)
- is_callable = ha... | {"golden_diff": "diff --git a/celery/utils/functional.py b/celery/utils/functional.py\n--- a/celery/utils/functional.py\n+++ b/celery/utils/functional.py\n@@ -311,7 +311,7 @@\n # with an empty body, meaning it has the same performance as\n # as just calling a function.\n is_function = inspect.isfunction(fun... |
gh_patches_debug_1613 | rasdani/github-patches | git_diff | translate__pootle-4270 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PootleCommand handles obsolete translation projects
`update_stores` command can make obsolete TP directory many times.
It doesn't affect us much except we get extra unnecessary log messages like this:
```
s... | diff --git a/pootle/apps/pootle_app/management/commands/__init__.py b/pootle/apps/pootle_app/management/commands/__init__.py
--- a/pootle/apps/pootle_app/management/commands/__init__.py
+++ b/pootle/apps/pootle_app/management/commands/__init__.py
@@ -136,7 +136,7 @@
project_query = project_query.filter(cod... | {"golden_diff": "diff --git a/pootle/apps/pootle_app/management/commands/__init__.py b/pootle/apps/pootle_app/management/commands/__init__.py\n--- a/pootle/apps/pootle_app/management/commands/__init__.py\n+++ b/pootle/apps/pootle_app/management/commands/__init__.py\n@@ -136,7 +136,7 @@\n project_query = pro... |
gh_patches_debug_1614 | rasdani/github-patches | git_diff | Pylons__pyramid-3076 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`AllPermissionsList.__iter__` returns tuple(). Should return iter(tuple())?
My understanding is that __iter__ should [return an iterator object](https://docs.python.org/3.5/library/stdtypes.html#container.__i... | diff --git a/pyramid/security.py b/pyramid/security.py
--- a/pyramid/security.py
+++ b/pyramid/security.py
@@ -21,10 +21,13 @@
class AllPermissionsList(object):
""" Stand in 'permission list' to represent all permissions """
+
def __iter__(self):
- return ()
+ return iter(())
+
def __con... | {"golden_diff": "diff --git a/pyramid/security.py b/pyramid/security.py\n--- a/pyramid/security.py\n+++ b/pyramid/security.py\n@@ -21,10 +21,13 @@\n \n class AllPermissionsList(object):\n \"\"\" Stand in 'permission list' to represent all permissions \"\"\"\n+\n def __iter__(self):\n- return ()\n+ ... |
gh_patches_debug_1615 | rasdani/github-patches | git_diff | conan-io__conan-center-index-789 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[question] Consistency in package and generator names
After the discussion in https://github.com/conan-io/conan/issues/6269#issuecomment-570182130, most packages got normalized to use the format discussed in ... | diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py
--- a/recipes/backward-cpp/all/conanfile.py
+++ b/recipes/backward-cpp/all/conanfile.py
@@ -111,7 +111,6 @@
os.remove(os.path.join(self.package_folder, "lib", "backward", "BackwardConfig.cmake"))
def package_info(... | {"golden_diff": "diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py\n--- a/recipes/backward-cpp/all/conanfile.py\n+++ b/recipes/backward-cpp/all/conanfile.py\n@@ -111,7 +111,6 @@\n os.remove(os.path.join(self.package_folder, \"lib\", \"backward\", \"BackwardConfig.cmake\"... |
gh_patches_debug_1616 | rasdani/github-patches | git_diff | openstates__openstates-scrapers-2041 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
OH failing since at least 2017-12-23
OH has been failing since 2017-12-23
Based on automated runs it appears that OH has not run successfully in 2 days (2017-12-23).
```
23:01:27 INFO pupa: save post 85 ... | diff --git a/openstates/oh/bills.py b/openstates/oh/bills.py
--- a/openstates/oh/bills.py
+++ b/openstates/oh/bills.py
@@ -333,8 +333,8 @@
doc = self.get(url.format(chamber=chamber))
leg_json = doc.json()
for leg in leg_json["items"]:
- legislators[leg["med_id"]] = ... | {"golden_diff": "diff --git a/openstates/oh/bills.py b/openstates/oh/bills.py\n--- a/openstates/oh/bills.py\n+++ b/openstates/oh/bills.py\n@@ -333,8 +333,8 @@\n doc = self.get(url.format(chamber=chamber))\n leg_json = doc.json()\n for leg in leg_json[\"items\"]:\n- leg... |
gh_patches_debug_1617 | rasdani/github-patches | git_diff | aio-libs__aiohttp-1431 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Method "read_chunk" of "BodyPartReader" returns zero bytes before eof
## Long story short
I've implemented a multipart file upload handler inspired on code from the [docs](http://aiohttp.readthedocs.io/en/... | diff --git a/aiohttp/multipart.py b/aiohttp/multipart.py
--- a/aiohttp/multipart.py
+++ b/aiohttp/multipart.py
@@ -332,10 +332,6 @@
chunk = window[len(self._prev_chunk):idx]
if not chunk:
self._at_eof = True
- if 0 < len(chunk) < len(sub) and not self._content_eof:
- ... | {"golden_diff": "diff --git a/aiohttp/multipart.py b/aiohttp/multipart.py\n--- a/aiohttp/multipart.py\n+++ b/aiohttp/multipart.py\n@@ -332,10 +332,6 @@\n chunk = window[len(self._prev_chunk):idx]\n if not chunk:\n self._at_eof = True\n- if 0 < len(chunk) < len(sub) and not... |
gh_patches_debug_1618 | rasdani/github-patches | git_diff | cookiecutter__cookiecutter-608 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
file_handle.close() is never called -- and it causes a bug!!
In https://github.com/audreyr/cookiecutter/blob/master/cookiecutter/generate.py#L90, `file_handle.close()` is never called, and there's no need for... | diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py
--- a/cookiecutter/generate.py
+++ b/cookiecutter/generate.py
@@ -87,9 +87,9 @@
context = {}
- file_handle = open(context_file)
try:
- obj = json.load(file_handle, object_pairs_hook=OrderedDict)
+ with open(context_file) as ... | {"golden_diff": "diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py\n--- a/cookiecutter/generate.py\n+++ b/cookiecutter/generate.py\n@@ -87,9 +87,9 @@\n \n context = {}\n \n- file_handle = open(context_file)\n try:\n- obj = json.load(file_handle, object_pairs_hook=OrderedDict)\n+ ... |
gh_patches_debug_1619 | rasdani/github-patches | git_diff | openai__gym-1730 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Sampling Bug
Gym Version: 0.15.3
issue: Box samples numbers above the `high` parameter.
```
from gym.spaces import Box
observation_space = Box(low=-3, high=-1, shape=(9,), dtype='int')
print(observatio... | diff --git a/gym/spaces/box.py b/gym/spaces/box.py
--- a/gym/spaces/box.py
+++ b/gym/spaces/box.py
@@ -93,6 +93,8 @@
sample[bounded] = self.np_random.uniform(low=self.low[bounded],
high=high[bounded],
size=bounded[bounde... | {"golden_diff": "diff --git a/gym/spaces/box.py b/gym/spaces/box.py\n--- a/gym/spaces/box.py\n+++ b/gym/spaces/box.py\n@@ -93,6 +93,8 @@\n sample[bounded] = self.np_random.uniform(low=self.low[bounded], \n high=high[bounded],\n ... |
gh_patches_debug_1620 | rasdani/github-patches | git_diff | urllib3__urllib3-1304 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
RECENT_DATE needs to be bumped
Test suite started failing, as RECENT_DATE is not recent enough:
```
[ 62s] def test_recent_date(self):
[ 62s] # This test is to make sure that the RECENT_D... | diff --git a/urllib3/connection.py b/urllib3/connection.py
--- a/urllib3/connection.py
+++ b/urllib3/connection.py
@@ -56,10 +56,11 @@
'https': 443,
}
-# When updating RECENT_DATE, move it to
-# within two years of the current date, and no
-# earlier than 6 months ago.
-RECENT_DATE = datetime.date(2016, 1, 1)
+... | {"golden_diff": "diff --git a/urllib3/connection.py b/urllib3/connection.py\n--- a/urllib3/connection.py\n+++ b/urllib3/connection.py\n@@ -56,10 +56,11 @@\n 'https': 443,\n }\n \n-# When updating RECENT_DATE, move it to\n-# within two years of the current date, and no\n-# earlier than 6 months ago.\n-RECENT_DATE = ... |
gh_patches_debug_1621 | rasdani/github-patches | git_diff | conan-io__conan-3284 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Consider turning off template directories in Git for conan config install
To help us debug your issue please explain:
- [x] I've read the [CONTRIBUTING guide](https://raw.githubusercontent.com/conan-io/con... | diff --git a/conans/client/conf/config_installer.py b/conans/client/conf/config_installer.py
--- a/conans/client/conf/config_installer.py
+++ b/conans/client/conf/config_installer.py
@@ -44,7 +44,7 @@
with tools.chdir(tmp_folder):
try:
- subprocess.check_output('git -c http.sslVerify=%s clone... | {"golden_diff": "diff --git a/conans/client/conf/config_installer.py b/conans/client/conf/config_installer.py\n--- a/conans/client/conf/config_installer.py\n+++ b/conans/client/conf/config_installer.py\n@@ -44,7 +44,7 @@\n \n with tools.chdir(tmp_folder):\n try:\n- subprocess.check_output('git -c... |
gh_patches_debug_1622 | rasdani/github-patches | git_diff | googleapis__google-cloud-python-1481 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pubsub fails if data key is not present
If a message is published with a string of 0 length (`topic.publish( '', url=url, title=title)`) when the message is received there is no data field in the message and ... | diff --git a/gcloud/pubsub/message.py b/gcloud/pubsub/message.py
--- a/gcloud/pubsub/message.py
+++ b/gcloud/pubsub/message.py
@@ -71,6 +71,6 @@
:type api_repr: dict or None
:param api_repr: The API representation of the message
"""
- data = base64.b64decode(api_repr['data'])
+ ... | {"golden_diff": "diff --git a/gcloud/pubsub/message.py b/gcloud/pubsub/message.py\n--- a/gcloud/pubsub/message.py\n+++ b/gcloud/pubsub/message.py\n@@ -71,6 +71,6 @@\n :type api_repr: dict or None\n :param api_repr: The API representation of the message\n \"\"\"\n- data = base64.b64decode(... |
gh_patches_debug_1623 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-2093 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
RuntimeError: Requested component 'jaeger' not found in entry points for 'opentelemetry_exporter'
From the exporters selection of [spec](https://github.com/open-telemetry/opentelemetry-specification/blob/main... | diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py
--- a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py
+++ b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py
@@ -109,7 +109,7 @@
... | {"golden_diff": "diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py\n--- a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py\n+++ b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py\n@@ -1... |
gh_patches_debug_1624 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-636 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add a standard way to "reset" a Configuration object for testing
It is a common occurrence in tests that the global `Configuration` object needs to be "reset" between tests. This means that its attributes nee... | diff --git a/opentelemetry-api/src/opentelemetry/configuration/__init__.py b/opentelemetry-api/src/opentelemetry/configuration/__init__.py
--- a/opentelemetry-api/src/opentelemetry/configuration/__init__.py
+++ b/opentelemetry-api/src/opentelemetry/configuration/__init__.py
@@ -122,3 +122,20 @@
def __getattr__(s... | {"golden_diff": "diff --git a/opentelemetry-api/src/opentelemetry/configuration/__init__.py b/opentelemetry-api/src/opentelemetry/configuration/__init__.py\n--- a/opentelemetry-api/src/opentelemetry/configuration/__init__.py\n+++ b/opentelemetry-api/src/opentelemetry/configuration/__init__.py\n@@ -122,3 +122,20 @@\n \n... |
gh_patches_debug_1625 | rasdani/github-patches | git_diff | adamchainz__django-mysql-486 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
dangling connection created during system check may become unusable
*Summary*: mysql connection created during system check is not closed timely. This connection might (mysteriously) become unusable afterward... | diff --git a/django_mysql/checks.py b/django_mysql/checks.py
--- a/django_mysql/checks.py
+++ b/django_mysql/checks.py
@@ -17,7 +17,7 @@
errors = []
for alias, connection in mysql_connections():
- with connection.cursor() as cursor:
+ with connection.temporary_connection() as cursor:
... | {"golden_diff": "diff --git a/django_mysql/checks.py b/django_mysql/checks.py\n--- a/django_mysql/checks.py\n+++ b/django_mysql/checks.py\n@@ -17,7 +17,7 @@\n errors = []\n \n for alias, connection in mysql_connections():\n- with connection.cursor() as cursor:\n+ with connection.temporary_connecti... |
gh_patches_debug_1626 | rasdani/github-patches | git_diff | napari__napari-1371 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Napari 0.3.4 release crashes when switching to volume rendering
## 🐛 Bug
Napari 0.3.4 (release version) crashes when trying to render volume in 3D.
## To Reproduce
Steps to reproduce the behavior:... | diff --git a/napari/__init__.py b/napari/__init__.py
--- a/napari/__init__.py
+++ b/napari/__init__.py
@@ -75,5 +75,14 @@
# register napari object types with magicgui if it is installed
_magicgui.register_types_with_magicgui()
+
+# this unused import is here to fix a very strange bug.
+# there is some mysterious ma... | {"golden_diff": "diff --git a/napari/__init__.py b/napari/__init__.py\n--- a/napari/__init__.py\n+++ b/napari/__init__.py\n@@ -75,5 +75,14 @@\n # register napari object types with magicgui if it is installed\n _magicgui.register_types_with_magicgui()\n \n+\n+# this unused import is here to fix a very strange bug.\n+# t... |
gh_patches_debug_1627 | rasdani/github-patches | git_diff | ytdl-org__youtube-dl-18343 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Gfycat cajax json endpoint is gone
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.11.23*. If it's not, read [this FAQ entry](https://github.com/r... | diff --git a/youtube_dl/extractor/gfycat.py b/youtube_dl/extractor/gfycat.py
--- a/youtube_dl/extractor/gfycat.py
+++ b/youtube_dl/extractor/gfycat.py
@@ -53,7 +53,7 @@
video_id = self._match_id(url)
gfy = self._download_json(
- 'http://gfycat.com/cajax/get/%s' % video_id,
+ 'h... | {"golden_diff": "diff --git a/youtube_dl/extractor/gfycat.py b/youtube_dl/extractor/gfycat.py\n--- a/youtube_dl/extractor/gfycat.py\n+++ b/youtube_dl/extractor/gfycat.py\n@@ -53,7 +53,7 @@\n video_id = self._match_id(url)\n \n gfy = self._download_json(\n- 'http://gfycat.com/cajax/get/%s' % v... |
gh_patches_debug_1628 | rasdani/github-patches | git_diff | watchdogpolska__feder-349 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Przyjazny komunikat o aktualizacji wiarygodności

--- END ISSUE ---
Below are some c... | diff --git a/feder/tasks/views.py b/feder/tasks/views.py
--- a/feder/tasks/views.py
+++ b/feder/tasks/views.py
@@ -142,7 +142,10 @@
self.object.save()
def get_success_message(self):
- return _("Survey {object} selected!").format(object=self.object)
+ if self.direction == 'up':
+ ... | {"golden_diff": "diff --git a/feder/tasks/views.py b/feder/tasks/views.py\n--- a/feder/tasks/views.py\n+++ b/feder/tasks/views.py\n@@ -142,7 +142,10 @@\n self.object.save()\n \n def get_success_message(self):\n- return _(\"Survey {object} selected!\").format(object=self.object)\n+ if self.dire... |
gh_patches_debug_1629 | rasdani/github-patches | git_diff | pytorch__vision-810 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`UserWarning` when applying `Normalize`
Hi!
pytorch's version: 1.0.1.post2
torchvision's version: 0.2.2.post3
Sorry for the formatting, but you need to scroll the snippet to the right in order to see the... | diff --git a/torchvision/transforms/functional.py b/torchvision/transforms/functional.py
--- a/torchvision/transforms/functional.py
+++ b/torchvision/transforms/functional.py
@@ -203,8 +203,8 @@
if not inplace:
tensor = tensor.clone()
- mean = torch.tensor(mean, dtype=torch.float32, device=tensor.dev... | {"golden_diff": "diff --git a/torchvision/transforms/functional.py b/torchvision/transforms/functional.py\n--- a/torchvision/transforms/functional.py\n+++ b/torchvision/transforms/functional.py\n@@ -203,8 +203,8 @@\n if not inplace:\n tensor = tensor.clone()\n \n- mean = torch.tensor(mean, dtype=torch.fl... |
gh_patches_debug_1630 | rasdani/github-patches | git_diff | cowrie__cowrie-1761 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Gcc "compile" file quits cowrie
**Describe the bug**
By running gcc to "compile" a file just quits cowrie
**To Reproduce**
Steps to reproduce the behavior:
1. Login on the honeypot
2. Compile the file ... | diff --git a/src/cowrie/commands/gcc.py b/src/cowrie/commands/gcc.py
--- a/src/cowrie/commands/gcc.py
+++ b/src/cowrie/commands/gcc.py
@@ -133,7 +133,7 @@
# Schedule call to make it more time consuming and real
self.scheduled = reactor.callLater( # type: ignore[attr-defined]
- ... | {"golden_diff": "diff --git a/src/cowrie/commands/gcc.py b/src/cowrie/commands/gcc.py\n--- a/src/cowrie/commands/gcc.py\n+++ b/src/cowrie/commands/gcc.py\n@@ -133,7 +133,7 @@\n \n # Schedule call to make it more time consuming and real\n self.scheduled = reactor.callLater( # type: ignore[attr-d... |
gh_patches_debug_1631 | rasdani/github-patches | git_diff | facebookresearch__hydra-1887 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Ray-Plugin] Add support for Python 3.9
Python 3.9 support depends on https://github.com/ray-project/ray/issues/12788
Related to #1062
--- END ISSUE ---
Below are some code segments, each from a relevan... | diff --git a/plugins/hydra_ray_launcher/setup.py b/plugins/hydra_ray_launcher/setup.py
--- a/plugins/hydra_ray_launcher/setup.py
+++ b/plugins/hydra_ray_launcher/setup.py
@@ -19,7 +19,7 @@
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.7",
"Programming Language... | {"golden_diff": "diff --git a/plugins/hydra_ray_launcher/setup.py b/plugins/hydra_ray_launcher/setup.py\n--- a/plugins/hydra_ray_launcher/setup.py\n+++ b/plugins/hydra_ray_launcher/setup.py\n@@ -19,7 +19,7 @@\n \"License :: OSI Approved :: MIT License\",\n \"Programming Language :: Python :: 3.7\",\n ... |
gh_patches_debug_1632 | rasdani/github-patches | git_diff | mitmproxy__mitmproxy-6127 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`view.flows.add` command does not exist but the examples reference it
#### Problem Description
The `view.flows.add` command does not exist but the example `duplicate-modify-replay.py` shows this command be... | diff --git a/examples/addons/duplicate-modify-replay.py b/examples/addons/duplicate-modify-replay.py
--- a/examples/addons/duplicate-modify-replay.py
+++ b/examples/addons/duplicate-modify-replay.py
@@ -10,6 +10,6 @@
# Only interactive tools have a view. If we have one, add a duplicate entry
# for our flow.
... | {"golden_diff": "diff --git a/examples/addons/duplicate-modify-replay.py b/examples/addons/duplicate-modify-replay.py\n--- a/examples/addons/duplicate-modify-replay.py\n+++ b/examples/addons/duplicate-modify-replay.py\n@@ -10,6 +10,6 @@\n # Only interactive tools have a view. If we have one, add a duplicate entry\n... |
gh_patches_debug_1633 | rasdani/github-patches | git_diff | pyodide__pyodide-55 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make work on Chrome
Make work on Chrome
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `tools/buildpkg.py... | diff --git a/tools/buildpkg.py b/tools/buildpkg.py
--- a/tools/buildpkg.py
+++ b/tools/buildpkg.py
@@ -144,7 +144,8 @@
'--js-output={}'.format(os.path.join(buildpath, name + '.js')),
'--export-name=pyodide',
'--exclude', '*.wasm.pre',
- '--exclude', '__pycache__'], check=True)
+ ... | {"golden_diff": "diff --git a/tools/buildpkg.py b/tools/buildpkg.py\n--- a/tools/buildpkg.py\n+++ b/tools/buildpkg.py\n@@ -144,7 +144,8 @@\n '--js-output={}'.format(os.path.join(buildpath, name + '.js')),\n '--export-name=pyodide',\n '--exclude', '*.wasm.pre',\n- '--exclude', '__pycache__... |
gh_patches_debug_1634 | rasdani/github-patches | git_diff | pallets__click-1587 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
click.prompt(type=int, hide_input=True) outputs rejected input
Despite asking `click.prompt()` to hide input it will still outputs the input if it rejects it. I get the same behavior for `7.0` from PyPI, `7.... | diff --git a/src/click/termui.py b/src/click/termui.py
--- a/src/click/termui.py
+++ b/src/click/termui.py
@@ -153,7 +153,10 @@
try:
result = value_proc(value)
except UsageError as e:
- echo(f"Error: {e.message}", err=err) # noqa: B306
+ if hide_input:
+ ... | {"golden_diff": "diff --git a/src/click/termui.py b/src/click/termui.py\n--- a/src/click/termui.py\n+++ b/src/click/termui.py\n@@ -153,7 +153,10 @@\n try:\n result = value_proc(value)\n except UsageError as e:\n- echo(f\"Error: {e.message}\", err=err) # noqa: B306\n+ i... |
gh_patches_debug_1635 | rasdani/github-patches | git_diff | chainer__chainer-271 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
FunctionSet.copy_parameters_from()
Hi all!
The code in 'FunctionSet.copy_parameters_from()' does not work, when 'src' and 'dst' are both numpy.ndarrays?
``` python
if isinstance(dst, numpy.ndarray):
if ... | diff --git a/chainer/function_set.py b/chainer/function_set.py
--- a/chainer/function_set.py
+++ b/chainer/function_set.py
@@ -81,7 +81,7 @@
for dst, src in zip(self.parameters, params):
if isinstance(dst, numpy.ndarray):
if isinstance(src, numpy.ndarray):
- dst... | {"golden_diff": "diff --git a/chainer/function_set.py b/chainer/function_set.py\n--- a/chainer/function_set.py\n+++ b/chainer/function_set.py\n@@ -81,7 +81,7 @@\n for dst, src in zip(self.parameters, params):\n if isinstance(dst, numpy.ndarray):\n if isinstance(src, numpy.ndarray):\n... |
gh_patches_debug_1636 | rasdani/github-patches | git_diff | Qiskit__qiskit-1024 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
_matches_coupling_map seems to check single qubit ops too and fails
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
... | diff --git a/qiskit/transpiler/_transpiler.py b/qiskit/transpiler/_transpiler.py
--- a/qiskit/transpiler/_transpiler.py
+++ b/qiskit/transpiler/_transpiler.py
@@ -457,9 +457,10 @@
for _, data in dag.multi_graph.nodes(data=True):
if data['type'] == 'op':
gate_map = [qr[1] for qr in data['qargs... | {"golden_diff": "diff --git a/qiskit/transpiler/_transpiler.py b/qiskit/transpiler/_transpiler.py\n--- a/qiskit/transpiler/_transpiler.py\n+++ b/qiskit/transpiler/_transpiler.py\n@@ -457,9 +457,10 @@\n for _, data in dag.multi_graph.nodes(data=True):\n if data['type'] == 'op':\n gate_map = [qr[1... |
gh_patches_debug_1637 | rasdani/github-patches | git_diff | ARM-DOE__ACT-396 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add Google Analytics ID
Add a Google Analytics ID to the `conf.py` file used by sphinx. For those interested in having access the analytics, you will need to send over your gmail address
Fixes #396
--- E... | diff --git a/docs/source/conf.py b/docs/source/conf.py
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -126,7 +126,9 @@
# further. For a list of options available for each theme, see the
# documentation.
#
-# html_theme_options = {}
+html_theme_options = {
+ 'google_analytics_id': 'UA-179020619-3',
+}
... | {"golden_diff": "diff --git a/docs/source/conf.py b/docs/source/conf.py\n--- a/docs/source/conf.py\n+++ b/docs/source/conf.py\n@@ -126,7 +126,9 @@\n # further. For a list of options available for each theme, see the\n # documentation.\n #\n-# html_theme_options = {}\n+html_theme_options = {\n+ 'google_analytics_id'... |
gh_patches_debug_1638 | rasdani/github-patches | git_diff | evennia__evennia-2748 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG - Develop] `get_by_tag` category list fails on None
#### Describe the bug
When using a list for the `category` kwarg that contains an entry of `None` (which is a valid category), it fails with a traceba... | diff --git a/evennia/typeclasses/managers.py b/evennia/typeclasses/managers.py
--- a/evennia/typeclasses/managers.py
+++ b/evennia/typeclasses/managers.py
@@ -286,7 +286,7 @@
categories = make_iter(category) if category else []
n_keys = len(keys)
n_categories = len(categories)
- unique... | {"golden_diff": "diff --git a/evennia/typeclasses/managers.py b/evennia/typeclasses/managers.py\n--- a/evennia/typeclasses/managers.py\n+++ b/evennia/typeclasses/managers.py\n@@ -286,7 +286,7 @@\n categories = make_iter(category) if category else []\n n_keys = len(keys)\n n_categories = len(cate... |
gh_patches_debug_1639 | rasdani/github-patches | git_diff | openfun__richie-1960 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
MultipleObjectsReturned error during sync course from LMS to Richie
## Bug Report
**Problematic Behavior**
Error synchronizing course from LMS to Richie after adding a course code.
**Expected behavior/... | diff --git a/src/richie/apps/courses/api.py b/src/richie/apps/courses/api.py
--- a/src/richie/apps/courses/api.py
+++ b/src/richie/apps/courses/api.py
@@ -160,7 +160,7 @@
# Look for the course targeted by the resource link
course_code = normalize_code(lms.extract_course_code(data))
try:
- course =... | {"golden_diff": "diff --git a/src/richie/apps/courses/api.py b/src/richie/apps/courses/api.py\n--- a/src/richie/apps/courses/api.py\n+++ b/src/richie/apps/courses/api.py\n@@ -160,7 +160,7 @@\n # Look for the course targeted by the resource link\n course_code = normalize_code(lms.extract_course_code(data))\n ... |
gh_patches_debug_1640 | rasdani/github-patches | git_diff | spotify__luigi-880 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix external dynamic deps
Since running tasks communicate with worker via a queue, all dynamic dependencies that they yield must be serialized and then deserialized back. This doesn't work if a task has `run ... | diff --git a/luigi/task_register.py b/luigi/task_register.py
--- a/luigi/task_register.py
+++ b/luigi/task_register.py
@@ -135,8 +135,6 @@
# We return this in a topologically sorted list of inheritance: this is useful in some cases (#822)
reg = OrderedDict()
for cls in cls._reg:
- ... | {"golden_diff": "diff --git a/luigi/task_register.py b/luigi/task_register.py\n--- a/luigi/task_register.py\n+++ b/luigi/task_register.py\n@@ -135,8 +135,6 @@\n # We return this in a topologically sorted list of inheritance: this is useful in some cases (#822)\n reg = OrderedDict()\n for cls in ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.