problem_id stringlengths 18 22 | source stringclasses 1
value | task_type stringclasses 1
value | in_source_id stringlengths 13 58 | prompt stringlengths 1.1k 10.2k | golden_diff stringlengths 151 4.94k | verification_info stringlengths 582 21k | num_tokens int64 271 2.05k | num_tokens_diff int64 47 1.02k |
|---|---|---|---|---|---|---|---|---|
gh_patches_debug_38607 | rasdani/github-patches | git_diff | liqd__a4-opin-688 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spatial Idea Challenge: No comments possible
In the blueprint Spatial Idea Challenge, in phase 1 comments cannot be made (be sure to test with normal user account). We need to fix the blueprint, apparently. S... | diff --git a/euth/maps/rules.py b/euth/maps/rules.py
--- a/euth/maps/rules.py
+++ b/euth/maps/rules.py
@@ -3,11 +3,36 @@
from adhocracy4.modules.predicates import (is_context_initiator,
is_context_member,
- is_context_moderator)
-f... | {"golden_diff": "diff --git a/euth/maps/rules.py b/euth/maps/rules.py\n--- a/euth/maps/rules.py\n+++ b/euth/maps/rules.py\n@@ -3,11 +3,36 @@\n \n from adhocracy4.modules.predicates import (is_context_initiator,\n is_context_member,\n- ... | 1,164 | 665 |
gh_patches_debug_26237 | rasdani/github-patches | git_diff | netket__netket-212 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Get rid of netket::Ising and other hard-coded hamiltonians in c++
In the spirit of #199 , we can safely remove the Ising and Heisenberg hamiltonians from the C++ classes, since those are nothing but specific ... | diff --git a/netket/operator.py b/netket/operator.py
--- a/netket/operator.py
+++ b/netket/operator.py
@@ -1 +1,52 @@
from ._C_netket.operator import *
+import numpy as _np
+
+
+def Ising(hilbert, h, J=1.0):
+ """
+ Constructs a new ``Ising`` given a hilbert space, a transverse field,
+ and (if specified) a c... | {"golden_diff": "diff --git a/netket/operator.py b/netket/operator.py\n--- a/netket/operator.py\n+++ b/netket/operator.py\n@@ -1 +1,52 @@\n from ._C_netket.operator import *\n+import numpy as _np\n+\n+\n+def Ising(hilbert, h, J=1.0):\n+ \"\"\"\n+ Constructs a new ``Ising`` given a hilbert space, a transverse fiel... | 390 | 711 |
gh_patches_debug_37010 | rasdani/github-patches | git_diff | mirumee__ariadne-565 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Federated schemas should not require at least one query to be implemented
In a Federated environment, the Gateway instantiates the Query type by default. This means that an implementing services should _not_ ... | diff --git a/ariadne/contrib/federation/schema.py b/ariadne/contrib/federation/schema.py
--- a/ariadne/contrib/federation/schema.py
+++ b/ariadne/contrib/federation/schema.py
@@ -2,6 +2,7 @@
from graphql import extend_schema, parse
from graphql.language import DocumentNode
+from graphql.language.ast import ObjectTy... | {"golden_diff": "diff --git a/ariadne/contrib/federation/schema.py b/ariadne/contrib/federation/schema.py\n--- a/ariadne/contrib/federation/schema.py\n+++ b/ariadne/contrib/federation/schema.py\n@@ -2,6 +2,7 @@\n \n from graphql import extend_schema, parse\n from graphql.language import DocumentNode\n+from graphql.lang... | 1,687 | 547 |
gh_patches_debug_28358 | rasdani/github-patches | git_diff | mkdocs__mkdocs-1517 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unicode paths break clean_directory on server
Discovered a weird error with the server and Unicode characters in paths. Run the following command and everything seems fine:
mkdocs serve -f mkdocs/tests... | diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py
--- a/mkdocs/commands/serve.py
+++ b/mkdocs/commands/serve.py
@@ -92,7 +92,9 @@
"""
# Create a temporary build directory, and set some options to serve it
- tempdir = tempfile.mkdtemp()
+ # PY2 returns a byte string by default. The Unico... | {"golden_diff": "diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py\n--- a/mkdocs/commands/serve.py\n+++ b/mkdocs/commands/serve.py\n@@ -92,7 +92,9 @@\n \"\"\"\n \n # Create a temporary build directory, and set some options to serve it\n- tempdir = tempfile.mkdtemp()\n+ # PY2 returns a byte ... | 1,885 | 380 |
gh_patches_debug_34083 | rasdani/github-patches | git_diff | Nitrate__Nitrate-532 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Replace deprecated inspect.getargspec call in log_call
`inspect.getargspec` has been deprecated. Replace it with equivalent function call.
--- END ISSUE ---
Below are some code segments, each from a relevan... | diff --git a/src/tcms/xmlrpc/decorators.py b/src/tcms/xmlrpc/decorators.py
--- a/src/tcms/xmlrpc/decorators.py
+++ b/src/tcms/xmlrpc/decorators.py
@@ -28,7 +28,7 @@
def log_call(*args, **kwargs):
"""Log XMLRPC-specific invocations
- This is copied from kobo.django.xmlrpc.decorators to add custom abitlities,
... | {"golden_diff": "diff --git a/src/tcms/xmlrpc/decorators.py b/src/tcms/xmlrpc/decorators.py\n--- a/src/tcms/xmlrpc/decorators.py\n+++ b/src/tcms/xmlrpc/decorators.py\n@@ -28,7 +28,7 @@\n def log_call(*args, **kwargs):\n \"\"\"Log XMLRPC-specific invocations\n \n- This is copied from kobo.django.xmlrpc.decorators... | 868 | 442 |
gh_patches_debug_5812 | rasdani/github-patches | git_diff | wagtail__wagtail-713 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Typo in wagtailforms.forms.FormBuilder.formfields
Line 86:
``` python
raise Exception("Unrecognised field type: " + form.field_type)
```
This raises `NameError: global name 'form' is not defined`
Ordinaril... | diff --git a/wagtail/wagtailforms/forms.py b/wagtail/wagtailforms/forms.py
--- a/wagtail/wagtailforms/forms.py
+++ b/wagtail/wagtailforms/forms.py
@@ -83,7 +83,7 @@
if field.field_type in self.FIELD_TYPES:
formfields[field.clean_name] = self.FIELD_TYPES[field.field_type](self, field, optio... | {"golden_diff": "diff --git a/wagtail/wagtailforms/forms.py b/wagtail/wagtailforms/forms.py\n--- a/wagtail/wagtailforms/forms.py\n+++ b/wagtail/wagtailforms/forms.py\n@@ -83,7 +83,7 @@\n if field.field_type in self.FIELD_TYPES:\n formfields[field.clean_name] = self.FIELD_TYPES[field.field_ty... | 1,375 | 134 |
gh_patches_debug_23126 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-2635 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider riteaid is broken
During the global build at 2021-08-11-14-42-19, spider **riteaid** failed with **1234 features** and **1 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-08-11-14-4... | diff --git a/locations/spiders/riteaid.py b/locations/spiders/riteaid.py
--- a/locations/spiders/riteaid.py
+++ b/locations/spiders/riteaid.py
@@ -8,7 +8,7 @@
name = "riteaid"
allowed_domains = ["riteaid.com"]
start_urls = (
- 'https://locations.riteaid.com/',
+ 'https://www.riteaid.com/loc... | {"golden_diff": "diff --git a/locations/spiders/riteaid.py b/locations/spiders/riteaid.py\n--- a/locations/spiders/riteaid.py\n+++ b/locations/spiders/riteaid.py\n@@ -8,7 +8,7 @@\n name = \"riteaid\"\n allowed_domains = [\"riteaid.com\"]\n start_urls = (\n- 'https://locations.riteaid.com/',\n+ ... | 1,890 | 290 |
gh_patches_debug_29536 | rasdani/github-patches | git_diff | fossasia__open-event-server-2067 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Internal server error in promotion link
https://open-event-dev.herokuapp.com/events/110/tickets/promotion/
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these fi... | diff --git a/app/views/admin/models_views/ticket_sales.py b/app/views/admin/models_views/ticket_sales.py
--- a/app/views/admin/models_views/ticket_sales.py
+++ b/app/views/admin/models_views/ticket_sales.py
@@ -1,6 +1,6 @@
import flask_login
import pycountry
-from flask import redirect
+from flask import redirect, fl... | {"golden_diff": "diff --git a/app/views/admin/models_views/ticket_sales.py b/app/views/admin/models_views/ticket_sales.py\n--- a/app/views/admin/models_views/ticket_sales.py\n+++ b/app/views/admin/models_views/ticket_sales.py\n@@ -1,6 +1,6 @@\n import flask_login\n import pycountry\n-from flask import redirect\n+from f... | 1,521 | 411 |
gh_patches_debug_31238 | rasdani/github-patches | git_diff | marshmallow-code__webargs-832 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Dealing with empty values in `DelimitedFieldMixin`
`DelimitedList(String())` deserializes "a,,c" as `["a", "", "c"]`.
I guess this meets user expectations.
My expectation with integers would be that
... | diff --git a/src/webargs/fields.py b/src/webargs/fields.py
--- a/src/webargs/fields.py
+++ b/src/webargs/fields.py
@@ -15,6 +15,8 @@
"""
from __future__ import annotations
+import typing
+
import marshmallow as ma
# Expose all fields from marshmallow.fields.
@@ -64,6 +66,8 @@
delimiter: str = ","
# de... | {"golden_diff": "diff --git a/src/webargs/fields.py b/src/webargs/fields.py\n--- a/src/webargs/fields.py\n+++ b/src/webargs/fields.py\n@@ -15,6 +15,8 @@\n \"\"\"\n from __future__ import annotations\n \n+import typing\n+\n import marshmallow as ma\n \n # Expose all fields from marshmallow.fields.\n@@ -64,6 +66,8 @@\n ... | 1,876 | 390 |
gh_patches_debug_15073 | rasdani/github-patches | git_diff | allegro__ralph-3365 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
min_ip, max_ip fields erroring despite being specified via JSON REST API
As of commit 4794c4c04fced29b397b58a7689ff725c20ff6bd I'm having a problem where the JSON rest API won't let me create networks - https... | diff --git a/src/ralph/networks/api.py b/src/ralph/networks/api.py
--- a/src/ralph/networks/api.py
+++ b/src/ralph/networks/api.py
@@ -34,6 +34,13 @@
)
+class NetworkSaveSerializer(RalphAPISerializer):
+ class Meta:
+ model = Network
+ depth = 1
+ exclude = ('min_ip', 'max_ip')
+
+
... | {"golden_diff": "diff --git a/src/ralph/networks/api.py b/src/ralph/networks/api.py\n--- a/src/ralph/networks/api.py\n+++ b/src/ralph/networks/api.py\n@@ -34,6 +34,13 @@\n )\n \n \n+class NetworkSaveSerializer(RalphAPISerializer):\n+ class Meta:\n+ model = Network\n+ depth = 1\n+ exclude... | 1,569 | 191 |
gh_patches_debug_24344 | rasdani/github-patches | git_diff | getnikola__nikola-1068 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
nikola auto not working
I'm a newb so suspect user error, but I installed nikola v6.3.0 (pip install nikola) and have not been able to get **nikola auto** to work.
Initially I was getting errors due to a mo... | diff --git a/nikola/plugins/command/auto.py b/nikola/plugins/command/auto.py
--- a/nikola/plugins/command/auto.py
+++ b/nikola/plugins/command/auto.py
@@ -64,20 +64,20 @@
req_missing(['livereload>=2.0.0'], 'use the "auto" command')
return
- # Run an initial build so we are uptodate
+ ... | {"golden_diff": "diff --git a/nikola/plugins/command/auto.py b/nikola/plugins/command/auto.py\n--- a/nikola/plugins/command/auto.py\n+++ b/nikola/plugins/command/auto.py\n@@ -64,20 +64,20 @@\n req_missing(['livereload>=2.0.0'], 'use the \"auto\" command')\n return\n \n- # Run an initial b... | 1,325 | 298 |
gh_patches_debug_24665 | rasdani/github-patches | git_diff | TabbycatDebate__tabbycat-1173 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
NonExistentTimeError and AmbiguousTimeError on daylight time changes with checkin filter window
I believe this error occurs when:
- There is a change into or out of daylight saving time
- A user loads a view ... | diff --git a/tabbycat/checkins/utils.py b/tabbycat/checkins/utils.py
--- a/tabbycat/checkins/utils.py
+++ b/tabbycat/checkins/utils.py
@@ -4,7 +4,9 @@
import string
from django.db import IntegrityError
+from django.db.models import Q
from django.core.exceptions import ObjectDoesNotExist
+from django.utils import t... | {"golden_diff": "diff --git a/tabbycat/checkins/utils.py b/tabbycat/checkins/utils.py\n--- a/tabbycat/checkins/utils.py\n+++ b/tabbycat/checkins/utils.py\n@@ -4,7 +4,9 @@\n import string\n \n from django.db import IntegrityError\n+from django.db.models import Q\n from django.core.exceptions import ObjectDoesNotExist\n+... | 1,997 | 296 |
gh_patches_debug_39039 | rasdani/github-patches | git_diff | Mailu__Mailu-1392 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
certwatcher.py is not using TLS_CERT_FILENAME nor TLS_KEYPAIR_FILENAME
certwatcher.py is assuming that the certificate and the key are in /certs and named respectively cert.pem and key.pem
However, Mailu o... | diff --git a/core/nginx/certwatcher.py b/core/nginx/certwatcher.py
--- a/core/nginx/certwatcher.py
+++ b/core/nginx/certwatcher.py
@@ -5,8 +5,8 @@
of TLS_FLAVOR=[mail, cert]
"""
-from os.path import exists, split as path_split
-from os import system
+from os.path import exists, split as path_split, join as path_joi... | {"golden_diff": "diff --git a/core/nginx/certwatcher.py b/core/nginx/certwatcher.py\n--- a/core/nginx/certwatcher.py\n+++ b/core/nginx/certwatcher.py\n@@ -5,8 +5,8 @@\n of TLS_FLAVOR=[mail, cert]\n \"\"\"\n \n-from os.path import exists, split as path_split\n-from os import system\n+from os.path import exists, split as... | 1,028 | 647 |
gh_patches_debug_5433 | rasdani/github-patches | git_diff | open-mmlab__mmocr-221 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make default ingnored class to -100 in SDMGRLoss
In most cases, class 0 should not be ignored.
ref https://github.com/open-mmlab/mmocr/blob/main/mmocr/models/kie/losses/sdmgr_loss.py#L17
--- END ISSUE ---... | diff --git a/mmocr/models/kie/losses/sdmgr_loss.py b/mmocr/models/kie/losses/sdmgr_loss.py
--- a/mmocr/models/kie/losses/sdmgr_loss.py
+++ b/mmocr/models/kie/losses/sdmgr_loss.py
@@ -14,7 +14,7 @@
https://arxiv.org/abs/2103.14470.
"""
- def __init__(self, node_weight=1.0, edge_weight=1.0, ignore=0):
+ ... | {"golden_diff": "diff --git a/mmocr/models/kie/losses/sdmgr_loss.py b/mmocr/models/kie/losses/sdmgr_loss.py\n--- a/mmocr/models/kie/losses/sdmgr_loss.py\n+++ b/mmocr/models/kie/losses/sdmgr_loss.py\n@@ -14,7 +14,7 @@\n https://arxiv.org/abs/2103.14470.\n \"\"\"\n \n- def __init__(self, node_weight=1.0, edge_... | 778 | 186 |
gh_patches_debug_525 | rasdani/github-patches | git_diff | fidals__shopelectro-592 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix env substitution in docker-compose.yml for docker-rm
https://ci.fidals.com/fidals/shopelectro/938/12
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files... | diff --git a/shopelectro/management/commands/excel.py b/shopelectro/management/commands/excel.py
--- a/shopelectro/management/commands/excel.py
+++ b/shopelectro/management/commands/excel.py
@@ -1,7 +1,7 @@
"""
Generate Excel price-list.
-Use this excel editor lib: https://openpyxl.readthedocs.io/en/default/
+Use t... | {"golden_diff": "diff --git a/shopelectro/management/commands/excel.py b/shopelectro/management/commands/excel.py\n--- a/shopelectro/management/commands/excel.py\n+++ b/shopelectro/management/commands/excel.py\n@@ -1,7 +1,7 @@\n \"\"\"\n Generate Excel price-list.\n \n-Use this excel editor lib: https://openpyxl.readth... | 1,907 | 119 |
gh_patches_debug_23961 | rasdani/github-patches | git_diff | mindsdb__mindsdb-1858 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Feat] convert query to string using new mindsdb_sql feature
Since [that works](https://github.com/mindsdb/mindsdb_sql/issues/130) is finished, we can add this changes to mindsdb. So ve can delete dirtyfix fo... | diff --git a/mindsdb/api/mysql/mysql_proxy/utilities/sql.py b/mindsdb/api/mysql/mysql_proxy/utilities/sql.py
--- a/mindsdb/api/mysql/mysql_proxy/utilities/sql.py
+++ b/mindsdb/api/mysql/mysql_proxy/utilities/sql.py
@@ -2,6 +2,9 @@
import pandas as pd
from mindsdb_sql import parse_sql
from mindsdb_sql.parser.ast impo... | {"golden_diff": "diff --git a/mindsdb/api/mysql/mysql_proxy/utilities/sql.py b/mindsdb/api/mysql/mysql_proxy/utilities/sql.py\n--- a/mindsdb/api/mysql/mysql_proxy/utilities/sql.py\n+++ b/mindsdb/api/mysql/mysql_proxy/utilities/sql.py\n@@ -2,6 +2,9 @@\n import pandas as pd\n from mindsdb_sql import parse_sql\n from mind... | 802 | 350 |
gh_patches_debug_30403 | rasdani/github-patches | git_diff | pytorch__pytorch-2645 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug in legacy padding layer
I've found a bug in [Padding.py](https://github.com/pytorch/pytorch/blob/master/torch/legacy/nn/Padding.py).
It doesn't handle nInputDim original Torch Padding layer's parameter .... | diff --git a/torch/legacy/nn/Padding.py b/torch/legacy/nn/Padding.py
--- a/torch/legacy/nn/Padding.py
+++ b/torch/legacy/nn/Padding.py
@@ -7,12 +7,15 @@
# index [index] in that dimension. If pad<0, index counts from the left.
# If pad>0 index counts from the right index = 1 pads before index 1.
# index =... | {"golden_diff": "diff --git a/torch/legacy/nn/Padding.py b/torch/legacy/nn/Padding.py\n--- a/torch/legacy/nn/Padding.py\n+++ b/torch/legacy/nn/Padding.py\n@@ -7,12 +7,15 @@\n # index [index] in that dimension. If pad<0, index counts from the left.\n # If pad>0 index counts from the right index = 1 pads before i... | 1,502 | 437 |
gh_patches_debug_22994 | rasdani/github-patches | git_diff | numba__numba-2610 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Lowering error when removing element from the middle of linked list
Hi
I am having a hard time trying to figure out an error when I reassign "element_0.next = element_1.next" of a linked list. I posted my ... | diff --git a/numba/targets/optional.py b/numba/targets/optional.py
--- a/numba/targets/optional.py
+++ b/numba/targets/optional.py
@@ -1,9 +1,9 @@
from __future__ import print_function, absolute_import, division
-from numba import types, cgutils
+from numba import types, cgutils, typing
from .imputils import (low... | {"golden_diff": "diff --git a/numba/targets/optional.py b/numba/targets/optional.py\n--- a/numba/targets/optional.py\n+++ b/numba/targets/optional.py\n@@ -1,9 +1,9 @@\n from __future__ import print_function, absolute_import, division\n \n-from numba import types, cgutils\n+from numba import types, cgutils, typing\n \n ... | 1,524 | 325 |
gh_patches_debug_8179 | rasdani/github-patches | git_diff | Gallopsled__pwntools-1659 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fatal error when $TERM is not set
I am trying to use `pwntools` in a SageMath script. This works great interactively, but when I run my script with `sage foo.sage`, it fails somewhere in terminal code. I have... | diff --git a/pwnlib/term/unix_termcap.py b/pwnlib/term/unix_termcap.py
--- a/pwnlib/term/unix_termcap.py
+++ b/pwnlib/term/unix_termcap.py
@@ -60,6 +60,8 @@
except curses.error as e:
import traceback
print('Warning:', ''.join(traceback.format_exception_only(e.__class__, e)), file=sys.... | {"golden_diff": "diff --git a/pwnlib/term/unix_termcap.py b/pwnlib/term/unix_termcap.py\n--- a/pwnlib/term/unix_termcap.py\n+++ b/pwnlib/term/unix_termcap.py\n@@ -60,6 +60,8 @@\n except curses.error as e:\n import traceback\n print('Warning:', ''.join(traceback.format_exception_only(e.__... | 1,463 | 159 |
gh_patches_debug_30175 | rasdani/github-patches | git_diff | microsoft__ptvsd-480 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PyPI package missing information
Looking at https://pypi.org/project/ptvsd/4.0.0a1/ we are currently missing:
* link to GitHub
* long description
* specific classifiers
* any mention of VS Code
* link to... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -39,6 +39,10 @@
yield filename
+with open('DESCRIPTION.md', 'r') as fh:
+ long_description = fh.read()
+
+
if __name__ == '__main__':
if not os.getenv('SKIP_CYTHON_BUILD'):
cython_build()
@@ -47,17 +51,22 @@
na... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -39,6 +39,10 @@\n yield filename\n \n \n+with open('DESCRIPTION.md', 'r') as fh:\n+ long_description = fh.read()\n+\n+\n if __name__ == '__main__':\n if not os.getenv('SKIP_CYTHON_BUILD'):\n cython_build()\n... | 972 | 400 |
gh_patches_debug_18596 | rasdani/github-patches | git_diff | mkdocs__mkdocs-647 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Mailto links not correctly interpreted
Hi,
I've noticed "mailto" links are not correctly interpreted.
- This code:
```
Contact us at <foo@bar>
```
- Renders the following link:
http://localhost//mailto:... | diff --git a/mkdocs/relative_path_ext.py b/mkdocs/relative_path_ext.py
--- a/mkdocs/relative_path_ext.py
+++ b/mkdocs/relative_path_ext.py
@@ -43,6 +43,7 @@
from markdown.extensions import Extension
from markdown.treeprocessors import Treeprocessor
+from markdown.util import AMP_SUBSTITUTE
from mkdocs import uti... | {"golden_diff": "diff --git a/mkdocs/relative_path_ext.py b/mkdocs/relative_path_ext.py\n--- a/mkdocs/relative_path_ext.py\n+++ b/mkdocs/relative_path_ext.py\n@@ -43,6 +43,7 @@\n \n from markdown.extensions import Extension\n from markdown.treeprocessors import Treeprocessor\n+from markdown.util import AMP_SUBSTITUTE\n... | 1,712 | 228 |
gh_patches_debug_30640 | rasdani/github-patches | git_diff | sanic-org__sanic-326 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
During handling of the above exception, another exception occurred
In the examples/exception_monitoring.py, when i try to run the app and hit the default route, it prints out the exception and then it calls "... | diff --git a/examples/exception_monitoring.py b/examples/exception_monitoring.py
--- a/examples/exception_monitoring.py
+++ b/examples/exception_monitoring.py
@@ -9,17 +9,15 @@
class' default handler, we can do anything including sending exceptions to
an external service.
"""
-
-
-
+from sanic.exceptions import Hand... | {"golden_diff": "diff --git a/examples/exception_monitoring.py b/examples/exception_monitoring.py\n--- a/examples/exception_monitoring.py\n+++ b/examples/exception_monitoring.py\n@@ -9,17 +9,15 @@\n class' default handler, we can do anything including sending exceptions to\n an external service.\n \"\"\"\n-\n-\n-\n+fro... | 918 | 333 |
gh_patches_debug_13210 | rasdani/github-patches | git_diff | fossasia__open-event-server-7862 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Calendar link in calendar not working properly
In the description, "Join using link: https://eventyay.com/e/fa96ae2c/video/Main Hall/187"
The space is treated as a break, clipping the link at Main"
"Ma... | diff --git a/app/api/helpers/calendar/ical.py b/app/api/helpers/calendar/ical.py
--- a/app/api/helpers/calendar/ical.py
+++ b/app/api/helpers/calendar/ical.py
@@ -1,3 +1,5 @@
+from urllib.parse import quote
+
import pytz
from flask import jsonify
from flask_jwt_extended import current_user
@@ -57,7 +59,7 @@
... | {"golden_diff": "diff --git a/app/api/helpers/calendar/ical.py b/app/api/helpers/calendar/ical.py\n--- a/app/api/helpers/calendar/ical.py\n+++ b/app/api/helpers/calendar/ical.py\n@@ -1,3 +1,5 @@\n+from urllib.parse import quote\n+\n import pytz\n from flask import jsonify\n from flask_jwt_extended import current_user\n... | 1,267 | 143 |
gh_patches_debug_38935 | rasdani/github-patches | git_diff | Zeroto521__my-data-toolkit-833 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ENH: New geoaccessor `geocentroid` to get the center point of points
<!--
Thanks for contributing a pull request!
Please follow these standard acronyms to start the commit message:
- ENH: enhancement
... | diff --git a/dtoolkit/geoaccessor/geodataframe/geocentroid.py b/dtoolkit/geoaccessor/geodataframe/geocentroid.py
--- a/dtoolkit/geoaccessor/geodataframe/geocentroid.py
+++ b/dtoolkit/geoaccessor/geodataframe/geocentroid.py
@@ -18,7 +18,7 @@
/,
weights: Hashable | pd.Series = None,
max_iter: int = 300,
- ... | {"golden_diff": "diff --git a/dtoolkit/geoaccessor/geodataframe/geocentroid.py b/dtoolkit/geoaccessor/geodataframe/geocentroid.py\n--- a/dtoolkit/geoaccessor/geodataframe/geocentroid.py\n+++ b/dtoolkit/geoaccessor/geodataframe/geocentroid.py\n@@ -18,7 +18,7 @@\n /,\n weights: Hashable | pd.Series = None,\n ... | 1,933 | 1,014 |
gh_patches_debug_33369 | rasdani/github-patches | git_diff | OCA__stock-logistics-warehouse-1192 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[12.0] stock_secondary_unit "secondary qty" value in picking not affecting "initial demand"
AFFECTED VERSIONS
12.0 (it works ok on 13.0)
STEPS TO REPRODUCE
Activate Units of Measure in general settin... | diff --git a/stock_secondary_unit/models/stock_move.py b/stock_secondary_unit/models/stock_move.py
--- a/stock_secondary_unit/models/stock_move.py
+++ b/stock_secondary_unit/models/stock_move.py
@@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from... | {"golden_diff": "diff --git a/stock_secondary_unit/models/stock_move.py b/stock_secondary_unit/models/stock_move.py\n--- a/stock_secondary_unit/models/stock_move.py\n+++ b/stock_secondary_unit/models/stock_move.py\n@@ -2,7 +2,7 @@\n # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).\n from odoo import api... | 1,177 | 611 |
gh_patches_debug_14880 | rasdani/github-patches | git_diff | google__pytype-520 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pytype can't parse hex literals
The following code causes the error `ParseError: syntax error, unexpected NAME, expecting ']'`:
```py
from typing import Literal
a: Literal[0x00ff]
```
Add lexing for b... | diff --git a/pytype/tools/traces/source.py b/pytype/tools/traces/source.py
--- a/pytype/tools/traces/source.py
+++ b/pytype/tools/traces/source.py
@@ -4,6 +4,9 @@
from __future__ import print_function
import collections
+from pytype import compat
+
+
Location = collections.namedtuple("Location", ("line", "column")... | {"golden_diff": "diff --git a/pytype/tools/traces/source.py b/pytype/tools/traces/source.py\n--- a/pytype/tools/traces/source.py\n+++ b/pytype/tools/traces/source.py\n@@ -4,6 +4,9 @@\n from __future__ import print_function\n import collections\n \n+from pytype import compat\n+\n+\n Location = collections.namedtuple(\"L... | 2,024 | 200 |
gh_patches_debug_11603 | rasdani/github-patches | git_diff | opsdroid__opsdroid-1648 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Migrate tests from unittest to pytest
Our existing test suite has been written with the Python [`unittest`](https://docs.python.org/3/library/unittest.html) framework. However, as the test suite has grown and... | diff --git a/opsdroid/conftest.py b/opsdroid/conftest.py
--- a/opsdroid/conftest.py
+++ b/opsdroid/conftest.py
@@ -1,8 +1,29 @@
"""Pytest config for all opsdroid tests."""
+import pytest
+
+import asyncio
+
from opsdroid.testing import opsdroid
+from opsdroid.connector import Connector
from opsdroid.cli.start impo... | {"golden_diff": "diff --git a/opsdroid/conftest.py b/opsdroid/conftest.py\n--- a/opsdroid/conftest.py\n+++ b/opsdroid/conftest.py\n@@ -1,8 +1,29 @@\n \"\"\"Pytest config for all opsdroid tests.\"\"\"\n+import pytest\n+\n+import asyncio\n+\n from opsdroid.testing import opsdroid\n+from opsdroid.connector import Connecto... | 1,570 | 218 |
gh_patches_debug_38667 | rasdani/github-patches | git_diff | encode__uvicorn-22 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Signal handlers
In the worker class
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `uvicorn/worker.py`
Cont... | diff --git a/uvicorn/worker.py b/uvicorn/worker.py
--- a/uvicorn/worker.py
+++ b/uvicorn/worker.py
@@ -1,5 +1,7 @@
import asyncio
import functools
+import signal
+import sys
import uvloop
@@ -19,6 +21,11 @@
* `httptools` as the HTTP request parser.
"""
+ def __init__(self, *args, **kwargs): # pra... | {"golden_diff": "diff --git a/uvicorn/worker.py b/uvicorn/worker.py\n--- a/uvicorn/worker.py\n+++ b/uvicorn/worker.py\n@@ -1,5 +1,7 @@\n import asyncio\n import functools\n+import signal\n+import sys\n \n import uvloop\n \n@@ -19,6 +21,11 @@\n * `httptools` as the HTTP request parser.\n \"\"\"\n \n+ def __in... | 753 | 766 |
gh_patches_debug_2047 | rasdani/github-patches | git_diff | conan-io__conan-center-index-7286 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[package] aws-c-event-stream/0.2.7: conflicting openssl versions
```
ERROR: Conflict in s2n/1.0.11:
's2n/1.0.11' requires 'openssl/1.1.1k' while 'aws-c-cal/0.5.11' requires 'openssl/1.1.1l'.
To fix... | diff --git a/recipes/s2n/all/conanfile.py b/recipes/s2n/all/conanfile.py
--- a/recipes/s2n/all/conanfile.py
+++ b/recipes/s2n/all/conanfile.py
@@ -36,7 +36,7 @@
del self.settings.compiler.libcxx
def requirements(self):
- self.requires("openssl/1.1.1k")
+ self.requires("openssl/1.1.1l")
... | {"golden_diff": "diff --git a/recipes/s2n/all/conanfile.py b/recipes/s2n/all/conanfile.py\n--- a/recipes/s2n/all/conanfile.py\n+++ b/recipes/s2n/all/conanfile.py\n@@ -36,7 +36,7 @@\n del self.settings.compiler.libcxx\n \n def requirements(self):\n- self.requires(\"openssl/1.1.1k\")\n+ self.req... | 1,401 | 125 |
gh_patches_debug_3768 | rasdani/github-patches | git_diff | quantumlib__Cirq-1794 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
QubitOrder.explicit fails when given an iterator
Also affects `QubitOrder.as_qubit_order()`. I believe the issue is on line 77 of cirq/ops/qubit_order.py.
Example:
```
cirq.QubitOrder.as_qubit_order(rev... | diff --git a/cirq/ops/qubit_order.py b/cirq/ops/qubit_order.py
--- a/cirq/ops/qubit_order.py
+++ b/cirq/ops/qubit_order.py
@@ -74,7 +74,7 @@
'Qubits appear in fixed_order twice: {}.'.format(result))
def func(qubits):
- remaining = set(qubits) - set(fixed_qubits)
+ remai... | {"golden_diff": "diff --git a/cirq/ops/qubit_order.py b/cirq/ops/qubit_order.py\n--- a/cirq/ops/qubit_order.py\n+++ b/cirq/ops/qubit_order.py\n@@ -74,7 +74,7 @@\n 'Qubits appear in fixed_order twice: {}.'.format(result))\n \n def func(qubits):\n- remaining = set(qubits) - set(fixed_qu... | 2,010 | 119 |
gh_patches_debug_8659 | rasdani/github-patches | git_diff | DataDog__dd-trace-py-1745 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
RuntimeError: Set changed size during iteration
Python Version: 3.7.7
Error:
```
RuntimeError: Set changed size during iteration
File "django/core/handlers/wsgi.py", line 141, in __call__
respons... | diff --git a/ddtrace/internal/runtime/tag_collectors.py b/ddtrace/internal/runtime/tag_collectors.py
--- a/ddtrace/internal/runtime/tag_collectors.py
+++ b/ddtrace/internal/runtime/tag_collectors.py
@@ -21,7 +21,8 @@
def collect_fn(self, keys):
ddtrace = self.modules.get("ddtrace")
- tags = [(SER... | {"golden_diff": "diff --git a/ddtrace/internal/runtime/tag_collectors.py b/ddtrace/internal/runtime/tag_collectors.py\n--- a/ddtrace/internal/runtime/tag_collectors.py\n+++ b/ddtrace/internal/runtime/tag_collectors.py\n@@ -21,7 +21,8 @@\n \n def collect_fn(self, keys):\n ddtrace = self.modules.get(\"ddtrace... | 1,280 | 165 |
gh_patches_debug_39127 | rasdani/github-patches | git_diff | ietf-tools__datatracker-4309 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
session_purpose_demo management command no longer needed
### Description
When the session purpose project was in development, we added a management command `session_purpose_demo` to add a fake meeting that e... | diff --git a/ietf/meeting/management/commands/session_purpose_demo.py b/ietf/meeting/management/commands/session_purpose_demo.py
deleted file mode 100644
--- a/ietf/meeting/management/commands/session_purpose_demo.py
+++ /dev/null
@@ -1,91 +0,0 @@
-import datetime
-import random
-
-from django.core.management.base impo... | {"golden_diff": "diff --git a/ietf/meeting/management/commands/session_purpose_demo.py b/ietf/meeting/management/commands/session_purpose_demo.py\ndeleted file mode 100644\n--- a/ietf/meeting/management/commands/session_purpose_demo.py\n+++ /dev/null\n@@ -1,91 +0,0 @@\n-import datetime\n-import random\n-\n-from django.... | 1,280 | 889 |
gh_patches_debug_29684 | rasdani/github-patches | git_diff | secondmind-labs__trieste-194 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Pareto set: hypervolume
As a user, I want functionality available to calculate the hypervolume of a Pareto front given the cell bounds, so that I can easily find the hypervolume when defining multi-objective ... | diff --git a/trieste/utils/pareto.py b/trieste/utils/pareto.py
--- a/trieste/utils/pareto.py
+++ b/trieste/utils/pareto.py
@@ -105,3 +105,46 @@
upper = tf.concat([range_ + 1, pf_ext_idx[::-1, 1:][: pf_ext_idx[-1, 0]]], axis=-1)
return BoundedVolumes(lower, upper)
+
+ def hypervolume_indicator(sel... | {"golden_diff": "diff --git a/trieste/utils/pareto.py b/trieste/utils/pareto.py\n--- a/trieste/utils/pareto.py\n+++ b/trieste/utils/pareto.py\n@@ -105,3 +105,46 @@\n upper = tf.concat([range_ + 1, pf_ext_idx[::-1, 1:][: pf_ext_idx[-1, 0]]], axis=-1)\n \n return BoundedVolumes(lower, upper)\n+\n+ def ... | 1,503 | 604 |
gh_patches_debug_20014 | rasdani/github-patches | git_diff | huggingface__optimum-1141 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unpin onnx version to allow using v1.14
### Feature request
Remove the version constraint on onnx package to allow using onnx==1.14.
### Motivation
- The latest version of onnxruntime (v1.15 at the t... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -41,21 +41,21 @@
EXTRAS_REQUIRE = {
"onnxruntime": [
- "onnx<1.14.0",
+ "onnx",
"onnxruntime>=1.9.0",
"datasets>=1.2.1",
"evaluate",
"protobuf>=3.20.1",
],
"onnxruntime-gpu": [
- ... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -41,21 +41,21 @@\n \n EXTRAS_REQUIRE = {\n \"onnxruntime\": [\n- \"onnx<1.14.0\",\n+ \"onnx\",\n \"onnxruntime>=1.9.0\",\n \"datasets>=1.2.1\",\n \"evaluate\",\n \"protobuf>=3.20.1\",\... | 1,635 | 352 |
gh_patches_debug_28777 | rasdani/github-patches | git_diff | lk-geimfari__mimesis-922 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add UUID objects support for uuid()
- [x] Add parameter `as_object`
--- 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/mimesis/__init__.py b/mimesis/__init__.py
--- a/mimesis/__init__.py
+++ b/mimesis/__init__.py
@@ -72,7 +72,7 @@
'__license__',
]
-__version__ = '4.0.0'
+__version__ = '4.1.0'
__title__ = 'mimesis'
__description__ = 'Mimesis: fake data generator.'
__url__ = 'https://github.com/lk-geimfari/mimesis... | {"golden_diff": "diff --git a/mimesis/__init__.py b/mimesis/__init__.py\n--- a/mimesis/__init__.py\n+++ b/mimesis/__init__.py\n@@ -72,7 +72,7 @@\n '__license__',\n ]\n \n-__version__ = '4.0.0'\n+__version__ = '4.1.0'\n __title__ = 'mimesis'\n __description__ = 'Mimesis: fake data generator.'\n __url__ = 'https://gi... | 1,981 | 461 |
gh_patches_debug_14282 | rasdani/github-patches | git_diff | google__turbinia-384 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Local installation requires filled-out GCP section of config
I'm attempting to get Turbinia working locally on a laptop. The laptop has internet for at least the installation part of this process.
Running ... | diff --git a/turbinia/config/turbinia_config.py b/turbinia/config/turbinia_config.py
--- a/turbinia/config/turbinia_config.py
+++ b/turbinia/config/turbinia_config.py
@@ -26,10 +26,14 @@
# separate when running with the same Cloud projects or backend servers.
INSTANCE_ID = 'turbinia-instance1'
-# Which state manage... | {"golden_diff": "diff --git a/turbinia/config/turbinia_config.py b/turbinia/config/turbinia_config.py\n--- a/turbinia/config/turbinia_config.py\n+++ b/turbinia/config/turbinia_config.py\n@@ -26,10 +26,14 @@\n # separate when running with the same Cloud projects or backend servers.\n INSTANCE_ID = 'turbinia-instance1'\n... | 1,798 | 253 |
gh_patches_debug_37430 | rasdani/github-patches | git_diff | streamlink__streamlink-4638 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
plugins.vk: fixes required
### Checklist
- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master... | diff --git a/src/streamlink/plugins/vk.py b/src/streamlink/plugins/vk.py
--- a/src/streamlink/plugins/vk.py
+++ b/src/streamlink/plugins/vk.py
@@ -6,6 +6,7 @@
import logging
import re
+from hashlib import md5
from urllib.parse import parse_qsl, unquote, urlparse
from streamlink.exceptions import NoStreamsError
... | {"golden_diff": "diff --git a/src/streamlink/plugins/vk.py b/src/streamlink/plugins/vk.py\n--- a/src/streamlink/plugins/vk.py\n+++ b/src/streamlink/plugins/vk.py\n@@ -6,6 +6,7 @@\n \n import logging\n import re\n+from hashlib import md5\n from urllib.parse import parse_qsl, unquote, urlparse\n \n from streamlink.except... | 1,876 | 584 |
gh_patches_debug_6189 | rasdani/github-patches | git_diff | facebookresearch__hydra-594 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fish completion is not working
Fish completion does not seem to work:
```
$ python my_app.py -sc install=fish | source
$ python my_app.py <TAB> string split: Unknown option “-n”
- (line 2): ... | diff --git a/hydra/_internal/core_plugins/fish_completion.py b/hydra/_internal/core_plugins/fish_completion.py
--- a/hydra/_internal/core_plugins/fish_completion.py
+++ b/hydra/_internal/core_plugins/fish_completion.py
@@ -16,7 +16,7 @@
set -lx COMP_LINE (commandline -cp)
# Find out how to call the underlyi... | {"golden_diff": "diff --git a/hydra/_internal/core_plugins/fish_completion.py b/hydra/_internal/core_plugins/fish_completion.py\n--- a/hydra/_internal/core_plugins/fish_completion.py\n+++ b/hydra/_internal/core_plugins/fish_completion.py\n@@ -16,7 +16,7 @@\n set -lx COMP_LINE (commandline -cp)\n \n # Find out h... | 1,507 | 175 |
gh_patches_debug_29530 | rasdani/github-patches | git_diff | Flexget__Flexget-1667 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Adding new column to `plugins` output
I'm trying to understand the concepts of 'phase' and 'interface' of a plugin. The output of the CLI command `flexget plugins` has been helpful. But I think I noticed that... | diff --git a/flexget/plugins/cli/plugins.py b/flexget/plugins/cli/plugins.py
--- a/flexget/plugins/cli/plugins.py
+++ b/flexget/plugins/cli/plugins.py
@@ -15,11 +15,12 @@
def plugins_summary(manager, options):
if options.table_type == 'porcelain':
disable_all_colors()
- header = ['Keyword', 'Phases', ... | {"golden_diff": "diff --git a/flexget/plugins/cli/plugins.py b/flexget/plugins/cli/plugins.py\n--- a/flexget/plugins/cli/plugins.py\n+++ b/flexget/plugins/cli/plugins.py\n@@ -15,11 +15,12 @@\n def plugins_summary(manager, options):\n if options.table_type == 'porcelain':\n disable_all_colors()\n- header ... | 966 | 325 |
gh_patches_debug_5568 | rasdani/github-patches | git_diff | pyodide__pyodide-689 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Typo?
Wondering what "wv" means or if this should read "more complex things."
https://github.com/iodide-project/pyodide/blob/163ab43b64180223d010cdcdcdecd17307cc5a45/pyodide_build/mkpkg.py#L77-L79
--- END... | diff --git a/pyodide_build/mkpkg.py b/pyodide_build/mkpkg.py
--- a/pyodide_build/mkpkg.py
+++ b/pyodide_build/mkpkg.py
@@ -75,7 +75,7 @@
def make_parser(parser):
parser.description = '''
Make a new pyodide package. Creates a simple template that will work
-for most pure Python packages, but will have to be edite... | {"golden_diff": "diff --git a/pyodide_build/mkpkg.py b/pyodide_build/mkpkg.py\n--- a/pyodide_build/mkpkg.py\n+++ b/pyodide_build/mkpkg.py\n@@ -75,7 +75,7 @@\n def make_parser(parser):\n parser.description = '''\n Make a new pyodide package. Creates a simple template that will work\n-for most pure Python packages, b... | 1,145 | 137 |
gh_patches_debug_30846 | rasdani/github-patches | git_diff | alltheplaces__alltheplaces-1877 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider tmobile_us is broken
During the global build at 2021-05-26-14-42-23, spider **tmobile_us** failed with **7356 features** and **2 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-2... | diff --git a/locations/spiders/tmobile_us.py b/locations/spiders/tmobile_us.py
--- a/locations/spiders/tmobile_us.py
+++ b/locations/spiders/tmobile_us.py
@@ -15,12 +15,12 @@
'Saturday': 'Sa',
'Sunday': 'Su'}
-BASE_URL = 'https://onmyj41p3c.execute-api.us-west-2.amazonaws.com/prod/getS... | {"golden_diff": "diff --git a/locations/spiders/tmobile_us.py b/locations/spiders/tmobile_us.py\n--- a/locations/spiders/tmobile_us.py\n+++ b/locations/spiders/tmobile_us.py\n@@ -15,12 +15,12 @@\n 'Saturday': 'Sa',\n 'Sunday': 'Su'}\n \n-BASE_URL = 'https://onmyj41p3c.execute-api.us-west-2... | 1,227 | 392 |
gh_patches_debug_54784 | rasdani/github-patches | git_diff | encode__httpx-589 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: module 'rfc3986.api' has no attribute 'iri_reference'
Just did a pip install of httpx, and it appeared to meet all the pre-reqs. However, I'd encounter the error in the title.
(python37) ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -57,7 +57,7 @@
"h11==0.8.*",
"h2==3.*",
"idna==2.*",
- "rfc3986==1.*",
+ "rfc3986>=1.3,<2",
"sniffio==1.*",
],
classifiers=[
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -57,7 +57,7 @@\n \"h11==0.8.*\",\n \"h2==3.*\",\n \"idna==2.*\",\n- \"rfc3986==1.*\",\n+ \"rfc3986>=1.3,<2\",\n \"sniffio==1.*\",\n ],\n classifiers=[\n", "issue": "AttributeError:... | 1,814 | 102 |
gh_patches_debug_44285 | rasdani/github-patches | git_diff | lisa-lab__pylearn2-579 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update default training algorithm to support multiple monitoring datasets
Just follow SGD or BGD for an example
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of the... | diff --git a/pylearn2/training_algorithms/default.py b/pylearn2/training_algorithms/default.py
--- a/pylearn2/training_algorithms/default.py
+++ b/pylearn2/training_algorithms/default.py
@@ -29,7 +29,8 @@
WRITEME
monitoring_batches : int
WRITEME
- monitoring_dataset : WRITEME
+... | {"golden_diff": "diff --git a/pylearn2/training_algorithms/default.py b/pylearn2/training_algorithms/default.py\n--- a/pylearn2/training_algorithms/default.py\n+++ b/pylearn2/training_algorithms/default.py\n@@ -29,7 +29,8 @@\n WRITEME\n monitoring_batches : int\n WRITEME\n- monito... | 1,714 | 833 |
gh_patches_debug_34098 | rasdani/github-patches | git_diff | airctic__icevision-646 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow passing a Config object to the MMDetection models
## 🚀 Feature
**Is your feature request related to a problem? Please describe.**
In the current version, to update the loss_weight for example, We hav... | diff --git a/icevision/models/mmdet/common/bbox/single_stage/model.py b/icevision/models/mmdet/common/bbox/single_stage/model.py
--- a/icevision/models/mmdet/common/bbox/single_stage/model.py
+++ b/icevision/models/mmdet/common/bbox/single_stage/model.py
@@ -7,11 +7,16 @@
def model(
- cfg_path: Union[str, Path]... | {"golden_diff": "diff --git a/icevision/models/mmdet/common/bbox/single_stage/model.py b/icevision/models/mmdet/common/bbox/single_stage/model.py\n--- a/icevision/models/mmdet/common/bbox/single_stage/model.py\n+++ b/icevision/models/mmdet/common/bbox/single_stage/model.py\n@@ -7,11 +7,16 @@\n \n \n def model(\n- cf... | 1,222 | 716 |
gh_patches_debug_4636 | rasdani/github-patches | git_diff | enthought__chaco-885 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ImportError: cannot import name 'marker_trait' from 'chaco.api'
**Problem Description**
ImportError: cannot import name 'marker_trait' from 'chaco.api' when trying to run a 2008 demo
**Reproduction Steps:**
... | diff --git a/examples/tutorials/scipy2008/traits_example.py b/examples/tutorials/scipy2008/traits_example.py
--- a/examples/tutorials/scipy2008/traits_example.py
+++ b/examples/tutorials/scipy2008/traits_example.py
@@ -1,7 +1,7 @@
from numpy import linspace, sin
-from enable.api import ColorTrait
-from chaco.api imp... | {"golden_diff": "diff --git a/examples/tutorials/scipy2008/traits_example.py b/examples/tutorials/scipy2008/traits_example.py\n--- a/examples/tutorials/scipy2008/traits_example.py\n+++ b/examples/tutorials/scipy2008/traits_example.py\n@@ -1,7 +1,7 @@\n from numpy import linspace, sin\n \n-from enable.api import ColorTr... | 885 | 154 |
gh_patches_debug_19957 | rasdani/github-patches | git_diff | huggingface__accelerate-43 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AcceleratedOptimizer `zero_grad` argument not supported: `set_to_none`
Currently the `AcceleratedOptimizer` class doesn't support the argument `set_to_none`, is this an intentional exclusion?
--- END ISSUE -... | diff --git a/src/accelerate/optimizer.py b/src/accelerate/optimizer.py
--- a/src/accelerate/optimizer.py
+++ b/src/accelerate/optimizer.py
@@ -14,6 +14,8 @@
import torch
+from packaging import version
+
from .state import AcceleratorState, DistributedType, is_tpu_available
@@ -86,8 +88,18 @@
def state_di... | {"golden_diff": "diff --git a/src/accelerate/optimizer.py b/src/accelerate/optimizer.py\n--- a/src/accelerate/optimizer.py\n+++ b/src/accelerate/optimizer.py\n@@ -14,6 +14,8 @@\n \n import torch\n \n+from packaging import version\n+\n from .state import AcceleratorState, DistributedType, is_tpu_available\n \n \n@@ -86,... | 1,292 | 280 |
gh_patches_debug_12535 | rasdani/github-patches | git_diff | conda__conda-6918 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
deprecate 'conda help' in favor of --help CLI flag
With the install on Windows 10:
_platform : win-64 conda version : 4.3.30
conda is private : False conda-env version : 4.3.30
conda-build vers... | diff --git a/conda/cli/main_help.py b/conda/cli/main_help.py
--- a/conda/cli/main_help.py
+++ b/conda/cli/main_help.py
@@ -5,7 +5,6 @@
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print_function, unicode_literals
-import subprocess
import s... | {"golden_diff": "diff --git a/conda/cli/main_help.py b/conda/cli/main_help.py\n--- a/conda/cli/main_help.py\n+++ b/conda/cli/main_help.py\n@@ -5,7 +5,6 @@\n # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n from __future__ import absolute_import, division, print_function, unicode_literals\n \n-imp... | 632 | 184 |
gh_patches_debug_24251 | rasdani/github-patches | git_diff | nvaccess__nvda-7114 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
When the -c option is used when starting NVDA user configuration can not be saved
Steps to reproduce:
- Open a command prompt and cd to the nvda.exe directory.
- start nvda with `nvda.exe -c "C:\myTemp"
... | diff --git a/source/fileUtils.py b/source/fileUtils.py
--- a/source/fileUtils.py
+++ b/source/fileUtils.py
@@ -18,6 +18,7 @@
file `name' when the context manager scope ends and the the context manager __exit__ is called. This
means writing out the complete file can be performed with less concern of corrupting the o... | {"golden_diff": "diff --git a/source/fileUtils.py b/source/fileUtils.py\n--- a/source/fileUtils.py\n+++ b/source/fileUtils.py\n@@ -18,6 +18,7 @@\n \tfile `name' when the context manager scope ends and the the context manager __exit__ is called. This\n \tmeans writing out the complete file can be performed with less con... | 845 | 253 |
gh_patches_debug_25184 | rasdani/github-patches | git_diff | getsentry__sentry-6688 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Search related events by event ID

Right now you can search [by message or tags](https://github.c... | diff --git a/src/sentry/api/endpoints/group_events.py b/src/sentry/api/endpoints/group_events.py
--- a/src/sentry/api/endpoints/group_events.py
+++ b/src/sentry/api/endpoints/group_events.py
@@ -12,6 +12,7 @@
from sentry.utils.apidocs import scenario, attach_scenarios
from rest_framework.response import Response
fro... | {"golden_diff": "diff --git a/src/sentry/api/endpoints/group_events.py b/src/sentry/api/endpoints/group_events.py\n--- a/src/sentry/api/endpoints/group_events.py\n+++ b/src/sentry/api/endpoints/group_events.py\n@@ -12,6 +12,7 @@\n from sentry.utils.apidocs import scenario, attach_scenarios\n from rest_framework.respons... | 1,057 | 269 |
gh_patches_debug_43222 | rasdani/github-patches | git_diff | hydroshare__hydroshare-5067 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
add a select for "subject areas"
**Describe the feature you'd like and what it will do**
Currently, subject areas is free text.
Should be a typeahead -- noninvasive.
@martinseul suggested that we should po... | diff --git a/theme/migrations/0023_alter_userprofile_subject_areas.py b/theme/migrations/0023_alter_userprofile_subject_areas.py
--- a/theme/migrations/0023_alter_userprofile_subject_areas.py
+++ b/theme/migrations/0023_alter_userprofile_subject_areas.py
@@ -2,12 +2,25 @@
import django.contrib.postgres.fields
from ... | {"golden_diff": "diff --git a/theme/migrations/0023_alter_userprofile_subject_areas.py b/theme/migrations/0023_alter_userprofile_subject_areas.py\n--- a/theme/migrations/0023_alter_userprofile_subject_areas.py\n+++ b/theme/migrations/0023_alter_userprofile_subject_areas.py\n@@ -2,12 +2,25 @@\n \n import django.contrib.... | 1,107 | 897 |
gh_patches_debug_14475 | rasdani/github-patches | git_diff | pre-commit__pre-commit-2686 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ParserError exception raised for invalid configuration
### search you tried in the issue tracker
ParserError and unicode
### describe your issue
I executed `pre-commit autoupdate` with an invalid con... | diff --git a/pre_commit/commands/migrate_config.py b/pre_commit/commands/migrate_config.py
--- a/pre_commit/commands/migrate_config.py
+++ b/pre_commit/commands/migrate_config.py
@@ -3,8 +3,10 @@
import re
import textwrap
+import cfgv
import yaml
+from pre_commit.clientlib import InvalidConfigError
from pre_com... | {"golden_diff": "diff --git a/pre_commit/commands/migrate_config.py b/pre_commit/commands/migrate_config.py\n--- a/pre_commit/commands/migrate_config.py\n+++ b/pre_commit/commands/migrate_config.py\n@@ -3,8 +3,10 @@\n import re\n import textwrap\n \n+import cfgv\n import yaml\n \n+from pre_commit.clientlib import Inval... | 1,703 | 199 |
gh_patches_debug_11999 | rasdani/github-patches | git_diff | chainer__chainer-249 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add type check to LeakyReLU function
Related to #123
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `chai... | diff --git a/chainer/functions/leaky_relu.py b/chainer/functions/leaky_relu.py
--- a/chainer/functions/leaky_relu.py
+++ b/chainer/functions/leaky_relu.py
@@ -1,5 +1,8 @@
+import numpy
+
from chainer import cuda
from chainer import function
+from chainer.utils import type_check
def _kern():
@@ -15,6 +18,13 @@
... | {"golden_diff": "diff --git a/chainer/functions/leaky_relu.py b/chainer/functions/leaky_relu.py\n--- a/chainer/functions/leaky_relu.py\n+++ b/chainer/functions/leaky_relu.py\n@@ -1,5 +1,8 @@\n+import numpy\n+\n from chainer import cuda\n from chainer import function\n+from chainer.utils import type_check\n \n \n def _k... | 759 | 205 |
gh_patches_debug_1427 | rasdani/github-patches | git_diff | saleor__saleor-340 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Move py.test config to tox.ini
Pytest (like many tools) can read its configuration from `tox.ini`. There is no need to keep a separate `pytest.ini`.
--- END ISSUE ---
Below are some code segments, each fro... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -70,7 +70,7 @@
entry_points={
'console_scripts': ['saleor = saleor:manage']},
tests_require=[
- 'mock==1.0.1',
+ 'mock==1.3.0',
'purl>=0.4.1',
'pytest',
'pytest-django'])
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -70,7 +70,7 @@\n entry_points={\n 'console_scripts': ['saleor = saleor:manage']},\n tests_require=[\n- 'mock==1.0.1',\n+ 'mock==1.3.0',\n 'purl>=0.4.1',\n 'pytest',\n 'pytest-djang... | 1,104 | 97 |
gh_patches_debug_837 | rasdani/github-patches | git_diff | optuna__optuna-1088 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[RFC] CI for examples/visualization
It'll be better if we can validate that all the visualization examples run without failures with CI.
I guess https://github.com/computationalmodelling/nbval/ might be us... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -61,6 +61,7 @@
"mlflow",
"mpi4py",
"mxnet",
+ "nbval",
"pytorch-ignite",
"scikit-image",
"scikit-learn",
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -61,6 +61,7 @@\n \"mlflow\",\n \"mpi4py\",\n \"mxnet\",\n+ \"nbval\",\n \"pytorch-ignite\",\n \"scikit-image\",\n \"scikit-learn\",\n", "issue": "[RFC]... | 1,901 | 74 |
gh_patches_debug_2789 | rasdani/github-patches | git_diff | ivy-llc__ivy-18204 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
meshgrid
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/paddle/tensor/creation.p... | diff --git a/ivy/functional/frontends/paddle/tensor/creation.py b/ivy/functional/frontends/paddle/tensor/creation.py
--- a/ivy/functional/frontends/paddle/tensor/creation.py
+++ b/ivy/functional/frontends/paddle/tensor/creation.py
@@ -123,3 +123,11 @@
def diagflat(x, offset=0, name=None):
arr = ivy.diagflat(x, o... | {"golden_diff": "diff --git a/ivy/functional/frontends/paddle/tensor/creation.py b/ivy/functional/frontends/paddle/tensor/creation.py\n--- a/ivy/functional/frontends/paddle/tensor/creation.py\n+++ b/ivy/functional/frontends/paddle/tensor/creation.py\n@@ -123,3 +123,11 @@\n def diagflat(x, offset=0, name=None):\r\n ... | 1,548 | 190 |
gh_patches_debug_2003 | rasdani/github-patches | git_diff | googleapis__google-cloud-python-9604 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release google-cloud-storage
Hi @tseaver, could you help cut a release for google-cloud-storage?
cc: @JesseLovelace
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or mor... | diff --git a/storage/setup.py b/storage/setup.py
--- a/storage/setup.py
+++ b/storage/setup.py
@@ -22,7 +22,7 @@
name = "google-cloud-storage"
description = "Google Cloud Storage API client library"
-version = "1.21.0"
+version = "1.22.0"
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Development Sta... | {"golden_diff": "diff --git a/storage/setup.py b/storage/setup.py\n--- a/storage/setup.py\n+++ b/storage/setup.py\n@@ -22,7 +22,7 @@\n \n name = \"google-cloud-storage\"\n description = \"Google Cloud Storage API client library\"\n-version = \"1.21.0\"\n+version = \"1.22.0\"\n # Should be one of:\n # 'Development Statu... | 1,149 | 101 |
gh_patches_debug_318 | rasdani/github-patches | git_diff | TencentBlueKing__bk-user-164 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
部门查询接口 ?lookup_field=name,当部门名称中含有 "." 时返回 404
**用文字描述你遇到的问题**
请用简练的文字描述你遇到的问题,问题描述的清晰程度决定了问题被解决的效率。
**重现方法**
1. 创建一个目录,名字包含点,如【广东省.深圳市】
2. 使用api查询, http:://{host:port}/api/v2/departments/广东省.深圳市/?loo... | diff --git a/src/api/bkuser_core/departments/urls.py b/src/api/bkuser_core/departments/urls.py
--- a/src/api/bkuser_core/departments/urls.py
+++ b/src/api/bkuser_core/departments/urls.py
@@ -13,7 +13,7 @@
from . import views
-PVAR_DEPARTMENT_ID = r"(?P<%s>[\w\-]+)" % LOOKUP_FIELD_NAME
+PVAR_DEPARTMENT_ID = r"(?P<%... | {"golden_diff": "diff --git a/src/api/bkuser_core/departments/urls.py b/src/api/bkuser_core/departments/urls.py\n--- a/src/api/bkuser_core/departments/urls.py\n+++ b/src/api/bkuser_core/departments/urls.py\n@@ -13,7 +13,7 @@\n \n from . import views\n \n-PVAR_DEPARTMENT_ID = r\"(?P<%s>[\\w\\-]+)\" % LOOKUP_FIELD_NAME\n... | 1,406 | 136 |
gh_patches_debug_2253 | rasdani/github-patches | git_diff | coala__coala-bears-1082 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
GofmtBear: Add advanced asciinema
The coala bear GofmtBear does not have a proper asciinema.
`gofmt` is a command line tool that automatically solves formatting / styling issues to the absolute coding styl... | diff --git a/bears/go/GofmtBear.py b/bears/go/GofmtBear.py
--- a/bears/go/GofmtBear.py
+++ b/bears/go/GofmtBear.py
@@ -20,6 +20,7 @@
AUTHORS_EMAILS = {'coala-devel@googlegroups.com'}
LICENSE = 'AGPL-3.0'
CAN_FIX = {'Formatting'}
+ ASCIINEMA_URL = 'https://asciinema.org/a/94812'
@staticmethod
... | {"golden_diff": "diff --git a/bears/go/GofmtBear.py b/bears/go/GofmtBear.py\n--- a/bears/go/GofmtBear.py\n+++ b/bears/go/GofmtBear.py\n@@ -20,6 +20,7 @@\n AUTHORS_EMAILS = {'coala-devel@googlegroups.com'}\n LICENSE = 'AGPL-3.0'\n CAN_FIX = {'Formatting'}\n+ ASCIINEMA_URL = 'https://asciinema.org/a/94812'... | 623 | 128 |
gh_patches_debug_9694 | rasdani/github-patches | git_diff | pretix__pretix-883 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
rich_text: tel schema
When providing email links using the mailto schema in richtext description like `[Email us!](mailto:mail@weandus.com)`, resulting in [Email us!](mailto:mail@weandus.com), Pretix creates ... | diff --git a/src/pretix/base/templatetags/rich_text.py b/src/pretix/base/templatetags/rich_text.py
--- a/src/pretix/base/templatetags/rich_text.py
+++ b/src/pretix/base/templatetags/rich_text.py
@@ -63,7 +63,7 @@
def safelink_callback(attrs, new=False):
url = attrs.get((None, 'href'), '/')
- if not is_safe_u... | {"golden_diff": "diff --git a/src/pretix/base/templatetags/rich_text.py b/src/pretix/base/templatetags/rich_text.py\n--- a/src/pretix/base/templatetags/rich_text.py\n+++ b/src/pretix/base/templatetags/rich_text.py\n@@ -63,7 +63,7 @@\n \n def safelink_callback(attrs, new=False):\n url = attrs.get((None, 'href'), '/'... | 1,417 | 195 |
gh_patches_debug_37392 | rasdani/github-patches | git_diff | wemake-services__wemake-python-styleguide-1670 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Stray WPS513 warning.
# Bug report
`WPS513` is emitted on `if`/`else`/`if` chains that contain other statements in the last `if` block.
## What's wrong
The following snippet:
```python
if private... | diff --git a/wemake_python_styleguide/visitors/tokenize/conditions.py b/wemake_python_styleguide/visitors/tokenize/conditions.py
--- a/wemake_python_styleguide/visitors/tokenize/conditions.py
+++ b/wemake_python_styleguide/visitors/tokenize/conditions.py
@@ -1,5 +1,5 @@
import tokenize
-from typing import ClassVar, Fr... | {"golden_diff": "diff --git a/wemake_python_styleguide/visitors/tokenize/conditions.py b/wemake_python_styleguide/visitors/tokenize/conditions.py\n--- a/wemake_python_styleguide/visitors/tokenize/conditions.py\n+++ b/wemake_python_styleguide/visitors/tokenize/conditions.py\n@@ -1,5 +1,5 @@\n import tokenize\n-from typi... | 1,268 | 757 |
gh_patches_debug_20297 | rasdani/github-patches | git_diff | mozmeao__snippets-service-1063 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix Snippets ICal AttributeError exception
Snippets ICal feed raises:
`AttributeError: 'ASRSnippet' object has no attribute 'locales'`
Fix the error and add tests catch this on the unit test level. We ... | diff --git a/snippets/base/feed.py b/snippets/base/feed.py
--- a/snippets/base/feed.py
+++ b/snippets/base/feed.py
@@ -77,10 +77,10 @@
def item_description(self, item):
description = dedent('''\
Channels: {}
- Locales: {}'
+ Locale: {}'
Preview Link: {}
'''.format(... | {"golden_diff": "diff --git a/snippets/base/feed.py b/snippets/base/feed.py\n--- a/snippets/base/feed.py\n+++ b/snippets/base/feed.py\n@@ -77,10 +77,10 @@\n def item_description(self, item):\n description = dedent('''\\\n Channels: {}\n- Locales: {}'\n+ Locale: {}'\n Preview Li... | 1,448 | 269 |
gh_patches_debug_29324 | rasdani/github-patches | git_diff | dask__distributed-228 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
No such file or directory "bokeh" - in release 1.9.2 (conda install)
Get this error in my logs:
```
scheduler_1 | distributed.scheduler - INFO - http at: 172.17.0.4:9786
scheduler_1 | di... | diff --git a/distributed/cli/dscheduler.py b/distributed/cli/dscheduler.py
--- a/distributed/cli/dscheduler.py
+++ b/distributed/cli/dscheduler.py
@@ -1,9 +1,9 @@
from __future__ import print_function, division, absolute_import
import logging
+import multiprocessing
import os
import socket
-import subprocess
fro... | {"golden_diff": "diff --git a/distributed/cli/dscheduler.py b/distributed/cli/dscheduler.py\n--- a/distributed/cli/dscheduler.py\n+++ b/distributed/cli/dscheduler.py\n@@ -1,9 +1,9 @@\n from __future__ import print_function, division, absolute_import\n \n import logging\n+import multiprocessing\n import os\n import sock... | 1,523 | 337 |
gh_patches_debug_12036 | rasdani/github-patches | git_diff | sql-machine-learning__elasticdl-354 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix TFExample codec
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `record_codec/__init__.py`
Content:
```... | diff --git a/record_codec/__init__.py b/record_codec/__init__.py
--- a/record_codec/__init__.py
+++ b/record_codec/__init__.py
@@ -0,0 +1,3 @@
+from record_codec.tf_example_codec import TFExampleCodec
+
+__all__=[TFExampleCodec]
diff --git a/record_codec/tf_example_codec.py b/record_codec/tf_example_codec.py
--- a/reco... | {"golden_diff": "diff --git a/record_codec/__init__.py b/record_codec/__init__.py\n--- a/record_codec/__init__.py\n+++ b/record_codec/__init__.py\n@@ -0,0 +1,3 @@\n+from record_codec.tf_example_codec import TFExampleCodec\n+\n+__all__=[TFExampleCodec]\ndiff --git a/record_codec/tf_example_codec.py b/record_codec/tf_exa... | 634 | 233 |
gh_patches_debug_18359 | rasdani/github-patches | git_diff | pantsbuild__pants-6361 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`pants_requirement` should include the `; python_version<'3'` environment marker
Until pants can run on python 3, the `pants_requirement` should add an environment marker to restict the python environment it ... | diff --git a/src/python/pants/backend/python/pants_requirement.py b/src/python/pants/backend/python/pants_requirement.py
--- a/src/python/pants/backend/python/pants_requirement.py
+++ b/src/python/pants/backend/python/pants_requirement.py
@@ -32,7 +32,14 @@
:param string name: The name to use for the target, defau... | {"golden_diff": "diff --git a/src/python/pants/backend/python/pants_requirement.py b/src/python/pants/backend/python/pants_requirement.py\n--- a/src/python/pants/backend/python/pants_requirement.py\n+++ b/src/python/pants/backend/python/pants_requirement.py\n@@ -32,7 +32,14 @@\n :param string name: The name to use ... | 733 | 253 |
gh_patches_debug_19531 | rasdani/github-patches | git_diff | fidals__shopelectro-733 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Adapt page usage to the new refarm pages interface
At https://github.com/fidals/refarm-site/issues/240 we changed page templates and page context interfaces.
Adapt site code to the new interface.
--- EN... | diff --git a/shopelectro/context.py b/shopelectro/context.py
--- a/shopelectro/context.py
+++ b/shopelectro/context.py
@@ -1,5 +1,3 @@
-from functools import partial
-
from django.conf import settings
from django.shortcuts import get_object_or_404
@@ -31,18 +29,15 @@
self._tags = tags
def context(se... | {"golden_diff": "diff --git a/shopelectro/context.py b/shopelectro/context.py\n--- a/shopelectro/context.py\n+++ b/shopelectro/context.py\n@@ -1,5 +1,3 @@\n-from functools import partial\n-\n from django.conf import settings\n from django.shortcuts import get_object_or_404\n \n@@ -31,18 +29,15 @@\n self._tags =... | 1,397 | 271 |
gh_patches_debug_41380 | rasdani/github-patches | git_diff | scoutapp__scout_apm_python-462 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix Jinja2 async integration
Since https://github.com/pallets/jinja/issues/765 , Jinja2 only lazily imports and adds the `render_async` function that we instrument (since #398).
We need to update to only i... | diff --git a/src/scout_apm/instruments/jinja2.py b/src/scout_apm/instruments/jinja2.py
--- a/src/scout_apm/instruments/jinja2.py
+++ b/src/scout_apm/instruments/jinja2.py
@@ -2,11 +2,17 @@
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
+import sys
import wrapt
... | {"golden_diff": "diff --git a/src/scout_apm/instruments/jinja2.py b/src/scout_apm/instruments/jinja2.py\n--- a/src/scout_apm/instruments/jinja2.py\n+++ b/src/scout_apm/instruments/jinja2.py\n@@ -2,11 +2,17 @@\n from __future__ import absolute_import, division, print_function, unicode_literals\n \n import logging\n+impo... | 893 | 836 |
gh_patches_debug_2580 | rasdani/github-patches | git_diff | pypa__setuptools-4127 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Setuptools 69.0.0 breaks Astropy's setup
### setuptools version
setuptools==69.0.0
### Python version
3.12
### OS
Ubuntu
### Additional environment information
_No response_
### Description
Abo... | diff --git a/setuptools/dep_util.py b/setuptools/dep_util.py
--- a/setuptools/dep_util.py
+++ b/setuptools/dep_util.py
@@ -4,7 +4,7 @@
def __getattr__(name):
- if name not in ['newer_pairwise_group']:
+ if name not in ['newer_group', 'newer_pairwise_group']:
raise AttributeError(name)
warnings.... | {"golden_diff": "diff --git a/setuptools/dep_util.py b/setuptools/dep_util.py\n--- a/setuptools/dep_util.py\n+++ b/setuptools/dep_util.py\n@@ -4,7 +4,7 @@\n \n \n def __getattr__(name):\n- if name not in ['newer_pairwise_group']:\n+ if name not in ['newer_group', 'newer_pairwise_group']:\n raise Attribute... | 638 | 107 |
gh_patches_debug_23752 | rasdani/github-patches | git_diff | Azure__azure-cli-extensions-3136 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Transition to GA: databox
Command module `databox` has been released for a long time and is using stable sdk version `2019-09-01`.
Please check [Extension GA guidelines](https://github.com/Azure/azure-cli/... | diff --git a/src/databox/azext_databox/commands.py b/src/databox/azext_databox/commands.py
--- a/src/databox/azext_databox/commands.py
+++ b/src/databox/azext_databox/commands.py
@@ -17,7 +17,7 @@
databox_jobs = CliCommandType(
operations_tmpl='azext_databox.vendored_sdks.databox.operations._jobs_operatio... | {"golden_diff": "diff --git a/src/databox/azext_databox/commands.py b/src/databox/azext_databox/commands.py\n--- a/src/databox/azext_databox/commands.py\n+++ b/src/databox/azext_databox/commands.py\n@@ -17,7 +17,7 @@\n databox_jobs = CliCommandType(\n operations_tmpl='azext_databox.vendored_sdks.databox.ope... | 1,315 | 347 |
gh_patches_debug_37030 | rasdani/github-patches | git_diff | RedHatInsights__insights-core-2713 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
yum.repos.d parser is too tolerant
The yum repos d parser will accept almost anything, including binary.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files... | diff --git a/insights/parsers/yum_repos_d.py b/insights/parsers/yum_repos_d.py
--- a/insights/parsers/yum_repos_d.py
+++ b/insights/parsers/yum_repos_d.py
@@ -1,5 +1,39 @@
-from .. import Parser, parser, get_active_lines, LegacyItemAccess
+import re
+import string
+
+from .. import Parser, parser, LegacyItemAccess
fro... | {"golden_diff": "diff --git a/insights/parsers/yum_repos_d.py b/insights/parsers/yum_repos_d.py\n--- a/insights/parsers/yum_repos_d.py\n+++ b/insights/parsers/yum_repos_d.py\n@@ -1,5 +1,39 @@\n-from .. import Parser, parser, get_active_lines, LegacyItemAccess\n+import re\n+import string\n+\n+from .. import Parser, pars... | 952 | 801 |
gh_patches_debug_9034 | rasdani/github-patches | git_diff | e-valuation__EvaP-1029 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Staff users should see the public view of results by default
Staff users should by default see the public view of results pages. It shows less data (primarily no comments), which is good, and random people lo... | diff --git a/evap/results/views.py b/evap/results/views.py
--- a/evap/results/views.py
+++ b/evap/results/views.py
@@ -58,7 +58,10 @@
sections = calculate_results(course)
- public_view = request.GET.get('public_view') == 'true' # if parameter is not given, show own view.
+ if request.user.is_staff or re... | {"golden_diff": "diff --git a/evap/results/views.py b/evap/results/views.py\n--- a/evap/results/views.py\n+++ b/evap/results/views.py\n@@ -58,7 +58,10 @@\n \n sections = calculate_results(course)\n \n- public_view = request.GET.get('public_view') == 'true' # if parameter is not given, show own view.\n+ if re... | 1,947 | 181 |
gh_patches_debug_28895 | rasdani/github-patches | git_diff | translate__pootle-3780 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Legal pages don't remember your acceptance of the agreemenet
This is likely only a problem on the [LibreOffice dev server](https://translations-test.documentfoundation.org/projects/) but tracking it here so w... | diff --git a/pootle/apps/pootle_misc/context_processors.py b/pootle/apps/pootle_misc/context_processors.py
--- a/pootle/apps/pootle_misc/context_processors.py
+++ b/pootle/apps/pootle_misc/context_processors.py
@@ -23,7 +23,7 @@
settings.LEGALPAGE_NOCHECK_PREFIXES)
if (request.user.is_authe... | {"golden_diff": "diff --git a/pootle/apps/pootle_misc/context_processors.py b/pootle/apps/pootle_misc/context_processors.py\n--- a/pootle/apps/pootle_misc/context_processors.py\n+++ b/pootle/apps/pootle_misc/context_processors.py\n@@ -23,7 +23,7 @@\n settings.LEGALPAGE_NOCHECK_PREFIXES)\n \n if... | 1,150 | 439 |
gh_patches_debug_1241 | rasdani/github-patches | git_diff | crytic__slither-1108 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug]: Infinite loop in RTLO detector
### What happened?
Slither hangs on this code indefinitely
### Can you share code with us to reproduce this bug?
https://github.com/ethereum/solidity/blob/develop/test... | diff --git a/slither/detectors/source/rtlo.py b/slither/detectors/source/rtlo.py
--- a/slither/detectors/source/rtlo.py
+++ b/slither/detectors/source/rtlo.py
@@ -88,6 +88,6 @@
results.append(res)
# Advance the start index for the next iteration
- start_index = result_... | {"golden_diff": "diff --git a/slither/detectors/source/rtlo.py b/slither/detectors/source/rtlo.py\n--- a/slither/detectors/source/rtlo.py\n+++ b/slither/detectors/source/rtlo.py\n@@ -88,6 +88,6 @@\n results.append(res)\n \n # Advance the start index for the next iteration\n- ... | 1,270 | 106 |
gh_patches_debug_28367 | rasdani/github-patches | git_diff | dbt-labs__dbt-core-8909 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[CT-3279] Remove usage of dbt.config in dbt/adapters
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `core/... | diff --git a/core/dbt/adapters/base/plugin.py b/core/dbt/adapters/base/plugin.py
--- a/core/dbt/adapters/base/plugin.py
+++ b/core/dbt/adapters/base/plugin.py
@@ -1,20 +1,10 @@
from typing import List, Optional, Type
+from pathlib import Path
from dbt.adapters.base import Credentials
-from dbt.exceptions import Com... | {"golden_diff": "diff --git a/core/dbt/adapters/base/plugin.py b/core/dbt/adapters/base/plugin.py\n--- a/core/dbt/adapters/base/plugin.py\n+++ b/core/dbt/adapters/base/plugin.py\n@@ -1,20 +1,10 @@\n from typing import List, Optional, Type\n+from pathlib import Path\n \n from dbt.adapters.base import Credentials\n-from ... | 644 | 338 |
gh_patches_debug_10793 | rasdani/github-patches | git_diff | pyro-ppl__pyro-724 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deprecate dependency on scipy for pyro-ppl package
Once distributions are migrated upstream and we do not have a core dependency on scipy, we should remove this from our requirements in `setup.py` (add it to ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -37,7 +37,6 @@
author_email='pyro@uber.com',
install_requires=[
'numpy>=1.7',
- 'scipy>=0.19.0',
'cloudpickle>=0.3.1',
'graphviz>=0.8',
'networkx>=2.0.0',
@@ -56,6 +55,7 @@
'pytest',
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -37,7 +37,6 @@\n author_email='pyro@uber.com',\n install_requires=[\n 'numpy>=1.7',\n- 'scipy>=0.19.0',\n 'cloudpickle>=0.3.1',\n 'graphviz>=0.8',\n 'networkx>=2.0.0',\n@@ -56,6 +55,7 @@\... | 1,216 | 153 |
gh_patches_debug_17814 | rasdani/github-patches | git_diff | Qiskit__qiskit-7328 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Parameters needs examples in the documentation
### What is the expected enhancement?
Many users land in https://qiskit.org/documentation/stubs/qiskit.circuit.Parameter.html when search on how to parametrize... | diff --git a/qiskit/circuit/parameter.py b/qiskit/circuit/parameter.py
--- a/qiskit/circuit/parameter.py
+++ b/qiskit/circuit/parameter.py
@@ -26,7 +26,32 @@
class Parameter(ParameterExpression):
- """Parameter Class for variable parameters."""
+ """Parameter Class for variable parameters.
+
+ A parameter... | {"golden_diff": "diff --git a/qiskit/circuit/parameter.py b/qiskit/circuit/parameter.py\n--- a/qiskit/circuit/parameter.py\n+++ b/qiskit/circuit/parameter.py\n@@ -26,7 +26,32 @@\n \n \n class Parameter(ParameterExpression):\n- \"\"\"Parameter Class for variable parameters.\"\"\"\n+ \"\"\"Parameter Class for varia... | 1,338 | 280 |
gh_patches_debug_21047 | rasdani/github-patches | git_diff | dask__distributed-3387 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
When --dashboard-prefix is used root location is always redirected to /status without adding the prefix
The problem arises when using --dashboard-prefix, using http://DASHBOARD[:PORT]/PREFIX/ redirects to htt... | diff --git a/distributed/dashboard/core.py b/distributed/dashboard/core.py
--- a/distributed/dashboard/core.py
+++ b/distributed/dashboard/core.py
@@ -5,6 +5,7 @@
import bokeh
from bokeh.server.server import Server
from tornado import web
+from urllib.parse import urljoin
if LooseVersion(bokeh.__version__) < Lo... | {"golden_diff": "diff --git a/distributed/dashboard/core.py b/distributed/dashboard/core.py\n--- a/distributed/dashboard/core.py\n+++ b/distributed/dashboard/core.py\n@@ -5,6 +5,7 @@\n import bokeh\n from bokeh.server.server import Server\n from tornado import web\n+from urllib.parse import urljoin\n \n \n if LooseVers... | 1,139 | 209 |
gh_patches_debug_40460 | rasdani/github-patches | git_diff | vacanza__python-holidays-371 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wrong workday info for country HR
Today (Oct. 8, 2020) my alarmclock automation did not go off, because my workday sensor gave the wrong info (no workday). This day used to be a holiday in Croatia, but is not... | diff --git a/holidays/countries/croatia.py b/holidays/countries/croatia.py
--- a/holidays/countries/croatia.py
+++ b/holidays/countries/croatia.py
@@ -11,18 +11,18 @@
# Website: https://github.com/dr-prodigy/python-holidays
# License: MIT (see LICENSE file)
-from datetime import date
+from datetime import date, t... | {"golden_diff": "diff --git a/holidays/countries/croatia.py b/holidays/countries/croatia.py\n--- a/holidays/countries/croatia.py\n+++ b/holidays/countries/croatia.py\n@@ -11,18 +11,18 @@\n # Website: https://github.com/dr-prodigy/python-holidays\n # License: MIT (see LICENSE file)\n \n-from datetime import date\n+fro... | 1,373 | 883 |
gh_patches_debug_39903 | rasdani/github-patches | git_diff | scrapy__scrapy-5514 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Drop Python 3.6 support
[It went end-of-life on December 2021](https://endoflife.date/python).
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may conta... | diff --git a/scrapy/__init__.py b/scrapy/__init__.py
--- a/scrapy/__init__.py
+++ b/scrapy/__init__.py
@@ -28,8 +28,8 @@
# Check minimum required Python version
-if sys.version_info < (3, 6):
- print(f"Scrapy {__version__} requires Python 3.6+")
+if sys.version_info < (3, 7):
+ print(f"Scrapy {__version__} r... | {"golden_diff": "diff --git a/scrapy/__init__.py b/scrapy/__init__.py\n--- a/scrapy/__init__.py\n+++ b/scrapy/__init__.py\n@@ -28,8 +28,8 @@\n \n \n # Check minimum required Python version\n-if sys.version_info < (3, 6):\n- print(f\"Scrapy {__version__} requires Python 3.6+\")\n+if sys.version_info < (3, 7):\n+ p... | 1,894 | 887 |
gh_patches_debug_10492 | rasdani/github-patches | git_diff | fossasia__open-event-server-2532 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: Kubernetes Deployment Info shown on heroku
Do not try to show Kubernetes deployment info when not hosted on Kubernetes
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or ... | diff --git a/app/views/admin/super_admin/super_admin.py b/app/views/admin/super_admin/super_admin.py
--- a/app/views/admin/super_admin/super_admin.py
+++ b/app/views/admin/super_admin/super_admin.py
@@ -53,7 +53,7 @@
events=events,
version=version,
... | {"golden_diff": "diff --git a/app/views/admin/super_admin/super_admin.py b/app/views/admin/super_admin/super_admin.py\n--- a/app/views/admin/super_admin/super_admin.py\n+++ b/app/views/admin/super_admin/super_admin.py\n@@ -53,7 +53,7 @@\n events=events,\n version=ve... | 1,059 | 123 |
gh_patches_debug_9975 | rasdani/github-patches | git_diff | cookiecutter__cookiecutter-852 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
# -*- coding: utf-8 -*- is not consistently used in all Python source files
- Cookiecutter version:
Cookiecutter 1.4.0
- Template project url:
none
- Python version:
3.5
- Operating System:
OS X
###... | diff --git a/__main__.py b/__main__.py
--- a/__main__.py
+++ b/__main__.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
"""Allow cookiecutter to be executable from a checkout or zip file."""
import runpy
diff --git a/cookiecutter/__main__.py b/cookiecutter/__main__.py
--- a/cookiecutter/__main__.py
+++ b/cookiecutter/_... | {"golden_diff": "diff --git a/__main__.py b/__main__.py\n--- a/__main__.py\n+++ b/__main__.py\n@@ -1,3 +1,4 @@\n+# -*- coding: utf-8 -*-\n \"\"\"Allow cookiecutter to be executable from a checkout or zip file.\"\"\"\n import runpy\n \ndiff --git a/cookiecutter/__main__.py b/cookiecutter/__main__.py\n--- a/cookiecutter/... | 1,353 | 205 |
gh_patches_debug_50127 | rasdani/github-patches | git_diff | scrapy__scrapy-4481 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
responsetypes.py ResponseTypes.from_headers typo as 'Content-type'
Shall this line:
https://github.com/scrapy/scrapy/blob/8845773d44329194ee73fa4985a94e768bf664e7/scrapy/responsetypes.py#L74
be changed ... | diff --git a/scrapy/responsetypes.py b/scrapy/responsetypes.py
--- a/scrapy/responsetypes.py
+++ b/scrapy/responsetypes.py
@@ -71,7 +71,7 @@
cls = Response
if b'Content-Type' in headers:
cls = self.from_content_type(
- content_type=headers[b'Content-type'],
+ ... | {"golden_diff": "diff --git a/scrapy/responsetypes.py b/scrapy/responsetypes.py\n--- a/scrapy/responsetypes.py\n+++ b/scrapy/responsetypes.py\n@@ -71,7 +71,7 @@\n cls = Response\n if b'Content-Type' in headers:\n cls = self.from_content_type(\n- content_type=headers[b'Content-... | 1,617 | 121 |
gh_patches_debug_11555 | rasdani/github-patches | git_diff | pypa__setuptools-753 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Setuptools doesn't play nice with Numpy
See: https://github.com/numpy/numpy/blob/master/numpy/distutils/extension.py#L42-L52
That functionality was broken by:
https://github.com/pypa/setuptools/blob/master/s... | diff --git a/setuptools/extension.py b/setuptools/extension.py
--- a/setuptools/extension.py
+++ b/setuptools/extension.py
@@ -36,9 +36,11 @@
class Extension(_Extension):
"""Extension that uses '.c' files in place of '.pyx' files"""
- def __init__(self, name, sources, py_limited_api=False, **kw):
- se... | {"golden_diff": "diff --git a/setuptools/extension.py b/setuptools/extension.py\n--- a/setuptools/extension.py\n+++ b/setuptools/extension.py\n@@ -36,9 +36,11 @@\n class Extension(_Extension):\n \"\"\"Extension that uses '.c' files in place of '.pyx' files\"\"\"\n \n- def __init__(self, name, sources, py_limited... | 941 | 219 |
gh_patches_debug_22181 | rasdani/github-patches | git_diff | fossasia__open-event-server-6129 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
order_expiry_time migration error
**Describe the bug**
The latest migration, `2c7ff9781032` had a bug where the server_default was supposed to be a string.
**Additional context**
Working on it.
--- E... | diff --git a/migrations/versions/2c7ff9781032_.py b/migrations/versions/2c7ff9781032_.py
--- a/migrations/versions/2c7ff9781032_.py
+++ b/migrations/versions/2c7ff9781032_.py
@@ -20,13 +20,13 @@
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('events', 'order_expiry_time')
op... | {"golden_diff": "diff --git a/migrations/versions/2c7ff9781032_.py b/migrations/versions/2c7ff9781032_.py\n--- a/migrations/versions/2c7ff9781032_.py\n+++ b/migrations/versions/2c7ff9781032_.py\n@@ -20,13 +20,13 @@\n # ### commands auto generated by Alembic - please adjust! ###\n op.drop_column('events', 'order... | 674 | 342 |
gh_patches_debug_40616 | rasdani/github-patches | git_diff | optuna__optuna-1248 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`experimental` decorator adds extra indents to docs
An extra indent appears in the docs when the [`experimental`](https://github.com/optuna/optuna/blob/2d5f24b06eed56ece72b8dfa878135bb4bb63779/optuna/_experim... | diff --git a/optuna/_experimental.py b/optuna/_experimental.py
--- a/optuna/_experimental.py
+++ b/optuna/_experimental.py
@@ -1,5 +1,6 @@
import functools
import inspect
+import textwrap
from typing import Any
from typing import Callable
import warnings
@@ -7,14 +8,11 @@
from optuna.exceptions import Experimenta... | {"golden_diff": "diff --git a/optuna/_experimental.py b/optuna/_experimental.py\n--- a/optuna/_experimental.py\n+++ b/optuna/_experimental.py\n@@ -1,5 +1,6 @@\n import functools\n import inspect\n+import textwrap\n from typing import Any\n from typing import Callable\n import warnings\n@@ -7,14 +8,11 @@\n from optuna.e... | 1,622 | 711 |
gh_patches_debug_14346 | rasdani/github-patches | git_diff | svthalia__concrexit-2857 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Become a member menu item is missing!
### Describe the bug
Become a member menu item is missing!
### How to reproduce
1. Check staging, the menu item is missing
### Expected behaviour
It should be ... | diff --git a/website/registrations/apps.py b/website/registrations/apps.py
--- a/website/registrations/apps.py
+++ b/website/registrations/apps.py
@@ -1,5 +1,6 @@
"""Configuration for the newsletters package."""
from django.apps import AppConfig
+from django.urls import reverse
from django.utils.translation import g... | {"golden_diff": "diff --git a/website/registrations/apps.py b/website/registrations/apps.py\n--- a/website/registrations/apps.py\n+++ b/website/registrations/apps.py\n@@ -1,5 +1,6 @@\n \"\"\"Configuration for the newsletters package.\"\"\"\n from django.apps import AppConfig\n+from django.urls import reverse\n from dja... | 472 | 194 |
gh_patches_debug_13199 | rasdani/github-patches | git_diff | Nitrate__Nitrate-671 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Replace smart_text() with smart_str()
To suppress warning: `RemovedInDjango40Warning: smart_text() is deprecated in favor of smart_str()`
Run command `runserver`, find out the warning messages from output.... | diff --git a/src/tcms/logs/views.py b/src/tcms/logs/views.py
--- a/src/tcms/logs/views.py
+++ b/src/tcms/logs/views.py
@@ -5,7 +5,7 @@
from .models import TCMSLogModel
-from django.utils.encoding import smart_text as smart_unicode
+from django.utils.encoding import smart_str
class TCMSLog:
@@ -62,7 +62,7 @@
... | {"golden_diff": "diff --git a/src/tcms/logs/views.py b/src/tcms/logs/views.py\n--- a/src/tcms/logs/views.py\n+++ b/src/tcms/logs/views.py\n@@ -5,7 +5,7 @@\n \n from .models import TCMSLogModel\n \n-from django.utils.encoding import smart_text as smart_unicode\n+from django.utils.encoding import smart_str\n \n \n class ... | 874 | 156 |
gh_patches_debug_10819 | rasdani/github-patches | git_diff | aws-powertools__powertools-lambda-python-921 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DeprecationWarning for distutils in Python 3.10 (will be removed in Python 3.12)
<!--- Provide a general summary of the issue in the Title above -->
<!--- How has this issue affected you? What are you trying... | diff --git a/aws_lambda_powertools/shared/functions.py b/aws_lambda_powertools/shared/functions.py
--- a/aws_lambda_powertools/shared/functions.py
+++ b/aws_lambda_powertools/shared/functions.py
@@ -1,7 +1,16 @@
-from distutils.util import strtobool
from typing import Any, Optional, Union
+def strtobool(value):
+ ... | {"golden_diff": "diff --git a/aws_lambda_powertools/shared/functions.py b/aws_lambda_powertools/shared/functions.py\n--- a/aws_lambda_powertools/shared/functions.py\n+++ b/aws_lambda_powertools/shared/functions.py\n@@ -1,7 +1,16 @@\n-from distutils.util import strtobool\n from typing import Any, Optional, Union\n \n \n... | 1,103 | 207 |
gh_patches_debug_61694 | rasdani/github-patches | git_diff | mdn__kuma-7762 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Locale searches aren't working
**Summary**
https://developer.mozilla.org/de/search?q=Zuweisungsoperator yields nothing.
But it should work, because of: https://developer.mozilla.org/api/v1/search?q=Zuweisu... | diff --git a/kuma/search/views.py b/kuma/search/views.py
--- a/kuma/search/views.py
+++ b/kuma/search/views.py
@@ -46,7 +46,7 @@
# it to do a search in both locales.
# This might come in handy for people searching in a locale where
# there's very little results but they'd be happy to get the ... | {"golden_diff": "diff --git a/kuma/search/views.py b/kuma/search/views.py\n--- a/kuma/search/views.py\n+++ b/kuma/search/views.py\n@@ -46,7 +46,7 @@\n # it to do a search in both locales.\n # This might come in handy for people searching in a locale where\n # there's very little results but they... | 1,928 | 134 |
gh_patches_debug_13051 | rasdani/github-patches | git_diff | ckan__ckan-7871 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
current_user.is_anonymous doesn't care if context has an user
## CKAN version
2.10
## Describe the bug
While looking into why https://github.com/ckan/ckan/pull/7266 started failing on unmodified ckan, I ... | diff --git a/ckan/logic/auth/__init__.py b/ckan/logic/auth/__init__.py
--- a/ckan/logic/auth/__init__.py
+++ b/ckan/logic/auth/__init__.py
@@ -8,8 +8,8 @@
from typing_extensions import Literal
import ckan.logic as logic
+import ckan.authz as authz
from ckan.types import Context, AuthResult, DataDict
-from ckan.com... | {"golden_diff": "diff --git a/ckan/logic/auth/__init__.py b/ckan/logic/auth/__init__.py\n--- a/ckan/logic/auth/__init__.py\n+++ b/ckan/logic/auth/__init__.py\n@@ -8,8 +8,8 @@\n from typing_extensions import Literal\n \n import ckan.logic as logic\n+import ckan.authz as authz\n from ckan.types import Context, AuthResult... | 1,343 | 182 |
gh_patches_debug_16492 | rasdani/github-patches | git_diff | googleapis__google-cloud-python-4174 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PubSub: Default thread-based subscriber Policy's on_response() implementation degenerates into series of synchronous calls because of debug statement
https://github.com/GoogleCloudPlatform/google-cloud-python... | diff --git a/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py b/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py
--- a/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py
+++ b/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py
@@ -30,6 +30,11 @@
logger = logging.getLogger(__name__)
... | {"golden_diff": "diff --git a/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py b/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py\n--- a/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py\n+++ b/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py\n@@ -30,6 +30,11 @@\n logger = logging.get... | 1,945 | 224 |
gh_patches_debug_18077 | rasdani/github-patches | git_diff | freedomofpress__securedrop-3258 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[qt-journalist-updater] Add a time estimate to the update progress bar
## Description
[See epic #3076 for primary feature, PRs for this ticket should go into `qt-journalist-updater`]
We should add a rea... | diff --git a/journalist_gui/journalist_gui/strings.py b/journalist_gui/journalist_gui/strings.py
--- a/journalist_gui/journalist_gui/strings.py
+++ b/journalist_gui/journalist_gui/strings.py
@@ -2,8 +2,10 @@
update_in_progress = ("SecureDrop workstation updates are available! "
"You should insta... | {"golden_diff": "diff --git a/journalist_gui/journalist_gui/strings.py b/journalist_gui/journalist_gui/strings.py\n--- a/journalist_gui/journalist_gui/strings.py\n+++ b/journalist_gui/journalist_gui/strings.py\n@@ -2,8 +2,10 @@\n update_in_progress = (\"SecureDrop workstation updates are available! \"\n ... | 616 | 211 |
gh_patches_debug_10610 | rasdani/github-patches | git_diff | spacetelescope__jwql-465 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Import environment bokeh version in HTML
As described in #425, having the environment Bokeh version NOT match the HTML template Bokeh version can cause problems.
I wrote some tests #429 that will test and ... | diff --git a/jwql/website/apps/jwql/context_processors.py b/jwql/website/apps/jwql/context_processors.py
--- a/jwql/website/apps/jwql/context_processors.py
+++ b/jwql/website/apps/jwql/context_processors.py
@@ -23,6 +23,8 @@
As such, it will automatically be executed upon each request.
"""
+import bokeh
+
impo... | {"golden_diff": "diff --git a/jwql/website/apps/jwql/context_processors.py b/jwql/website/apps/jwql/context_processors.py\n--- a/jwql/website/apps/jwql/context_processors.py\n+++ b/jwql/website/apps/jwql/context_processors.py\n@@ -23,6 +23,8 @@\n As such, it will automatically be executed upon each request.\n \"\"\... | 759 | 177 |
gh_patches_debug_5092 | rasdani/github-patches | git_diff | fossasia__open-event-server-5383 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improper exception handling in manage.py
**Describe the bug**
Exceptions are not handled properly in `initialize_db` method of `manage` module.
**To Reproduce**
Steps to reproduce the behavior:
1. Open ... | diff --git a/manage.py b/manage.py
--- a/manage.py
+++ b/manage.py
@@ -74,7 +74,7 @@
try:
db.create_all()
stamp()
- except:
+ except Exception:
populate_data = False
print("[LOG] Could not create tables. Either databa... | {"golden_diff": "diff --git a/manage.py b/manage.py\n--- a/manage.py\n+++ b/manage.py\n@@ -74,7 +74,7 @@\n try:\n db.create_all()\n stamp()\n- except:\n+ except Exception:\n populate_data = False\n print(\"[LOG] Could not ... | 1,296 | 83 |
gh_patches_debug_1067 | rasdani/github-patches | git_diff | encode__httpx-1799 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update h2 pin?
### Discussed in https://github.com/encode/httpx/discussions/1485
<div type='discussions-op-text'>
<sup>Originally posted by **HarrySky** February 24, 2021</sup>
Hi, some time ago `h2` p... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -63,7 +63,7 @@
"async_generator; python_version < '3.7'"
],
extras_require={
- "http2": "h2==3.*",
+ "http2": "h2>=3,<5",
"brotli": "brotlicffi==1.*",
},
classifiers=[
| {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -63,7 +63,7 @@\n \"async_generator; python_version < '3.7'\"\n ],\n extras_require={\n- \"http2\": \"h2==3.*\",\n+ \"http2\": \"h2>=3,<5\",\n \"brotli\": \"brotlicffi==1.*\",\n },\n classi... | 1,315 | 98 |
gh_patches_debug_15412 | rasdani/github-patches | git_diff | bridgecrewio__checkov-1928 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CKV_AZURE_53 is a duplicate of CKV_AZURE_90
**Is your feature request related to a problem? Please describe.**
CKV_AZURE_53 is a duplicate of CKV_AZURE_90. We should use only one.
**Describe the solution ... | diff --git a/checkov/terraform/checks/resource/azure/MySQLServerPublicAccessDisabled.py b/checkov/terraform/checks/resource/azure/MySQLServerPublicAccessDisabled.py
deleted file mode 100644
--- a/checkov/terraform/checks/resource/azure/MySQLServerPublicAccessDisabled.py
+++ /dev/null
@@ -1,23 +0,0 @@
-from checkov.comm... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/MySQLServerPublicAccessDisabled.py b/checkov/terraform/checks/resource/azure/MySQLServerPublicAccessDisabled.py\ndeleted file mode 100644\n--- a/checkov/terraform/checks/resource/azure/MySQLServerPublicAccessDisabled.py\n+++ /dev/null\n@@ -1,23 +0,0 ... | 595 | 293 |
gh_patches_debug_196 | rasdani/github-patches | git_diff | twisted__twisted-11622 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 22.8.0
This is the ticket to track the release of 22.8.0
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
P... | diff --git a/src/twisted/_version.py b/src/twisted/_version.py
--- a/src/twisted/_version.py
+++ b/src/twisted/_version.py
@@ -7,5 +7,5 @@
from incremental import Version
-__version__ = Version("Twisted", 22, 4, 0, post=0)
+__version__ = Version("Twisted", 22, 8, 0, post=0)
__all__ = ["__version__"]
| {"golden_diff": "diff --git a/src/twisted/_version.py b/src/twisted/_version.py\n--- a/src/twisted/_version.py\n+++ b/src/twisted/_version.py\n@@ -7,5 +7,5 @@\n \n from incremental import Version\n \n-__version__ = Version(\"Twisted\", 22, 4, 0, post=0)\n+__version__ = Version(\"Twisted\", 22, 8, 0, post=0)\n __all__ =... | 377 | 113 |
gh_patches_debug_24456 | rasdani/github-patches | git_diff | bridgecrewio__checkov-1096 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Duplicate check
**Describe the bug**
The new check `CKV_AWS_125` popped up complaining about me not activating point in time recovery for a DynamoDB table, which is surprising, because I already acknowledged... | diff --git a/checkov/terraform/checks/resource/aws/DynamodbPointInTimeRecoveryEnabled.py b/checkov/terraform/checks/resource/aws/DynamodbPointInTimeRecoveryEnabled.py
deleted file mode 100644
--- a/checkov/terraform/checks/resource/aws/DynamodbPointInTimeRecoveryEnabled.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from checkov.c... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/aws/DynamodbPointInTimeRecoveryEnabled.py b/checkov/terraform/checks/resource/aws/DynamodbPointInTimeRecoveryEnabled.py\ndeleted file mode 100644\n--- a/checkov/terraform/checks/resource/aws/DynamodbPointInTimeRecoveryEnabled.py\n+++ /dev/null\n@@ -1,20 +0... | 912 | 493 |
gh_patches_debug_6160 | rasdani/github-patches | git_diff | hpcaitech__ColossalAI-2741 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG]: Error during running chatgpt train_rm.sh
### 🐛 Describe the bug
I run into a runtime error when running `train_rm.sh` under examples of chatgpt.
```
Traceback (most recent call last):
File "/ro... | diff --git a/applications/ChatGPT/chatgpt/trainer/rm.py b/applications/ChatGPT/chatgpt/trainer/rm.py
--- a/applications/ChatGPT/chatgpt/trainer/rm.py
+++ b/applications/ChatGPT/chatgpt/trainer/rm.py
@@ -43,7 +43,7 @@
# train
if use_lora > 0:
print("Using Lora")
- ... | {"golden_diff": "diff --git a/applications/ChatGPT/chatgpt/trainer/rm.py b/applications/ChatGPT/chatgpt/trainer/rm.py\n--- a/applications/ChatGPT/chatgpt/trainer/rm.py\n+++ b/applications/ChatGPT/chatgpt/trainer/rm.py\n@@ -43,7 +43,7 @@\n # train\n if use_lora > 0:\n print(\"Usin... | 1,842 | 156 |
gh_patches_debug_730 | rasdani/github-patches | git_diff | pytorch__pytorch-116517 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Missing packaging dependency in torch 2.1.x
### 🐛 Describe the bug
Hi,
[torch.utils.tensorboard requires "packaging"](https://github.com/pytorch/pytorch/blob/fa1ccc34c4f65756bc50c3e3ab135c88b175b18c/torch/... | diff --git a/torch/utils/tensorboard/__init__.py b/torch/utils/tensorboard/__init__.py
--- a/torch/utils/tensorboard/__init__.py
+++ b/torch/utils/tensorboard/__init__.py
@@ -1,5 +1,5 @@
import tensorboard
-from packaging.version import Version
+from torch._vendor.packaging.version import Version
if not hasattr(ten... | {"golden_diff": "diff --git a/torch/utils/tensorboard/__init__.py b/torch/utils/tensorboard/__init__.py\n--- a/torch/utils/tensorboard/__init__.py\n+++ b/torch/utils/tensorboard/__init__.py\n@@ -1,5 +1,5 @@\n import tensorboard\n-from packaging.version import Version\n+from torch._vendor.packaging.version import Versio... | 840 | 102 |
gh_patches_debug_21259 | rasdani/github-patches | git_diff | archlinux__archinstall-914 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
desktop profiles, replace pipewire-media-session with wireplumber, wireplumber seembs to be the newest replacement media-session replaceing pipewire-media-session
hi,
would it be possible to replace pipewire... | diff --git a/profiles/applications/pipewire.py b/profiles/applications/pipewire.py
--- a/profiles/applications/pipewire.py
+++ b/profiles/applications/pipewire.py
@@ -3,7 +3,7 @@
# Define the package list in order for lib to source
# which packages will be installed by this profile
-__packages__ = ["pipewire", "pip... | {"golden_diff": "diff --git a/profiles/applications/pipewire.py b/profiles/applications/pipewire.py\n--- a/profiles/applications/pipewire.py\n+++ b/profiles/applications/pipewire.py\n@@ -3,7 +3,7 @@\n \n # Define the package list in order for lib to source\n # which packages will be installed by this profile\n-__packag... | 565 | 295 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.