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_23491 | rasdani/github-patches | git_diff | ESMCI__cime-1396 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Build pFUnit on some other machines
We should build pFUnit on some other machines so we can run unit tests there:
- cheyenne
- hobart
Instructions for building pFUnit are:
1. Download pFUnit from
... | diff --git a/scripts/lib/CIME/BuildTools/cmakemacroswriter.py b/scripts/lib/CIME/BuildTools/cmakemacroswriter.py
--- a/scripts/lib/CIME/BuildTools/cmakemacroswriter.py
+++ b/scripts/lib/CIME/BuildTools/cmakemacroswriter.py
@@ -89,7 +89,8 @@
>>> s.getvalue()
u'set(foo "bar")\\n'
"""
- s... | {"golden_diff": "diff --git a/scripts/lib/CIME/BuildTools/cmakemacroswriter.py b/scripts/lib/CIME/BuildTools/cmakemacroswriter.py\n--- a/scripts/lib/CIME/BuildTools/cmakemacroswriter.py\n+++ b/scripts/lib/CIME/BuildTools/cmakemacroswriter.py\n@@ -89,7 +89,8 @@\n >>> s.getvalue()\n u'set(foo \"bar\")\\\\... | 1,748 | 368 |
gh_patches_debug_31153 | rasdani/github-patches | git_diff | cupy__cupy-6121 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`copyto` does not test shape for memcpy cases
### Description
There should be a shape check before these:
https://github.com/cupy/cupy/blob/e7f2e797216954dd152efe0169ec6a0094d7777d/cupy/_manipulation/basi... | diff --git a/cupy/_manipulation/basic.py b/cupy/_manipulation/basic.py
--- a/cupy/_manipulation/basic.py
+++ b/cupy/_manipulation/basic.py
@@ -1,3 +1,5 @@
+import itertools
+
import numpy
from cupy import _core
@@ -41,22 +43,35 @@
raise TypeError('Cannot cast %s to %s in %s casting mode' %
... | {"golden_diff": "diff --git a/cupy/_manipulation/basic.py b/cupy/_manipulation/basic.py\n--- a/cupy/_manipulation/basic.py\n+++ b/cupy/_manipulation/basic.py\n@@ -1,3 +1,5 @@\n+import itertools\n+\n import numpy\n \n from cupy import _core\n@@ -41,22 +43,35 @@\n raise TypeError('Cannot cast %s to %s in %s casti... | 1,538 | 488 |
gh_patches_debug_10098 | rasdani/github-patches | git_diff | liqd__a4-opin-2485 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Community debate module error messages
**expected behaviour:** Error message only shown for document upload if file is incorrect
**behaviour:** Error message is also shown when title is not added
--- EN... | diff --git a/euth/communitydebate/views.py b/euth/communitydebate/views.py
--- a/euth/communitydebate/views.py
+++ b/euth/communitydebate/views.py
@@ -95,8 +95,9 @@
'successfully created'))
return response
- upload_forms = forms.TopicFileUploadFormset(re... | {"golden_diff": "diff --git a/euth/communitydebate/views.py b/euth/communitydebate/views.py\n--- a/euth/communitydebate/views.py\n+++ b/euth/communitydebate/views.py\n@@ -95,8 +95,9 @@\n 'successfully created'))\n return response\n \n- upload_forms = forms.T... | 1,883 | 123 |
gh_patches_debug_13913 | rasdani/github-patches | git_diff | cookiecutter__cookiecutter-655 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix the repo regex to handle + in URLs
The documentation said that you could do git+https:// or git+ssh:// but that was not, in fact, true.
--- END ISSUE ---
Below are some code segments, each from a relev... | diff --git a/cookiecutter/main.py b/cookiecutter/main.py
--- a/cookiecutter/main.py
+++ b/cookiecutter/main.py
@@ -30,19 +30,18 @@
'bb': 'https://bitbucket.org/{0}',
}
-REPO_REGEX = """
-(
-((git|ssh|https|http):(//)?) # something like git:// ssh:// etc.
- | # or
- (\w+@[\w\.]+) ... | {"golden_diff": "diff --git a/cookiecutter/main.py b/cookiecutter/main.py\n--- a/cookiecutter/main.py\n+++ b/cookiecutter/main.py\n@@ -30,19 +30,18 @@\n 'bb': 'https://bitbucket.org/{0}',\n }\n \n-REPO_REGEX = \"\"\"\n-(\n-((git|ssh|https|http):(//)?) # something like git:// ssh:// etc.\n- | ... | 1,655 | 246 |
gh_patches_debug_20096 | rasdani/github-patches | git_diff | liqd__adhocracy4-1005 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
comments: make sure blocked comments are not searched or filtered for their category
**URL:**
**user:**
**expected behaviour:** when I search for sth. in the comments, I do not expect to find blocked comm... | diff --git a/adhocracy4/comments_async/filters.py b/adhocracy4/comments_async/filters.py
--- a/adhocracy4/comments_async/filters.py
+++ b/adhocracy4/comments_async/filters.py
@@ -8,9 +8,12 @@
def filter_queryset(self, request, queryset, view):
- if 'comment_category' in request.GET:
+ if ('commen... | {"golden_diff": "diff --git a/adhocracy4/comments_async/filters.py b/adhocracy4/comments_async/filters.py\n--- a/adhocracy4/comments_async/filters.py\n+++ b/adhocracy4/comments_async/filters.py\n@@ -8,9 +8,12 @@\n \n def filter_queryset(self, request, queryset, view):\n \n- if 'comment_category' in request.G... | 982 | 237 |
gh_patches_debug_10648 | rasdani/github-patches | git_diff | zestedesavoir__zds-site-5449 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
L'export à la demande ne fonctionne pas
Plus précisement, l'export Markdown ne fonctionne pas quand on clique sur le bouton "Exporter le contenu" alors qu'il fonctionne lors de la publication.
--- END ISSUE ... | diff --git a/zds/tutorialv2/api/views.py b/zds/tutorialv2/api/views.py
--- a/zds/tutorialv2/api/views.py
+++ b/zds/tutorialv2/api/views.py
@@ -88,7 +88,7 @@
if not publishable_content.public_version:
raise Http404('Not public content')
tmp_dir, _ = self.ensure_directories(publ... | {"golden_diff": "diff --git a/zds/tutorialv2/api/views.py b/zds/tutorialv2/api/views.py\n--- a/zds/tutorialv2/api/views.py\n+++ b/zds/tutorialv2/api/views.py\n@@ -88,7 +88,7 @@\n if not publishable_content.public_version:\n raise Http404('Not public content')\n tmp_dir, _ = self.... | 1,446 | 148 |
gh_patches_debug_10271 | rasdani/github-patches | git_diff | PaddlePaddle__Paddle2ONNX-15 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Need check whether protoc existed.
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `variables.py`
Content:
... | diff --git a/variables.py b/variables.py
--- a/variables.py
+++ b/variables.py
@@ -19,9 +19,9 @@
def paddle_variable_to_onnx_tensor(paddle_var_name, block):
# TODO(varunarora): Need to do this only in the case of VarType.LOD_TENSOR.
paddle_var = block.var(paddle_var_name)
- return helper.make_tensor_value... | {"golden_diff": "diff --git a/variables.py b/variables.py\n--- a/variables.py\n+++ b/variables.py\n@@ -19,9 +19,9 @@\n def paddle_variable_to_onnx_tensor(paddle_var_name, block):\n # TODO(varunarora): Need to do this only in the case of VarType.LOD_TENSOR.\n paddle_var = block.var(paddle_var_name)\n- return ... | 817 | 163 |
gh_patches_debug_9971 | rasdani/github-patches | git_diff | pretix__pretix-882 | 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
@@ -58,6 +58,8 @@
# Update doc/user/markdown.rst if you change this!
}
+ALLOWED_PROTOCOLS = ['http', 'https', 'mailto... | {"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@@ -58,6 +58,8 @@\n # Update doc/user/markdown.rst if you change this!\n }\n \n+ALLOWED_PROTOCOLS = [... | 1,247 | 188 |
gh_patches_debug_30999 | rasdani/github-patches | git_diff | apache__airflow-28953 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support telegram-bot v20+
### Body
Currently our telegram integration uses Telegram v13 telegram-bot library. On 1st of Jan 2023 a new, backwards incompatible version of Telegram-bot has been released : http... | diff --git a/airflow/providers/telegram/hooks/telegram.py b/airflow/providers/telegram/hooks/telegram.py
--- a/airflow/providers/telegram/hooks/telegram.py
+++ b/airflow/providers/telegram/hooks/telegram.py
@@ -18,6 +18,8 @@
"""Hook for Telegram"""
from __future__ import annotations
+import asyncio
+
import telegr... | {"golden_diff": "diff --git a/airflow/providers/telegram/hooks/telegram.py b/airflow/providers/telegram/hooks/telegram.py\n--- a/airflow/providers/telegram/hooks/telegram.py\n+++ b/airflow/providers/telegram/hooks/telegram.py\n@@ -18,6 +18,8 @@\n \"\"\"Hook for Telegram\"\"\"\n from __future__ import annotations\n \n+i... | 1,898 | 357 |
gh_patches_debug_9859 | rasdani/github-patches | git_diff | aimhubio__aim-3112 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[fix] Serve files linked into the static files directory
In certain conda environments, the files in the static files root directory can be symlinked from a different place. The fixed implementation only reso... | diff --git a/aim/web/api/views.py b/aim/web/api/views.py
--- a/aim/web/api/views.py
+++ b/aim/web/api/views.py
@@ -21,7 +21,7 @@
# Ensure that no paths outside the root directory are accessed by checking that the
# root directory is a prefix of the file path
common_prefix = Path(os.path.commonpath([stati... | {"golden_diff": "diff --git a/aim/web/api/views.py b/aim/web/api/views.py\n--- a/aim/web/api/views.py\n+++ b/aim/web/api/views.py\n@@ -21,7 +21,7 @@\n # Ensure that no paths outside the root directory are accessed by checking that the\n # root directory is a prefix of the file path\n common_prefix = Path(os... | 816 | 141 |
gh_patches_debug_2972 | rasdani/github-patches | git_diff | pyodide__pyodide-325 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ValueError: invalid __array_struct__ when using js arrays of arrays and numpy
When using a matrix (array of array of numbers) in javascript and trying to convert that to a numpy array, it fails with the error... | diff --git a/src/pyodide.py b/src/pyodide.py
--- a/src/pyodide.py
+++ b/src/pyodide.py
@@ -67,4 +67,16 @@
return list(imports)
-__all__ = ['open_url', 'eval_code', 'find_imports']
+def as_nested_list(obj):
+ """
+ Assumes a Javascript object is made of (possibly nested) arrays and
+ converts them to n... | {"golden_diff": "diff --git a/src/pyodide.py b/src/pyodide.py\n--- a/src/pyodide.py\n+++ b/src/pyodide.py\n@@ -67,4 +67,16 @@\n return list(imports)\n \n \n-__all__ = ['open_url', 'eval_code', 'find_imports']\n+def as_nested_list(obj):\n+ \"\"\"\n+ Assumes a Javascript object is made of (possibly nested) arra... | 916 | 168 |
gh_patches_debug_23525 | rasdani/github-patches | git_diff | pretalx__pretalx-626 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
email sender address fallback is incorrect
## Current Behavior

the UI says emails will be se... | diff --git a/src/pretalx/common/mail.py b/src/pretalx/common/mail.py
--- a/src/pretalx/common/mail.py
+++ b/src/pretalx/common/mail.py
@@ -92,14 +92,14 @@
headers: dict = None,
):
headers = headers or dict()
+ if reply_to and isinstance(reply_to, str):
+ reply_to = reply_to.split(',')
if event... | {"golden_diff": "diff --git a/src/pretalx/common/mail.py b/src/pretalx/common/mail.py\n--- a/src/pretalx/common/mail.py\n+++ b/src/pretalx/common/mail.py\n@@ -92,14 +92,14 @@\n headers: dict = None,\n ):\n headers = headers or dict()\n+ if reply_to and isinstance(reply_to, str):\n+ reply_to = reply_to... | 1,883 | 304 |
gh_patches_debug_25799 | rasdani/github-patches | git_diff | mlflow__mlflow-5121 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Service metrics endpoint excludes many important routes
### Willingness to contribute
The MLflow Community encourages bug fix contributions. Would you or another member of your organization be willing ... | diff --git a/mlflow/server/prometheus_exporter.py b/mlflow/server/prometheus_exporter.py
--- a/mlflow/server/prometheus_exporter.py
+++ b/mlflow/server/prometheus_exporter.py
@@ -1,32 +1,19 @@
from prometheus_flask_exporter.multiprocess import GunicornInternalPrometheusMetrics
from flask import request
+from mlf... | {"golden_diff": "diff --git a/mlflow/server/prometheus_exporter.py b/mlflow/server/prometheus_exporter.py\n--- a/mlflow/server/prometheus_exporter.py\n+++ b/mlflow/server/prometheus_exporter.py\n@@ -1,32 +1,19 @@\n from prometheus_flask_exporter.multiprocess import GunicornInternalPrometheusMetrics\r\n from flask impor... | 2,043 | 407 |
gh_patches_debug_13249 | rasdani/github-patches | git_diff | streamlit__streamlit-7256 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pydeck_chart: Error (not a valid JSON) when data contains NaN
### Checklist
- [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues.
- [X] I added a v... | diff --git a/e2e/scripts/st_pydeck_chart.py b/e2e/scripts/st_pydeck_chart.py
--- a/e2e/scripts/st_pydeck_chart.py
+++ b/e2e/scripts/st_pydeck_chart.py
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import math
from typing import Any, cast
... | {"golden_diff": "diff --git a/e2e/scripts/st_pydeck_chart.py b/e2e/scripts/st_pydeck_chart.py\n--- a/e2e/scripts/st_pydeck_chart.py\n+++ b/e2e/scripts/st_pydeck_chart.py\n@@ -12,6 +12,7 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n+import math\n from ... | 1,386 | 257 |
gh_patches_debug_50331 | rasdani/github-patches | git_diff | pypi__warehouse-13706 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wrong key name used for PEP 658 metadata files in the JSON index
**Describe the bug**
[PEP 691](https://peps.python.org/pep-0691/#project-detail) states that the key name for metadata files in the JSON ind... | diff --git a/warehouse/packaging/utils.py b/warehouse/packaging/utils.py
--- a/warehouse/packaging/utils.py
+++ b/warehouse/packaging/utils.py
@@ -73,6 +73,9 @@
"data-dist-info-metadata": {"sha256": file.metadata_file_sha256_digest}
if file.metadata_file_sha256_digest
... | {"golden_diff": "diff --git a/warehouse/packaging/utils.py b/warehouse/packaging/utils.py\n--- a/warehouse/packaging/utils.py\n+++ b/warehouse/packaging/utils.py\n@@ -73,6 +73,9 @@\n \"data-dist-info-metadata\": {\"sha256\": file.metadata_file_sha256_digest}\n if file.metadata_file_sha25... | 1,884 | 137 |
gh_patches_debug_24568 | rasdani/github-patches | git_diff | mdn__kuma-6829 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
T - Fix post-sign-ins redirect so that user lands on correct page
**Summary**
You're not taken back to where you were when you sign in. At least via the modal and GitHub.
![Screen-Recording-2020-04-03-at-... | diff --git a/kuma/core/context_processors.py b/kuma/core/context_processors.py
--- a/kuma/core/context_processors.py
+++ b/kuma/core/context_processors.py
@@ -4,6 +4,8 @@
from django.conf import settings
from django.utils import translation
+from kuma.core.urlresolvers import reverse
+
from .i18n import get_langua... | {"golden_diff": "diff --git a/kuma/core/context_processors.py b/kuma/core/context_processors.py\n--- a/kuma/core/context_processors.py\n+++ b/kuma/core/context_processors.py\n@@ -4,6 +4,8 @@\n from django.conf import settings\n from django.utils import translation\n \n+from kuma.core.urlresolvers import reverse\n+\n fr... | 1,121 | 389 |
gh_patches_debug_9354 | rasdani/github-patches | git_diff | huggingface__text-generation-inference-579 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tied weight optimization for checkpoints doesn't work with text-generation-inference.
### System Info
Ubuntu 20.04
4 A10 NVIDIA GPU's
I think checkpoints saved after this feature was merged don't work wi... | diff --git a/server/text_generation_server/models/flash_rw.py b/server/text_generation_server/models/flash_rw.py
--- a/server/text_generation_server/models/flash_rw.py
+++ b/server/text_generation_server/models/flash_rw.py
@@ -49,7 +49,13 @@
torch.distributed.barrier(group=self.process_group)
filena... | {"golden_diff": "diff --git a/server/text_generation_server/models/flash_rw.py b/server/text_generation_server/models/flash_rw.py\n--- a/server/text_generation_server/models/flash_rw.py\n+++ b/server/text_generation_server/models/flash_rw.py\n@@ -49,7 +49,13 @@\n \n torch.distributed.barrier(group=self.process_... | 1,066 | 166 |
gh_patches_debug_38598 | rasdani/github-patches | git_diff | apache__airflow-32382 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add DagProcessor status to health endpoint.
### Description
Add DagProcessor status including latest heartbeat to health endpoint similar to Triggerer status added recently. Related PRs.
https://github.co... | diff --git a/airflow/api/common/airflow_health.py b/airflow/api/common/airflow_health.py
--- a/airflow/api/common/airflow_health.py
+++ b/airflow/api/common/airflow_health.py
@@ -18,6 +18,7 @@
from typing import Any
+from airflow.jobs.dag_processor_job_runner import DagProcessorJobRunner
from airflow.jobs.schedul... | {"golden_diff": "diff --git a/airflow/api/common/airflow_health.py b/airflow/api/common/airflow_health.py\n--- a/airflow/api/common/airflow_health.py\n+++ b/airflow/api/common/airflow_health.py\n@@ -18,6 +18,7 @@\n \n from typing import Any\n \n+from airflow.jobs.dag_processor_job_runner import DagProcessorJobRunner\n ... | 1,584 | 652 |
gh_patches_debug_31339 | rasdani/github-patches | git_diff | pwndbg__pwndbg-1853 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Better exception handling for unmet dependencies
Some of our users update Pwndbg only by `git pull`ing the newest version and not re-running `setup.sh`. If that happens and when we updated our dependencies re... | diff --git a/pwndbg/exception.py b/pwndbg/exception.py
--- a/pwndbg/exception.py
+++ b/pwndbg/exception.py
@@ -1,10 +1,12 @@
from __future__ import annotations
import functools
+import os
import sys
import traceback
import gdb
+import pkg_resources
import pwndbg.lib.cache
import pwndbg.lib.stdio
@@ -33,6 +... | {"golden_diff": "diff --git a/pwndbg/exception.py b/pwndbg/exception.py\n--- a/pwndbg/exception.py\n+++ b/pwndbg/exception.py\n@@ -1,10 +1,12 @@\n from __future__ import annotations\n \n import functools\n+import os\n import sys\n import traceback\n \n import gdb\n+import pkg_resources\n \n import pwndbg.lib.cache\n im... | 1,541 | 506 |
gh_patches_debug_18840 | rasdani/github-patches | git_diff | pyro-ppl__numpyro-1325 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
compat module: compat.infer.MCMC broken
Calling
```python
compat.infer.MCMC(kernel, num_warmup=100, num_samples=1000)
```
throws an error since no kwargs are handed to `mcmc.MCMC`. Also, shouldnt the corr... | diff --git a/numpyro/compat/infer.py b/numpyro/compat/infer.py
--- a/numpyro/compat/infer.py
+++ b/numpyro/compat/infer.py
@@ -82,7 +82,7 @@
self,
kernel,
num_samples,
- num_warmup=None,
+ warmup_steps=None,
initial_params=None,
num_chains=1,
hook_fn=N... | {"golden_diff": "diff --git a/numpyro/compat/infer.py b/numpyro/compat/infer.py\n--- a/numpyro/compat/infer.py\n+++ b/numpyro/compat/infer.py\n@@ -82,7 +82,7 @@\n self,\n kernel,\n num_samples,\n- num_warmup=None,\n+ warmup_steps=None,\n initial_params=None,\n num_c... | 1,971 | 234 |
gh_patches_debug_4953 | rasdani/github-patches | git_diff | getnikola__nikola-2998 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Theme meta file ignored_assets key should ignore whitespace
### Environment (if reporting a bug)
**Python Version:**
3.5.4
**Nikola Version:**
8.0.0dev HEAD
**Operating System:**
gentoo GNU/Linux
###... | diff --git a/nikola/plugins/task/copy_assets.py b/nikola/plugins/task/copy_assets.py
--- a/nikola/plugins/task/copy_assets.py
+++ b/nikola/plugins/task/copy_assets.py
@@ -67,6 +67,7 @@
theme_ini = utils.parse_theme_meta(main_theme)
if theme_ini:
ignored_assets = theme_ini.get("Nikola", "i... | {"golden_diff": "diff --git a/nikola/plugins/task/copy_assets.py b/nikola/plugins/task/copy_assets.py\n--- a/nikola/plugins/task/copy_assets.py\n+++ b/nikola/plugins/task/copy_assets.py\n@@ -67,6 +67,7 @@\n theme_ini = utils.parse_theme_meta(main_theme)\n if theme_ini:\n ignored_assets = the... | 1,697 | 122 |
gh_patches_debug_18140 | rasdani/github-patches | git_diff | open-telemetry__opentelemetry-python-2408 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
OTLP Exporter: Add support for Gauge point types
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `exporter/... | diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py
--- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentel... | {"golden_diff": "diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py\n--- a/exporter/opentelemetry-exporter-otlp-prot... | 1,841 | 308 |
gh_patches_debug_2760 | rasdani/github-patches | git_diff | getredash__redash-464 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error running query: datetime.time(13, 52, 27) is not JSON serializable
My table schema:
``` sql
CREATE TABLE F_entrances (
id SERIAL PRIMARY KEY,
timeOfEntrance time,
customerId int REFERENCES D_custo... | diff --git a/redash/utils.py b/redash/utils.py
--- a/redash/utils.py
+++ b/redash/utils.py
@@ -95,7 +95,7 @@
if isinstance(o, decimal.Decimal):
return float(o)
- if isinstance(o, datetime.date):
+ if isinstance(o, (datetime.date, datetime.time, datetime.timedelta)):
re... | {"golden_diff": "diff --git a/redash/utils.py b/redash/utils.py\n--- a/redash/utils.py\n+++ b/redash/utils.py\n@@ -95,7 +95,7 @@\n if isinstance(o, decimal.Decimal):\n return float(o)\n \n- if isinstance(o, datetime.date):\n+ if isinstance(o, (datetime.date, datetime.time, datetime.tim... | 1,799 | 96 |
gh_patches_debug_7666 | rasdani/github-patches | git_diff | tensorflow__addons-2204 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Drop Python3.5 Support
Per SIG Build, python3.5 will not be supported in TF2.4 since it has reached end of life. We should align.
--- END ISSUE ---
Below are some code segments, each from a relevant file. O... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -107,7 +107,6 @@
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.5",
"Programming Lang... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -107,7 +107,6 @@\n \"Intended Audience :: Science/Research\",\n \"License :: OSI Approved :: Apache Software License\",\n \"Programming Language :: Python :: 3\",\n- \"Programming Language :: Python :: 3... | 1,498 | 114 |
gh_patches_debug_3093 | rasdani/github-patches | git_diff | googleapis__python-bigquery-135 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
A new release of rsa dependency breaks Python 2.7 tests
Recent `rsa` releases are not compatible with Python 2.7 anymore, the last compatible version is 4.0. We need to bound its version in order to preserve ... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -36,6 +36,10 @@
"google-resumable-media >= 0.5.0, < 0.6dev",
"protobuf >= 3.6.0",
"six >=1.13.0,< 2.0.0dev",
+ # rsa >= 4.1 is not compatible with Python 2
+ # https://github.com/sybrenstuvel/python-rsa/issues/152
+ 'rsa <4.1; pyt... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -36,6 +36,10 @@\n \"google-resumable-media >= 0.5.0, < 0.6dev\",\n \"protobuf >= 3.6.0\",\n \"six >=1.13.0,< 2.0.0dev\",\n+ # rsa >= 4.1 is not compatible with Python 2\n+ # https://github.com/sybrenstuvel/python-rsa... | 1,877 | 169 |
gh_patches_debug_54533 | rasdani/github-patches | git_diff | dbt-labs__dbt-core-7566 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[CT-2552] Pin protobuf to greater than 4.0
Some users were seeing an error:
> ImportError: cannot import name 'builder' from 'google.protobuf.internal'.
The generated types_pb2.py file was built with prot... | diff --git a/core/setup.py b/core/setup.py
--- a/core/setup.py
+++ b/core/setup.py
@@ -63,7 +63,7 @@
"typing-extensions>=3.7.4",
"werkzeug>=1,<3",
"pathspec>=0.9,<0.12",
- "protobuf>=3.18.3",
+ "protobuf>=4.0.0",
"pytz>=2015.7",
# the following are all to match... | {"golden_diff": "diff --git a/core/setup.py b/core/setup.py\n--- a/core/setup.py\n+++ b/core/setup.py\n@@ -63,7 +63,7 @@\n \"typing-extensions>=3.7.4\",\n \"werkzeug>=1,<3\",\n \"pathspec>=0.9,<0.12\",\n- \"protobuf>=3.18.3\",\n+ \"protobuf>=4.0.0\",\n \"pytz>=2015.7\",\n ... | 1,302 | 130 |
gh_patches_debug_4049 | rasdani/github-patches | git_diff | strawberry-graphql__strawberry-1811 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Decimal scalars aren't serialized as strings when passed as numbers
When using the `Decimal` scalar, if the value passed in is a floating point number, the value isn't serialized as a string, but as if it wer... | diff --git a/strawberry/schema/types/base_scalars.py b/strawberry/schema/types/base_scalars.py
--- a/strawberry/schema/types/base_scalars.py
+++ b/strawberry/schema/types/base_scalars.py
@@ -21,9 +21,9 @@
return inner
-def parse_decimal(value: str) -> decimal.Decimal:
+def parse_decimal(value: object) -> decim... | {"golden_diff": "diff --git a/strawberry/schema/types/base_scalars.py b/strawberry/schema/types/base_scalars.py\n--- a/strawberry/schema/types/base_scalars.py\n+++ b/strawberry/schema/types/base_scalars.py\n@@ -21,9 +21,9 @@\n return inner\n \n \n-def parse_decimal(value: str) -> decimal.Decimal:\n+def parse_decima... | 1,686 | 133 |
gh_patches_debug_6817 | rasdani/github-patches | git_diff | SeldonIO__MLServer-866 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add more debugging information
I am running a custom Python model in MLServer, and it fails with an error. The error itself is not interesting, what's important is that MLServer gives very little helpful info... | diff --git a/mlserver/grpc/utils.py b/mlserver/grpc/utils.py
--- a/mlserver/grpc/utils.py
+++ b/mlserver/grpc/utils.py
@@ -43,7 +43,10 @@
try:
return await f(self, request, context)
except MLServerError as err:
- logger.error(err)
+ logger.exception(err)
... | {"golden_diff": "diff --git a/mlserver/grpc/utils.py b/mlserver/grpc/utils.py\n--- a/mlserver/grpc/utils.py\n+++ b/mlserver/grpc/utils.py\n@@ -43,7 +43,10 @@\n try:\n return await f(self, request, context)\n except MLServerError as err:\n- logger.error(err)\n+ logger.ex... | 900 | 126 |
gh_patches_debug_39788 | rasdani/github-patches | git_diff | cupy__cupy-2145 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use `ReductionKernel` in k-means example
The k-mean example uses `ElementwiseKernel` as an example of a custom kernel, but its algorithm is essentially reduction rather than mapping. It would be better to use... | diff --git a/examples/kmeans/kmeans.py b/examples/kmeans/kmeans.py
--- a/examples/kmeans/kmeans.py
+++ b/examples/kmeans/kmeans.py
@@ -19,26 +19,22 @@
print('%s: %f sec' % (message, end - start))
-_fit_calc_distances = cupy.ElementwiseKernel(
- 'S data, raw S centers, int32 n_clusters, int32 dim', 'raw S d... | {"golden_diff": "diff --git a/examples/kmeans/kmeans.py b/examples/kmeans/kmeans.py\n--- a/examples/kmeans/kmeans.py\n+++ b/examples/kmeans/kmeans.py\n@@ -19,26 +19,22 @@\n print('%s: %f sec' % (message, end - start))\n \n \n-_fit_calc_distances = cupy.ElementwiseKernel(\n- 'S data, raw S centers, int32 n_clust... | 1,806 | 946 |
gh_patches_debug_38523 | rasdani/github-patches | git_diff | ietf-tools__datatracker-5167 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
/sync/discrepancies is missing `.distinct()`
At the moment in the second table:

Likely this wi... | diff --git a/ietf/sync/discrepancies.py b/ietf/sync/discrepancies.py
--- a/ietf/sync/discrepancies.py
+++ b/ietf/sync/discrepancies.py
@@ -6,25 +6,25 @@
title = "Internet-Drafts that have been sent to the RFC Editor but do not have an RFC Editor state"
- docs = Document.objects.filter(states__in=list(State.... | {"golden_diff": "diff --git a/ietf/sync/discrepancies.py b/ietf/sync/discrepancies.py\n--- a/ietf/sync/discrepancies.py\n+++ b/ietf/sync/discrepancies.py\n@@ -6,25 +6,25 @@\n \n title = \"Internet-Drafts that have been sent to the RFC Editor but do not have an RFC Editor state\"\n \n- docs = Document.objects.fil... | 1,017 | 854 |
gh_patches_debug_9564 | rasdani/github-patches | git_diff | watchdogpolska__small_eod-494 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
udostępnienie id w API dla tags i documentType
Id dla tags i documetType, jest niezbędne dla zbudowania listy tych elementów w reakcie.
--- END ISSUE ---
Below are some code segments, each from a relevant... | diff --git a/backend-project/small_eod/letters/serializers.py b/backend-project/small_eod/letters/serializers.py
--- a/backend-project/small_eod/letters/serializers.py
+++ b/backend-project/small_eod/letters/serializers.py
@@ -13,7 +13,7 @@
class DocumentTypeSerializer(serializers.ModelSerializer):
class Meta:
... | {"golden_diff": "diff --git a/backend-project/small_eod/letters/serializers.py b/backend-project/small_eod/letters/serializers.py\n--- a/backend-project/small_eod/letters/serializers.py\n+++ b/backend-project/small_eod/letters/serializers.py\n@@ -13,7 +13,7 @@\n class DocumentTypeSerializer(serializers.ModelSerializer)... | 1,248 | 197 |
gh_patches_debug_19197 | rasdani/github-patches | git_diff | enthought__chaco-717 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove "PopupablePlot"
`PopupablePlot` was introduced in the commit https://github.com/enthought/chaco/commit/4af154cec6f678862ba7e695ae62d681312b50e8#diff-c93657842da48caff25acdb9de9f919f9c04b5301d0fafc28598... | diff --git a/chaco/ui/popupable_plot.py b/chaco/ui/popupable_plot.py
deleted file mode 100644
--- a/chaco/ui/popupable_plot.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Enthought library imports
-from traits.api import List
-from chaco.plot import Plot
-from chaco.plot_containers import VPlotContainer
-from chaco.tools.pan_too... | {"golden_diff": "diff --git a/chaco/ui/popupable_plot.py b/chaco/ui/popupable_plot.py\ndeleted file mode 100644\n--- a/chaco/ui/popupable_plot.py\n+++ /dev/null\n@@ -1,35 +0,0 @@\n-# Enthought library imports\n-from traits.api import List\n-from chaco.plot import Plot\n-from chaco.plot_containers import VPlotContainer\... | 723 | 347 |
gh_patches_debug_12556 | rasdani/github-patches | git_diff | DDMAL__CantusDB-726 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Ensure that dummy users (i.e. old indexers) can't log in.
Currently, on NewCantus we have created dummy users for people who had an Indexer object but no User account on OldCantus. These dummy users have rand... | diff --git a/django/cantusdb_project/main_app/management/commands/sync_indexers.py b/django/cantusdb_project/main_app/management/commands/sync_indexers.py
--- a/django/cantusdb_project/main_app/management/commands/sync_indexers.py
+++ b/django/cantusdb_project/main_app/management/commands/sync_indexers.py
@@ -69,12 +69... | {"golden_diff": "diff --git a/django/cantusdb_project/main_app/management/commands/sync_indexers.py b/django/cantusdb_project/main_app/management/commands/sync_indexers.py\n--- a/django/cantusdb_project/main_app/management/commands/sync_indexers.py\n+++ b/django/cantusdb_project/main_app/management/commands/sync_indexe... | 1,307 | 217 |
gh_patches_debug_5627 | rasdani/github-patches | git_diff | nf-core__tools-2075 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Lint linter config for Python < 3.6 and issue warning if Actions are using Python 3.6 and older
### Description of the bug
```
Run nf-core -l lint_log.txt lint --dir ${GITHUB_WORKSPACE} --markdown lint_re... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -35,6 +35,7 @@
"console_scripts": ["nf-core=nf_core.__main__:run_nf_core"],
"refgenie.hooks.post_update": ["nf-core-refgenie=nf_core.refgenie:update_config"],
},
+ python_requires=">=3.7, <4",
install_requires=required,
... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -35,6 +35,7 @@\n \"console_scripts\": [\"nf-core=nf_core.__main__:run_nf_core\"],\n \"refgenie.hooks.post_update\": [\"nf-core-refgenie=nf_core.refgenie:update_config\"],\n },\n+ python_requires=\">=3.7, <4\",\n... | 1,269 | 111 |
gh_patches_debug_9252 | rasdani/github-patches | git_diff | HypothesisWorks__hypothesis-2889 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve handling of self-referential strategies
As mentioned in #2783, the following strategy is not explicitly forbidden but fails with an `AssertionError`:
```python
from hypothesis import strategies as... | diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/recursive.py b/hypothesis-python/src/hypothesis/strategies/_internal/recursive.py
--- a/hypothesis-python/src/hypothesis/strategies/_internal/recursive.py
+++ b/hypothesis-python/src/hypothesis/strategies/_internal/recursive.py
@@ -66,13 +66,13 @@
... | {"golden_diff": "diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/recursive.py b/hypothesis-python/src/hypothesis/strategies/_internal/recursive.py\n--- a/hypothesis-python/src/hypothesis/strategies/_internal/recursive.py\n+++ b/hypothesis-python/src/hypothesis/strategies/_internal/recursive.py\n@@ -6... | 1,745 | 180 |
gh_patches_debug_65637 | rasdani/github-patches | git_diff | saulpw__visidata-2036 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug: cannot read .vds with expression column
**Small description**
Visidata cannot read back sheet(s) it saved as `.vds` if they contain an
expression column.
"KeyError: 'ExprColumn'" shows as error, result... | diff --git a/visidata/loaders/vds.py b/visidata/loaders/vds.py
--- a/visidata/loaders/vds.py
+++ b/visidata/loaders/vds.py
@@ -2,7 +2,7 @@
import json
-from visidata import VisiData, JsonSheet, Progress, IndexSheet, SettableColumn, ItemColumn
+from visidata import VisiData, JsonSheet, Progress, IndexSheet, Settabl... | {"golden_diff": "diff --git a/visidata/loaders/vds.py b/visidata/loaders/vds.py\n--- a/visidata/loaders/vds.py\n+++ b/visidata/loaders/vds.py\n@@ -2,7 +2,7 @@\n \n import json\n \n-from visidata import VisiData, JsonSheet, Progress, IndexSheet, SettableColumn, ItemColumn\n+from visidata import VisiData, JsonSheet, Prog... | 1,949 | 113 |
gh_patches_debug_7921 | rasdani/github-patches | git_diff | OpenMined__PySyft-5330 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Check and Fix notebook / jupyter client warning on Colab
## Description
This needs to be checked on Colab, since it seems colab has its own outdated versions of notebook and jupyter-client as well.
https://... | diff --git a/src/syft/core/common/environment.py b/src/syft/core/common/environment.py
--- a/src/syft/core/common/environment.py
+++ b/src/syft/core/common/environment.py
@@ -14,7 +14,8 @@
from packaging import version
NOTEBOOK_VERSION = version.parse(notebook.__version__.split("+")[0])
- if NOTEBOOK_VER... | {"golden_diff": "diff --git a/src/syft/core/common/environment.py b/src/syft/core/common/environment.py\n--- a/src/syft/core/common/environment.py\n+++ b/src/syft/core/common/environment.py\n@@ -14,7 +14,8 @@\n from packaging import version\n \n NOTEBOOK_VERSION = version.parse(notebook.__version__.split(\"+\")... | 548 | 163 |
gh_patches_debug_42569 | rasdani/github-patches | git_diff | NVIDIA-Merlin__NVTabular-1262 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[FEA] Create a padding option in the ListSlice Op
The right padding option is required
- to create fixed length lists generated from ETL workflow (see ([example nb](https://github.com/NVIDIA-Merlin/Transform... | diff --git a/nvtabular/ops/list_slice.py b/nvtabular/ops/list_slice.py
--- a/nvtabular/ops/list_slice.py
+++ b/nvtabular/ops/list_slice.py
@@ -44,10 +44,12 @@
truncated = column_names >> ops.ListSlice(-10)
"""
- def __init__(self, start, end=None):
+ def __init__(self, start, end=None, pad=False, ... | {"golden_diff": "diff --git a/nvtabular/ops/list_slice.py b/nvtabular/ops/list_slice.py\n--- a/nvtabular/ops/list_slice.py\n+++ b/nvtabular/ops/list_slice.py\n@@ -44,10 +44,12 @@\n truncated = column_names >> ops.ListSlice(-10)\n \"\"\"\n \n- def __init__(self, start, end=None):\n+ def __init__(self, ... | 1,829 | 892 |
gh_patches_debug_2135 | rasdani/github-patches | git_diff | chainer__chainer-258 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Shape of output value of `concat` is list in GPU
`cuda.empty([1])` makes a `GPUArray` with `list` shape. It causes a type invalid error.
https://github.com/pfnet/chainer/blob/master/chainer/functions/concat.... | diff --git a/chainer/functions/concat.py b/chainer/functions/concat.py
--- a/chainer/functions/concat.py
+++ b/chainer/functions/concat.py
@@ -64,6 +64,7 @@
shape = list(xs[0].shape)
for x in xs[1:]:
shape[self.axis] += x.shape[self.axis]
+ shape = tuple(shape)
self.shape ... | {"golden_diff": "diff --git a/chainer/functions/concat.py b/chainer/functions/concat.py\n--- a/chainer/functions/concat.py\n+++ b/chainer/functions/concat.py\n@@ -64,6 +64,7 @@\n shape = list(xs[0].shape)\n for x in xs[1:]:\n shape[self.axis] += x.shape[self.axis]\n+ shape = tuple(sha... | 1,491 | 105 |
gh_patches_debug_38697 | rasdani/github-patches | git_diff | facebookresearch__hydra-605 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Feature Request] Allow Initialize to take a module
# 🚀 Feature Request
Allow hydra.experimental.initialize to take a calling module
--- END ISSUE ---
Below are some code segments, each from a relevant ... | diff --git a/examples/advanced/ad_hoc_composition/hydra_compose_example.py b/examples/advanced/ad_hoc_composition/hydra_compose_example.py
--- a/examples/advanced/ad_hoc_composition/hydra_compose_example.py
+++ b/examples/advanced/ad_hoc_composition/hydra_compose_example.py
@@ -4,7 +4,7 @@
if __name__ == "__main__":
... | {"golden_diff": "diff --git a/examples/advanced/ad_hoc_composition/hydra_compose_example.py b/examples/advanced/ad_hoc_composition/hydra_compose_example.py\n--- a/examples/advanced/ad_hoc_composition/hydra_compose_example.py\n+++ b/examples/advanced/ad_hoc_composition/hydra_compose_example.py\n@@ -4,7 +4,7 @@\n if __na... | 935 | 789 |
gh_patches_debug_25543 | rasdani/github-patches | git_diff | bridgecrewio__checkov-5756 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CKV_AWS_265 false positive
**Describe the issue**
CKV_AWS_265 fails checks on KeySpaces not using a Customer Managed KMS key even though it is configured to do so
This is because the code is looking for [... | diff --git a/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py b/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py
--- a/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py
+++ b/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py
@@ -3,6 +3,10 @@
class KeyspacesTabl... | {"golden_diff": "diff --git a/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py b/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py\n--- a/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py\n+++ b/checkov/terraform/checks/resource/aws/KeyspacesTableUsesCMK.py\n@@ -3,6 +3,10 @@\n \n... | 1,267 | 316 |
gh_patches_debug_24317 | rasdani/github-patches | git_diff | GeotrekCE__Geotrek-admin-3757 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tri des évènements touristiques dans l'API
Par défaut les évènement ne sont pas triés par date de départ, ce qui implique qu'ils apparaissent dans le désordre dans Geotrek-Rando.
Il faut modifier l'API pou... | diff --git a/geotrek/api/v2/views/tourism.py b/geotrek/api/v2/views/tourism.py
--- a/geotrek/api/v2/views/tourism.py
+++ b/geotrek/api/v2/views/tourism.py
@@ -1,6 +1,6 @@
from django.conf import settings
from django.contrib.gis.db.models.functions import Transform
-from django.db.models import F, Case, When
+from dja... | {"golden_diff": "diff --git a/geotrek/api/v2/views/tourism.py b/geotrek/api/v2/views/tourism.py\n--- a/geotrek/api/v2/views/tourism.py\n+++ b/geotrek/api/v2/views/tourism.py\n@@ -1,6 +1,6 @@\n from django.conf import settings\n from django.contrib.gis.db.models.functions import Transform\n-from django.db.models import ... | 1,972 | 275 |
gh_patches_debug_253 | rasdani/github-patches | git_diff | kserve__kserve-2726 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Knative installation keeps failing in e2e tests
/kind bug
**What steps did you take and what happened:**
[A clear and concise description of what the bug is.]
The e2e tests are failing every now and then... | diff --git a/python/kserve/setup.py b/python/kserve/setup.py
--- a/python/kserve/setup.py
+++ b/python/kserve/setup.py
@@ -21,7 +21,7 @@
'pytest-cov',
'pytest-asyncio',
'mypy',
- 'portforward',
+ 'portforward==0.4.0',
]
with open('requirements.txt') as f:
| {"golden_diff": "diff --git a/python/kserve/setup.py b/python/kserve/setup.py\n--- a/python/kserve/setup.py\n+++ b/python/kserve/setup.py\n@@ -21,7 +21,7 @@\n 'pytest-cov',\n 'pytest-asyncio',\n 'mypy',\n- 'portforward',\n+ 'portforward==0.4.0',\n ]\n \n with open('requirements.txt') as f:\n", "issue"... | 1,098 | 91 |
gh_patches_debug_37628 | rasdani/github-patches | git_diff | ansible-collections__community.general-1595 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support GSSAPI authentication for ldap_* module
<!--- Verify first that your feature was not already discussed on GitHub -->
<!--- Complete *all* sections as described, this form is processed automatically -... | diff --git a/plugins/doc_fragments/ldap.py b/plugins/doc_fragments/ldap.py
--- a/plugins/doc_fragments/ldap.py
+++ b/plugins/doc_fragments/ldap.py
@@ -15,7 +15,7 @@
options:
bind_dn:
description:
- - A DN to bind with. If this is omitted, we'll try a SASL bind with the EXTERNAL mechanism.
+ - A DN to... | {"golden_diff": "diff --git a/plugins/doc_fragments/ldap.py b/plugins/doc_fragments/ldap.py\n--- a/plugins/doc_fragments/ldap.py\n+++ b/plugins/doc_fragments/ldap.py\n@@ -15,7 +15,7 @@\n options:\n bind_dn:\n description:\n- - A DN to bind with. If this is omitted, we'll try a SASL bind with the EXTERNAL mec... | 1,851 | 626 |
gh_patches_debug_1688 | rasdani/github-patches | git_diff | conda__conda-build-570 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AppVeyor: AttributeError: 'module' object has no attribute 'get_pid_list
https://ci.appveyor.com/project/mpi4py/mpi4py/build/2.0.0a0-17/job/965h1pw9k7476768#L1187
conda info:
https://ci.appveyor.com/project/... | diff --git a/conda_build/windows.py b/conda_build/windows.py
--- a/conda_build/windows.py
+++ b/conda_build/windows.py
@@ -89,7 +89,7 @@
def kill_processes():
if psutil is None:
return
- for n in psutil.get_pid_list():
+ for n in psutil.pids():
try:
p = psutil.Process(n)
... | {"golden_diff": "diff --git a/conda_build/windows.py b/conda_build/windows.py\n--- a/conda_build/windows.py\n+++ b/conda_build/windows.py\n@@ -89,7 +89,7 @@\n def kill_processes():\n if psutil is None:\n return\n- for n in psutil.get_pid_list():\n+ for n in psutil.pids():\n try:\n ... | 1,744 | 102 |
gh_patches_debug_40563 | rasdani/github-patches | git_diff | cloud-custodian__cloud-custodian-4169 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
aws - new generic resource action "invoke-stepfunction" enhancement
Enhancement which behaves just like action invoke-lambda but invokes (aka starts execution of) step function state machines for use cases wh... | diff --git a/c7n/resources/sfn.py b/c7n/resources/sfn.py
--- a/c7n/resources/sfn.py
+++ b/c7n/resources/sfn.py
@@ -13,9 +13,12 @@
# limitations under the License.
from __future__ import absolute_import, division, print_function, unicode_literals
+
+from c7n.actions import Action
from c7n.manager import resources
... | {"golden_diff": "diff --git a/c7n/resources/sfn.py b/c7n/resources/sfn.py\n--- a/c7n/resources/sfn.py\n+++ b/c7n/resources/sfn.py\n@@ -13,9 +13,12 @@\n # limitations under the License.\n from __future__ import absolute_import, division, print_function, unicode_literals\n \n+\n+from c7n.actions import Action\n from c7n.... | 1,113 | 990 |
gh_patches_debug_1598 | rasdani/github-patches | git_diff | CTFd__CTFd-1908 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bump pybluemonday to latest
Just tracking this so we don't forget. Latest should be 0.0.6 with bluemonday at 1.0.10. It adds support for comments in the HTML output.
--- END ISSUE ---
Below are some code s... | diff --git a/CTFd/utils/security/sanitize.py b/CTFd/utils/security/sanitize.py
--- a/CTFd/utils/security/sanitize.py
+++ b/CTFd/utils/security/sanitize.py
@@ -92,6 +92,9 @@
SANITIZER.RequireNoReferrerOnFullyQualifiedLinks(True)
SANITIZER.RequireNoReferrerOnLinks(True)
+# Allow Comments
+SANITIZER.AllowComments()
+
... | {"golden_diff": "diff --git a/CTFd/utils/security/sanitize.py b/CTFd/utils/security/sanitize.py\n--- a/CTFd/utils/security/sanitize.py\n+++ b/CTFd/utils/security/sanitize.py\n@@ -92,6 +92,9 @@\n SANITIZER.RequireNoReferrerOnFullyQualifiedLinks(True)\n SANITIZER.RequireNoReferrerOnLinks(True)\n \n+# Allow Comments\n+SAN... | 1,353 | 108 |
gh_patches_debug_21547 | rasdani/github-patches | git_diff | fidals__shopelectro-421 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wrong QuerySet in RobotsView stb2
Currently it looks so `CustomPage.objects.filter(slug='robots')` and should be `.filter(slug='robots.txt')`
--- END ISSUE ---
Below are some code segments, each from a rele... | diff --git a/shopelectro/urls.py b/shopelectro/urls.py
--- a/shopelectro/urls.py
+++ b/shopelectro/urls.py
@@ -6,6 +6,7 @@
from django.contrib.sitemaps.views import sitemap
from django.views.decorators.cache import cache_page
+from pages.models import CustomPage
from pages.views import RobotsView, SitemapPage
fro... | {"golden_diff": "diff --git a/shopelectro/urls.py b/shopelectro/urls.py\n--- a/shopelectro/urls.py\n+++ b/shopelectro/urls.py\n@@ -6,6 +6,7 @@\n from django.contrib.sitemaps.views import sitemap\n from django.views.decorators.cache import cache_page\n \n+from pages.models import CustomPage\n from pages.views import Rob... | 1,886 | 277 |
gh_patches_debug_25269 | rasdani/github-patches | git_diff | pre-commit__pre-commit-493 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Encode some sort of "version" for language-local repositories
Without this, they'll never get upgraded if fixes are made in the pre-commit empty template
--- END ISSUE ---
Below are some code segments, each... | diff --git a/pre_commit/constants.py b/pre_commit/constants.py
--- a/pre_commit/constants.py
+++ b/pre_commit/constants.py
@@ -17,6 +17,8 @@
# Bump when installation changes in a backwards / forwards incompatible way
INSTALLED_STATE_VERSION = '1'
+# Bump when modifying `empty_template`
+LOCAL_REPO_VERSION = '1'
... | {"golden_diff": "diff --git a/pre_commit/constants.py b/pre_commit/constants.py\n--- a/pre_commit/constants.py\n+++ b/pre_commit/constants.py\n@@ -17,6 +17,8 @@\n \n # Bump when installation changes in a backwards / forwards incompatible way\n INSTALLED_STATE_VERSION = '1'\n+# Bump when modifying `empty_template`\n+LOC... | 1,834 | 275 |
gh_patches_debug_7905 | rasdani/github-patches | git_diff | coala__coala-591 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
run_tests --html doesn't work in ubuntu
In ubuntu and debian systems, coverage isn't installed in `/usr/bin/coverage3` ... rather, it is installed as `/usr/bin/python3-coverage`. Hence, `--html` flag doesn't ... | diff --git a/coalib/misc/StringConstants.py b/coalib/misc/StringConstants.py
--- a/coalib/misc/StringConstants.py
+++ b/coalib/misc/StringConstants.py
@@ -1,5 +1,6 @@
import inspect
import os
+import sys
from coalib.misc.i18n import _
@@ -53,3 +54,8 @@
system_coafile = os.path.join(coalib_root, "default_coa... | {"golden_diff": "diff --git a/coalib/misc/StringConstants.py b/coalib/misc/StringConstants.py\n--- a/coalib/misc/StringConstants.py\n+++ b/coalib/misc/StringConstants.py\n@@ -1,5 +1,6 @@\n import inspect\n import os\n+import sys\n \n from coalib.misc.i18n import _\n \n@@ -53,3 +54,8 @@\n system_coafile = os.path.jo... | 866 | 163 |
gh_patches_debug_33170 | rasdani/github-patches | git_diff | kedro-org__kedro-1838 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
tracking.JSONDataSet documentation and docstring are not accurate
Here is the source code for `tracking.JSONDataSet`: https://kedro.readthedocs.io/en/latest/_modules/kedro/extras/datasets/tracking/json_datase... | diff --git a/kedro/extras/datasets/tracking/json_dataset.py b/kedro/extras/datasets/tracking/json_dataset.py
--- a/kedro/extras/datasets/tracking/json_dataset.py
+++ b/kedro/extras/datasets/tracking/json_dataset.py
@@ -12,7 +12,7 @@
"""``JSONDataSet`` saves data to a JSON file using an underlying
filesystem (... | {"golden_diff": "diff --git a/kedro/extras/datasets/tracking/json_dataset.py b/kedro/extras/datasets/tracking/json_dataset.py\n--- a/kedro/extras/datasets/tracking/json_dataset.py\n+++ b/kedro/extras/datasets/tracking/json_dataset.py\n@@ -12,7 +12,7 @@\n \"\"\"``JSONDataSet`` saves data to a JSON file using an unde... | 1,440 | 525 |
gh_patches_debug_29307 | rasdani/github-patches | git_diff | shuup__shuup-1557 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Admin: Search doesn't work well with categories
Admin > Search > Search for a category
Why does it say "Products" when it's clearly showing categories?
Deleted categories are also visible in search.
![s... | diff --git a/shuup/admin/modules/categories/__init__.py b/shuup/admin/modules/categories/__init__.py
--- a/shuup/admin/modules/categories/__init__.py
+++ b/shuup/admin/modules/categories/__init__.py
@@ -12,6 +12,7 @@
from shuup.admin.base import AdminModule, MenuEntry, SearchResult
from shuup.admin.menu import PROD... | {"golden_diff": "diff --git a/shuup/admin/modules/categories/__init__.py b/shuup/admin/modules/categories/__init__.py\n--- a/shuup/admin/modules/categories/__init__.py\n+++ b/shuup/admin/modules/categories/__init__.py\n@@ -12,6 +12,7 @@\n \n from shuup.admin.base import AdminModule, MenuEntry, SearchResult\n from shuup... | 1,361 | 325 |
gh_patches_debug_34114 | rasdani/github-patches | git_diff | learningequality__kolibri-1396 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Coach Reports - change when progress starts being measured in coach reports
## Summary
Implementations team members were confused as to why some exercises were showing up as having progress in Recent but t... | diff --git a/kolibri/plugins/coach/api.py b/kolibri/plugins/coach/api.py
--- a/kolibri/plugins/coach/api.py
+++ b/kolibri/plugins/coach/api.py
@@ -1,12 +1,13 @@
import datetime
from dateutil.parser import parse
+from django.db.models import Q
from django.utils import timezone
from kolibri.auth.constants import ... | {"golden_diff": "diff --git a/kolibri/plugins/coach/api.py b/kolibri/plugins/coach/api.py\n--- a/kolibri/plugins/coach/api.py\n+++ b/kolibri/plugins/coach/api.py\n@@ -1,12 +1,13 @@\n import datetime\n from dateutil.parser import parse\n \n+from django.db.models import Q\n from django.utils import timezone\n \n from kol... | 1,677 | 369 |
gh_patches_debug_5072 | rasdani/github-patches | git_diff | pypa__cibuildwheel-1217 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Should arm64 runners build both universal2 and arm64 wheels by default?
Continuing the discussion from https://github.com/pypa/cibuildwheel/pull/1191#discussion_r928749039
The current situation is that arm... | diff --git a/cibuildwheel/architecture.py b/cibuildwheel/architecture.py
--- a/cibuildwheel/architecture.py
+++ b/cibuildwheel/architecture.py
@@ -66,10 +66,6 @@
if platform == "windows" and native_architecture == Architecture.AMD64:
result.add(Architecture.x86)
- if platform == "macos" a... | {"golden_diff": "diff --git a/cibuildwheel/architecture.py b/cibuildwheel/architecture.py\n--- a/cibuildwheel/architecture.py\n+++ b/cibuildwheel/architecture.py\n@@ -66,10 +66,6 @@\n if platform == \"windows\" and native_architecture == Architecture.AMD64:\n result.add(Architecture.x86)\n \n- ... | 1,895 | 140 |
gh_patches_debug_54055 | rasdani/github-patches | git_diff | docker__docker-py-1669 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Issue with port option in 2.4.0 version
Hi,
I update to the 2.4 today and i got issue with docker-compose when i try to add the following line to my configuration file (docker-compose.yml) :
`ports:
... | diff --git a/docker/utils/ports.py b/docker/utils/ports.py
--- a/docker/utils/ports.py
+++ b/docker/utils/ports.py
@@ -54,6 +54,7 @@
def split_port(port):
+ port = str(port)
match = PORT_SPEC.match(port)
if match is None:
_raise_invalid_port(port)
| {"golden_diff": "diff --git a/docker/utils/ports.py b/docker/utils/ports.py\n--- a/docker/utils/ports.py\n+++ b/docker/utils/ports.py\n@@ -54,6 +54,7 @@\n \n \n def split_port(port):\n+ port = str(port)\n match = PORT_SPEC.match(port)\n if match is None:\n _raise_invalid_port(port)\n", "issue": "Issu... | 1,672 | 78 |
gh_patches_debug_32765 | rasdani/github-patches | git_diff | openai__evals-1180 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Registry path CLI option for oaievalset
### Describe the feature or improvement you're requesting
It should take an `--registry_path` like `oaieval` does
### Additional context
Useful when using as a libra... | diff --git a/evals/cli/oaievalset.py b/evals/cli/oaievalset.py
--- a/evals/cli/oaievalset.py
+++ b/evals/cli/oaievalset.py
@@ -48,6 +48,13 @@
parser = argparse.ArgumentParser(description="Run eval sets through the API")
parser.add_argument("model", type=str, help="Name of a completion model.")
parser.add... | {"golden_diff": "diff --git a/evals/cli/oaievalset.py b/evals/cli/oaievalset.py\n--- a/evals/cli/oaievalset.py\n+++ b/evals/cli/oaievalset.py\n@@ -48,6 +48,13 @@\n parser = argparse.ArgumentParser(description=\"Run eval sets through the API\")\n parser.add_argument(\"model\", type=str, help=\"Name of a completi... | 1,510 | 395 |
gh_patches_debug_22706 | rasdani/github-patches | git_diff | arviz-devs__arviz-426 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Incompatibility with emcee3 pre-release
Trying to use the `from_emcee()` function raises the following error for `emcee3`:
> AttributeError: 'EnsembleSampler' object has no attribute 'args'
This is due ... | diff --git a/arviz/data/io_emcee.py b/arviz/data/io_emcee.py
--- a/arviz/data/io_emcee.py
+++ b/arviz/data/io_emcee.py
@@ -27,7 +27,8 @@
Defaults for var_names and arg_names
"""
num_vars = sampler.chain.shape[-1]
- num_args = len(sampler.args)
+ # Get emcee version 2 sampler args, else get emce... | {"golden_diff": "diff --git a/arviz/data/io_emcee.py b/arviz/data/io_emcee.py\n--- a/arviz/data/io_emcee.py\n+++ b/arviz/data/io_emcee.py\n@@ -27,7 +27,8 @@\n Defaults for var_names and arg_names\n \"\"\"\n num_vars = sampler.chain.shape[-1]\n- num_args = len(sampler.args)\n+ # Get emcee version 2... | 1,519 | 299 |
gh_patches_debug_3463 | rasdani/github-patches | git_diff | ipython__ipython-10046 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Autocompletion with Init-Signatures of C extension classes
I don't quite get the autocompletion to work with C extension classes. These classes have a Signature (at least since python 3.4 by utilizing `__text... | diff --git a/IPython/utils/dir2.py b/IPython/utils/dir2.py
--- a/IPython/utils/dir2.py
+++ b/IPython/utils/dir2.py
@@ -41,6 +41,9 @@
# TypeError: dir(obj) does not return a list
words = set()
+ if safe_hasattr(obj, '__class__'):
+ words |= set(dir(obj.__class__))
+
# filter out non-st... | {"golden_diff": "diff --git a/IPython/utils/dir2.py b/IPython/utils/dir2.py\n--- a/IPython/utils/dir2.py\n+++ b/IPython/utils/dir2.py\n@@ -41,6 +41,9 @@\n # TypeError: dir(obj) does not return a list\n words = set()\n \n+ if safe_hasattr(obj, '__class__'):\n+ words |= set(dir(obj.__class__))\n... | 1,118 | 116 |
gh_patches_debug_9205 | rasdani/github-patches | git_diff | sanic-org__sanic-2622 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
restart workers online (graceful restart) to hot reload, in production environment.
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is your feature request related... | diff --git a/sanic/worker/multiplexer.py b/sanic/worker/multiplexer.py
--- a/sanic/worker/multiplexer.py
+++ b/sanic/worker/multiplexer.py
@@ -21,9 +21,14 @@
"state": ProcessState.ACKED.name,
}
- def restart(self, name: str = ""):
+ def restart(self, name: str = "", all_workers: bool = Fal... | {"golden_diff": "diff --git a/sanic/worker/multiplexer.py b/sanic/worker/multiplexer.py\n--- a/sanic/worker/multiplexer.py\n+++ b/sanic/worker/multiplexer.py\n@@ -21,9 +21,14 @@\n \"state\": ProcessState.ACKED.name,\n }\n \n- def restart(self, name: str = \"\"):\n+ def restart(self, name: str ... | 1,014 | 185 |
gh_patches_debug_15392 | rasdani/github-patches | git_diff | DataBiosphere__toil-1385 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Improve toil cluster utils CLI
Instead of requiring the -p flag make it default to 'aws'. It would also be great to make the cluster name optional -- if the user only has 1 cluster running it should use that ... | diff --git a/src/toil/utils/__init__.py b/src/toil/utils/__init__.py
--- a/src/toil/utils/__init__.py
+++ b/src/toil/utils/__init__.py
@@ -5,12 +5,12 @@
from toil.provisioners.aws import getCurrentAWSZone
-logger = logging.getLogger( __name__ )
+logger = logging.getLogger(__name__)
def addBasicProvisionerOpti... | {"golden_diff": "diff --git a/src/toil/utils/__init__.py b/src/toil/utils/__init__.py\n--- a/src/toil/utils/__init__.py\n+++ b/src/toil/utils/__init__.py\n@@ -5,12 +5,12 @@\n \n from toil.provisioners.aws import getCurrentAWSZone\n \n-logger = logging.getLogger( __name__ )\n+logger = logging.getLogger(__name__)\n \n \n... | 649 | 197 |
gh_patches_debug_34630 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-2154 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Don't validate for existing column names if they're being moved
<img width="905" alt="Screen Shot 2022-12-21 at 6 02 20 PM" src="https://user-images.githubusercontent.com/287034/209019919-a8dd4cab-4ce9-4c85-8... | diff --git a/db/tables/operations/split.py b/db/tables/operations/split.py
--- a/db/tables/operations/split.py
+++ b/db/tables/operations/split.py
@@ -2,8 +2,11 @@
from db import constants
from db.columns.base import MathesarColumn
-from db.columns.operations.alter import batch_alter_table_drop_columns
-from db.col... | {"golden_diff": "diff --git a/db/tables/operations/split.py b/db/tables/operations/split.py\n--- a/db/tables/operations/split.py\n+++ b/db/tables/operations/split.py\n@@ -2,8 +2,11 @@\n \n from db import constants\n from db.columns.base import MathesarColumn\n-from db.columns.operations.alter import batch_alter_table_d... | 1,812 | 460 |
gh_patches_debug_30217 | rasdani/github-patches | git_diff | bokeh__bokeh-8373 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DataTable crashes layout if 'field' is key in ColumnDataSource data
Bokeh 0.13.0
Mac OS 10.13.3
python 2.7.10
Safari 11.0.3
If 'field' is a key in the data of ColumnDataSource, bokeh serve cannot genera... | diff --git a/examples/models/file/donut.py b/examples/models/file/donut.py
--- a/examples/models/file/donut.py
+++ b/examples/models/file/donut.py
@@ -61,7 +61,7 @@
end = angles.tolist() + [end_angle]
start = [start_angle] + end[:-1]
base_color = colors[browser]
- fill = [ base_color.lighten(i*0.05) f... | {"golden_diff": "diff --git a/examples/models/file/donut.py b/examples/models/file/donut.py\n--- a/examples/models/file/donut.py\n+++ b/examples/models/file/donut.py\n@@ -61,7 +61,7 @@\n end = angles.tolist() + [end_angle]\n start = [start_angle] + end[:-1]\n base_color = colors[browser]\n- fill = [ base... | 2,008 | 457 |
gh_patches_debug_19290 | rasdani/github-patches | git_diff | Pylons__pyramid-3458 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pyramid.exceptions.ConfigurationConflictError: <exception str() failed>
**Describe the bug**
While building an app I caused an error who's traceback ending the the following line:
```
pyramid.exceptions.Co... | diff --git a/pyramid/exceptions.py b/pyramid/exceptions.py
--- a/pyramid/exceptions.py
+++ b/pyramid/exceptions.py
@@ -7,8 +7,6 @@
NotFound = HTTPNotFound # bw compat
Forbidden = HTTPForbidden # bw compat
-CR = '\n'
-
class BadCSRFOrigin(HTTPBadRequest):
"""
@@ -89,14 +87,13 @@
def __str__(self):
... | {"golden_diff": "diff --git a/pyramid/exceptions.py b/pyramid/exceptions.py\n--- a/pyramid/exceptions.py\n+++ b/pyramid/exceptions.py\n@@ -7,8 +7,6 @@\n NotFound = HTTPNotFound # bw compat\n Forbidden = HTTPForbidden # bw compat\n \n-CR = '\\n'\n-\n \n class BadCSRFOrigin(HTTPBadRequest):\n \"\"\"\n@@ -89,14 +87,13... | 1,936 | 241 |
gh_patches_debug_3211 | rasdani/github-patches | git_diff | xonsh__xonsh-428 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't type literal tab with prompt_toolkit
In bash or zsh I would typically type `Ctl-V TAB` to insert a literal tab, however, when using prompt_tookitas my shell type this simply tries to do tab completion a... | diff --git a/xonsh/prompt_toolkit_key_bindings.py b/xonsh/prompt_toolkit_key_bindings.py
--- a/xonsh/prompt_toolkit_key_bindings.py
+++ b/xonsh/prompt_toolkit_key_bindings.py
@@ -32,3 +32,11 @@
indent instead of autocompleting.
"""
event.cli.current_buffer.insert_text(env.get('INDENT'))
+
+ ... | {"golden_diff": "diff --git a/xonsh/prompt_toolkit_key_bindings.py b/xonsh/prompt_toolkit_key_bindings.py\n--- a/xonsh/prompt_toolkit_key_bindings.py\n+++ b/xonsh/prompt_toolkit_key_bindings.py\n@@ -32,3 +32,11 @@\n indent instead of autocompleting.\n \"\"\"\n event.cli.current_buffer.insert_tex... | 617 | 143 |
gh_patches_debug_689 | rasdani/github-patches | git_diff | great-expectations__great_expectations-1500 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of th... | diff --git a/great_expectations/cli/cli_messages.py b/great_expectations/cli/cli_messages.py
--- a/great_expectations/cli/cli_messages.py
+++ b/great_expectations/cli/cli_messages.py
@@ -17,6 +17,7 @@
great_expectations
|-- great_expectations.yml
|-- expectations
+ |-- checkpoints
|-- notebooks
... | {"golden_diff": "diff --git a/great_expectations/cli/cli_messages.py b/great_expectations/cli/cli_messages.py\n--- a/great_expectations/cli/cli_messages.py\n+++ b/great_expectations/cli/cli_messages.py\n@@ -17,6 +17,7 @@\n great_expectations\n |-- great_expectations.yml\n |-- expectations\n+ |-- checkpoi... | 1,139 | 91 |
gh_patches_debug_25258 | rasdani/github-patches | git_diff | mindsdb__lightwood-1091 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Apple M1 support
## Your Environment
* Operating system: macOS in an M1 apple computer
## Describe your issue
As reported by @alejandrovillegas, installation currently fails in MacBooks with M1 processor... | diff --git a/lightwood/helpers/seed.py b/lightwood/helpers/seed.py
--- a/lightwood/helpers/seed.py
+++ b/lightwood/helpers/seed.py
@@ -1,7 +1,11 @@
import random
import torch
import numpy as np
-import mxnet as mx
+
+try:
+ import mxnet as mx
+except Exception:
+ mx = None
def seed(seed_nr: int) -> None:
... | {"golden_diff": "diff --git a/lightwood/helpers/seed.py b/lightwood/helpers/seed.py\n--- a/lightwood/helpers/seed.py\n+++ b/lightwood/helpers/seed.py\n@@ -1,7 +1,11 @@\n import random\n import torch\n import numpy as np\n-import mxnet as mx\n+\n+try:\n+ import mxnet as mx\n+except Exception:\n+ mx = None\n \n \n ... | 859 | 362 |
gh_patches_debug_5753 | rasdani/github-patches | git_diff | OpenEnergyPlatform__oeplatform-787 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Meta-schemas are not created properly
It seems that a fresh installation of the most recent version does not create the meta-schemas anymore.
--- END ISSUE ---
Below are some code segments, each from a rele... | diff --git a/oedb_datamodels/versions/5c098aa81e2c_create_schemas.py b/oedb_datamodels/versions/5c098aa81e2c_create_schemas.py
--- a/oedb_datamodels/versions/5c098aa81e2c_create_schemas.py
+++ b/oedb_datamodels/versions/5c098aa81e2c_create_schemas.py
@@ -30,12 +30,15 @@
"reference",
]
-
def upgrade():
for... | {"golden_diff": "diff --git a/oedb_datamodels/versions/5c098aa81e2c_create_schemas.py b/oedb_datamodels/versions/5c098aa81e2c_create_schemas.py\n--- a/oedb_datamodels/versions/5c098aa81e2c_create_schemas.py\n+++ b/oedb_datamodels/versions/5c098aa81e2c_create_schemas.py\n@@ -30,12 +30,15 @@\n \"reference\",\n ]\n \n... | 622 | 225 |
gh_patches_debug_15539 | rasdani/github-patches | git_diff | scikit-hep__pyhf-1355 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Validate lower bounds of dependencies in CI
# Description
To ensure that the lower bound of all dependencies are still sufficient for the API used, add a test that installs from a `lower-bound-requirements... | diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -3,13 +3,13 @@
extras_require = {
'shellcomplete': ['click_completion'],
'tensorflow': [
- 'tensorflow~=2.2.0', # TensorFlow minor releases are as volatile as major
- 'tensorflow-probability~=0.10.0',
+ 'tensorflow~=2.2.1... | {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -3,13 +3,13 @@\n extras_require = {\n 'shellcomplete': ['click_completion'],\n 'tensorflow': [\n- 'tensorflow~=2.2.0', # TensorFlow minor releases are as volatile as major\n- 'tensorflow-probability~=0.10.0',\n+... | 1,182 | 280 |
gh_patches_debug_723 | rasdani/github-patches | git_diff | pypi__warehouse-1177 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Permanent URL (Heroku "No such app" error)
I noticed that https://warehouse.python.org/ produces a `Heroku | No such app` error at the moment. Is this intentional? Are we permanently at https://pypi.io/ now?
... | diff --git a/warehouse/__about__.py b/warehouse/__about__.py
--- a/warehouse/__about__.py
+++ b/warehouse/__about__.py
@@ -26,7 +26,7 @@
__title__ = "warehouse"
__summary__ = "Next Generation Python Package Repository"
-__uri__ = "https://warehouse.python.org/"
+__uri__ = "https://pypi.io/"
__version__ = "15.0.d... | {"golden_diff": "diff --git a/warehouse/__about__.py b/warehouse/__about__.py\n--- a/warehouse/__about__.py\n+++ b/warehouse/__about__.py\n@@ -26,7 +26,7 @@\n \n __title__ = \"warehouse\"\n __summary__ = \"Next Generation Python Package Repository\"\n-__uri__ = \"https://warehouse.python.org/\"\n+__uri__ = \"https://py... | 785 | 104 |
gh_patches_debug_27547 | rasdani/github-patches | git_diff | conan-io__conan-300 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[requires} in conanfile.txt gives no error
The typo:
```
[requires}
...
```
in `conanfile.txt` does not give any error indication at all when running `conan install ...`. The way to see that something is wr... | diff --git a/conans/util/config_parser.py b/conans/util/config_parser.py
--- a/conans/util/config_parser.py
+++ b/conans/util/config_parser.py
@@ -12,19 +12,26 @@
self._sections = {}
self._allowed_fields = allowed_fields or []
pattern = re.compile("^\[([a-z_]{2,50})\]")
- current_lines... | {"golden_diff": "diff --git a/conans/util/config_parser.py b/conans/util/config_parser.py\n--- a/conans/util/config_parser.py\n+++ b/conans/util/config_parser.py\n@@ -12,19 +12,26 @@\n self._sections = {}\n self._allowed_fields = allowed_fields or []\n pattern = re.compile(\"^\\[([a-z_]{2,50})\\... | 743 | 357 |
gh_patches_debug_30732 | rasdani/github-patches | git_diff | ManageIQ__integration_tests-194 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unexpected popup in server_roles fixture
The server_roles fixture attempts to explicitly navigate to the current server's settings page before clicking any checkboxen, but the call to do that (`settings_pg.cl... | diff --git a/fixtures/server_roles.py b/fixtures/server_roles.py
--- a/fixtures/server_roles.py
+++ b/fixtures/server_roles.py
@@ -17,6 +17,7 @@
'web_services',
)
+
@pytest.fixture
def server_roles(fixtureconf, cfme_data, cnf_configuration_pg):
"""Set the server roles based on a list of roles attached to... | {"golden_diff": "diff --git a/fixtures/server_roles.py b/fixtures/server_roles.py\n--- a/fixtures/server_roles.py\n+++ b/fixtures/server_roles.py\n@@ -17,6 +17,7 @@\n 'web_services',\n )\n \n+\n @pytest.fixture\n def server_roles(fixtureconf, cfme_data, cnf_configuration_pg):\n \"\"\"Set the server roles based ... | 1,614 | 363 |
gh_patches_debug_18842 | rasdani/github-patches | git_diff | scikit-image__scikit-image-6169 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
broken match histograms gallery example
## Description
This bug was reported here: https://forum.image.sc/t/exposure-match-histograms-broken/61682
Most likely this is due to some unintended change in sc... | diff --git a/skimage/exposure/histogram_matching.py b/skimage/exposure/histogram_matching.py
--- a/skimage/exposure/histogram_matching.py
+++ b/skimage/exposure/histogram_matching.py
@@ -63,7 +63,6 @@
if image.ndim != reference.ndim:
raise ValueError('Image and reference must have the same number '
... | {"golden_diff": "diff --git a/skimage/exposure/histogram_matching.py b/skimage/exposure/histogram_matching.py\n--- a/skimage/exposure/histogram_matching.py\n+++ b/skimage/exposure/histogram_matching.py\n@@ -63,7 +63,6 @@\n if image.ndim != reference.ndim:\n raise ValueError('Image and reference must have th... | 1,179 | 239 |
gh_patches_debug_49612 | rasdani/github-patches | git_diff | StackStorm__st2-5306 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add a CI lint task to check st2client's README.md
We need to make sure that the st2client `README.rst` file is acceptable to PyPI, since any syntax errors in it will cause the `push_st2client` task of the `st... | diff --git a/st2client/setup.py b/st2client/setup.py
--- a/st2client/setup.py
+++ b/st2client/setup.py
@@ -45,6 +45,7 @@
"automation platform."
),
long_description=readme,
+ long_description_content_type="text/x-rst",
author="StackStorm",
author_email="info@stackstorm.com",
url="htt... | {"golden_diff": "diff --git a/st2client/setup.py b/st2client/setup.py\n--- a/st2client/setup.py\n+++ b/st2client/setup.py\n@@ -45,6 +45,7 @@\n \"automation platform.\"\n ),\n long_description=readme,\n+ long_description_content_type=\"text/x-rst\",\n author=\"StackStorm\",\n author_email=\"in... | 1,325 | 94 |
gh_patches_debug_9236 | rasdani/github-patches | git_diff | beetbox__beets-1435 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
embedart plugin disregards "write: no" and "-W" config opts
Any import action with `embedart` enabled causes a full write of tags and art, even when config file specifies `write: no`, or commandline includes ... | diff --git a/beetsplug/embedart.py b/beetsplug/embedart.py
--- a/beetsplug/embedart.py
+++ b/beetsplug/embedart.py
@@ -126,7 +126,7 @@
def process_album(self, album):
"""Automatically embed art after art has been set
"""
- if self.config['auto']:
+ if self.config['auto'] and config[... | {"golden_diff": "diff --git a/beetsplug/embedart.py b/beetsplug/embedart.py\n--- a/beetsplug/embedart.py\n+++ b/beetsplug/embedart.py\n@@ -126,7 +126,7 @@\n def process_album(self, album):\n \"\"\"Automatically embed art after art has been set\n \"\"\"\n- if self.config['auto']:\n+ if ... | 1,962 | 133 |
gh_patches_debug_1313 | rasdani/github-patches | git_diff | readthedocs__readthedocs.org-4853 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Confusing error message to end user
In https://github.com/rtfd/readthedocs.org/issues/4071#issuecomment-405939492 I realized that we are saying that we have a problem parsing the YAML file but the problem is ... | diff --git a/readthedocs/doc_builder/exceptions.py b/readthedocs/doc_builder/exceptions.py
--- a/readthedocs/doc_builder/exceptions.py
+++ b/readthedocs/doc_builder/exceptions.py
@@ -43,7 +43,7 @@
class YAMLParseError(BuildEnvironmentError):
GENERIC_WITH_PARSE_EXCEPTION = ugettext_noop(
- 'Problem parsin... | {"golden_diff": "diff --git a/readthedocs/doc_builder/exceptions.py b/readthedocs/doc_builder/exceptions.py\n--- a/readthedocs/doc_builder/exceptions.py\n+++ b/readthedocs/doc_builder/exceptions.py\n@@ -43,7 +43,7 @@\n \n class YAMLParseError(BuildEnvironmentError):\n GENERIC_WITH_PARSE_EXCEPTION = ugettext_noop(\n... | 1,031 | 105 |
gh_patches_debug_50216 | rasdani/github-patches | git_diff | pex-tool__pex-991 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Release 2.1.12
On the docket:
- [x] A PEX_EXTRA_SYS_PATH runtime variable #989
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- B... | diff --git a/pex/version.py b/pex/version.py
--- a/pex/version.py
+++ b/pex/version.py
@@ -1,4 +1,4 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
-__version__ = '2.1.11'
+__version__ = '2.1.12'
| {"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = '2.1.11'\n+__version__ = '2.1.12'\n", "issu... | 338 | 96 |
gh_patches_debug_14012 | rasdani/github-patches | git_diff | streamlink__streamlink-4355 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
plugins.ard_live: Unable to parse MEDIAINFO
### 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/streamli... | diff --git a/src/streamlink/plugins/ard_live.py b/src/streamlink/plugins/ard_live.py
--- a/src/streamlink/plugins/ard_live.py
+++ b/src/streamlink/plugins/ard_live.py
@@ -14,6 +14,7 @@
r"https?://((www|live)\.)?daserste\.de/"
))
class ARDLive(Plugin):
+ _URL_DATA_BASE = "https://www.daserste.de/"
_QUALIT... | {"golden_diff": "diff --git a/src/streamlink/plugins/ard_live.py b/src/streamlink/plugins/ard_live.py\n--- a/src/streamlink/plugins/ard_live.py\n+++ b/src/streamlink/plugins/ard_live.py\n@@ -14,6 +14,7 @@\n r\"https?://((www|live)\\.)?daserste\\.de/\"\n ))\n class ARDLive(Plugin):\n+ _URL_DATA_BASE = \"https://w... | 1,444 | 207 |
gh_patches_debug_38602 | rasdani/github-patches | git_diff | streamlink__streamlink-2969 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Plugin App17 cannot fetch any stream
## Plugin Issue
<!-- Replace [ ] with [x] in order to check the box -->
- [x] This is a plugin issue and I have read the contribution guidelines.
### Description
... | diff --git a/src/streamlink/plugins/app17.py b/src/streamlink/plugins/app17.py
--- a/src/streamlink/plugins/app17.py
+++ b/src/streamlink/plugins/app17.py
@@ -1,35 +1,49 @@
+import logging
import re
from streamlink.plugin import Plugin
-from streamlink.plugin.api import useragents
+from streamlink.plugin.api import... | {"golden_diff": "diff --git a/src/streamlink/plugins/app17.py b/src/streamlink/plugins/app17.py\n--- a/src/streamlink/plugins/app17.py\n+++ b/src/streamlink/plugins/app17.py\n@@ -1,35 +1,49 @@\n+import logging\n import re\n \n from streamlink.plugin import Plugin\n-from streamlink.plugin.api import useragents\n+from st... | 1,357 | 808 |
gh_patches_debug_66700 | rasdani/github-patches | git_diff | googleapis__google-cloud-python-10076 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Synthesis failed for recommender
Hello! Autosynth couldn't regenerate recommender. :broken_heart:
Here's the output from running `synth.py`:
```
Cloning into 'working_repo'...
Switched to branch 'autosynth-... | diff --git a/recommender/synth.py b/recommender/synth.py
--- a/recommender/synth.py
+++ b/recommender/synth.py
@@ -29,7 +29,8 @@
for version in versions:
library = gapic.py_library(
"recommender", version,
- include_protos=True
+ include_protos=True,
+ config_path="/google/cloud/reco... | {"golden_diff": "diff --git a/recommender/synth.py b/recommender/synth.py\n--- a/recommender/synth.py\n+++ b/recommender/synth.py\n@@ -29,7 +29,8 @@\n for version in versions:\n library = gapic.py_library(\n \"recommender\", version,\n- include_protos=True\n+ include_protos=True,\n+ con... | 1,536 | 135 |
gh_patches_debug_16252 | rasdani/github-patches | git_diff | fedora-infra__bodhi-2097 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bodhi-check-policies only operates on unpushed updates
I noticed today when working on #1514 that the update query that ```bodhi-check-policies``` performs only selects [unpushed updates](https://github.com/f... | diff --git a/bodhi/server/scripts/check_policies.py b/bodhi/server/scripts/check_policies.py
--- a/bodhi/server/scripts/check_policies.py
+++ b/bodhi/server/scripts/check_policies.py
@@ -24,7 +24,6 @@
messages in the message bus yet.
"""
import click
-from sqlalchemy.sql.expression import false
from bodhi.server ... | {"golden_diff": "diff --git a/bodhi/server/scripts/check_policies.py b/bodhi/server/scripts/check_policies.py\n--- a/bodhi/server/scripts/check_policies.py\n+++ b/bodhi/server/scripts/check_policies.py\n@@ -24,7 +24,6 @@\n messages in the message bus yet.\n \"\"\"\n import click\n-from sqlalchemy.sql.expression import ... | 970 | 199 |
gh_patches_debug_26464 | rasdani/github-patches | git_diff | geopandas__geopandas-2418 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
wrong country code ISO_3 for France in naturalearth_lowres dataset
Not sure this is the right place to mention it, but code iso_3 for France should be 'FRA' not -99.
```
import geopandas
path = g... | diff --git a/geopandas/datasets/naturalearth_creation.py b/geopandas/datasets/naturalearth_creation.py
--- a/geopandas/datasets/naturalearth_creation.py
+++ b/geopandas/datasets/naturalearth_creation.py
@@ -1,19 +1,29 @@
"""
Script that generates the included dataset 'naturalearth_lowres.shp'.
-Raw data: https://ww... | {"golden_diff": "diff --git a/geopandas/datasets/naturalearth_creation.py b/geopandas/datasets/naturalearth_creation.py\n--- a/geopandas/datasets/naturalearth_creation.py\n+++ b/geopandas/datasets/naturalearth_creation.py\n@@ -1,19 +1,29 @@\n \"\"\"\n Script that generates the included dataset 'naturalearth_lowres.shp'... | 605 | 461 |
gh_patches_debug_18801 | rasdani/github-patches | git_diff | TheAlgorithms__Python-338 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bug report for radix sort
**Description**
if the test case for [`radix_sort.py`](https://github.com/TheAlgorithms/Python/blob/master/sorts/radix_sort.py) is `[104, 203, 308, 401]`, the result would be `[40... | diff --git a/sorts/radix_sort.py b/sorts/radix_sort.py
--- a/sorts/radix_sort.py
+++ b/sorts/radix_sort.py
@@ -1,28 +1,26 @@
def radixsort(lst):
- RADIX = 10
- maxLength = False
- tmp , placement = -1, 1
+ RADIX = 10
+ placement = 1
- while not maxLength:
- maxLength = True
- # declare and initialize... | {"golden_diff": "diff --git a/sorts/radix_sort.py b/sorts/radix_sort.py\n--- a/sorts/radix_sort.py\n+++ b/sorts/radix_sort.py\n@@ -1,28 +1,26 @@\n def radixsort(lst):\n- RADIX = 10\n- maxLength = False\n- tmp , placement = -1, 1\n+ RADIX = 10\n+ placement = 1\n \n- while not maxLength:\n- maxLength = True\... | 810 | 413 |
gh_patches_debug_26262 | rasdani/github-patches | git_diff | conan-io__conan-2927 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Version("6") < Version("6.0") == True
Version model has a bug.
Version("6") is considered lower than "6.0". It introduced a bug (fixed in #2885) with the default`std`.
--- END ISSUE ---
Below are some c... | diff --git a/conans/model/version.py b/conans/model/version.py
--- a/conans/model/version.py
+++ b/conans/model/version.py
@@ -98,6 +98,18 @@
if not isinstance(other, Version):
other = Version(other)
+ # Check equals
+ def get_el(a_list, index):
+ if len(a_list) - 1 < in... | {"golden_diff": "diff --git a/conans/model/version.py b/conans/model/version.py\n--- a/conans/model/version.py\n+++ b/conans/model/version.py\n@@ -98,6 +98,18 @@\n if not isinstance(other, Version):\n other = Version(other)\n \n+ # Check equals\n+ def get_el(a_list, index):\n+ ... | 1,713 | 387 |
gh_patches_debug_25246 | rasdani/github-patches | git_diff | DataDog__dd-trace-py-2734 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
IndexError in _wrap_get_create
### Which version of dd-trace-py are you using? 0.50.3
### Which version of pip are you using? 20.3.3
### Which version of the libraries are you using? `dogpile.cache==0.7... | diff --git a/ddtrace/contrib/dogpile_cache/region.py b/ddtrace/contrib/dogpile_cache/region.py
--- a/ddtrace/contrib/dogpile_cache/region.py
+++ b/ddtrace/contrib/dogpile_cache/region.py
@@ -4,6 +4,7 @@
from ...constants import SPAN_MEASURED_KEY
from ...pin import Pin
+from ...utils import get_argument_value
d... | {"golden_diff": "diff --git a/ddtrace/contrib/dogpile_cache/region.py b/ddtrace/contrib/dogpile_cache/region.py\n--- a/ddtrace/contrib/dogpile_cache/region.py\n+++ b/ddtrace/contrib/dogpile_cache/region.py\n@@ -4,6 +4,7 @@\n \n from ...constants import SPAN_MEASURED_KEY\n from ...pin import Pin\n+from ...utils import g... | 1,250 | 313 |
gh_patches_debug_20132 | rasdani/github-patches | git_diff | ipython__ipython-6827 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
/files/ only serving attachments
https://github.com/ipython/ipython/pull/6624 changes the behavior of serving html files from '/files/'.
Instead of displaying a html page, I get the option to download it as f... | diff --git a/IPython/html/files/handlers.py b/IPython/html/files/handlers.py
--- a/IPython/html/files/handlers.py
+++ b/IPython/html/files/handlers.py
@@ -24,7 +24,10 @@
path, name = os.path.split(path)
model = cm.get_model(name, path)
-
+
+ if self.get_argument("download", False):
+ ... | {"golden_diff": "diff --git a/IPython/html/files/handlers.py b/IPython/html/files/handlers.py\n--- a/IPython/html/files/handlers.py\n+++ b/IPython/html/files/handlers.py\n@@ -24,7 +24,10 @@\n \n path, name = os.path.split(path)\n model = cm.get_model(name, path)\n-\n+ \n+ if self.get_argum... | 1,093 | 229 |
gh_patches_debug_7870 | rasdani/github-patches | git_diff | pytorch__examples-897 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Typo
https://github.com/pytorch/examples/blob/4db11160c21d0e26634ca1fcb94a73ad8d870ba7/snli/train.py#L122
`validation` instead of `valiation`
--- END ISSUE ---
Below are some code segments, each from a r... | diff --git a/snli/train.py b/snli/train.py
--- a/snli/train.py
+++ b/snli/train.py
@@ -119,7 +119,7 @@
epoch, iterations, 1+batch_idx, len(train_iter),
100. * (1+batch_idx) / len(train_iter), loss.item(), dev_loss.item(), train_acc, dev_acc))
- # update best valiation set ... | {"golden_diff": "diff --git a/snli/train.py b/snli/train.py\n--- a/snli/train.py\n+++ b/snli/train.py\n@@ -119,7 +119,7 @@\n epoch, iterations, 1+batch_idx, len(train_iter),\n 100. * (1+batch_idx) / len(train_iter), loss.item(), dev_loss.item(), train_acc, dev_acc))\n \n- # up... | 1,937 | 129 |
gh_patches_debug_33413 | rasdani/github-patches | git_diff | opendatacube__datacube-core-1466 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DeprecationWarning on `pkg_resources` in Python 3.10
### Expected behaviour
ODC running in Python 3.10 shouldn't print `DeprecationWarning`s.
### Actual behaviour
When running some ODC code:
```
..... | diff --git a/datacube/drivers/driver_cache.py b/datacube/drivers/driver_cache.py
--- a/datacube/drivers/driver_cache.py
+++ b/datacube/drivers/driver_cache.py
@@ -26,14 +26,9 @@
"""
def safe_load(ep):
- from pkg_resources import DistributionNotFound
# pylint: disable=broad-except,bare-except... | {"golden_diff": "diff --git a/datacube/drivers/driver_cache.py b/datacube/drivers/driver_cache.py\n--- a/datacube/drivers/driver_cache.py\n+++ b/datacube/drivers/driver_cache.py\n@@ -26,14 +26,9 @@\n \"\"\"\n \n def safe_load(ep):\n- from pkg_resources import DistributionNotFound\n # pylint: disa... | 1,899 | 461 |
gh_patches_debug_37127 | rasdani/github-patches | git_diff | pantsbuild__pants-11673 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
python_source_root not added to syspath
I have a project structure along the lines of this:
```
packages/
package_a/
BUILD
__init__.py
package_a.py
package_b/
B... | diff --git a/src/python/pants/backend/python/util_rules/python_sources.py b/src/python/pants/backend/python/util_rules/python_sources.py
--- a/src/python/pants/backend/python/util_rules/python_sources.py
+++ b/src/python/pants/backend/python/util_rules/python_sources.py
@@ -13,7 +13,7 @@
from pants.core.util_rules.str... | {"golden_diff": "diff --git a/src/python/pants/backend/python/util_rules/python_sources.py b/src/python/pants/backend/python/util_rules/python_sources.py\n--- a/src/python/pants/backend/python/util_rules/python_sources.py\n+++ b/src/python/pants/backend/python/util_rules/python_sources.py\n@@ -13,7 +13,7 @@\n from pant... | 1,966 | 656 |
gh_patches_debug_10677 | rasdani/github-patches | git_diff | python-discord__bot-1521 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Logic in Source Command's Help Command Check
## Description
<!-- Describe the bug you've found -->
Its impossible to get the source for the HelpChannel cog.
## Steps to Reproduce
<!-- Detail the exact l... | diff --git a/bot/exts/info/source.py b/bot/exts/info/source.py
--- a/bot/exts/info/source.py
+++ b/bot/exts/info/source.py
@@ -14,9 +14,10 @@
class SourceConverter(commands.Converter):
"""Convert an argument into a help command, tag, command, or cog."""
- async def convert(self, ctx: commands.Context, argume... | {"golden_diff": "diff --git a/bot/exts/info/source.py b/bot/exts/info/source.py\n--- a/bot/exts/info/source.py\n+++ b/bot/exts/info/source.py\n@@ -14,9 +14,10 @@\n class SourceConverter(commands.Converter):\n \"\"\"Convert an argument into a help command, tag, command, or cog.\"\"\"\n \n- async def convert(self,... | 1,969 | 166 |
gh_patches_debug_1323 | rasdani/github-patches | git_diff | ivy-llc__ivy-22920 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
eigvals
--- 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/numpy/linalg/matrix_eigen... | diff --git a/ivy/functional/frontends/numpy/linalg/matrix_eigenvalues.py b/ivy/functional/frontends/numpy/linalg/matrix_eigenvalues.py
--- a/ivy/functional/frontends/numpy/linalg/matrix_eigenvalues.py
+++ b/ivy/functional/frontends/numpy/linalg/matrix_eigenvalues.py
@@ -17,6 +17,11 @@
return ivy.eigh(a, UPLO=UPLO)... | {"golden_diff": "diff --git a/ivy/functional/frontends/numpy/linalg/matrix_eigenvalues.py b/ivy/functional/frontends/numpy/linalg/matrix_eigenvalues.py\n--- a/ivy/functional/frontends/numpy/linalg/matrix_eigenvalues.py\n+++ b/ivy/functional/frontends/numpy/linalg/matrix_eigenvalues.py\n@@ -17,6 +17,11 @@\n return i... | 460 | 161 |
gh_patches_debug_37040 | rasdani/github-patches | git_diff | opsdroid__opsdroid-522 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Switch CLI to use click
I recently discovered [`click`](http://click.pocoo.org/5/) which makes adding command line options and arguments to your python application super simple and much more robust.
We sho... | diff --git a/opsdroid/__main__.py b/opsdroid/__main__.py
--- a/opsdroid/__main__.py
+++ b/opsdroid/__main__.py
@@ -3,12 +3,13 @@
import os
import sys
import logging
-import argparse
import gettext
+import click
+
from opsdroid.core import OpsDroid
-from opsdroid.const import DEFAULT_LOG_FILENAME, EXAMPLE_CONFIG_... | {"golden_diff": "diff --git a/opsdroid/__main__.py b/opsdroid/__main__.py\n--- a/opsdroid/__main__.py\n+++ b/opsdroid/__main__.py\n@@ -3,12 +3,13 @@\n import os\n import sys\n import logging\n-import argparse\n import gettext\n \n+import click\n+\n from opsdroid.core import OpsDroid\n-from opsdroid.const import DEFAULT... | 1,657 | 672 |
gh_patches_debug_6492 | rasdani/github-patches | git_diff | mozilla__kitsune-2981 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add whitenoise and serve static files from the app
Add whitenoise to serve static files in the dev (and stage?) instances.
In production we'll probably go with another more efficient approach which is bei... | diff --git a/wsgi/app.py b/wsgi/app.py
--- a/wsgi/app.py
+++ b/wsgi/app.py
@@ -21,6 +21,10 @@
application = get_wsgi_application()
application = Sentry(application)
+if config('ENABLE_WHITENOISE', default=False, cast=bool):
+ from whitenoise.django import DjangoWhiteNoise
+ application = DjangoWhiteNoise(appl... | {"golden_diff": "diff --git a/wsgi/app.py b/wsgi/app.py\n--- a/wsgi/app.py\n+++ b/wsgi/app.py\n@@ -21,6 +21,10 @@\n application = get_wsgi_application()\n application = Sentry(application)\n \n+if config('ENABLE_WHITENOISE', default=False, cast=bool):\n+ from whitenoise.django import DjangoWhiteNoise\n+ applicati... | 612 | 136 |
gh_patches_debug_22252 | rasdani/github-patches | git_diff | getsentry__sentry-python-123 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
asyncio concurrency issues
@mitsuhiko discovered that passing around hubs does not work at all and we likely leak state between requests
--- END ISSUE ---
Below are some code segments, each from a relevant... | diff --git a/sentry_sdk/integrations/sanic.py b/sentry_sdk/integrations/sanic.py
--- a/sentry_sdk/integrations/sanic.py
+++ b/sentry_sdk/integrations/sanic.py
@@ -36,17 +36,19 @@
async def sentry_handle_request(self, request, *args, **kwargs):
hub = Hub.current
if hub.get_integration(... | {"golden_diff": "diff --git a/sentry_sdk/integrations/sanic.py b/sentry_sdk/integrations/sanic.py\n--- a/sentry_sdk/integrations/sanic.py\n+++ b/sentry_sdk/integrations/sanic.py\n@@ -36,17 +36,19 @@\n async def sentry_handle_request(self, request, *args, **kwargs):\n hub = Hub.current\n ... | 1,830 | 285 |
gh_patches_debug_14733 | rasdani/github-patches | git_diff | mathesar-foundation__mathesar-3271 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add openAPI Specification for /database_roles/ endpoint
Generate spec for `database_roles` endpoint
--- END ISSUE ---
Below are some code segments, each from a relevant file. One or more of these files may ... | diff --git a/config/settings/openapi.py b/config/settings/openapi.py
--- a/config/settings/openapi.py
+++ b/config/settings/openapi.py
@@ -1,9 +1,16 @@
def custom_preprocessing_hook(endpoints):
- filtered = []
- for (path, path_regex, method, callback) in endpoints:
- # Remove all but DRF API endpoints
- ... | {"golden_diff": "diff --git a/config/settings/openapi.py b/config/settings/openapi.py\n--- a/config/settings/openapi.py\n+++ b/config/settings/openapi.py\n@@ -1,9 +1,16 @@\n def custom_preprocessing_hook(endpoints):\n- filtered = []\n- for (path, path_regex, method, callback) in endpoints:\n- # Remove all ... | 541 | 281 |
gh_patches_debug_35341 | rasdani/github-patches | git_diff | google__mobly-170 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Snippets are not compatible with UIAutomator
'am instrument' only sets up a UiAutomationConnection in -w mode (I don't know why). Snippets are not run in wait mode, so UiAutomationConnection is null. This cra... | diff --git a/mobly/controllers/android_device_lib/snippet_client.py b/mobly/controllers/android_device_lib/snippet_client.py
--- a/mobly/controllers/android_device_lib/snippet_client.py
+++ b/mobly/controllers/android_device_lib/snippet_client.py
@@ -17,14 +17,18 @@
import logging
import re
-from mobly.controllers.... | {"golden_diff": "diff --git a/mobly/controllers/android_device_lib/snippet_client.py b/mobly/controllers/android_device_lib/snippet_client.py\n--- a/mobly/controllers/android_device_lib/snippet_client.py\n+++ b/mobly/controllers/android_device_lib/snippet_client.py\n@@ -17,14 +17,18 @@\n import logging\n import re\n \n... | 1,704 | 596 |
gh_patches_debug_57176 | rasdani/github-patches | git_diff | celery__celery-4037 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
celery.contrib.sphinx fails with Sphinx 1.6.1
When using the `celery.contrib.sphinx` extension with Sphinx 1.6.1 with Celery 4.0.2 the following occurs:
```
Exception occurred:
File "/home/ubuntu/virtu... | diff --git a/celery/contrib/sphinx.py b/celery/contrib/sphinx.py
--- a/celery/contrib/sphinx.py
+++ b/celery/contrib/sphinx.py
@@ -69,5 +69,5 @@
def setup(app):
"""Setup Sphinx extension."""
app.add_autodocumenter(TaskDocumenter)
- app.domains['py'].directives['task'] = TaskDirective
+ app.add_directiv... | {"golden_diff": "diff --git a/celery/contrib/sphinx.py b/celery/contrib/sphinx.py\n--- a/celery/contrib/sphinx.py\n+++ b/celery/contrib/sphinx.py\n@@ -69,5 +69,5 @@\n def setup(app):\n \"\"\"Setup Sphinx extension.\"\"\"\n app.add_autodocumenter(TaskDocumenter)\n- app.domains['py'].directives['task'] = TaskD... | 1,197 | 127 |
gh_patches_debug_30866 | rasdani/github-patches | git_diff | sktime__sktime-3723 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[MNT] PyPi publish action for 0.14 failed
Summary by @fkiraly:
The attempted 0.14.0 release has failed at pypi upload of successfully built wheels.
Help on diagnosing and solving this is appreciated.
O... | diff --git a/setup.py b/setup.py
deleted file mode 100644
--- a/setup.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-"""Install script for sktime."""
-
-__author__ = ["mloning", "lmmentel"]
-
-import codecs
-
-import toml
-from setuptools import find_packages, setup
-
-pyproject = t... | {"golden_diff": "diff --git a/setup.py b/setup.py\ndeleted file mode 100644\n--- a/setup.py\n+++ /dev/null\n@@ -1,71 +0,0 @@\n-#! /usr/bin/env python\n-# -*- coding: utf-8 -*-\n-\"\"\"Install script for sktime.\"\"\"\n-\n-__author__ = [\"mloning\", \"lmmentel\"]\n-\n-import codecs\n-\n-import toml\n-from setuptools imp... | 982 | 583 |
gh_patches_debug_24590 | rasdani/github-patches | git_diff | apluslms__a-plus-1216 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Display personal deadline extensions on a student’s points page
A student’s points page in A+ just shows the official deadlines for each module. Personalized deadlines are not shown. This has repeatedly cause... | diff --git a/course/templatetags/course.py b/course/templatetags/course.py
--- a/course/templatetags/course.py
+++ b/course/templatetags/course.py
@@ -1,4 +1,5 @@
from typing import Any, Dict, List, Union
+from copy import deepcopy
from django import template
from django.db import models
@@ -22,6 +23,11 @@
re... | {"golden_diff": "diff --git a/course/templatetags/course.py b/course/templatetags/course.py\n--- a/course/templatetags/course.py\n+++ b/course/templatetags/course.py\n@@ -1,4 +1,5 @@\n from typing import Any, Dict, List, Union\n+from copy import deepcopy\n \n from django import template\n from django.db import models\n... | 1,700 | 310 |
gh_patches_debug_13156 | rasdani/github-patches | git_diff | googleapis__google-cloud-python-5599 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Added retry on internal error
Added retry on internal error as suggested by the internal error message: '500 Error encountered during execution. Retrying may solve the problem.'.
Rationalised the conditions... | diff --git a/bigquery/google/cloud/bigquery/retry.py b/bigquery/google/cloud/bigquery/retry.py
--- a/bigquery/google/cloud/bigquery/retry.py
+++ b/bigquery/google/cloud/bigquery/retry.py
@@ -16,6 +16,13 @@
from google.api_core import retry
+_RETRYABLE_REASONS = frozenset([
+ 'backendError',
+ 'rateLimitExcee... | {"golden_diff": "diff --git a/bigquery/google/cloud/bigquery/retry.py b/bigquery/google/cloud/bigquery/retry.py\n--- a/bigquery/google/cloud/bigquery/retry.py\n+++ b/bigquery/google/cloud/bigquery/retry.py\n@@ -16,6 +16,13 @@\n from google.api_core import retry\n \n \n+_RETRYABLE_REASONS = frozenset([\n+ 'backendErr... | 728 | 200 |
gh_patches_debug_32509 | rasdani/github-patches | git_diff | carpentries__amy-2107 | We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make URL redirects from `?next` param safer
There are a couple places where we redirect to `?next` value without checking if it's safe. There's a `django.http.is_safe_url` function we could use.
--- END ISSU... | diff --git a/amy/autoemails/utils.py b/amy/autoemails/utils.py
--- a/amy/autoemails/utils.py
+++ b/amy/autoemails/utils.py
@@ -1,5 +1,7 @@
-from typing import Union
+from typing import Optional, Union
+from django.conf import settings
+from django.utils.http import is_safe_url
import django_rq
import pytz
from rq.... | {"golden_diff": "diff --git a/amy/autoemails/utils.py b/amy/autoemails/utils.py\n--- a/amy/autoemails/utils.py\n+++ b/amy/autoemails/utils.py\n@@ -1,5 +1,7 @@\n-from typing import Union\n+from typing import Optional, Union\n \n+from django.conf import settings\n+from django.utils.http import is_safe_url\n import django... | 1,978 | 485 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.