selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
9,300
r2e_gym::train::6206
r2e_gym
train
6,206
pillow__5908ccc5ae4606e933d4542ab81f99b2ef26ed3f
pillow
python-pillow/pillow
python
5908ccc5ae4606e933d4542ab81f99b2ef26ed3f
**Title:** `tobytes()` Raises `SystemError` for Empty Images **Description:** When calling the `tobytes()` method on an empty image (with zero width or height), a `SystemError` is raised instead of returning an empty bytestring. This issue affects scenarios where images might unintentionally have no dimensions, leadin...
diff --git a/src/PIL/Image.py b/src/PIL/Image.py --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -715,6 +715,9 @@ args = self.mode self.load() + + if self.width == 0 or self.height == 0: + return b"" # unpack data e = _getencoder(self.mode, encoder_name, ar...
diff --git a/Tests/test_image.py b/Tests/test_image.py --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -786,6 +786,11 @@ 34665: 196, } + @pytest.mark.parametrize("size", ((1, 0), (0, 1), (0, 0))) + def test_zero_tobytes(self, size): + im = Image.new("RGB", size) + ...
null
null
namanjain12/pillow_final:5908ccc5ae4606e933d4542ab81f99b2ef26ed3f
true
null
1
3
null
801
0
0.75
1
0.75
0.8
0.1435
78.8055
9,301
swe_bench::dev::214
swe_bench
dev
214
sqlfluff__sqlfluff-4777
sqlfluff/sqlfluff
sqlfluff/sqlfluff
python
0243d4a1ba29e6cc3dc96bd9ea178d0f8a576a8f
`fix` per file linted instead of at the end ### Search before asking - [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues. ### Description I am just testing sqlfluff on a small example project. We have configured it as part of `pre-commit`. ``` - repo: https://git...
This is actually the same as #427 This is actually the same as #427
diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py --- a/src/sqlfluff/cli/commands.py +++ b/src/sqlfluff/cli/commands.py @@ -693,12 +693,16 @@ def lint( def do_fixes( - result: LintingResult, formatter: Optional[OutputStreamFormatter] = None, **kwargs + result: LintingResult, + forma...
diff --git a/test/cli/commands_test.py b/test/cli/commands_test.py --- a/test/cli/commands_test.py +++ b/test/cli/commands_test.py @@ -1940,8 +1940,8 @@ def test__cli__fix_multiple_errors_quiet_force(): ) normalised_output = result.output.replace("\\", "/") assert normalised_output.startswith( - "...
["test/cli/commands_test.py::test__cli__fix_multiple_errors_quiet_force"]
["test/cli/commands_test.py::test__cli__command_directed", "test/cli/commands_test.py::test__cli__command_dialect", "test/cli/commands_test.py::test__cli__command_no_dialect", "test/cli/commands_test.py::test__cli__command_parse_error_dialect_explicit_warning", "test/cli/commands_test.py::test__cli__command_parse_error...
null
true
2023-04-17T16:19:13Z
5
168
1
2,524
0
0.8
1
0.7
0.6375
0.920667
78.802625
9,302
r2e_gym::train::6535
r2e_gym
train
6,535
pillow__07210e9425a6b509138ea222e94589981dce0106
pillow
python-pillow/pillow
python
07210e9425a6b509138ea222e94589981dce0106
**Error Raised When Loading Truncated EXIF Data** When attempting to load EXIF data that is truncated to only include the header, the application crashes with a `SyntaxError`. This prevents proper handling of images with incomplete EXIF information. **Steps to Reproduce:** ```python from PIL import Image with Image...
diff --git a/src/PIL/Image.py b/src/PIL/Image.py --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -3478,12 +3478,12 @@ self._loaded_exif = data self._data.clear() self._ifds.clear() + if data and data.startswith(b"Exif\x00\x00"): + data = data[6:] if not data: ...
diff --git a/Tests/test_image.py b/Tests/test_image.py --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -666,6 +666,19 @@ assert not fp.closed + def test_empty_exif(self): + with Image.open("Tests/images/exif.png") as im: + exif = im.getexif() + assert dict(exif) != {}...
null
null
namanjain12/pillow_final:07210e9425a6b509138ea222e94589981dce0106
true
null
1
4
null
699
0
0.75
1
0.75
0.8
0.129833
78.7645
9,303
swe_bench::test::1139
swe_bench
test
1,139
mwaskom__seaborn-2996
mwaskom/seaborn
mwaskom/seaborn
python
a5816697cbcab195a987f5e074204a052c13e1d5
Rename layout(algo=) to layout(engine=) Matplotlib has settled on this term with the new `set_layout_engine` method in 3.6 so might as well be consistent with them. The new API also ha some implications for how the parameter should be documented / typed.
diff --git a/seaborn/_compat.py b/seaborn/_compat.py --- a/seaborn/_compat.py +++ b/seaborn/_compat.py @@ -144,14 +144,14 @@ def register_colormap(name, cmap): mpl.cm.register_cmap(name, cmap) -def set_layout_engine(fig, algo): +def set_layout_engine(fig, engine): """Handle changes to auto layout engi...
diff --git a/tests/_core/test_plot.py b/tests/_core/test_plot.py --- a/tests/_core/test_plot.py +++ b/tests/_core/test_plot.py @@ -1305,8 +1305,8 @@ def test_layout_algo(self, algo): p = Plot().facet(["a", "b"]).limit(x=(.1, .9)) - p1 = p.layout(algo=algo).plot() - p2 = p.layout(algo=None).pl...
["tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[tight]", "tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[constrained]"]
["tests/_core/test_plot.py::TestInit::test_empty", "tests/_core/test_plot.py::TestInit::test_data_only", "tests/_core/test_plot.py::TestInit::test_df_and_named_variables", "tests/_core/test_plot.py::TestInit::test_df_and_mixed_variables", "tests/_core/test_plot.py::TestInit::test_vector_variables_only", "tests/_core/te...
null
true
2022-09-04T22:06:59Z
2
24
2
255
0
0.8
1
0.55
1
0.1225
78.7425
9,304
swe_bench::test::1474
swe_bench
test
1,474
pytest-dev__pytest-8950
pytest-dev/pytest
pytest-dev/pytest
python
398783521383e7f0d9897da679e8c12061024f30
pytest.skip: Rename "msg" to "reason" for consistency with pytest.mark.skip/xfail? The [signature of `pytest.skip` is](https://docs.pytest.org/en/latest/reference/reference.html#pytest-skip): ```python skip(msg[, allow_module_level=False]) ``` but the [signature of `pytest.xfail` is](https://docs.pytest.org/en/latest...
lovely find, should do Agreed. Also should not affect many users as I suspect almost everyone just writes `pytest.skip("some message")` rather than `pytest.skip(msg="some message")`, so they shouldn't be affected. 👍 agree to unify, would like to tackle it if you don't mind @The-Compiler ? I assume _some_ people will b...
diff --git a/src/_pytest/compat.py b/src/_pytest/compat.py --- a/src/_pytest/compat.py +++ b/src/_pytest/compat.py @@ -21,9 +21,6 @@ import attr import py -from _pytest.outcomes import fail -from _pytest.outcomes import TEST_OUTCOME - if TYPE_CHECKING: from typing import NoReturn from typing_extensions i...
diff --git a/testing/deprecated_test.py b/testing/deprecated_test.py --- a/testing/deprecated_test.py +++ b/testing/deprecated_test.py @@ -192,6 +192,64 @@ def test_warns_none_is_deprecated(): pass +class TestSkipMsgArgumentDeprecated: + def test_skip_with_msg_is_deprecated(self, pytester: Pytester)...
["testing/deprecated_test.py::TestSkipMsgArgumentDeprecated::test_skip_with_msg_is_deprecated", "testing/deprecated_test.py::TestSkipMsgArgumentDeprecated::test_fail_with_msg_is_deprecated", "testing/deprecated_test.py::TestSkipMsgArgumentDeprecated::test_exit_with_msg_is_deprecated", "testing/test_main.py::test_wrap_s...
["testing/deprecated_test.py::test_pytest_collect_module_deprecated[Collector]", "testing/deprecated_test.py::test_pytest_collect_module_deprecated[Module]", "testing/deprecated_test.py::test_pytest_collect_module_deprecated[Function]", "testing/deprecated_test.py::test_pytest_collect_module_deprecated[Instance]", "tes...
null
true
2021-07-27T23:02:06Z
5
120
10
1,455
0
0.8
1
0.55
0.85
0.6425
78.74
9,305
r2e_gym::train::4148
r2e_gym
train
4,148
numpy__c89273320a964e303121b4f42f08130e1e609499
numpy
numpy/numpy
python
c89273320a964e303121b4f42f08130e1e609499
**Title:** `structured_to_unstructured` Creates Copies Instead of Returning Views for Uniform Field dtypes **Description:** When converting a structured array with uniform field data types to an unstructured array using the `structured_to_unstructured` function, it unexpectedly returns a copy rather than a view. This ...
diff --git a/doc/release/1.16.0-notes.rst b/doc/release/1.16.0-notes.rst --- a/doc/release/1.16.0-notes.rst +++ b/doc/release/1.16.0-notes.rst @@ -19,6 +19,11 @@ New functions ============= + * New functions in the `numpy.lib.recfunctions` module to ease the structured + assignment changes: `assign_fields_by_name...
diff --git a/numpy/lib/tests/test_recfunctions.py b/numpy/lib/tests/test_recfunctions.py --- a/numpy/lib/tests/test_recfunctions.py +++ b/numpy/lib/tests/test_recfunctions.py @@ -232,6 +232,14 @@ np.array([ 8.0/3, 16.0/3, 26.0/3, 11. ])) assert_equal(apply_along_fields(np.mean, d[['x', ...
null
null
namanjain12/numpy_final:c89273320a964e303121b4f42f08130e1e609499
true
null
2
125
null
1,523
0
0.75
1
0.525
1
0.6705
78.724
9,306
swe_bench::dev::209
swe_bench
dev
209
sqlfluff__sqlfluff-4051
sqlfluff/sqlfluff
sqlfluff/sqlfluff
python
c3defb095b1aa7fe23c4bd430fdff2ce6ed6161d
Misleading path does not exist message It looks like if _at least one_ of the paths provided to sqlfluff do not exist, it will display an error message implying that _all_ of the supplied paths do not exist: ```bash dbt@b54bee9ced88:/workspaces/dbt-dutchie$ sqlfluff fix models/shared/dispensaries.sql models/shares/dis...
diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py --- a/src/sqlfluff/cli/commands.py +++ b/src/sqlfluff/cli/commands.py @@ -137,24 +137,14 @@ def red_log_filter(record: logging.LogRecord) -> bool: class PathAndUserErrorHandler: """Make an API call but with error handling for the CLI.""" -...
diff --git a/test/cli/commands_test.py b/test/cli/commands_test.py --- a/test/cli/commands_test.py +++ b/test/cli/commands_test.py @@ -1203,7 +1203,10 @@ def test__cli__command_lint_serialize_from_stdin(serialize, sql, expected, exit_ def test__cli__command_fail_nice_not_found(command): """Check commands fail as ...
["test/cli/commands_test.py::test__cli__command_fail_nice_not_found[command0]", "test/cli/commands_test.py::test__cli__command_fail_nice_not_found[command1]", "test/core/linter_test.py::test__linter__path_from_paths__not_exist"]
["test/cli/commands_test.py::test__cli__command_directed", "test/cli/commands_test.py::test__cli__command_dialect", "test/cli/commands_test.py::test__cli__command_no_dialect", "test/cli/commands_test.py::test__cli__command_parse_error_dialect_explicit_warning", "test/cli/commands_test.py::test__cli__command_parse_error...
null
true
2022-11-09T18:11:06Z
2
27
3
9,642
0
0.8
1
0.5
1
0.59
78.72
9,307
r2e_gym::train::5595
r2e_gym
train
5,595
scrapy__214525c2c16cb527a00e31ce47d274266cb5d418
scrapy
scrapy/scrapy
python
214525c2c16cb527a00e31ce47d274266cb5d418
### HttpAuthMiddleware Adds Authorization Header to Unrelated Domains When http_auth_domain Is Not Set **Description** When using `HttpAuthMiddleware` without specifying the `http_auth_domain`, the middleware erroneously adds the `Authorization` header to all outgoing requests, regardless of the target domain. This b...
diff --git a/docs/news.rst b/docs/news.rst --- a/docs/news.rst +++ b/docs/news.rst @@ -2,6 +2,44 @@ Release notes ============= + +.. _release-2.5.1: + +Scrapy 2.5.1 (2021-10-05) +------------------------- + +* **Security bug fix:** + + If you use + :class:`~scrapy.downloadermiddlewares.httpauth.HttpAuthMid...
diff --git a/tests/test_downloadermiddleware_httpauth.py b/tests/test_downloadermiddleware_httpauth.py --- a/tests/test_downloadermiddleware_httpauth.py +++ b/tests/test_downloadermiddleware_httpauth.py @@ -1,13 +1,60 @@ import unittest + +from w3lib.http import basic_auth_header from scrapy.http import Request fr...
null
null
namanjain12/scrapy_final:214525c2c16cb527a00e31ce47d274266cb5d418
true
null
3
115
null
1,670
0
0.75
1
0.525
1
0.661667
78.6975
9,308
swe_bench::dev::173
swe_bench
dev
173
pyvista__pyvista-4808
pyvista/pyvista
pyvista/pyvista
python
d0c2e12cac39af1872b00907f9526dbfb59ec69e
Boolean Operation freezes/crashes ### Describe the bug, what's wrong, and what you expected. Apparently, if two polyData have the exact same shape, their boolean operation freezes/crashes the application! ### Steps to reproduce the bug. ```python p1 = pv.Sphere().triangulate() p2 = pv.Sphere().triangulate() p1.bool...
diff --git a/pyvista/core/filters/poly_data.py b/pyvista/core/filters/poly_data.py --- a/pyvista/core/filters/poly_data.py +++ b/pyvista/core/filters/poly_data.py @@ -81,6 +81,11 @@ def edge_mask(self, angle, progress_bar=False): def _boolean(self, btype, other_mesh, tolerance, progress_bar=False): """P...
diff --git a/tests/core/test_polydata.py b/tests/core/test_polydata.py --- a/tests/core/test_polydata.py +++ b/tests/core/test_polydata.py @@ -280,9 +280,9 @@ def test_boolean_difference(sphere, sphere_shifted): assert np.isclose(difference.volume, expected_volume, atol=1e-3) -def test_boolean_difference_fail(...
["tests/core/test_polydata_filters.py::test_identical_boolean"]
["tests/core/test_polydata.py::test_init", "tests/core/test_polydata.py::test_init_from_pdata", "tests/core/test_polydata.py::test_init_from_arrays", "tests/core/test_polydata.py::test_init_from_arrays_with_vert", "tests/core/test_polydata.py::test_init_from_arrays_triangular", "tests/core/test_polydata.py::test_init_a...
null
true
2023-08-26T23:18:49Z
1
5
1
1,349
0
0.8
1
0.7
0.8
0.2415
78.6245
9,309
swe_bench::test::1678
swe_bench
test
1,678
scikit-learn__scikit-learn-24145
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
55af30d981ea2f72346ff93602f0b3b740cfe8d6
Add sparse matrix output to SplineTransformer ### Describe the workflow you want to enable As B-splines naturally have a sparse structure, I'd like to have the option that `SplineTransformer` returns a sparse matrix instead of always an ndarray. ```python import numpy as np from sklearn.preprocessing import SplineTran...
diff --git a/sklearn/preprocessing/_polynomial.py b/sklearn/preprocessing/_polynomial.py --- a/sklearn/preprocessing/_polynomial.py +++ b/sklearn/preprocessing/_polynomial.py @@ -13,11 +13,11 @@ from ..base import BaseEstimator, TransformerMixin from ..utils import check_array +from ..utils.fixes import sp_version,...
diff --git a/sklearn/preprocessing/tests/test_polynomial.py b/sklearn/preprocessing/tests/test_polynomial.py --- a/sklearn/preprocessing/tests/test_polynomial.py +++ b/sklearn/preprocessing/tests/test_polynomial.py @@ -35,6 +35,22 @@ def is_c_contiguous(a): assert np.isfortran(est(order="F").fit_transform(X)) ...
["sklearn/preprocessing/tests/test_polynomial.py::test_spline_transformer_n_features_out[False-error-3-True-5]", "sklearn/preprocessing/tests/test_polynomial.py::test_spline_transformer_n_features_out[False-error-3-True-10]", "sklearn/preprocessing/tests/test_polynomial.py::test_spline_transformer_n_features_out[False-...
["sklearn/preprocessing/tests/test_polynomial.py::test_polynomial_and_spline_array_order[PolynomialFeatures]", "sklearn/preprocessing/tests/test_polynomial.py::test_polynomial_and_spline_array_order[SplineTransformer]", "sklearn/preprocessing/tests/test_polynomial.py::test_spline_transformer_input_validation[params0-Nu...
null
true
2022-08-08T14:38:42Z
1
175
60
713
0
0.8
1
0.7
0.75
0.618833
78.569
9,310
swe_bench::test::1411
swe_bench
test
1,411
pytest-dev__pytest-5692
pytest-dev/pytest
pytest-dev/pytest
python
29e336bd9bf87eaef8e2683196ee1975f1ad4088
Hostname and timestamp properties in generated JUnit XML reports Pytest enables generating JUnit XML reports of the tests. However, there are some properties missing, specifically `hostname` and `timestamp` from the `testsuite` XML element. Is there an option to include them? Example of a pytest XML report: ```xml <?...
diff --git a/src/_pytest/junitxml.py b/src/_pytest/junitxml.py --- a/src/_pytest/junitxml.py +++ b/src/_pytest/junitxml.py @@ -10,9 +10,11 @@ """ import functools import os +import platform import re import sys import time +from datetime import datetime import py @@ -666,6 +668,8 @@ def pytest_sessionfinish(...
diff --git a/testing/test_junitxml.py b/testing/test_junitxml.py --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -1,4 +1,6 @@ import os +import platform +from datetime import datetime from xml.dom import minidom import py @@ -139,6 +141,30 @@ def test_xpass(): node = dom.find_first_by_tag...
["testing/test_junitxml.py::TestPython::test_hostname_in_xml", "testing/test_junitxml.py::TestPython::test_timestamp_in_xml"]
["testing/test_junitxml.py::test_mangle_test_address", "testing/test_junitxml.py::test_dont_configure_on_slaves", "testing/test_junitxml.py::test_invalid_xml_escape", "testing/test_junitxml.py::test_logxml_path_expansion", "testing/test_junitxml.py::TestPython::test_summing_simple", "testing/test_junitxml.py::TestPytho...
null
true
2019-08-03T14:15:04Z
1
4
2
1,256
0
0.8
1
0.7
0.8
0.222667
78.568
9,311
swe_bench::test::1453
swe_bench
test
1,453
pytest-dev__pytest-7648
pytest-dev/pytest
pytest-dev/pytest
python
d426a79a90351dff0492fbd40404b1256b24f91f
Since pytest 6.0.0, pylint complains about unimplemented abstract methods in custom collector Hi, we have implemented a custom pytest collector that takes testcases from YAML files. Starting with pytest 6.0.0, pylint reports the following about that collector: ``` tests/functiontest/conftest.py:225:0: W0223: Method 'g...
None of these methods are abstract (as in `abc.abstractmethod`) which led to some head scratching, but it seems that pylint considers any method which raises `NotImplementedError` to be abstract. `get_closest_marker` is only marked such because we use `raise NotImplementedError()` in `@overload`ed functions. Given h...
diff --git a/src/_pytest/deprecated.py b/src/_pytest/deprecated.py --- a/src/_pytest/deprecated.py +++ b/src/_pytest/deprecated.py @@ -84,3 +84,8 @@ "The pytest_warning_captured is deprecated and will be removed in a future release.\n" "Please use pytest_warning_recorded instead." ) + +FSCOLLECTOR_GETHOOKPRO...
diff --git a/testing/deprecated_test.py b/testing/deprecated_test.py --- a/testing/deprecated_test.py +++ b/testing/deprecated_test.py @@ -1,11 +1,13 @@ import copy import inspect +import warnings from unittest import mock import pytest from _pytest import deprecated from _pytest import nodes from _pytest.conf...
["testing/deprecated_test.py::test_fscollector_gethookproxy_isinitpath"]
["testing/deprecated_test.py::test_terminal_reporter_writer_attr", "testing/deprecated_test.py::test_node_direct_ctor_warning", "testing/deprecated_test.py::test_resultlog_is_deprecated", "testing/deprecated_test.py::test_external_plugins_integrated[pytest_capturelog]", "testing/deprecated_test.py::test_external_plugin...
null
true
2020-08-15T08:45:13Z
4
86
1
1,627
0
0.8
1
0.55
0.85
0.557833
78.486
9,312
swe_bench::dev::88
swe_bench
dev
88
pydicom__pydicom-1256
pydicom/pydicom
pydicom/pydicom
python
49a3da4a3d9c24d7e8427a25048a1c7d5c4f7724
from_json does not correctly convert BulkDataURI's in SQ data elements **Describe the bug** When a DICOM object contains large data elements in SQ elements and is converted to JSON, those elements are correctly turned into BulkDataURI's. However, when the JSON is converted back to DICOM using from_json, the BulkDataURI...
diff --git a/pydicom/jsonrep.py b/pydicom/jsonrep.py --- a/pydicom/jsonrep.py +++ b/pydicom/jsonrep.py @@ -226,7 +226,8 @@ def get_sequence_item(self, value): value_key = unique_value_keys[0] elem = DataElement.from_json( self.dataset_class, key, vr, - ...
diff --git a/pydicom/tests/test_json.py b/pydicom/tests/test_json.py --- a/pydicom/tests/test_json.py +++ b/pydicom/tests/test_json.py @@ -354,3 +354,25 @@ def bulk_data_reader(tag, vr, value): ds = Dataset().from_json(json.dumps(json_data), bulk_data_reader) assert b'xyzzy' == ds[0x00091002].value ...
["pydicom/tests/test_json.py::TestBinary::test_bulk_data_reader_is_called_within_SQ"]
["pydicom/tests/test_json.py::TestPersonName::test_json_pn_from_file", "pydicom/tests/test_json.py::TestPersonName::test_pn_components_to_json", "pydicom/tests/test_json.py::TestPersonName::test_pn_components_from_json", "pydicom/tests/test_json.py::TestPersonName::test_empty_value", "pydicom/tests/test_json.py::TestPe...
null
true
2020-11-04T21:13:33Z
1
3
1
1,069
0
0.8
1
0.7
0.8
0.188167
78.4645
9,313
r2e_gym::train::5343
r2e_gym
train
5,343
aiohttp__50efb2a389414cf36012d3f6e86623f8eac3a42e
aiohttp
aio-libs/aiohttp
python
50efb2a389414cf36012d3f6e86623f8eac3a42e
**Title:** WebSocket Close Race Condition Prevents Proper Close Code Delivery on Server Shutdown **Description:** When the server initiates a shutdown, the client websocket is expected to receive a close message with the appropriate close code. However, under certain conditions, a race condition occurs that prevents t...
diff --git a/CHANGES/8680.bugfix.rst b/CHANGES/8680.bugfix.rst --- a/CHANGES/8680.bugfix.rst +++ b/CHANGES/8680.bugfix.rst @@ -0,0 +1 @@ +Fixed a race closing the server-side WebSocket where the close code would not reach the client. -- by :user:`bdraco`. diff --git a/aiohttp/web_ws.py b/aiohttp/web_ws.py --- a/aiohttp...
diff --git a/tests/test_web_websocket_functional.py b/tests/test_web_websocket_functional.py --- a/tests/test_web_websocket_functional.py +++ b/tests/test_web_websocket_functional.py @@ -3,6 +3,7 @@ import asyncio import contextlib import sys +import weakref from typing import Any, Optional import pytest @@ -10,...
null
null
namanjain12/aiohttp_final:50efb2a389414cf36012d3f6e86623f8eac3a42e
true
null
2
29
null
2,856
0
0.75
1
0.525
1
0.572667
78.4305
9,314
r2e_gym::train::4345
r2e_gym
train
4,345
numpy__2540554039db9151edeaf360a0f54b39b5c815ba
numpy
numpy/numpy
python
2540554039db9151edeaf360a0f54b39b5c815ba
**Title:** `structured_to_unstructured` Does Not Return a Shared Memory View When Reordering Fields **Description:** When converting a structured NumPy array to an unstructured array with reordered fields, the `structured_to_unstructured` function fails to return a view that shares memory with the original array. This...
diff --git a/doc/release/upcoming_changes/23652.improvement.rst b/doc/release/upcoming_changes/23652.improvement.rst --- a/doc/release/upcoming_changes/23652.improvement.rst +++ b/doc/release/upcoming_changes/23652.improvement.rst @@ -0,0 +1,7 @@ +``numpy.lib.recfunctions.structured_to_unstructured`` returns views in m...
diff --git a/numpy/lib/tests/test_recfunctions.py b/numpy/lib/tests/test_recfunctions.py --- a/numpy/lib/tests/test_recfunctions.py +++ b/numpy/lib/tests/test_recfunctions.py @@ -228,7 +228,7 @@ dt = np.dtype((np.record, dt)) assert_(repack_fields(dt).type is np.record) - def test_structured_to_u...
null
null
namanjain12/numpy_final:2540554039db9151edeaf360a0f54b39b5c815ba
true
null
2
98
null
1,475
0
0.75
1
0.525
1
0.5725
78.43
9,315
swe_bench::test::1403
swe_bench
test
1,403
pytest-dev__pytest-5404
pytest-dev/pytest
pytest-dev/pytest
python
40c5a9d9f2a37631812395ecf356f5c957f092b9
KeyError: '__wrapped__' with from xxx import yyy # Checklist - [X] Include a detailed description of the bug or suggestion - [ ] `pip list` of the virtual environment you are using - [X] pytest and operating system versions - [X] Minimal example if possible # Description I implemented `tox` and `pytest` for automate...
https://github.com/feluxe/sty/blob/master/sty/primitive.py#L62-L66 is incorrect the problem is a bug in sty https://github.com/feluxe/sty/issues/17 Thank you. Since I was able to `import` without `from` it did not occur to me this could be an `sty` problem. It feels like this is good to close since nothing can be...
diff --git a/src/_pytest/doctest.py b/src/_pytest/doctest.py --- a/src/_pytest/doctest.py +++ b/src/_pytest/doctest.py @@ -3,6 +3,7 @@ import platform import sys import traceback +import warnings from contextlib import contextmanager import pytest @@ -12,6 +13,7 @@ from _pytest.compat import safe_getattr from ...
diff --git a/testing/test_doctest.py b/testing/test_doctest.py --- a/testing/test_doctest.py +++ b/testing/test_doctest.py @@ -1,7 +1,10 @@ +import inspect import textwrap import pytest from _pytest.compat import MODULE_NOT_FOUND_ERROR +from _pytest.doctest import _is_mocked +from _pytest.doctest import _patch_unw...
["testing/test_doctest.py::test_warning_on_unwrap_of_broken_object[None]", "testing/test_doctest.py::test_warning_on_unwrap_of_broken_object[_is_mocked]", "testing/test_doctest.py::test_warning_on_unwrap_of_broken_object[<lambda>0]", "testing/test_doctest.py::test_warning_on_unwrap_of_broken_object[<lambda>1]", "testin...
["testing/test_doctest.py::TestDoctests::test_collect_testtextfile", "testing/test_doctest.py::TestDoctests::test_collect_module_empty", "testing/test_doctest.py::TestDoctests::test_collect_module_single_modulelevel_doctest", "testing/test_doctest.py::TestDoctests::test_collect_module_two_doctest_one_modulelevel", "tes...
null
true
2019-06-05T08:10:48Z
1
16
5
4,116
0.166667
0.8
1
0.77
1
0.553333
78.42975
9,316
r2e_gym::train::5443
r2e_gym
train
5,443
aiohttp__147aa3deb9359d770f14f647d0f1faee0b88e4d3
aiohttp
aio-libs/aiohttp
python
147aa3deb9359d770f14f647d0f1faee0b88e4d3
**Title:** HttpRequestParser Silently Swallows EofStream Exceptions **Description** When a connection is closed unexpectedly before a complete HTTP request is received, the `HttpRequestParser` does not properly handle the `EofStream` exception. Instead of propagating the exception to signal the connection issue, it si...
diff --git a/aiohttp/protocol.py b/aiohttp/protocol.py --- a/aiohttp/protocol.py +++ b/aiohttp/protocol.py @@ -125,25 +125,20 @@ self.allowed_methods = [m.upper() for m in allowed_methods] def __call__(self, out, buf): - try: - raw_data = yield from buf.waituntil(b' ', 24) - ...
diff --git a/tests/test_http_parser.py b/tests/test_http_parser.py --- a/tests/test_http_parser.py +++ b/tests/test_http_parser.py @@ -391,7 +391,7 @@ result) def test_http_request_parser_eof(self): - # HttpRequestParser does not fail on EofStream() + # HttpRequestParser does fail on E...
null
null
namanjain12/aiohttp_final:147aa3deb9359d770f14f647d0f1faee0b88e4d3
true
null
1
114
null
1,137
0
0.75
1
0.525
1
0.5695
78.421
9,317
swe_bench::test::1340
swe_bench
test
1,340
pylint-dev__pylint-5839
pylint-dev/pylint
pylint-dev/pylint
python
15040ee7c42958606ae27aa32ccbe54371b83049
Pylint needs to forbid to re-use the msgid or symbol of old deleted msgid/symbol ### Bug description Right now it's possible to reuse old msgid that were removed, for example, everything from the python 3 checker (the problem was detected with ``using-f-string-in-unsupported-version`` vs ``apply-builtin``), or mixed-i...
I would suggest to see if we can find a way to do this in the form of a `test`. Registering a dict of `old_names` during runtime unnecessarily impacts performance. We could do something similar to how I recently added a check for non overlapping symbol prefixes. > Registering a dict of old_names during runtime unnecess...
diff --git a/pylint/checkers/__init__.py b/pylint/checkers/__init__.py --- a/pylint/checkers/__init__.py +++ b/pylint/checkers/__init__.py @@ -37,14 +37,15 @@ 13: string_format 14: string_constant 15: stdlib -16: python3 +16: python3 (This one was deleted but needs to be reserved for consistency with old messages) ...
diff --git a/tests/message/test_no_removed_msgid_or_symbol_used.py b/tests/message/test_no_removed_msgid_or_symbol_used.py new file mode 100644 --- /dev/null +++ b/tests/message/test_no_removed_msgid_or_symbol_used.py @@ -0,0 +1,17 @@ +# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html +# ...
["tests/message/test_no_removed_msgid_or_symbol_used.py::test_no_removed_msgid_or_symbol_used"]
[]
null
true
2022-02-25T21:03:32Z
4
118
1
779
0
0.8
1
0.55
0.85
0.523167
78.382
9,318
swe_bench::dev::190
swe_bench
dev
190
sqlfluff__sqlfluff-2862
sqlfluff/sqlfluff
sqlfluff/sqlfluff
python
447ecf862a4d2b977d0add9f444655357b9c4f1f
fix keep adding new line on wrong place ### Search before asking - [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues. ### What Happened To replicate this issue you can create a file eg. test.template.sql ``` {% if true %} SELECT 1 + 1 {%- endif %} ``` then run: ``...
> Version > sqlfluff, version 0.6.2 Is this correct? If so that is a VERY old version so please upgrade. Though confirmed this is still an issue in latest. But still, going to need to upgrade to get any fix for this. > > Version > > sqlfluff, version 0.6.2 > > Is this correct? If so that is a VERY old version s...
diff --git a/src/sqlfluff/core/linter/common.py b/src/sqlfluff/core/linter/common.py --- a/src/sqlfluff/core/linter/common.py +++ b/src/sqlfluff/core/linter/common.py @@ -67,21 +67,3 @@ class ParsedString(NamedTuple): config: FluffConfig fname: str source_str: str - - -class EnrichedFixPatch(NamedTuple):...
diff --git a/test/api/simple_test.py b/test/api/simple_test.py --- a/test/api/simple_test.py +++ b/test/api/simple_test.py @@ -72,16 +72,16 @@ "description": "Keywords must be consistently upper case.", }, { - "code": "L009", + "code": "L014", "line_no": 1, "line_pos":...
["test/api/simple_test.py::test__api__lint_string", "test/core/templaters/jinja_test.py::test__templater_jinja_slice_file[{%", "test/core/templaters/jinja_test.py::test__templater_jinja_slice_file[{%-"]
["test/api/simple_test.py::test__api__lint_string_without_violations", "test/api/simple_test.py::test__api__lint_string_specific", "test/api/simple_test.py::test__api__lint_string_specific_single", "test/api/simple_test.py::test__api__lint_string_specific_exclude", "test/api/simple_test.py::test__api__lint_string_speci...
null
true
2022-03-14T19:46:08Z
7
183
3
2,032
0
0.8
1
0.85
0.45
0.838667
78.3785
9,319
r2e_gym::train::5348
r2e_gym
train
5,348
aiohttp__2f7c45ebc0e2adee709815fc26264c7940b732fd
aiohttp
aio-libs/aiohttp
python
2f7c45ebc0e2adee709815fc26264c7940b732fd
**Analysis:** - **Key Parts from Commit Details and Test Results:** - **Commit Message:** "Fix decoding base64 chunk for BodyPartReader" - **Changes:** Added logic to handle base64-encoded chunks correctly by ensuring proper padding and chunk sizes. - **Test Results Before Commit:** - `test_decode_with_conte...
diff --git a/CHANGES/3867.bugfix.rst b/CHANGES/3867.bugfix.rst --- a/CHANGES/3867.bugfix.rst +++ b/CHANGES/3867.bugfix.rst @@ -0,0 +1 @@ +Fixed decoding base64 chunk in BodyPartReader -- by :user:`hyzyla`. diff --git a/aiohttp/multipart.py b/aiohttp/multipart.py --- a/aiohttp/multipart.py +++ b/aiohttp/multipart.py @@ ...
diff --git a/tests/test_multipart.py b/tests/test_multipart.py --- a/tests/test_multipart.py +++ b/tests/test_multipart.py @@ -377,6 +377,17 @@ b" \xd0\xbc\xd0\xb8\xd1\x80!" ) assert result == expected + + async def test_decode_with_content_transfer_encoding_base64(self) -> None: + ...
null
null
namanjain12/aiohttp_final:2f7c45ebc0e2adee709815fc26264c7940b732fd
true
null
2
26
null
2,681
0
0.75
1
0.525
1
0.5335
78.313
9,320
r2e_gym::train::4914
r2e_gym
train
4,914
datalad__d5809b9c19f40ac772ef534effeccfdca94f8947
datalad
datalad/datalad
python
d5809b9c19f40ac772ef534effeccfdca94f8947
**Title:** Parsing Contaminated Git-Config Output Results in Incorrect Configuration **Description:** When the `parse_gitconfig_dump` function encounters git-config output with unexpected or unrelated lines, it fails to properly discard these invalid entries. This leads to incorrect configuration data being loaded. *...
diff --git a/datalad/config.py b/datalad/config.py --- a/datalad/config.py +++ b/datalad/config.py @@ -31,7 +31,15 @@ import logging lgr = logging.getLogger('datalad.config') -cfg_kv_regex = re.compile(r'(^[^\n]*)\n(.*)$', flags=re.MULTILINE | re.DOTALL) +# git-config key syntax with a section and a subsection +# s...
diff --git a/datalad/tests/test_config.py b/datalad/tests/test_config.py --- a/datalad/tests/test_config.py +++ b/datalad/tests/test_config.py @@ -105,8 +105,15 @@ parsed, files = parse_gitconfig_dump(gitcfg_dump_w_origin, cwd='ROOT') assert_equal( files, + # the 'command line:' origin is igno...
null
null
namanjain12/datalad_final:d5809b9c19f40ac772ef534effeccfdca94f8947
true
null
1
93
null
1,333
0
0.75
1
0.525
1
0.532167
78.309
9,321
r2e_gym::train::4471
r2e_gym
train
4,471
numpy__549756836095efed97ee73c82bb623674bb07df4
numpy
numpy/numpy
python
549756836095efed97ee73c82bb623674bb07df4
**Title:** `structured_to_unstructured` Does Not Return a View When Fields Have Constant Stride **Description:** When using `structured_to_unstructured` to convert a structured NumPy array to an unstructured one, the function is expected to return a view of the original array if all fields have a constant stride. Howe...
diff --git a/numpy/lib/recfunctions.py b/numpy/lib/recfunctions.py --- a/numpy/lib/recfunctions.py +++ b/numpy/lib/recfunctions.py @@ -885,6 +885,52 @@ fields.extend([(d, c, o + i*size) for d, c, o in subfields]) return fields +def _common_stride(offsets, counts, itemsize): + """ + Ret...
diff --git a/numpy/lib/tests/test_recfunctions.py b/numpy/lib/tests/test_recfunctions.py --- a/numpy/lib/tests/test_recfunctions.py +++ b/numpy/lib/tests/test_recfunctions.py @@ -263,8 +263,13 @@ dtype=[('x', 'i4'), ('y', 'i4'), ('z', 'i4')]) dd = structured_to_unstructured(d) dd...
null
null
namanjain12/numpy_final:549756836095efed97ee73c82bb623674bb07df4
true
null
1
72
null
1,753
0
0.75
1
0.525
1
0.532167
78.309
9,322
r2e_gym::train::4451
r2e_gym
train
4,451
numpy__185c4f205c51049a2a21e406e205e4135fab5273
numpy
numpy/numpy
python
185c4f205c51049a2a21e406e205e4135fab5273
**Title:** `show_runtime` Function Added Without Updating Public API, Causing Namespace Test Failure **Description:** A new function `show_runtime` was introduced in `numpy.lib.utils` to provide detailed runtime information about system resources. However, after adding this function, the namespace consistency test fai...
diff --git a/doc/release/upcoming_changes/21468.new_feature.rst b/doc/release/upcoming_changes/21468.new_feature.rst --- a/doc/release/upcoming_changes/21468.new_feature.rst +++ b/doc/release/upcoming_changes/21468.new_feature.rst @@ -0,0 +1,6 @@ +New function ``np.show_runtime`` +-------------------------------- + +A ...
diff --git a/numpy/tests/test_public_api.py b/numpy/tests/test_public_api.py --- a/numpy/tests/test_public_api.py +++ b/numpy/tests/test_public_api.py @@ -51,6 +51,7 @@ 'safe_eval': 'numpy.lib.utils.safe_eval', 'set_string_function': 'numpy.core.arrayprint.set_string_function', 'show_config':...
null
null
namanjain12/numpy_final:185c4f205c51049a2a21e406e205e4135fab5273
true
null
3
86
null
1,468
0
0.75
1
0.525
1
0.531333
78.3065
9,323
swe_bench::dev::150
swe_bench
dev
150
pylint-dev__astroid-2240
pylint-dev/astroid
pylint-dev/astroid
python
514991036806e9cda2b12cef8ab3184ac373bd6c
`.arguments` property ignores keyword-only args, *args, and **kwargs ```python >>> from astroid import extract_node >>> node = extract_node("""def a(*args, b=None, c=None, **kwargs): ...""") >>> node.args.arguments [] ``` Expected to find all the arguments from the function signature. The wanted data can be found her...
Should the definition be changed as well? It states `args.arguments` returns required arguments, and AFAIK in the example none are required (I can call `a` without supplying any arguments). I tried running the following: ``` >>> node = extract_node("""def a(kiwi, apple, *args, b=None, c=None, **kwargs): ...""") ...
diff --git a/astroid/arguments.py b/astroid/arguments.py --- a/astroid/arguments.py +++ b/astroid/arguments.py @@ -181,7 +181,13 @@ def infer_argument( positional = self.positional_arguments[: len(funcnode.args.args)] vararg = self.positional_arguments[len(funcnode.args.args) :] - argindex = ...
diff --git a/tests/test_nodes.py b/tests/test_nodes.py --- a/tests/test_nodes.py +++ b/tests/test_nodes.py @@ -22,6 +22,7 @@ Uninferable, bases, builder, + extract_node, nodes, parse, test_utils, @@ -1975,3 +1976,38 @@ def test_str_repr_no_warnings(node): test_node = node(**args) ...
["tests/test_nodes.py::test_arguments_contains_all"]
["tests/test_nodes.py::AsStringTest::test_3k_annotations_and_metaclass", "tests/test_nodes.py::AsStringTest::test_3k_as_string", "tests/test_nodes.py::AsStringTest::test_as_string", "tests/test_nodes.py::AsStringTest::test_as_string_for_list_containing_uninferable", "tests/test_nodes.py::AsStringTest::test_as_string_un...
null
true
2023-07-06T20:52:39Z
5
115
1
636
0
0.8
1
0.55
0.85
0.489333
78.2805
9,324
swe_bench::test::1312
swe_bench
test
1,312
pydata__xarray-7391
pydata/xarray
pydata/xarray
python
f128f248f87fe0442c9b213c2772ea90f91d168b
`Dataset` binary ops ignore `keep_attrs` option ### What is your issue? When doing arithmetic operations on two Dataset operands, the `keep_attrs=True` option is ignored and therefore attributes not kept. Minimal example: ```python import xarray as xr ds1 = xr.Dataset( data_vars={"a": 1, "b": 1}, attrs={'m...
diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -6592,6 +6592,9 @@ def _binary_op(self, other, f, reflexive=False, join=None) -> Dataset: self, other = align(self, other, join=align_type, copy=False) # type: ignore[assignment] ...
diff --git a/xarray/tests/test_dataset.py b/xarray/tests/test_dataset.py --- a/xarray/tests/test_dataset.py +++ b/xarray/tests/test_dataset.py @@ -5849,6 +5849,21 @@ def test_binary_op_join_setting(self) -> None: actual = ds1 + ds2 assert_equal(actual, expected) + @pytest.mark.parametrize...
["xarray/tests/test_dataset.py::TestDataset::test_binary_ops_keep_attrs[True]"]
["xarray/tests/test_dataset.py::TestDataset::test_repr", "xarray/tests/test_dataset.py::TestDataset::test_repr_multiindex", "xarray/tests/test_dataset.py::TestDataset::test_repr_period_index", "xarray/tests/test_dataset.py::TestDataset::test_unicode_data", "xarray/tests/test_dataset.py::TestDataset::test_repr_nep18", "...
null
true
2022-12-19T20:42:20Z
1
3
1
693
0
0.8
1
0.7
0.8
0.1255
78.2765
9,325
swe_bench::test::1552
swe_bench
test
1,552
scikit-learn__scikit-learn-12557
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
4de404d46d24805ff48ad255ec3169a5155986f0
SVC.decision_function disagrees with predict In ``SVC`` with ``decision_function_shape="ovr"`` argmax of the decision function is not the same as ``predict``. This is related to the tie-breaking mentioned in #8276. The ``decision_function`` now includes tie-breaking, which the ``predict`` doesn't. I'm not sure the tie...
The relevant issue on `libsvm` (i.e. issue https://github.com/cjlin1/libsvm/issues/85) seems to be stalled and I'm not sure if it's had a conclusion. At least on the `libsvm` side it seems they prefer not to include the confidences for computational cost of it. Now the question is, do we want to change the `svm.cpp`...
diff --git a/examples/svm/plot_svm_tie_breaking.py b/examples/svm/plot_svm_tie_breaking.py new file mode 100644 --- /dev/null +++ b/examples/svm/plot_svm_tie_breaking.py @@ -0,0 +1,64 @@ +""" +========================================================= +SVM Tie Breaking Example +==========================================...
diff --git a/sklearn/svm/tests/test_svm.py b/sklearn/svm/tests/test_svm.py --- a/sklearn/svm/tests/test_svm.py +++ b/sklearn/svm/tests/test_svm.py @@ -985,6 +985,41 @@ def test_ovr_decision_function(): assert np.all(pred_class_deci_val[:, 0] < pred_class_deci_val[:, 1]) +@pytest.mark.parametrize("SVCClass", [s...
["sklearn/svm/tests/test_svm.py::test_svc_invalid_break_ties_param[SVC]", "sklearn/svm/tests/test_svm.py::test_svc_invalid_break_ties_param[NuSVC]", "sklearn/svm/tests/test_svm.py::test_svc_ovr_tie_breaking[SVC]", "sklearn/svm/tests/test_svm.py::test_svc_ovr_tie_breaking[NuSVC]"]
["sklearn/svm/tests/test_svm.py::test_libsvm_parameters", "sklearn/svm/tests/test_svm.py::test_libsvm_iris", "sklearn/svm/tests/test_svm.py::test_precomputed", "sklearn/svm/tests/test_svm.py::test_svr", "sklearn/svm/tests/test_svm.py::test_linearsvr", "sklearn/svm/tests/test_svm.py::test_linearsvr_fit_sampleweight", "s...
null
true
2018-11-10T15:45:52Z
4
126
4
378
0
0.8
1
0.55
0.85
0.483
78.2615
9,326
r2e_gym::train::4680
r2e_gym
train
4,680
numpy__090e85e7bd77e67c8b6bac63fc4b22331eac1950
numpy
numpy/numpy
python
090e85e7bd77e67c8b6bac63fc4b22331eac1950
**Analysis** - **Key Parts from Commit Details and Test Results:** - **Commit Message:** Fixes issue #6723 by ensuring that when accessing a field with a multidimensional dtype in an exotic masked structured array, the `fill_value` remains scalar (`ndim==0`). - **Test Results:** Before the commit, `TestFillingValu...
diff --git a/numpy/ma/core.py b/numpy/ma/core.py --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -3129,6 +3129,26 @@ if isinstance(indx, basestring): if self._fill_value is not None: dout._fill_value = self._fill_value[indx] + + # If we're indexing ...
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -1674,6 +1674,10 @@ assert_equal(test, control) control = np.array((0, 0, 0), dtype="int, float, float").astype(ndtype) assert_equal(_check_fill_value(...
null
null
namanjain12/numpy_final:090e85e7bd77e67c8b6bac63fc4b22331eac1950
true
null
1
20
null
2,681
0
0.75
1
0.525
1
0.5135
78.253
9,327
swe_bench::test::1006
swe_bench
test
1,006
matplotlib__matplotlib-23111
matplotlib/matplotlib
matplotlib/matplotlib
python
b31c5ae782876386006a544a5cc833ddddb4b877
[Bug]: Imshow with all negative values leads to math domain errors. ### Bug summary When using imshow to display a numpy array filled with identical negative values hovering the mouse over the displayed image throws math domain errors. ### Code for reproduction ```python import matplotlib.pyplot as plt import numpy ...
diff --git a/lib/matplotlib/cbook/__init__.py b/lib/matplotlib/cbook/__init__.py --- a/lib/matplotlib/cbook/__init__.py +++ b/lib/matplotlib/cbook/__init__.py @@ -2158,7 +2158,7 @@ def _g_sig_digits(value, delta): if delta == 0: # delta = 0 may occur when trying to format values over a tiny range; ...
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py --- a/lib/matplotlib/tests/test_image.py +++ b/lib/matplotlib/tests/test_image.py @@ -342,6 +342,7 @@ def test_cursor_data(): ([[.123, .987]], "[0.123]"), ([[np.nan, 1, 2]], "[]"), ([[1, 1+1e-15]], "[1.000000...
["lib/matplotlib/tests/test_image.py::test_format_cursor_data[data4-[-1.0000000000000000]]"]
["lib/matplotlib/tests/test_image.py::test_image_interps[png]", "lib/matplotlib/tests/test_image.py::test_image_interps[pdf]", "lib/matplotlib/tests/test_image.py::test_alpha_interp[png]", "lib/matplotlib/tests/test_image.py::test_interp_nearest_vs_none[pdf]", "lib/matplotlib/tests/test_image.py::test_figimage[png-Fals...
null
true
2022-05-23T17:55:16Z
1
2
1
2,552
0
0.8
1
1
0.4
0.432
78.246
9,328
r2e_gym::train::5236
r2e_gym
train
5,236
pyramid__796af58e3741a03cbddbaed19def5984fe8601e4
pyramid
pylons/pyramid
python
796af58e3741a03cbddbaed19def5984fe8601e4
**Analysis:** - **Key Parts:** - **Commit Changes:** Added the `overwrite` parameter to `copy_dir` function calls in `copydir.py`. - **Test Results:** The test `test_overwrite_false` failed in the old commit and passed in the new commit. - **Test Function Details:** The test checks that when `overwrite=False`, e...
diff --git a/pyramid/scaffolds/copydir.py b/pyramid/scaffolds/copydir.py --- a/pyramid/scaffolds/copydir.py +++ b/pyramid/scaffolds/copydir.py @@ -90,16 +90,16 @@ if verbosity: out('%sRecursing into %s' % (pad, os.path.basename(full))) copy_dir((source[0], full), dest_full, va...
diff --git a/pyramid/tests/test_scaffolds/test_copydir.py b/pyramid/tests/test_scaffolds/test_copydir.py --- a/pyramid/tests/test_scaffolds/test_copydir.py +++ b/pyramid/tests/test_scaffolds/test_copydir.py @@ -103,16 +103,57 @@ 1, False, overwrite=False, ...
null
null
namanjain12/pyramid_final:796af58e3741a03cbddbaed19def5984fe8601e4
true
null
1
8
null
2,873
0
0.75
1
0.525
1
0.5055
78.229
9,329
r2e_gym::train::6277
r2e_gym
train
6,277
pillow__8a8ac60817f6b5f248eb4bc5e51b725be175fb4c
pillow
python-pillow/pillow
python
8a8ac60817f6b5f248eb4bc5e51b725be175fb4c
**Title:** AttributeError: 'PIL.ImageOps' has no attribute 'contain' When Resizing Images **Description:** When attempting to resize an image while maintaining its aspect ratio using the `ImageOps.contain` method, an `AttributeError` is raised because the `contain` attribute does not exist in the `PIL.ImageOps` module...
diff --git a/docs/reference/ImageOps.rst b/docs/reference/ImageOps.rst --- a/docs/reference/ImageOps.rst +++ b/docs/reference/ImageOps.rst @@ -12,6 +12,7 @@ .. autofunction:: autocontrast .. autofunction:: colorize +.. autofunction:: contain .. autofunction:: pad .. autofunction:: crop .. autofunction:: scale di...
diff --git a/Tests/test_imageops.py b/Tests/test_imageops.py --- a/Tests/test_imageops.py +++ b/Tests/test_imageops.py @@ -36,6 +36,9 @@ ImageOps.pad(hopper("L"), (128, 128)) ImageOps.pad(hopper("RGB"), (128, 128)) + + ImageOps.contain(hopper("L"), (128, 128)) + ImageOps.contain(hopper("RGB"), (128, 1...
null
null
namanjain12/pillow_final:8a8ac60817f6b5f248eb4bc5e51b725be175fb4c
true
null
4
142
null
883
0
0.75
1
0.6375
0.85
0.6205
78.21775
9,330
swe_bench::test::1752
swe_bench
test
1,752
sphinx-doc__sphinx-11311
sphinx-doc/sphinx
sphinx-doc/sphinx
python
65fd5be20d0269c47fbf8c5bbc37a6f24324594b
[FEATURE] Avoid losing information in `SigElementFallbackTransform.fallback`. In light to #11272, the current implementation of `SigElementFallbackTransform` does the following assuming that the builder's current translator class is *not* a subclass of `SphinxTranslator`: - If one or more node classes specified by [SI...
diff --git a/sphinx/addnodes.py b/sphinx/addnodes.py --- a/sphinx/addnodes.py +++ b/sphinx/addnodes.py @@ -298,9 +298,20 @@ class desc_annotation(nodes.Part, nodes.Inline, nodes.FixedTextElement): # Leaf nodes for markup of text fragments ######################################### +#: A set of classes inheriting :cl...
diff --git a/tests/test_addnodes.py b/tests/test_addnodes.py new file mode 100644 --- /dev/null +++ b/tests/test_addnodes.py @@ -0,0 +1,51 @@ +"""Test the non-trivial features in the :mod:`sphinx.addnodes` module.""" + +from __future__ import annotations + +import pytest + +from sphinx import addnodes + + +@pytest.fixt...
["tests/test_addnodes.py::test_desc_sig_element_nodes", "tests/test_transforms_post_transforms.py::TestSigElementFallbackTransform::test_support_desc_inline[with_default_visitors_for_desc_sig_elements-no_explicit_visitor]", "tests/test_transforms_post_transforms.py::TestSigElementFallbackTransform::test_support_desc_in...
["tests/test_transforms_post_transforms.py::test_nitpicky_warning", "tests/test_transforms_post_transforms.py::test_missing_reference", "tests/test_transforms_post_transforms.py::test_missing_reference_conditional_pending_xref", "tests/test_transforms_post_transforms.py::test_keyboard_hyphen_spaces", "tests/test_transf...
null
true
2023-04-10T10:38:14Z
2
62
11
3,318
0
0.8
1
0.47
1
0.706667
78.215
9,331
r2e_gym::train::4809
r2e_gym
train
4,809
numpy__b581aade6891662e37931b04bba29262cd6057de
numpy
numpy/numpy
python
b581aade6891662e37931b04bba29262cd6057de
**Analysis:** - **Key Parts:** - **Commit Message:** BUG: Avoid signed overflow in histogram. - **Issue Details:** Using signed integers for `first` and `last` in histogram calculations can cause overflow when computing `(last - first)`, leading to incorrect histogram binning. - **Test Results:** - **Old Com...
diff --git a/numpy/lib/histograms.py b/numpy/lib/histograms.py --- a/numpy/lib/histograms.py +++ b/numpy/lib/histograms.py @@ -259,6 +259,32 @@ return first_edge, last_edge +def _unsigned_subtract(a, b): + """ + Subtract two values where a >= b, and produce an unsigned result + + This is needed when f...
diff --git a/numpy/lib/tests/test_histograms.py b/numpy/lib/tests/test_histograms.py --- a/numpy/lib/tests/test_histograms.py +++ b/numpy/lib/tests/test_histograms.py @@ -297,6 +297,20 @@ assert_equal(d_edge.dtype, dates.dtype) assert_equal(t_edge.dtype, td) + + def do_signed_overflow_bounds(self...
null
null
namanjain12/numpy_final:b581aade6891662e37931b04bba29262cd6057de
true
null
1
32
null
2,338
0
0.75
1
0.525
1
0.496333
78.2015
9,332
r2e_gym::train::6296
r2e_gym
train
6,296
pillow__5f9fff02155957287154787a9d1d235845108cea
pillow
python-pillow/pillow
python
5f9fff02155957287154787a9d1d235845108cea
**Title:** Corrupt EXIF Data Causes Image Loading to Fail with Struct Error **Description:** When attempting to load a JPEG image with malformed EXIF data, the image processing fails unexpectedly. This issue occurs because the EXIF parser encounters an unexpected number of bytes, leading to a `struct.error`. As a resu...
diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -468,55 +468,67 @@ return b"".join(self._pack("2L", *_limit_rational(frac, 2 ** 30)) for frac in values) + def _ensure_read(self, fp, size): + ret = fp....
diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -99,9 +99,11 @@ lambda: TiffImagePlugin.TiffImageFile(invalid_file)) def test_bad_exif(self): - image = Image.open('Tests/images/hopper_bad_exif.jpg') - ...
null
null
namanjain12/pillow_final:5f9fff02155957287154787a9d1d235845108cea
true
null
1
96
null
1,052
0
0.75
1
0.525
1
0.495333
78.1985
9,333
r2e_gym::train::6510
r2e_gym
train
6,510
pillow__a38fb2d0c550149116be4371530043ac37367028
pillow
python-pillow/pillow
python
a38fb2d0c550149116be4371530043ac37367028
**Title:** Animated GIFs Saved with Incorrect GIF Version Header **Description:** When saving animated GIFs, the generated files are incorrectly marked with the GIF87a version instead of GIF89a. This causes compatibility issues and fails tests that expect the GIF version to support animation features. For example, sa...
diff --git a/PIL/GifImagePlugin.py b/PIL/GifImagePlugin.py --- a/PIL/GifImagePlugin.py +++ b/PIL/GifImagePlugin.py @@ -24,7 +24,8 @@ # See the README file for information on usage and redistribution. # -from PIL import Image, ImageFile, ImagePalette, ImageChops, ImageSequence, _binary +from PIL import Image, ImageF...
diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -24,6 +24,7 @@ self.assertEqual(im.mode, "P") self.assertEqual(im.size, (128, 128)) self.assertEqual(im.format, "GIF") + self.assertEqual(im.info["version"], b"GIF8...
null
null
namanjain12/pillow_final:a38fb2d0c550149116be4371530043ac37367028
true
null
2
93
null
1,105
0
0.75
1
0.525
1
0.494167
78.195
9,334
r2e_gym::train::4729
r2e_gym
train
4,729
numpy__1e2cb50706c12c97396f311c3172963980d3e40c
numpy
numpy/numpy
python
1e2cb50706c12c97396f311c3172963980d3e40c
**Title:** Incorrect Covariance Matrix Scaling in `np.polyfit` Leads to Inaccurate Uncertainty Estimates **Description:** When using `np.polyfit` with the `cov=True` parameter to obtain the covariance matrix of the polynomial coefficients, the scaling factor applied to the covariance matrix is incorrect. Specifically,...
diff --git a/doc/release/1.16.0-notes.rst b/doc/release/1.16.0-notes.rst --- a/doc/release/1.16.0-notes.rst +++ b/doc/release/1.16.0-notes.rst @@ -251,6 +251,16 @@ The ``out`` argument to these functions is now always tested for memory overlap to avoid corrupted results when memory overlap occurs. +New value ``unsc...
diff --git a/numpy/lib/tests/test_polynomial.py b/numpy/lib/tests/test_polynomial.py --- a/numpy/lib/tests/test_polynomial.py +++ b/numpy/lib/tests/test_polynomial.py @@ -3,7 +3,7 @@ import numpy as np from numpy.testing import ( assert_, assert_equal, assert_array_equal, assert_almost_equal, - assert_array_a...
null
null
namanjain12/numpy_final:1e2cb50706c12c97396f311c3172963980d3e40c
true
null
2
48
null
1,996
0
0.75
1
0.525
1
0.492667
78.1905
9,335
swe_bench::test::1741
swe_bench
test
1,741
sphinx-doc__sphinx-10492
sphinx-doc/sphinx
sphinx-doc/sphinx
python
873d9f6fdababb96f0763f538e85921f7d332b70
Typo in new language warning ### Describe the bug See the following snippet: https://github.com/sphinx-doc/sphinx/blob/e1bf4dd5d5860a4c3790f41c5f5fe389dc5b4cf9/sphinx/config.py#L167-L174 Both `langugae` and `langauge` are used incorrectly. ### How to Reproduce Noticed in Read the Docs: https://readthedocs.org/proj...
diff --git a/sphinx/config.py b/sphinx/config.py --- a/sphinx/config.py +++ b/sphinx/config.py @@ -164,13 +164,13 @@ def read(cls, confdir: str, overrides: Dict = None, tags: Tags = None) -> "Confi confdir) namespace = eval_config_file(filename, tags) - # Note: Old sphin...
diff --git a/tests/test_config.py b/tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -411,7 +411,7 @@ def test_conf_py_language_none_warning(logger, tempdir): assert logger.warning.called assert logger.warning.call_args[0][0] == ( "Invalid configuration value found: 'lang...
["tests/test_config.py::test_conf_py_language_none_warning"]
["tests/test_config.py::test_core_config", "tests/test_config.py::test_config_not_found", "tests/test_config.py::test_extension_values", "tests/test_config.py::test_overrides", "tests/test_config.py::test_overrides_boolean", "tests/test_config.py::test_errors_warnings", "tests/test_config.py::test_errors_if_setup_is_no...
null
true
2022-05-30T11:32:56Z
1
4
1
482
0
0.8
1
0.7
0.8
0.093667
78.181
9,336
r2e_gym::train::4396
r2e_gym
train
4,396
numpy__ae56c58db4207bd11100a9d24c9edf7694e34d67
numpy
numpy/numpy
python
ae56c58db4207bd11100a9d24c9edf7694e34d67
**Analysis:** - **Key Parts from Commit Details and Test Results:** - **Commit Message:** *BUG,ENH: allow linalg.cond to work on a stack of matrices* - **Issue Closed:** gh-6351 - **Test Failures Before Commit:** - `TestCondSVD.test_generalized_sq_cases` failed due to shape mismatch. - `TestCondSVD.test_...
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -1012,9 +1012,9 @@ w : (..., M) array The eigenvalues, each repeated according to its multiplicity. The eigenvalues are not necessarily ordered. The resulting - array w...
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py --- a/numpy/linalg/tests/test_linalg.py +++ b/numpy/linalg/tests/test_linalg.py @@ -556,7 +556,12 @@ def do(self, a, b): c = asarray(a) # a might be a matrix s = linalg.svd(c, compute_uv=False) - old_assert...
null
null
namanjain12/numpy_final:ae56c58db4207bd11100a9d24c9edf7694e34d67
true
null
1
14
null
2,624
0
0.75
1
0.525
1
0.484
78.1645
9,337
r2e_gym::train::4866
r2e_gym
train
4,866
numpy__c926d0a5b087fd7c2d0e91a54364b354f4720a39
numpy
numpy/numpy
python
c926d0a5b087fd7c2d0e91a54364b354f4720a39
**Title:** MaskedArray `__getitem__` Returns `ndarray` Instead of `MaskedArray` for Structured Arrays **Description:** When accessing elements of a masked structured array using specific indices, the returned object is an `ndarray` instead of a `MaskedArray`. This inconsistency leads to the loss of mask information an...
diff --git a/numpy/ma/core.py b/numpy/ma/core.py --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -3183,29 +3183,78 @@ Return the item described by i, as a masked array. """ - dout = self.data[indx] # We could directly use ndarray.__getitem__ on self. # But then we would hav...
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -4376,15 +4376,26 @@ [1, 0, 0, 0, 0, 0, 0, 0, 1, 0])), dtype=[('a', bool), ('b', bool)]) # No mask - ...
null
null
namanjain12/numpy_final:c926d0a5b087fd7c2d0e91a54364b354f4720a39
true
null
1
76
null
1,380
0
0.75
1
0.525
1
0.483333
78.1625
9,338
r2e_gym::train::4852
r2e_gym
train
4,852
numpy__f30b2564d3923b2c307a026e4a22d20bc19872f0
numpy
numpy/numpy
python
f30b2564d3923b2c307a026e4a22d20bc19872f0
**Analysis:** - **Key Parts from Commit Details and Test Results:** - **Commit Message:** `BUG: lib: Fix handling of integer arrays by gradient.` - **Test Failures:** Tests involving integer arrays (`uint8`, `uint16`, `uint32`, `uint64`, `int8`, `int16`, `int32`, `int64`) failed due to overflow errors when computi...
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -974,13 +974,18 @@ # scalar or 1d array for each axis dx = list(varargs) for i, distances in enumerate(dx): - if np.ndim(distances) == 0: + ...
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -1082,6 +1082,40 @@ assert_raises(ValueError, gradient, np.arange(1), edge_order=1) assert_raises(ValueError, gradient, ...
null
null
namanjain12/numpy_final:f30b2564d3923b2c307a026e4a22d20bc19872f0
true
null
1
17
null
2,551
0
0.75
1
0.525
1
0.481833
78.158
9,339
r2e_gym::train::6076
r2e_gym
train
6,076
pillow__f7ec665bf1656245e9e3b483ff92e9eb1e0ef465
pillow
python-pillow/pillow
python
f7ec665bf1656245e9e3b483ff92e9eb1e0ef465
**Analysis:** - **Key Parts:** - **Commit Message:** "Support setting ROWSPERSTRIP tag." - **Test Failure Before Commit:** The test `test_rowsperstrip` expected the `ROWSPERSTRIP` tag to be `256`, but it was `128`. - **Commit Patch:** Modified how `ROWSPERSTRIP` is set, ensuring it only sets the tag if it's not ...
diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -1705,20 +1705,23 @@ ifd[COLORMAP] = colormap # data orientation stride = len(bits) * ((im.size[0] * bits[0] + 7) // 8) - # aim for given strip size (64 KB by d...
diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -612,6 +612,14 @@ assert_image_equal_tofile(im, tmpfile) + def test_rowsperstrip(self, tmp_path): + outfile = str(tmp_path / "temp.tif") + im = hopper() + ...
null
null
namanjain12/pillow_final:f7ec665bf1656245e9e3b483ff92e9eb1e0ef465
true
null
1
31
null
2,259
0
0.75
1
0.525
1
0.479833
78.152
9,340
r2e_gym::train::4698
r2e_gym
train
4,698
numpy__075859216fae0509c52a54cb5c96c217f23026ca
numpy
numpy/numpy
python
075859216fae0509c52a54cb5c96c217f23026ca
**Title:** Deprecated Scalar Type Aliases Remain Accessible Without Warnings **Description:** Certain deprecated scalar type aliases in NumPy are still accessible without emitting deprecation warnings. This causes tests that expect these aliases to trigger warnings to fail. **Example Buggy Code:** ```python import nu...
diff --git a/numpy/__init__.py b/numpy/__init__.py --- a/numpy/__init__.py +++ b/numpy/__init__.py @@ -155,70 +155,32 @@ from . import matrixlib as _mat from .matrixlib import * - # Deprecations introduced in NumPy 1.20.0, 2020-06-06 - import builtins as _builtins - + # Future warning introduced in...
diff --git a/numpy/core/tests/test_deprecations.py b/numpy/core/tests/test_deprecations.py --- a/numpy/core/tests/test_deprecations.py +++ b/numpy/core/tests/test_deprecations.py @@ -583,25 +583,6 @@ self.assert_deprecated(lambda: np.searchsorted(arr[0], 4, side='Random')) -class TestDeprecatedGlobals(_Dep...
null
null
namanjain12/numpy_final:075859216fae0509c52a54cb5c96c217f23026ca
true
null
3
106
null
738
0
0.75
1
0.525
1
0.476333
78.1415
9,341
r2e_gym::train::161
r2e_gym
train
161
orange3__c5fa7b7c74799c91d19e59be6acb77896ce697d9
orange3
biolab/orange3
python
c5fa7b7c74799c91d19e59be6acb77896ce697d9
**Title:** Settings Migration from Version 2 to 3 Fails, Causing Missing Domain Change Hints and Incorrect Output Table Name **Description:** When migrating settings from version 2 to version 3 in the `OWEditDomain` widget, the migration process does not correctly transfer certain settings. Specifically, the `_domain_...
diff --git a/Orange/widgets/data/oweditdomain.py b/Orange/widgets/data/oweditdomain.py --- a/Orange/widgets/data/oweditdomain.py +++ b/Orange/widgets/data/oweditdomain.py @@ -42,7 +42,8 @@ ) from Orange.misc.collections import DictMissingConst from Orange.util import frompyfunc -from Orange.widgets import widget, gu...
diff --git a/Orange/widgets/data/tests/test_oweditdomain.py b/Orange/widgets/data/tests/test_oweditdomain.py --- a/Orange/widgets/data/tests/test_oweditdomain.py +++ b/Orange/widgets/data/tests/test_oweditdomain.py @@ -16,6 +16,7 @@ QStyleOptionViewItem, QDialog, QMenu, QToolTip, QListView from AnyQt.QtTest impor...
null
null
namanjain12/orange3_final:c5fa7b7c74799c91d19e59be6acb77896ce697d9
true
null
1
33
null
2,190
0
0.75
1
0.525
1
0.475
78.1375
9,342
r2e_gym::train::4921
r2e_gym
train
4,921
datalad__de9d6923181175bd33607964e0ef56deb24aa39c
datalad
datalad/datalad
python
de9d6923181175bd33607964e0ef56deb24aa39c
**Title:** `download_url` Misinterprets Directory Target Without Trailing Separator **Description:** When using the `download_url` function with multiple URLs, specifying a directory path without a trailing separator causes unexpected behavior. Instead of recognizing the intended directory target, the function treats ...
diff --git a/datalad/interface/download_url.py b/datalad/interface/download_url.py --- a/datalad/interface/download_url.py +++ b/datalad/interface/download_url.py @@ -70,9 +70,13 @@ doc="""flag to overwrite it if target file exists"""), path=Parameter( args=("-O", "--path"), - ...
diff --git a/datalad/interface/tests/test_download_url.py b/datalad/interface/tests/test_download_url.py --- a/datalad/interface/tests/test_download_url.py +++ b/datalad/interface/tests/test_download_url.py @@ -31,8 +31,8 @@ res0 = download_url(['url1', 'url2'], path=__file__, save=False, ...
null
null
namanjain12/datalad_final:de9d6923181175bd33607964e0ef56deb24aa39c
true
null
1
50
null
1,820
0
0.75
1
0.525
1
0.47
78.1225
9,343
r2e_gym::train::4048
r2e_gym
train
4,048
coveragepy__1b19799edfbfc65dea254e8fcaa0dea23e9709f9
coveragepy
nedbat/coveragepy
python
1b19799edfbfc65dea254e8fcaa0dea23e9709f9
**Analysis:** - **Key Parts:** - **Commit Message:** Fixes the issue where combining data files with absolute and relative paths resulted in inconsistent behavior based on the combination order. - **Test Failure:** The test `test_combine_absolute_then_relative_1752` failed when absolute files were combined before ...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -23,6 +23,13 @@ Unreleased ---------- +- Fix: in some cases, even with ``[run] relative_files=True``, a data file + could be created with absolute path names. When combined with other relative + data files, it was random whether the ab...
diff --git a/tests/test_api.py b/tests/test_api.py --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1465,3 +1465,23 @@ # After combining, the .coverage file & the original combined file should still be there. self.assert_exists(".coverage") self.assert_file_count(".coverage.*", 2) + + @...
null
null
namanjain12/coveragepy_final:1b19799edfbfc65dea254e8fcaa0dea23e9709f9
true
null
3
16
null
2,474
0
0.75
1
0.525
1
0.465667
78.1095
9,344
r2e_gym::train::5806
r2e_gym
train
5,806
tornado__eb487cac3d829292ecca6e5124b1da5ae6bba407
tornado
tornadoweb/tornado
python
eb487cac3d829292ecca6e5124b1da5ae6bba407
**Title:** `finish()` and `render()` Methods Do Not Return Futures, Causing Asynchronous Operations to Fail **Description:** In the current implementation of `tornado.web.RequestHandler`, the `finish()` and `render()` methods do not return `Future` objects as expected. This behavior disrupts asynchronous workflows tha...
diff --git a/tornado/web.py b/tornado/web.py --- a/tornado/web.py +++ b/tornado/web.py @@ -749,7 +749,18 @@ self._write_buffer.append(chunk) def render(self, template_name, **kwargs): - """Renders the template with the given arguments as the response.""" + """Renders the template with the ...
diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py --- a/tornado/test/web_test.py +++ b/tornado/test/web_test.py @@ -191,6 +191,40 @@ self.assertEqual(new_handler.get_secure_cookie('foo'), None) +class FinalReturnTest(WebTestCase): + def get_handlers(self): + test = self + + ...
null
null
namanjain12/tornado_final:eb487cac3d829292ecca6e5124b1da5ae6bba407
true
null
1
33
null
2,117
0
0.75
1
0.525
1
0.462833
78.101
9,345
r2e_gym::train::6262
r2e_gym
train
6,262
pillow__9eb93915c3211d1c36d1e6b4083837f99476df60
pillow
python-pillow/pillow
python
9eb93915c3211d1c36d1e6b4083837f99476df60
**Title:** Incorrect Total Duration Calculation When Saving Multiple Identical GIF Frames **Description:** When saving a GIF with multiple identical frames and specifying the `duration` parameter, the total duration of the resulting GIF is calculated incorrectly. This issue occurs particularly when the `duration` is p...
diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py --- a/src/PIL/GifImagePlugin.py +++ b/src/PIL/GifImagePlugin.py @@ -624,28 +624,28 @@ bbox = None im_frames.append({"im": im_frame, "bbox": bbox, "encoderinfo": encoderinfo}) - if len(im_frames) > 1: - for frame...
diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -856,7 +856,14 @@ @pytest.mark.parametrize( - "duration", ([1000, 1500, 2000, 4000], (1000, 1500, 2000, 4000), 8500) + "duration", + ( + [1000, 1500, 2000], + (1000, 1500...
null
null
namanjain12/pillow_final:9eb93915c3211d1c36d1e6b4083837f99476df60
true
null
1
44
null
1,881
0
0.75
1
0.525
1
0.460167
78.093
9,346
r2e_gym::train::5592
r2e_gym
train
5,592
scrapy__b081f18a2f232a1bfd04c829ae6894cac93a89a1
scrapy
scrapy/scrapy
python
b081f18a2f232a1bfd04c829ae6894cac93a89a1
**Title:** HttpAuthMiddleware Adds Authorization Header to All Domains When `http_auth_domain` Is Not Set **Description:** When using `HttpAuthMiddleware` without specifying the `http_auth_domain`, the middleware erroneously attaches the `Authorization` header to requests targeting any domain. This behavior poses pote...
diff --git a/docs/topics/downloader-middleware.rst b/docs/topics/downloader-middleware.rst --- a/docs/topics/downloader-middleware.rst +++ b/docs/topics/downloader-middleware.rst @@ -323,8 +323,21 @@ This middleware authenticates all requests generated from certain spiders using `Basic access authentication`_...
diff --git a/tests/test_downloadermiddleware_httpauth.py b/tests/test_downloadermiddleware_httpauth.py --- a/tests/test_downloadermiddleware_httpauth.py +++ b/tests/test_downloadermiddleware_httpauth.py @@ -1,13 +1,60 @@ import unittest + +from w3lib.http import basic_auth_header from scrapy.http import Request fr...
null
null
namanjain12/scrapy_final:b081f18a2f232a1bfd04c829ae6894cac93a89a1
true
null
2
39
null
1,980
0
0.75
1
0.525
1
0.46
78.0925
9,347
r2e_gym::train::5866
r2e_gym
train
5,866
tornado__ea03332e204a357bb43b2f106a9868b3701d0623
tornado
tornadoweb/tornado
python
ea03332e204a357bb43b2f106a9868b3701d0623
**Issue Analysis:** - **Key Parts:** - The test `test_concurrent_streaming_barrier` was failing in the old commit. - The failure was due to responses returning `[b'ok 0', b'ok 1']` instead of `[b'ok broken barrier', b'ok broken barrier']`. - The new commit fixed the issue, making all tests pass. - **Main Proble...
diff --git a/tornado/wsgi.py b/tornado/wsgi.py --- a/tornado/wsgi.py +++ b/tornado/wsgi.py @@ -94,8 +94,8 @@ https://github.com/bdarnell/django-tornado-demo for a complete example. `WSGIContainer` supports executing the WSGI application in custom executors - using `IOLoop.run_in_executor`. The default ex...
diff --git a/tornado/test/wsgi_test.py b/tornado/test/wsgi_test.py --- a/tornado/test/wsgi_test.py +++ b/tornado/test/wsgi_test.py @@ -27,6 +27,7 @@ [ ("/simple", make_container(self.simple_wsgi_app)), ("/barrier", make_container(self.barrier_wsgi_app)), + (...
null
null
namanjain12/tornado_final:ea03332e204a357bb43b2f106a9868b3701d0623
true
null
1
26
null
2,222
0
0.75
1
0.525
1
0.457
78.0835
9,348
r2e_gym::train::6041
r2e_gym
train
6,041
pillow__f8e6953e6e86dddbd9685f3239b9e843913d2843
pillow
python-pillow/pillow
python
f8e6953e6e86dddbd9685f3239b9e843913d2843
**Title:** Palette Optimization Reduces Palette Length for Large GIF Images **Description:** When saving GIF images larger than 512x512 pixels with optimization enabled, the palette length is unexpectedly reduced from 256 colors to a lower number. This results in a loss of color information, degrading the image qualit...
diff --git a/PIL/GifImagePlugin.py b/PIL/GifImagePlugin.py --- a/PIL/GifImagePlugin.py +++ b/PIL/GifImagePlugin.py @@ -586,6 +586,10 @@ palette_bytes += o8(0) * 3 * actual_target_size_diff return palette_bytes +# Force optimization so that we can test performance against +# cases where it took lots of m...
diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -2,6 +2,8 @@ from PIL import Image from PIL import GifImagePlugin + +from io import BytesIO codecs = dir(Image.core) @@ -33,8 +35,6 @@ lambda: GifImagePlugin.GifI...
null
null
namanjain12/pillow_final:f8e6953e6e86dddbd9685f3239b9e843913d2843
true
null
1
74
null
1,208
0
0.75
1
0.525
1
0.448
78.0565
9,349
r2e_gym::train::409
r2e_gym
train
409
orange3__8b2a8f5e69f6c1e65d7d13f9e868c08cbed165b3
orange3
biolab/orange3
python
8b2a8f5e69f6c1e65d7d13f9e868c08cbed165b3
**Analysis:** - **Key Parts from Commit Details:** - **Commit Message:** "table_to_frame: ensure backward compatibility." - **Changes:** Added an optional parameter `include_metas` to the `table_to_frame` function to control the inclusion of metadata columns in the resulting DataFrame. - **Test Results:** - **O...
diff --git a/Orange/data/pandas_compat.py b/Orange/data/pandas_compat.py --- a/Orange/data/pandas_compat.py +++ b/Orange/data/pandas_compat.py @@ -78,13 +78,16 @@ np.column_stack(M) if M else None) -def table_to_frame(tab): +def table_to_frame(tab, include_metas=False): """ Co...
diff --git a/Orange/data/tests/test_pandas.py b/Orange/data/tests/test_pandas.py --- a/Orange/data/tests/test_pandas.py +++ b/Orange/data/tests/test_pandas.py @@ -1,3 +1,4 @@ +# pylint: disable=import-outside-toplevel import unittest import numpy as np from Orange.data import ContinuousVariable, DiscreteVariable, Ti...
null
null
namanjain12/orange3_final:8b2a8f5e69f6c1e65d7d13f9e868c08cbed165b3
true
null
1
10
null
2,454
0
0.75
1
0.525
1
0.442333
78.0395
9,350
r2e_gym::train::231
r2e_gym
train
231
orange3__6d1df8d358406c30c66d192599092605d51da431
orange3
biolab/orange3
python
6d1df8d358406c30c66d192599092605d51da431
**Analysis:** - **Key Parts:** - **Commit Message:** "DistMatrix: improve deduction of labels." - **Test Result:** The `test_trivial_labels` test failed in the old commit, asserting that `_trivial_labels` should return `True` when `row_items` is a list of strings (`list("abc")`), but it returned `False` instead. ...
diff --git a/Orange/misc/distmatrix.py b/Orange/misc/distmatrix.py --- a/Orange/misc/distmatrix.py +++ b/Orange/misc/distmatrix.py @@ -274,15 +274,19 @@ self.row_items or self.col_items, self.col_items or self.row_items) - @staticmethod - def _trivial_labels...
diff --git a/Orange/misc/tests/test_distmatrix.py b/Orange/misc/tests/test_distmatrix.py --- a/Orange/misc/tests/test_distmatrix.py +++ b/Orange/misc/tests/test_distmatrix.py @@ -2,6 +2,7 @@ from unittest.mock import patch import numpy as np +from Orange.data import ContinuousVariable, StringVariable, Table, Domain...
null
null
namanjain12/orange3_final:6d1df8d358406c30c66d192599092605d51da431
true
null
1
33
null
1,992
0
0.75
1
0.525
1
0.442
78.0385
9,351
r2e_gym::train::4352
r2e_gym
train
4,352
numpy__6420f844824cdc327026302870b57dfd8c7481f7
numpy
numpy/numpy
python
6420f844824cdc327026302870b57dfd8c7481f7
**Analysis:** - **Key Parts:** - **Commit Message:** "BUG: np.piecewise not working for scalars." - **Test Results:** Two tests (`test_0d` and `test_0d_comparison`) fail in the old commit but pass after the commit. - **Failed Tests Details:** - For a scalar input `x = 3` with conditions `[x <= 3, x > 3]` and...
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1225,9 +1225,9 @@ Parameters ---------- - x : ndarray + x : ndarray or scalar The input domain. - condlist : list of bool arrays + condlist : list o...
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -2299,9 +2299,19 @@ assert_(y.ndim == 0) assert_(y == 1) + # With 3 ranges (It was failing, before) + y ...
null
null
namanjain12/numpy_final:6420f844824cdc327026302870b57dfd8c7481f7
true
null
1
17
null
2,311
0
0.75
1
0.525
1
0.441833
78.038
9,352
r2e_gym::train::6448
r2e_gym
train
6,448
pillow__59780abd79799db4735c8b94ef32bcf829321ad6
pillow
python-pillow/pillow
python
59780abd79799db4735c8b94ef32bcf829321ad6
**Title**: ICO Saving Function Ignores Different Bit Depths, Producing Identical File Sizes **Description**: When attempting to save multiple images with different bit depths into a single ICO file, the resulting file does not reflect the varying bit depths. Instead, all images are saved with the same bit depth, causi...
diff --git a/src/PIL/IcoImagePlugin.py b/src/PIL/IcoImagePlugin.py --- a/src/PIL/IcoImagePlugin.py +++ b/src/PIL/IcoImagePlugin.py @@ -41,52 +41,65 @@ def _save(im, fp, filename): fp.write(_MAGIC) # (2+2) + bmp = im.encoderinfo.get("bitmap_format") == "bmp" sizes = im.encoderinfo.get( "sizes",...
diff --git a/Tests/test_file_ico.py b/Tests/test_file_ico.py --- a/Tests/test_file_ico.py +++ b/Tests/test_file_ico.py @@ -83,6 +83,39 @@ im.save(temp_file2, "ico", sizes=sizes) assert os.path.getsize(temp_file) == os.path.getsize(temp_file2) + + +def test_different_bit_depths(tmp_path): + temp_file = st...
null
null
namanjain12/pillow_final:59780abd79799db4735c8b94ef32bcf829321ad6
true
null
1
67
null
1,261
0
0.75
1
0.525
1
0.4335
78.013
9,353
r2e_gym::train::4061
r2e_gym
train
4,061
coveragepy__169972546b699f01813131d5356d0edcfc739343
coveragepy
nedbat/coveragepy
python
169972546b699f01813131d5356d0edcfc739343
**Analysis:** - **Key Parts:** - **Commit Message:** "fix: improve an error message. #803" - **Commit Patch:** Updated exception messages in `coverage/sqldata.py` to be more descriptive. - **Test Results Before Commit:** Two tests failed because the actual error messages did not match the expected patterns. ...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -37,6 +37,10 @@ - It has a little more room for line numbers so that 4-digit numbers work well, fixing `issue 1124`_. +- Improved the error message when combining line and branch data, so that users + will be more likely to underst...
diff --git a/tests/test_data.py b/tests/test_data.py --- a/tests/test_data.py +++ b/tests/test_data.py @@ -159,13 +159,15 @@ def test_cant_add_arcs_with_lines(self): covdata = CoverageData() covdata.add_lines(LINES_1) - with pytest.raises(CoverageException, match="Can't add arcs to existin...
null
null
namanjain12/coveragepy_final:169972546b699f01813131d5356d0edcfc739343
true
null
2
8
null
2,431
0
0.75
1
0.525
1
0.431833
78.008
9,354
r2e_gym::train::5192
r2e_gym
train
5,192
pyramid__c231d8174e811eec5a3faeafa5aee60757c6d31f
pyramid
pylons/pyramid
python
c231d8174e811eec5a3faeafa5aee60757c6d31f
### ImportError: Cannot Import 'VIEW' from 'pyramid.viewderivers' #### Description After updating the constraints for view derivers, attempting to import the `VIEW` constant from `pyramid.viewderivers` results in an `ImportError`. This prevents certain tests from running successfully and disrupts the configuration of ...
diff --git a/docs/api/viewderivers.rst b/docs/api/viewderivers.rst --- a/docs/api/viewderivers.rst +++ b/docs/api/viewderivers.rst @@ -10,7 +10,8 @@ Constant representing the request ingress, for use in ``under`` arguments to :meth:`pyramid.config.Configurator.add_view_deriver`. - .. attribute:: MAPPE...
diff --git a/pyramid/tests/test_viewderivers.py b/pyramid/tests/test_viewderivers.py --- a/pyramid/tests/test_viewderivers.py +++ b/pyramid/tests/test_viewderivers.py @@ -1239,6 +1239,25 @@ self.assertFalse(flags.get('deriv1')) self.assertTrue(flags.get('deriv2')) + def test_override_mapped_view(...
null
null
namanjain12/pyramid_final:c231d8174e811eec5a3faeafa5aee60757c6d31f
true
null
4
100
null
1,222
0
0.75
1
0.6375
0.85
0.537
77.96725
9,355
r2e_gym::train::335
r2e_gym
train
335
orange3__e432eec88d904ac56ffdc72ff621539f0fdb1389
orange3
biolab/orange3
python
e432eec88d904ac56ffdc72ff621539f0fdb1389
**Analysis:** - **Key Parts:** - The commit fixes the renaming of variables in `OWColor`. - Two tests (`DiscAttrTest.test_create_variable` and `ContAttrDesc.test_create_variable`) failed in the old commit because `var.compute_value` was `None` instead of an instance of `Identity`. - **Main Problem:** - When ren...
diff --git a/Orange/widgets/data/owcolor.py b/Orange/widgets/data/owcolor.py --- a/Orange/widgets/data/owcolor.py +++ b/Orange/widgets/data/owcolor.py @@ -7,6 +7,7 @@ from AnyQt.QtWidgets import QHeaderView, QColorDialog, QTableView, QComboBox import Orange +from Orange.preprocess.transformation import Identity fr...
diff --git a/Orange/widgets/data/tests/test_owcolor.py b/Orange/widgets/data/tests/test_owcolor.py --- a/Orange/widgets/data/tests/test_owcolor.py +++ b/Orange/widgets/data/tests/test_owcolor.py @@ -8,6 +8,7 @@ from AnyQt.QtGui import QBrush from Orange.data import Table, ContinuousVariable, DiscreteVariable, Domai...
null
null
namanjain12/orange3_final:e432eec88d904ac56ffdc72ff621539f0fdb1389
true
null
1
7
null
2,367
0
0.75
1
0.525
1
0.417833
77.966
9,356
r2e_gym::train::5865
r2e_gym
train
5,865
tornado__85954d98378e99f13af4abda91aa7fd39dfcd4d6
tornado
tornadoweb/tornado
python
85954d98378e99f13af4abda91aa7fd39dfcd4d6
**Analysis:** - **Key Parts:** - The commit introduces support for renaming the XSRF cookie by accessing it from settings instead of using the hardcoded name "_xsrf". - A new test `XSRFCookieNameTest.test_xsrf_success_post_body` was added to verify the behavior with a custom cookie name. - In the old commit, thi...
diff --git a/docs/web.rst b/docs/web.rst --- a/docs/web.rst +++ b/docs/web.rst @@ -253,11 +253,20 @@ * ``xsrf_cookie_kwargs``: May be set to a dictionary of additional arguments to be passed to `.RequestHandler.set_cookie` for the XSRF cookie. + * ``xsrf_cookie_name``: Controls...
diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py --- a/tornado/test/web_test.py +++ b/tornado/test/web_test.py @@ -2919,6 +2919,65 @@ self.assertEqual(response.code, 200) +# A subset of the previous test with a different cookie name +class XSRFCookieNameTest(SimpleHandlerTestCase): + ...
null
null
namanjain12/tornado_final:85954d98378e99f13af4abda91aa7fd39dfcd4d6
true
null
2
15
null
2,204
0
0.75
1
0.525
1
0.417333
77.9645
9,357
swe_bench::dev::136
swe_bench
dev
136
pylint-dev__astroid-1364
pylint-dev/astroid
pylint-dev/astroid
python
9363c34934f94124f4867caf1bdf8f6755201ccd
MRO failure on Python 3.7 with typing_extensions ### Steps to reproduce Run the following script on Python 3.7: ```python from astroid import parse module = parse(""" import abc import typing import dataclasses import typing_extensions T = typing.TypeVar("T") class MyProtocol(typing_extensions.Protocol): pass clas...
diff --git a/astroid/const.py b/astroid/const.py --- a/astroid/const.py +++ b/astroid/const.py @@ -8,6 +8,8 @@ PY310_PLUS = sys.version_info >= (3, 10) BUILTINS = "builtins" # TODO Remove in 2.8 +WIN32 = sys.platform == "win32" + class Context(enum.Enum): Load = 1
diff --git a/tests/unittest_scoped_nodes.py b/tests/unittest_scoped_nodes.py --- a/tests/unittest_scoped_nodes.py +++ b/tests/unittest_scoped_nodes.py @@ -43,9 +43,9 @@ import pytest -from astroid import MANAGER, builder, nodes, objects, test_utils, util +from astroid import MANAGER, builder, nodes, objects, parse...
["tests/unittest_scoped_nodes.py::ModuleNodeTest::test_dict_interface", "tests/unittest_scoped_nodes.py::ModuleNodeTest::test_file_stream_api", "tests/unittest_scoped_nodes.py::ModuleNodeTest::test_file_stream_in_memory", "tests/unittest_scoped_nodes.py::ModuleNodeTest::test_file_stream_physical", "tests/unittest_scope...
[]
null
true
2022-01-20T10:00:25Z
1
2
123
1,971
0
0.8
1
1
0.4
0.335167
77.9555
9,358
r2e_gym::train::6274
r2e_gym
train
6,274
pillow__914950959bc4eb16faf0c53d79ea918591bc8082
pillow
python-pillow/pillow
python
914950959bc4eb16faf0c53d79ea918591bc8082
**Title:** TypeError Occurs When Loading JPEG with EXIF X-Resolution Data **Description:** When attempting to load a JPEG image that contains EXIF X-Resolution metadata, a `TypeError` is raised, interrupting the image processing workflow. **Example Code:** ```python from PIL import Image with Image.open("Tests/image...
diff --git a/docs/deprecations.rst b/docs/deprecations.rst --- a/docs/deprecations.rst +++ b/docs/deprecations.rst @@ -24,6 +24,43 @@ vulnerability introduced in FreeType 2.6 (:cve:`CVE-2020-15999`). .. _2.10.4: https://sourceforge.net/projects/freetype/files/freetype2/2.10.4/ + +Image.show command parameter +~~~~~...
diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py --- a/Tests/test_file_jpeg.py +++ b/Tests/test_file_jpeg.py @@ -466,7 +466,7 @@ assert len(im.quantization) == n reloaded = self.roundtrip(im, qtables="keep") assert im.quantization == reloaded.quantization...
null
null
namanjain12/pillow_final:914950959bc4eb16faf0c53d79ea918591bc8082
true
null
4
119
null
816
0
0.75
1
0.6375
0.85
0.532667
77.95425
9,359
r2e_gym::train::6271
r2e_gym
train
6,271
pillow__9abef1ad0ba8dd12dea0c1c565c27a2ddb14cc91
pillow
python-pillow/pillow
python
9abef1ad0ba8dd12dea0c1c565c27a2ddb14cc91
**Analysis:** - **Key Parts from Commit Details and Test Results:** - **Commit Message:** Merges a pull request that enhances the `getcolor` function to support HSV mode. - **Commit Patch:** Updates `Image.py` to mention HSV images and modifies `getcolor` in `ImageColor.py` to handle HSV mode by converting RGB to ...
diff --git a/src/PIL/Image.py b/src/PIL/Image.py --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2885,7 +2885,7 @@ :param color: What color to use for the image. Default is black. If given, this should be a single integer or floating point value for single-band modes, and a tuple for multi-band ...
diff --git a/Tests/test_imagecolor.py b/Tests/test_imagecolor.py --- a/Tests/test_imagecolor.py +++ b/Tests/test_imagecolor.py @@ -193,6 +193,10 @@ Image.new("LA", (1, 1), "white") +def test_color_hsv(): + assert (170, 255, 255) == ImageColor.getcolor("hsv(240, 100%, 100%)", "HSV") + + def test_color_too_l...
null
null
namanjain12/pillow_final:9abef1ad0ba8dd12dea0c1c565c27a2ddb14cc91
true
null
2
18
null
2,116
0
0.75
1
0.525
1
0.412667
77.9505
9,360
r2e_gym::train::369
r2e_gym
train
369
orange3__90e994605f5d81ef13103c2a7095bbd62c655da0
orange3
biolab/orange3
python
90e994605f5d81ef13103c2a7095bbd62c655da0
**Title:** Missing Free Variables in Lambda Expressions with Default Parameters **Description:** When analyzing lambda expressions that include default parameters, some free variables are not correctly identified. Specifically, variables used in default arguments are not being recognized as free variables, which can l...
diff --git a/Orange/widgets/data/owfeatureconstructor.py b/Orange/widgets/data/owfeatureconstructor.py --- a/Orange/widgets/data/owfeatureconstructor.py +++ b/Orange/widgets/data/owfeatureconstructor.py @@ -369,7 +369,7 @@ return super().data(index, role) -def freevars(exp, env): +def freevars(exp: ast...
diff --git a/Orange/widgets/data/tests/test_owfeatureconstructor.py b/Orange/widgets/data/tests/test_owfeatureconstructor.py --- a/Orange/widgets/data/tests/test_owfeatureconstructor.py +++ b/Orange/widgets/data/tests/test_owfeatureconstructor.py @@ -226,20 +226,34 @@ self.assertEqual(freevars_("{a, b}"), ["a"...
null
null
namanjain12/orange3_final:90e994605f5d81ef13103c2a7095bbd62c655da0
true
null
1
46
null
1,544
0
0.75
1
0.525
1
0.410667
77.9445
9,361
r2e_gym::train::5127
r2e_gym
train
5,127
pyramid__3063246aa418ae2008adb48ab9e5090a88be42d4
pyramid
pylons/pyramid
python
3063246aa418ae2008adb48ab9e5090a88be42d4
**Analysis:** - **Key Parts:** - **Commit Details:** The commit modifies the `remember` method in `RepozeWho1AuthenticationPolicy` to accept `**kw` and include them in the identity dictionary. - **Test Results:** The test `test_remember_kwargs` fails in the old commit because the `remember` method does not include...
diff --git a/pyramid/authentication.py b/pyramid/authentication.py --- a/pyramid/authentication.py +++ b/pyramid/authentication.py @@ -336,12 +336,19 @@ return effective_principals def remember(self, request, principal, **kw): - """ Store the ``principal`` as ``repoze.who.userid``.""" + ""...
diff --git a/pyramid/tests/test_authentication.py b/pyramid/tests/test_authentication.py --- a/pyramid/tests/test_authentication.py +++ b/pyramid/tests/test_authentication.py @@ -349,6 +349,14 @@ result = policy.remember(request, 'fred') self.assertEqual(result[0], request.environ) self.asser...
null
null
namanjain12/pyramid_final:3063246aa418ae2008adb48ab9e5090a88be42d4
true
null
1
11
null
2,239
0
0.75
1
0.525
1
0.409833
77.942
9,362
r2e_gym::train::5043
r2e_gym
train
5,043
datalad__4476540ed403fd0dea8e1d717ff85ae1d56ae6f3
datalad
datalad/datalad
python
4476540ed403fd0dea8e1d717ff85ae1d56ae6f3
**Title:** Automatic Metadata Extraction Fails to Exclude Columns Using Regular Expressions **Description:** When attempting to exclude certain columns from automatic metadata extraction using regular expressions, the system does not properly exclude the specified columns. This results in metadata being incorrectly in...
diff --git a/datalad/plugin/addurls.py b/datalad/plugin/addurls.py --- a/datalad/plugin/addurls.py +++ b/datalad/plugin/addurls.py @@ -289,7 +289,7 @@ def extract(stream, input_type, filename_format, url_format, - no_autometa, meta, missing_value): + exclude_autometa, meta, missing_value): ...
diff --git a/datalad/plugin/tests/test_addurls.py b/datalad/plugin/tests/test_addurls.py --- a/datalad/plugin/tests/test_addurls.py +++ b/datalad/plugin/tests/test_addurls.py @@ -189,7 +189,7 @@ json_stream(ST_DATA["rows"]), "json", "{age_group}//{now_dead}//{name}.csv", "{name}_{debut_season...
null
null
namanjain12/datalad_final:4476540ed403fd0dea8e1d717ff85ae1d56ae6f3
true
null
1
28
null
1,878
0
0.75
1
0.525
1
0.406333
77.9315
9,363
r2e_gym::train::17
r2e_gym
train
17
orange3__7c9de553a279791535aa8ec927bef47801b819f1
orange3
biolab/orange3
python
7c9de553a279791535aa8ec927bef47801b819f1
### Title DiscreteVariable.colors attribute saved as a list instead of a dictionary ### Description When assigning color attributes to a `DiscreteVariable` using a dictionary that maps each value to a hexadecimal color code, the colors are incorrectly saved as a list. This prevents proper retrieval of colors based on ...
diff --git a/Orange/widgets/utils/colorpalettes.py b/Orange/widgets/utils/colorpalettes.py --- a/Orange/widgets/utils/colorpalettes.py +++ b/Orange/widgets/utils/colorpalettes.py @@ -7,6 +7,7 @@ from AnyQt.QtCore import Qt from AnyQt.QtGui import QImage, QPixmap, QColor, QIcon +from Orange.data import Variable, Dis...
diff --git a/Orange/widgets/utils/tests/test_colorpalettes.py b/Orange/widgets/utils/tests/test_colorpalettes.py --- a/Orange/widgets/utils/tests/test_colorpalettes.py +++ b/Orange/widgets/utils/tests/test_colorpalettes.py @@ -7,6 +7,7 @@ from AnyQt.QtGui import QImage, QColor, QIcon from orangewidget.tests.base im...
null
null
namanjain12/orange3_final:7c9de553a279791535aa8ec927bef47801b819f1
true
null
1
61
null
1,214
0
0.75
1
0.525
1
0.405667
77.9295
9,364
r2e_gym::train::6626
r2e_gym
train
6,626
pillow__13fe1a5ba7c00f98cfa35b3c8a028f004dcf6d21
pillow
python-pillow/pillow
python
13fe1a5ba7c00f98cfa35b3c8a028f004dcf6d21
**Title**: PDF Info Dictionary Remains Empty When Appending Metadata **Description**: When appending metadata to a PDF using the `pdfParser`, the Info dictionary does not populate with the provided fields. For example, setting the "Producer" field fails to reflect in the parsed PDF information. **Example Code**: ```p...
diff --git a/src/PIL/PdfImagePlugin.py b/src/PIL/PdfImagePlugin.py --- a/src/PIL/PdfImagePlugin.py +++ b/src/PIL/PdfImagePlugin.py @@ -48,11 +48,31 @@ def _save(im, fp, filename, save_all=False): resolution = im.encoderinfo.get("resolution", 72.0) is_appending = im.encoderinfo.get("append", False) + title...
diff --git a/Tests/test_file_pdf.py b/Tests/test_file_pdf.py --- a/Tests/test_file_pdf.py +++ b/Tests/test_file_pdf.py @@ -7,16 +7,13 @@ class TestFilePdf(PillowTestCase): - def helper_save_as_pdf(self, mode, save_all=False): + def helper_save_as_pdf(self, mode, **kwargs): # Arrange im = ho...
null
null
namanjain12/pillow_final:13fe1a5ba7c00f98cfa35b3c8a028f004dcf6d21
true
null
2
77
null
884
0
0.75
1
0.525
1
0.404
77.9245
9,365
r2e_gym::train::5800
r2e_gym
train
5,800
tornado__5ae7327e3e2763746a9d936dd89b8bc1a8c9fb47
tornado
tornadoweb/tornado
python
5ae7327e3e2763746a9d936dd89b8bc1a8c9fb47
### Event loop is unexpectedly closed when not created by the test #### Description When a test utilizes an existing event loop provided by an external system, the event loop is closed after the test completes, even though the test did not create it. This unexpected closure causes other tests or parts of the applicati...
diff --git a/tornado/testing.py b/tornado/testing.py --- a/tornado/testing.py +++ b/tornado/testing.py @@ -74,6 +74,12 @@ import unittest # type: ignore +if asyncio is None: + _NON_OWNED_IOLOOPS = () +else: + import tornado.platform.asyncio + _NON_OWNED_IOLOOPS = tornado.platform.asyncio.AsyncIOM...
diff --git a/tornado/test/testing_test.py b/tornado/test/testing_test.py --- a/tornado/test/testing_test.py +++ b/tornado/test/testing_test.py @@ -10,6 +10,11 @@ import platform import traceback import warnings + +try: + import asyncio +except ImportError: + asyncio = None @contextlib.contextmanager @@ -3...
null
null
namanjain12/tornado_final:5ae7327e3e2763746a9d936dd89b8bc1a8c9fb47
true
null
1
29
null
1,836
0
0.75
1
0.525
1
0.402667
77.9205
9,366
r2e_gym::train::399
r2e_gym
train
399
orange3__5429e1c18b0c05147bc2781fb28ec1b984d07817
orange3
biolab/orange3
python
5429e1c18b0c05147bc2781fb28ec1b984d07817
**Title:** Table.concatenate does not retain the expected table name when concatenating horizontally **Description:** When concatenating multiple tables horizontally using `Table.concatenate`, the resulting table does not retain the expected name from the input tables. Specifically, even if one of the input tables has...
diff --git a/Orange/data/table.py b/Orange/data/table.py --- a/Orange/data/table.py +++ b/Orange/data/table.py @@ -898,11 +898,11 @@ @classmethod def concatenate(cls, tables, axis=0): """ - Concatenate tables into a new table, either horizontally or vertically. - - If axis=0 (horizontal...
diff --git a/Orange/data/tests/test_table.py b/Orange/data/tests/test_table.py --- a/Orange/data/tests/test_table.py +++ b/Orange/data/tests/test_table.py @@ -182,6 +182,18 @@ def test_concatenate_invalid_axis(self): self.assertRaises(ValueError, Table.concatenate, (), axis=2) + + def test_concatenat...
null
null
namanjain12/orange3_final:5429e1c18b0c05147bc2781fb28ec1b984d07817
true
null
1
58
null
1,255
0
0.75
1
0.525
1
0.4025
77.92
9,367
r2e_gym::train::5760
r2e_gym
train
5,760
scrapy__5bcb8fd5019c72d05c4a96da78a7fcb6ecb55b75
scrapy
scrapy/scrapy
python
5bcb8fd5019c72d05c4a96da78a7fcb6ecb55b75
**Title:** Authorization Header Not Removed on Cross-Domain Redirects **Description:** When a request is redirected to an external domain, the `RedirectMiddleware` fails to remove the `Authorization` header. This oversight can lead to sensitive authorization information being inadvertently sent to unintended external ...
diff --git a/docs/news.rst b/docs/news.rst --- a/docs/news.rst +++ b/docs/news.rst @@ -5,14 +5,25 @@ .. _release-2.11.1: -Scrapy 2.11.1 (YYYY-MM-DD) +Scrapy 2.11.1 (unreleased) -------------------------- Highlights: +- Security bug fixes. + - Support for Twisted >= 23.8.0. - Documentation improveme...
diff --git a/tests/test_downloadermiddleware_redirect.py b/tests/test_downloadermiddleware_redirect.py --- a/tests/test_downloadermiddleware_redirect.py +++ b/tests/test_downloadermiddleware_redirect.py @@ -246,6 +246,37 @@ req_result = self.mw.process_response(req, resp, self.spider) perc_encoded_utf...
null
null
namanjain12/scrapy_final:5bcb8fd5019c72d05c4a96da78a7fcb6ecb55b75
true
null
2
37
null
1,663
0
0.75
1
0.525
1
0.4005
77.914
9,368
swe_bench::test::1305
swe_bench
test
1,305
pydata__xarray-7147
pydata/xarray
pydata/xarray
python
9f390f50718ee94237084cbc1badb66f9a8083d6
Time decoding error message does not include the problematic variable's name ### What is your issue? If any variable in a Dataset has times that cannot be represented as `cftime.datetime` objects, an error message will be raised. However, this error message will not indicate the problematic variable's name. It would...
diff --git a/xarray/conventions.py b/xarray/conventions.py --- a/xarray/conventions.py +++ b/xarray/conventions.py @@ -519,16 +519,19 @@ def stackable(dim): and v.ndim > 0 and stackable(v.dims[-1]) ) - new_vars[k] = decode_cf_variable( - k, - v, - ...
diff --git a/xarray/tests/test_conventions.py b/xarray/tests/test_conventions.py --- a/xarray/tests/test_conventions.py +++ b/xarray/tests/test_conventions.py @@ -475,3 +475,9 @@ def test_scalar_units() -> None: actual = conventions.decode_cf_variable("t", var) assert_identical(actual, var) + + +def test_de...
["xarray/tests/test_conventions.py::test_decode_cf_error_includes_variable_name"]
["xarray/tests/test_conventions.py::TestBoolTypeArray::test_booltype_array", "xarray/tests/test_conventions.py::TestNativeEndiannessArray::test", "xarray/tests/test_conventions.py::test_decode_cf_with_conflicting_fill_missing_value", "xarray/tests/test_conventions.py::TestEncodeCFVariable::test_incompatible_attributes"...
null
true
2022-10-08T17:53:23Z
1
23
1
3,310
0.142857
0.8
1
0.77
1
0.576667
77.9105
9,369
r2e_gym::train::5164
r2e_gym
train
5,164
pyramid__bff312df8c36ac3ef5389a89c7459b282f944f77
pyramid
pylons/pyramid
python
bff312df8c36ac3ef5389a89c7459b282f944f77
**Title:** Plural Rules Not Loaded for Default 'messages' Domain Causing Incorrect Pluralization **Description:** When adding multiple message catalogs to the default 'messages' domain, the pluralization rules are not correctly updated. This leads to incorrect plural forms being used, which can cause misleading transl...
diff --git a/CHANGES.txt b/CHANGES.txt --- a/CHANGES.txt +++ b/CHANGES.txt @@ -149,6 +149,11 @@ from previous orders have executed. See https://github.com/Pylons/pyramid/pull/2757 +- Fix bug in i18n where the default domain would always use the Germanic plural + style, even if a different plural function is de...
diff --git a/pyramid/tests/test_i18n.py b/pyramid/tests/test_i18n.py --- a/pyramid/tests/test_i18n.py +++ b/pyramid/tests/test_i18n.py @@ -357,6 +357,36 @@ inst.add(inst2) self.assertEqual(inst._catalog['a'], 'b') + def test_add_default_domain_replaces_plural_first_time(self): + # Create t...
null
null
namanjain12/pyramid_final:bff312df8c36ac3ef5389a89c7459b282f944f77
true
null
2
17
null
2,028
0
0.75
1
0.525
1
0.394667
77.8965
9,370
r2e_gym::train::6416
r2e_gym
train
6,416
pillow__e91aedb65d2c4aaaf2ab807669fa29aa189ea8a3
pillow
python-pillow/pillow
python
e91aedb65d2c4aaaf2ab807669fa29aa189ea8a3
**Title:** Setting image size with scale does not emit deprecation warning and causes `load` to fail **Description:** When setting the size of an ICNS image using a tuple that includes a scale factor, the expected deprecation warning is not triggered. Additionally, attempting to load the image with a scale parameter r...
diff --git a/docs/deprecations.rst b/docs/deprecations.rst --- a/docs/deprecations.rst +++ b/docs/deprecations.rst @@ -121,6 +121,14 @@ vulnerability introduced in FreeType 2.6 (:cve:`2020-15999`). .. _2.10.4: https://sourceforge.net/projects/freetype/files/freetype2/2.10.4/ + +ICNS (width, height, scale) sizes +^^...
diff --git a/Tests/test_file_icns.py b/Tests/test_file_icns.py --- a/Tests/test_file_icns.py +++ b/Tests/test_file_icns.py @@ -63,8 +63,8 @@ assert_image_similar_tofile(im, temp_file, 1) with Image.open(temp_file) as reread: - reread.size = (16, 16, 2) - reread.load() + ...
null
null
namanjain12/pillow_final:e91aedb65d2c4aaaf2ab807669fa29aa189ea8a3
true
null
4
96
null
1,150
0
0.75
1
0.6375
0.85
0.511667
77.89125
9,371
r2e_gym::train::4029
r2e_gym
train
4,029
coveragepy__07b76b251138dd9bc8a2e2cd585fe822dc36785a
coveragepy
nedbat/coveragepy
python
07b76b251138dd9bc8a2e2cd585fe822dc36785a
After analyzing the commit and test results, the main issue revolves around the incorrect handling of clause exclusions in the coverage parser. Specifically, the test `test_excluding_bug1713` was failing because additional lines were being excluded unintentionally. The expected behavior was for only specific lines to b...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,9 +20,14 @@ Unreleased ---------- +- Fix: the change for multi-line signature exclusions in 7.3.3 broke other + forms of nested clauses being excluded properly. This is now fixed, closing + `issue 1713`_. + - Fix: in the HTML repo...
diff --git a/tests/coveragetest.py b/tests/coveragetest.py --- a/tests/coveragetest.py +++ b/tests/coveragetest.py @@ -193,7 +193,7 @@ # Get the analysis results, and check that they are right. analysis = cov._analyze(mod) statements = sorted(analysis.statements) - if lines is not None...
null
null
namanjain12/coveragepy_final:07b76b251138dd9bc8a2e2cd585fe822dc36785a
true
null
2
17
null
2,013
0
0.75
1
0.525
1
0.392167
77.889
9,372
r2e_gym::train::5025
r2e_gym
train
5,025
datalad__2df9d5fbce2dd5a23a60dc647caa20bdfcc8384a
datalad
datalad/datalad
python
2df9d5fbce2dd5a23a60dc647caa20bdfcc8384a
**[ISSUE]** **Title:** `eval_results` Decorator Fails to Log Decorated Function's Class Information **Description:** When applying the `eval_results` decorator to a method, the expected log message that identifies the class of the decorated function is missing. This absence causes tests that verify the logging behavi...
diff --git a/datalad/interface/utils.py b/datalad/interface/utils.py --- a/datalad/interface/utils.py +++ b/datalad/interface/utils.py @@ -12,6 +12,8 @@ __docformat__ = 'restructuredtext' +import wrapt +import sys import logging from os import curdir from os import pardir @@ -25,6 +27,7 @@ from os.path import ...
diff --git a/datalad/interface/tests/test_utils.py b/datalad/interface/tests/test_utils.py --- a/datalad/interface/tests/test_utils.py +++ b/datalad/interface/tests/test_utils.py @@ -349,7 +349,14 @@ def test_eval_results(): - result = Dataset('/does/not/matter').fake_command(3) + from datalad.utils import s...
null
null
namanjain12/datalad_final:2df9d5fbce2dd5a23a60dc647caa20bdfcc8384a
true
null
1
62
null
1,107
0
0.75
1
0.525
1
0.391167
77.886
9,373
swe_bench::test::1388
swe_bench
test
1,388
pytest-dev__pytest-11047
pytest-dev/pytest
pytest-dev/pytest
python
fbfd4b50050080413c8faca5368b9cb9b1ac9313
support sub-second granularity/precision in `--log-date-format` (strftime `%f`) ***tl;dr*** pytest processing strftime `%f` specifier from `--log-*-date-format` arguments would allow me to accurately merge log messages from disparate sub-systems ### What's the problem? Tests I run have pytest log messages that print ...
diff --git a/src/_pytest/logging.py b/src/_pytest/logging.py --- a/src/_pytest/logging.py +++ b/src/_pytest/logging.py @@ -5,7 +5,11 @@ import re from contextlib import contextmanager from contextlib import nullcontext +from datetime import datetime +from datetime import timedelta +from datetime import timezone fro...
diff --git a/testing/logging/test_reporting.py b/testing/logging/test_reporting.py --- a/testing/logging/test_reporting.py +++ b/testing/logging/test_reporting.py @@ -1234,3 +1234,100 @@ def test_log_cli_works(caplog): "WARNING disabled:test_log_disabling_works_with_log_cli.py:7 This string will be suppressed...
["testing/logging/test_reporting.py::test_date_format_percentf_log", "testing/logging/test_reporting.py::test_date_format_percentf_tz_log"]
["[100%]", "[", "[100%]------------------------------", "testing/logging/test_reporting.py::test_live_logging_suspends_capture[True]", "testing/logging/test_reporting.py::test_live_logging_suspends_capture[False]", "testing/logging/test_reporting.py::test_nothing_logged", "testing/logging/test_reporting.py::test_messag...
null
true
2023-05-28T11:13:56Z
1
28
2
4,270
0
0.8
1
0.47
1
0.593333
77.875
9,374
r2e_gym::train::4965
r2e_gym
train
4,965
datalad__041ad758b0971fa86995789e8821c0da70ba8a85
datalad
datalad/datalad
python
041ad758b0971fa86995789e8821c0da70ba8a85
**Title:** `getargspec` Fails to Retrieve Arguments for Wrapped Functions **Description:** When using `getargspec` on a function that has been decorated with a `wraps`-based decorator, it returns an empty list of arguments instead of the actual parameter names. This unexpected behavior makes it difficult to introspec...
diff --git a/datalad/utils.py b/datalad/utils.py --- a/datalad/utils.py +++ b/datalad/utils.py @@ -158,27 +158,58 @@ "ArgSpecFake", ["args", "varargs", "keywords", "defaults"]) -def getargspec(func, include_kwonlyargs=False): - """Minimal compat shim for getargspec deprecated in python 3. +def getargspec(fu...
diff --git a/datalad/tests/test_utils.py b/datalad/tests/test_utils.py --- a/datalad/tests/test_utils.py +++ b/datalad/tests/test_utils.py @@ -11,6 +11,8 @@ """ +from functools import wraps +import inspect import os import os.path as op import shutil @@ -49,6 +51,7 @@ file_basename, find_files, g...
null
null
namanjain12/datalad_final:041ad758b0971fa86995789e8821c0da70ba8a85
true
null
1
65
null
1,019
0
0.75
1
0.525
1
0.3865
77.872
9,375
r2e_gym::train::5356
r2e_gym
train
5,356
aiohttp__1d761e172bcb5314a9f9dbcf3e0fb1e1ea8c995b
aiohttp
aio-libs/aiohttp
python
1d761e172bcb5314a9f9dbcf3e0fb1e1ea8c995b
**Title:** Connections Tracked Per Host Despite No Per-Host Limit Configuration **Description:** When configuring the `BaseConnector` with `limit_per_host` set to `0` (indicating no limit per host), connections are still being tracked per host. This results in the internal `_acquired_per_host` dictionary containing co...
diff --git a/CHANGES/9756.misc.rst b/CHANGES/9756.misc.rst --- a/CHANGES/9756.misc.rst +++ b/CHANGES/9756.misc.rst @@ -0,0 +1 @@ +Improved performance of :py:class:`aiohttp.BaseConnector` when there is no ``limit_per_host`` -- by :user:`bdraco`. diff --git a/aiohttp/connector.py b/aiohttp/connector.py --- a/aiohttp/con...
diff --git a/tests/test_connector.py b/tests/test_connector.py --- a/tests/test_connector.py +++ b/tests/test_connector.py @@ -375,7 +375,7 @@ async def test_release_acquired(loop, key) -> None: proto = mock.Mock() - conn = aiohttp.BaseConnector(loop=loop, limit=5) + conn = aiohttp.BaseConnector(loop=loop...
null
null
namanjain12/aiohttp_final:1d761e172bcb5314a9f9dbcf3e0fb1e1ea8c995b
true
null
2
16
null
1,994
0
0.75
1
0.525
1
0.385667
77.8695
9,376
swe_bench::test::1512
swe_bench
test
1,512
scikit-learn__scikit-learn-10774
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
ccbf9975fcf1676f6ac4f311e388529d3a3c4d3f
return_X_y should be available on more dataset loaders/fetchers Version 0.18 added a `return_X_y` option to `load_iris` et al., but not to, for example, `fetch_kddcup99`. All dataset loaders that currently return Bunches should also be able to return (X, y).
Looks like a doable first issue - may I take it on? Sure. On 1 March 2018 at 12:59, Chris Catalfo <notifications@github.com> wrote: > Looks like a doable first issue - may I take it on? > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github....
diff --git a/sklearn/datasets/california_housing.py b/sklearn/datasets/california_housing.py --- a/sklearn/datasets/california_housing.py +++ b/sklearn/datasets/california_housing.py @@ -50,7 +50,8 @@ logger = logging.getLogger(__name__) -def fetch_california_housing(data_home=None, download_if_missing=True): +def...
diff --git a/sklearn/datasets/tests/test_20news.py b/sklearn/datasets/tests/test_20news.py --- a/sklearn/datasets/tests/test_20news.py +++ b/sklearn/datasets/tests/test_20news.py @@ -5,6 +5,8 @@ from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing im...
["sklearn/datasets/tests/test_lfw.py::test_load_fake_lfw_people"]
["sklearn/datasets/tests/test_base.py::test_data_home", "sklearn/datasets/tests/test_base.py::test_default_empty_load_files", "sklearn/datasets/tests/test_base.py::test_default_load_files", "sklearn/datasets/tests/test_base.py::test_load_files_w_categories_desc_and_encoding", "sklearn/datasets/tests/test_base.py::test_...
null
true
2018-03-08T02:48:49Z
6
92
1
259
0
0.8
1
0.55
0.85
0.349833
77.862
9,377
r2e_gym::train::4950
r2e_gym
train
4,950
datalad__36853566a3b20f0ce0f94367e4e3a6fa964c5dea
datalad
datalad/datalad
python
36853566a3b20f0ce0f94367e4e3a6fa964c5dea
**Analysis:** - **Key Commit Details:** - **Commit Message:** Restore handling of short options. - **Code Change:** Modified the `_get_option_tuples` method to properly handle short options instead of disabling abbreviations entirely. - **Test Results:** - **Before Commit:** The test `test_combined_short_option...
diff --git a/datalad/cmdline/main.py b/datalad/cmdline/main.py --- a/datalad/cmdline/main.py +++ b/datalad/cmdline/main.py @@ -67,9 +67,15 @@ # Don't accept abbreviations for long options. With py3.5 and above, we # could just use allow_abbrev=False. # - # See https://bugs.python.org/issue14910#msg204...
diff --git a/datalad/cmdline/tests/test_main.py b/datalad/cmdline/tests/test_main.py --- a/datalad/cmdline/tests/test_main.py +++ b/datalad/cmdline/tests/test_main.py @@ -131,6 +131,12 @@ in_('get', stdout) +def test_combined_short_option(): + stdout, stderr = run_main(['-fjson'], exit_code=2, expect_stderr...
null
null
namanjain12/datalad_final:36853566a3b20f0ce0f94367e4e3a6fa964c5dea
true
null
1
10
null
2,092
0
0.75
1
0.525
1
0.382
77.8585
9,378
r2e_gym::train::5108
r2e_gym
train
5,108
pyramid__3fb934e8d600018800932fb66d001f5bacdac2c8
pyramid
pylons/pyramid
python
3fb934e8d600018800932fb66d001f5bacdac2c8
**Title:** RequestParamPredicate Fails to Handle Multiple Constraints as Tuple **Description:** When using `RequestParamPredicate` with a tuple of constraints, the predicate does not correctly evaluate the presence and values of multiple request parameters. Additionally, the textual representation of the predicate doe...
diff --git a/pyramid/config/predicates.py b/pyramid/config/predicates.py --- a/pyramid/config/predicates.py +++ b/pyramid/config/predicates.py @@ -64,28 +64,35 @@ class RequestParamPredicate(object): def __init__(self, val, config): - name = val - v = None - if '=' in name: - ...
diff --git a/pyramid/tests/test_config/test_predicates.py b/pyramid/tests/test_config/test_predicates.py --- a/pyramid/tests/test_config/test_predicates.py +++ b/pyramid/tests/test_config/test_predicates.py @@ -117,6 +117,20 @@ result = inst(None, request) self.assertTrue(result) + def test___cal...
null
null
namanjain12/pyramid_final:3fb934e8d600018800932fb66d001f5bacdac2c8
true
null
1
51
null
1,261
0
0.75
1
0.525
1
0.380167
77.853
9,379
swe_bench::dev::104
swe_bench
dev
104
pydicom__pydicom-1694
pydicom/pydicom
pydicom/pydicom
python
f8cf45b6c121e5a4bf4a43f71aba3bc64af3db9c
Dataset.to_json_dict can still generate exceptions when suppress_invalid_tags=True **Describe the bug** I'm using `Dataset.to_json_dict(suppress_invalid_tags=True)` and can live with losing invalid tags. Unfortunately, I can still trigger an exception with something like `2.0` in an `IS` field. **Expected behavior**...
diff --git a/pydicom/dataset.py b/pydicom/dataset.py --- a/pydicom/dataset.py +++ b/pydicom/dataset.py @@ -2492,8 +2492,8 @@ def to_json_dict( json_dataset = {} for key in self.keys(): json_key = '{:08X}'.format(key) - data_element = self[key] try: + ...
diff --git a/pydicom/tests/test_json.py b/pydicom/tests/test_json.py --- a/pydicom/tests/test_json.py +++ b/pydicom/tests/test_json.py @@ -7,7 +7,7 @@ from pydicom import dcmread from pydicom.data import get_testdata_file -from pydicom.dataelem import DataElement +from pydicom.dataelem import DataElement, RawDataEl...
["pydicom/tests/test_json.py::TestDataSetToJson::test_suppress_invalid_tags_with_failed_dataelement"]
["pydicom/tests/test_json.py::TestPersonName::test_json_pn_from_file", "pydicom/tests/test_json.py::TestPersonName::test_pn_components_to_json", "pydicom/tests/test_json.py::TestPersonName::test_pn_components_from_json", "pydicom/tests/test_json.py::TestPersonName::test_empty_value", "pydicom/tests/test_json.py::TestPe...
null
true
2022-09-20T18:52:53Z
1
2
1
1,762
0
0.8
1
1
0.4
0.300333
77.851
9,380
swe_bench::dev::36
swe_bench
dev
36
pvlib__pvlib-python-1296
pvlib/pvlib-python
pvlib/pvlib-python
python
bc0f0ff4e8580797af6672ff7c590caa1c78d6ed
Add a model for spectral corrections **Additional context** First of all, I introduce myself, my name is Jose Antonio Caballero, and I have recently finished my PhD in photovoltaic engineering at the University of Jaén, Spain. I have developed a python script to apply spectral corrections as a function of AM, AOD, PW ...
Hello @Jacc0027 and welcome to this community. I would welcome submission of a function implementing that model. It differs from the existing functions by including parameters for perovskite cells. It would need to be coded as a function similar to [first_solar_spectral_correction](https://github.com/pvlib/pvlib-...
diff --git a/pvlib/spectrum/__init__.py b/pvlib/spectrum/__init__.py --- a/pvlib/spectrum/__init__.py +++ b/pvlib/spectrum/__init__.py @@ -3,6 +3,7 @@ calc_spectral_mismatch_field, get_am15g, get_example_spectral_response, + spectral_factor_caballero, spectral_factor_firstsolar, spectral_fac...
diff --git a/pvlib/tests/test_spectrum.py b/pvlib/tests/test_spectrum.py --- a/pvlib/tests/test_spectrum.py +++ b/pvlib/tests/test_spectrum.py @@ -271,3 +271,47 @@ def test_spectral_factor_sapm(sapm_module_params, airmass, expected): assert_series_equal(out, expected, check_less_precise=4) else: ...
["pvlib/tests/test_spectrum.py::test_spectral_factor_caballero[asi-expected0]", "pvlib/tests/test_spectrum.py::test_spectral_factor_caballero[perovskite-expected1]", "pvlib/tests/test_spectrum.py::test_spectral_factor_caballero[cdte-expected2]", "pvlib/tests/test_spectrum.py::test_spectral_factor_caballero[multisi-expe...
["pvlib/tests/test_spectrum.py::test_spectrl2", "pvlib/tests/test_spectrum.py::test_spectrl2_array", "pvlib/tests/test_spectrum.py::test_spectrl2_series", "pvlib/tests/test_spectrum.py::test_dayofyear_missing", "pvlib/tests/test_spectrum.py::test_aoi_gt_90", "pvlib/tests/test_spectrum.py::test_get_example_spectral_resp...
null
true
2021-08-26T16:50:46Z
2
121
9
1,070
0
0.8
1
0.4
1
0.581667
77.845
9,381
r2e_gym::train::40
r2e_gym
train
40
orange3__fcf24c6b45b9042cb1cbb00419bc71383b714ea5
orange3
biolab/orange3
python
fcf24c6b45b9042cb1cbb00419bc71383b714ea5
**Title:** Incorrect Handling of Date-Only Strings in Time Variable Parsing **Description:** When parsing a list of date strings that do not include time components, the system fails to recognize the presence of dates correctly. This results in the `have_date` attribute being set to `False`, even though the input clea...
diff --git a/Orange/widgets/data/oweditdomain.py b/Orange/widgets/data/oweditdomain.py --- a/Orange/widgets/data/oweditdomain.py +++ b/Orange/widgets/data/oweditdomain.py @@ -2527,8 +2527,16 @@ def time_parse(values: Sequence[str], name="__"): tvar = Orange.data.TimeVariable(name) parse_time = ftry(tvar.pars...
diff --git a/Orange/widgets/data/tests/test_oweditdomain.py b/Orange/widgets/data/tests/test_oweditdomain.py --- a/Orange/widgets/data/tests/test_oweditdomain.py +++ b/Orange/widgets/data/tests/test_oweditdomain.py @@ -8,6 +8,7 @@ import numpy as np from numpy.testing import assert_array_equal +import pandas as pd ...
null
null
namanjain12/orange3_final:fcf24c6b45b9042cb1cbb00419bc71383b714ea5
true
null
1
28
null
1,700
0
0.75
1
0.525
1
0.376667
77.8425
9,382
r2e_gym::train::6026
r2e_gym
train
6,026
tornado__9bad9e5d24247cdf54bf36784ad543164cb2d908
tornado
tornadoweb/tornado
python
9bad9e5d24247cdf54bf36784ad543164cb2d908
**Title:** `url_concat` Incorrectly Appends Parameters After URL Fragments and Missing Trailing Ampersands **Description:** The `url_concat` function fails to properly handle URLs that include fragments or lack trailing ampersands when concatenating additional query parameters. This results in malformed URLs where que...
diff --git a/tornado/httputil.py b/tornado/httputil.py --- a/tornado/httputil.py +++ b/tornado/httputil.py @@ -38,11 +38,12 @@ if PY3: import http.cookies as Cookie from http.client import responses - from urllib.parse import urlencode + from urllib.parse import urlencode, urlparse, urlunparse, parse_q...
diff --git a/tornado/test/httputil_test.py b/tornado/test/httputil_test.py --- a/tornado/test/httputil_test.py +++ b/tornado/test/httputil_test.py @@ -43,14 +43,14 @@ "https://localhost/path?x", [('y', 'y'), ('z', 'z')], ) - self.assertEqual(url, "https://localhost/path?x&y=y&z...
null
null
namanjain12/tornado_final:9bad9e5d24247cdf54bf36784ad543164cb2d908
true
null
1
28
null
1,695
0
0.75
1
0.525
1
0.375833
77.84
9,383
r2e_gym::train::38
r2e_gym
train
38
orange3__7ed8c4f21f672008a8f0c0b9bafc00b368b36e31
orange3
biolab/orange3
python
7ed8c4f21f672008a8f0c0b9bafc00b368b36e31
**Title:** Confusion Matrix Widget Fails to Maintain Minimum Size When Displaying Sum of Probabilities **Description:** After adding the "Sum of probabilities" option to the Confusion Matrix widget, selecting this option causes the widget to not adhere to its expected minimum size. This results in layout issues where ...
diff --git a/Orange/widgets/evaluate/owconfusionmatrix.py b/Orange/widgets/evaluate/owconfusionmatrix.py --- a/Orange/widgets/evaluate/owconfusionmatrix.py +++ b/Orange/widgets/evaluate/owconfusionmatrix.py @@ -99,7 +99,13 @@ quantities = ["Number of instances", "Proportion of predicted", - ...
diff --git a/Orange/widgets/evaluate/tests/test_owconfusionmatrix.py b/Orange/widgets/evaluate/tests/test_owconfusionmatrix.py --- a/Orange/widgets/evaluate/tests/test_owconfusionmatrix.py +++ b/Orange/widgets/evaluate/tests/test_owconfusionmatrix.py @@ -9,7 +9,7 @@ ShuffleSplit, Results from Orange.widgets.evalu...
null
null
namanjain12/orange3_final:7ed8c4f21f672008a8f0c0b9bafc00b368b36e31
true
null
1
56
null
1,123
0
0.75
1
0.525
1
0.373833
77.834
9,384
r2e_gym::train::5423
r2e_gym
train
5,423
aiohttp__d9c65b97afe64d2c27e46421dc115c80535930ca
aiohttp
aio-libs/aiohttp
python
d9c65b97afe64d2c27e46421dc115c80535930ca
**Title: Incorrect Calculation of Available Connections in BaseConnector** **Description** When managing connections with specific limits, the `BaseConnector` incorrectly calculates the number of available connections. This leads to unexpected behavior when attempting to acquire new connections beyond the perceived av...
diff --git a/aiohttp/connector.py b/aiohttp/connector.py --- a/aiohttp/connector.py +++ b/aiohttp/connector.py @@ -484,14 +484,20 @@ available. """ # check total available connections - if self._limit and (available := self._limit - len(self._acquired)) <= 0: - return availa...
diff --git a/tests/test_connector.py b/tests/test_connector.py --- a/tests/test_connector.py +++ b/tests/test_connector.py @@ -47,7 +47,13 @@ @pytest.fixture -def ssl_key(): +def other_host_key2() -> ConnectionKey: + # Connection key + return ConnectionKey("otherhost", 80, False, True, None, None, None) + + ...
null
null
namanjain12/aiohttp_final:d9c65b97afe64d2c27e46421dc115c80535930ca
true
null
1
18
null
1,879
0
0.75
1
0.525
1
0.373167
77.832
9,385
r2e_gym::train::4053
r2e_gym
train
4,053
coveragepy__f12672d37060f986246e5cb13dfd036ab09eb70b
coveragepy
nedbat/coveragepy
python
f12672d37060f986246e5cb13dfd036ab09eb70b
**Analysis:** - **Key Parts:** - **Commit Message:** Automatically setting `timid=True` for plugins to avoid manual configuration cleanup. - **Test Results:** Before the commit, `LoadPluginsTest.test_implicit_boolean` failed because `Plugins.load_plugins([], config)` was expected to be `False` but returned a truth...
diff --git a/coverage/control.py b/coverage/control.py --- a/coverage/control.py +++ b/coverage/control.py @@ -15,14 +15,13 @@ from coverage.config import CoverageConfig from coverage.data import CoverageData from coverage.debug import DebugControl -from coverage.plugin import CoveragePlugin from coverage.files imp...
diff --git a/tests/test_plugins.py b/tests/test_plugins.py --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -31,6 +31,21 @@ class LoadPluginsTest(CoverageTest): """Test Plugins.load_plugins directly.""" + + def test_implicit_boolean(self): + self.make_file("plugin1.py", """\ + fro...
null
null
namanjain12/coveragepy_final:f12672d37060f986246e5cb13dfd036ab09eb70b
true
null
1
14
null
1,911
0
0.75
1
0.525
1
0.365167
77.808
9,386
r2e_gym::train::5274
r2e_gym
train
5,274
aiohttp__f99348b989eb9741e7f19412045a685308db15a3
aiohttp
aio-libs/aiohttp
python
f99348b989eb9741e7f19412045a685308db15a3
**Connector Cleanup Tasks Not Scheduled Correctly, Leading to Resource Leaks** **Description:** In the `aiohttp` library, when initializing a `BaseConnector` with a `keepalive_timeout`, the cleanup tasks responsible for managing active connections are not being scheduled properly. Specifically, the `call_at` method of...
diff --git a/aiohttp/connector.py b/aiohttp/connector.py --- a/aiohttp/connector.py +++ b/aiohttp/connector.py @@ -8,6 +8,7 @@ import traceback import warnings +from math import ceil from . import hdrs from .client import ClientRequest @@ -160,31 +161,38 @@ now = self._loop.time() connection...
diff --git a/tests/test_connector.py b/tests/test_connector.py --- a/tests/test_connector.py +++ b/tests/test_connector.py @@ -374,13 +374,14 @@ def test_start_cleanup_task(self): loop = unittest.mock.Mock() - conn = aiohttp.BaseConnector(loop=loop) + loop.time.return_value = 1.5 + ...
null
null
namanjain12/aiohttp_final:f99348b989eb9741e7f19412045a685308db15a3
true
null
1
26
null
1,647
0
0.75
1
0.525
1
0.361167
77.796
9,387
r2e_gym::train::107
r2e_gym
train
107
orange3__be3a9ff73b14b763a7094a1c99272f521da94bfa
orange3
biolab/orange3
python
be3a9ff73b14b763a7094a1c99272f521da94bfa
**Title:** DiscreteVariable.colors Stored as List Instead of Dictionary **Description:** When assigning colors to a `DiscreteVariable`, the colors are saved as a list in the `attributes["colors"]` instead of a dictionary that maps each value to its corresponding color. This leads to inconsistencies, especially when tr...
diff --git a/Orange/widgets/utils/colorpalettes.py b/Orange/widgets/utils/colorpalettes.py --- a/Orange/widgets/utils/colorpalettes.py +++ b/Orange/widgets/utils/colorpalettes.py @@ -7,6 +7,7 @@ from AnyQt.QtCore import Qt from AnyQt.QtGui import QImage, QPixmap, QColor, QIcon +from Orange.data import Variable, Dis...
diff --git a/Orange/widgets/utils/tests/test_colorpalettes.py b/Orange/widgets/utils/tests/test_colorpalettes.py --- a/Orange/widgets/utils/tests/test_colorpalettes.py +++ b/Orange/widgets/utils/tests/test_colorpalettes.py @@ -7,6 +7,7 @@ from AnyQt.QtGui import QImage, QColor, QIcon from orangewidget.tests.base im...
null
null
namanjain12/orange3_final:be3a9ff73b14b763a7094a1c99272f521da94bfa
true
null
1
60
null
962
0
0.75
1
0.525
1
0.360333
77.7935
9,388
r2e_gym::train::4958
r2e_gym
train
4,958
datalad__9ba5de094ea326e6fd5773f21c7de1776ec0fa69
datalad
datalad/datalad
python
9ba5de094ea326e6fd5773f21c7de1776ec0fa69
**Title:** Decorated `eval_results` function returns `FunctionWrapper` instead of expected results **Description:** When using the `eval_results` decorator, the decorated function unexpectedly returns a `FunctionWrapper` instead of the intended list of results. This behavior causes tests that expect a list to fail, as...
diff --git a/datalad/interface/utils.py b/datalad/interface/utils.py --- a/datalad/interface/utils.py +++ b/datalad/interface/utils.py @@ -766,7 +766,7 @@ import wrapt -def eval_results(switch): +def eval_results(func): """Decorator providing functionality to evaluate return values of datalad commands ...
diff --git a/datalad/interface/tests/test_utils.py b/datalad/interface/tests/test_utils.py --- a/datalad/interface/tests/test_utils.py +++ b/datalad/interface/tests/test_utils.py @@ -17,6 +17,7 @@ from os.path import relpath from nose.tools import assert_raises, assert_equal from datalad.tests.utils import with_temp...
null
null
namanjain12/datalad_final:9ba5de094ea326e6fd5773f21c7de1776ec0fa69
true
null
1
46
null
1,226
0
0.75
1
0.525
1
0.357667
77.7855
9,389
r2e_gym::train::6460
r2e_gym
train
6,460
pillow__b2b3b62be7248043da7716c0ea5e6b56f58e6c90
pillow
python-pillow/pillow
python
b2b3b62be7248043da7716c0ea5e6b56f58e6c90
**Title:** PNG `save_all` Ignores Modes of Appended Frames **Description:** When saving a PNG image with multiple frames of different modes using the `save_all=True` parameter, the resulting image does not reflect the modes of the appended frames upon reloading. Specifically, the mode remains `'L'` (grayscale) instead...
diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py --- a/src/PIL/PngImagePlugin.py +++ b/src/PIL/PngImagePlugin.py @@ -1089,28 +1089,28 @@ self.seq_num += 1 -def _write_multiple_frames(im, fp, chunk, rawmode): - default_image = im.encoderinfo.get("default_image", im.info.get("default_ima...
diff --git a/Tests/test_file_apng.py b/Tests/test_file_apng.py --- a/Tests/test_file_apng.py +++ b/Tests/test_file_apng.py @@ -648,6 +648,16 @@ im.seek(0) +@pytest.mark.parametrize("mode", ("RGBA", "RGB", "P")) +def test_different_modes_in_later_frames(mode, tmp_path): + test_file = str(tmp_path / "temp...
null
null
namanjain12/pillow_final:b2b3b62be7248043da7716c0ea5e6b56f58e6c90
true
null
1
41
null
1,295
0
0.75
1
0.525
1
0.3525
77.77
9,390
r2e_gym::train::6310
r2e_gym
train
6,310
pillow__e37a8a263d44281c2549cfdb5e69f27444acdff2
pillow
python-pillow/pillow
python
e37a8a263d44281c2549cfdb5e69f27444acdff2
**Title:** Saving ICO with `append_images` Results in Mismatched Image Content **Description:** When attempting to save an ICO file using the `append_images` parameter to include additional image sizes, the appended images are not correctly incorporated into the ICO file. As a result, upon reopening the saved ICO, the...
diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst --- a/docs/handbook/image-file-formats.rst +++ b/docs/handbook/image-file-formats.rst @@ -127,8 +127,8 @@ images in the list can be single or multiframe images. This is currently supported for GIF, PDF, PNG, TIFF, and Web...
diff --git a/Tests/test_file_ico.py b/Tests/test_file_ico.py --- a/Tests/test_file_ico.py +++ b/Tests/test_file_ico.py @@ -86,6 +86,20 @@ assert im_saved.info["sizes"] == {(16, 16), (24, 24), (32, 32), (48, 48)} +def test_save_append_images(tmp_path): + # append_images should be used for scaled down ver...
null
null
namanjain12/pillow_final:e37a8a263d44281c2549cfdb5e69f27444acdff2
true
null
2
22
null
1,657
0
0.75
1
0.525
1
0.3495
77.761
9,391
r2e_gym::train::4064
r2e_gym
train
4,064
coveragepy__c44bbcd1d86e6c4192988f20319d9e3c94e263b6
coveragepy
nedbat/coveragepy
python
c44bbcd1d86e6c4192988f20319d9e3c94e263b6
**Title:** Lack of Clear Error Message When Specified Configuration File Is Unreadable **Description:** When a user explicitly provides a configuration file that cannot be read—either because the file does not exist or due to insufficient permissions—the system fails to display a clear and informative error message. T...
diff --git a/CHANGES.txt b/CHANGES.txt --- a/CHANGES.txt +++ b/CHANGES.txt @@ -27,6 +27,9 @@ column is a "partial branches" column so that both reports show the same numbers. This closes `issue 342`_. +- If you specify a ``--rcfile`` that cannot be read, you will get an error + message. Fixes `issue 343`_. +...
diff --git a/tests/test_config.py b/tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -91,13 +91,18 @@ self.assertEqual(cov.config.data_file, "fromarg.dat") def test_parse_errors(self): - # Im-parseable values raise CoverageException - self.make_file(".coverager...
null
null
namanjain12/coveragepy_final:c44bbcd1d86e6c4192988f20319d9e3c94e263b6
true
null
3
44
null
1,209
0
0.75
1
0.525
1
0.348167
77.757
9,392
r2e_gym::train::258
r2e_gym
train
258
orange3__09df730fdec7230f6994971d7de241a6b784e23b
orange3
biolab/orange3
python
09df730fdec7230f6994971d7de241a6b784e23b
**[ISSUE]** **Title:** Multiple Deepcopy Operations on Attributes During Table Transformations **Description:** When performing transformations on a `Table` object, the attributes dictionary is being deepcopied multiple times. This leads to unnecessary overhead and can negatively impact performance, especially during...
diff --git a/Orange/data/table.py b/Orange/data/table.py --- a/Orange/data/table.py +++ b/Orange/data/table.py @@ -792,6 +792,16 @@ :return: a new table :rtype: Orange.data.Table """ + if domain is source.domain: + table = cls.from_table_rows(source, row_indices) + ...
diff --git a/Orange/tests/test_table.py b/Orange/tests/test_table.py --- a/Orange/tests/test_table.py +++ b/Orange/tests/test_table.py @@ -2068,6 +2068,24 @@ # attributes dict of old table not be changed since new dist is a copy self.assertDictEqual(self.table.attributes, {"A": "Test", "B": []}) + ...
null
null
namanjain12/orange3_final:09df730fdec7230f6994971d7de241a6b784e23b
true
null
1
28
null
1,527
0
0.75
1
0.525
1
0.347833
77.756
9,393
r2e_gym::train::5056
r2e_gym
train
5,056
datalad__ad61af78abf25aad6c0d1d569b0da1e2a769ba06
datalad
datalad/datalad
python
ad61af78abf25aad6c0d1d569b0da1e2a769ba06
**Title:** Interface substitutions fail with nested brackets in PY&CMD doc markups **Description:** When using nested brackets or multiline content within PY and CMD markup in documentation, the substitution process does not properly remove the markup tags. This results in leftover `PY` and `CMD` tags in the generated...
diff --git a/changelog.d/pr-7226.md b/changelog.d/pr-7226.md --- a/changelog.d/pr-7226.md +++ b/changelog.d/pr-7226.md @@ -0,0 +1,6 @@ +### 🐛 Bug Fixes + +- Interface-specific (python vs CLI) doc generation for commands and their parameters was broken when brackets were used within the interface markups. + Fixes [#7...
diff --git a/datalad/cli/tests/test_interface.py b/datalad/cli/tests/test_interface.py --- a/datalad/cli/tests/test_interface.py +++ b/datalad/cli/tests/test_interface.py @@ -28,6 +28,12 @@ assert_in('a b', alt) assert_in('not\n reflowed', alt) assert_in("Something for the cmdline only Multiline!", alt...
null
null
namanjain12/datalad_final:ad61af78abf25aad6c0d1d569b0da1e2a769ba06
true
null
3
18
null
1,726
0
0.75
1
0.525
1
0.347667
77.7555
9,394
r2e_gym::train::277
r2e_gym
train
277
orange3__08ac250e547808210bae804464bb775dbed3fe30
orange3
biolab/orange3
python
08ac250e547808210bae804464bb775dbed3fe30
**Title:** OWPLS Widget Generates Incorrect Predictions Due to Coefficient Misalignment with sklearn’s PLSRegression **Description:** When using the OWPLS widget to perform Partial Least Squares (PLS) regression, the predicted values significantly differ from those produced by sklearn’s PLSRegression. This issue arise...
diff --git a/Orange/widgets/model/owpls.py b/Orange/widgets/model/owpls.py --- a/Orange/widgets/model/owpls.py +++ b/Orange/widgets/model/owpls.py @@ -68,15 +68,15 @@ def _create_output_coeffs_loadings(self) -> Table: intercept = self.model.intercept.T[None, :] - coefficients = self.model.coeffic...
diff --git a/Orange/widgets/model/tests/test_owpls.py b/Orange/widgets/model/tests/test_owpls.py --- a/Orange/widgets/model/tests/test_owpls.py +++ b/Orange/widgets/model/tests/test_owpls.py @@ -1,5 +1,6 @@ import unittest import numpy as np +from sklearn.cross_decomposition import PLSRegression from Orange.data i...
null
null
namanjain12/orange3_final:08ac250e547808210bae804464bb775dbed3fe30
true
null
2
20
null
1,685
0
0.75
1
0.525
1
0.3475
77.755
9,395
r2e_gym::train::5633
r2e_gym
train
5,633
scrapy__30fb54f47e0c130010db53c6e5f9b668e1e41a86
scrapy
scrapy/scrapy
python
30fb54f47e0c130010db53c6e5f9b668e1e41a86
**Title:** Exceptions in Contract Pre/Post Processing Are Swallowed Due to Return in Finally Block **Description:** When a contract's `pre_process` or `post_process` method raises an exception like `KeyboardInterrupt`, the exception is not propagated as expected. This behavior prevents proper handling of critical inte...
diff --git a/scrapy/contracts/__init__.py b/scrapy/contracts/__init__.py --- a/scrapy/contracts/__init__.py +++ b/scrapy/contracts/__init__.py @@ -38,9 +38,7 @@ assert cb is not None @wraps(cb) - def wrapper( # pylint: disable=inconsistent-return-statements - respo...
diff --git a/tests/test_contracts.py b/tests/test_contracts.py --- a/tests/test_contracts.py +++ b/tests/test_contracts.py @@ -556,3 +556,61 @@ requests = self.conman.from_spider(spider, self.results) self.assertTrue(requests) + + +class CustomFailContractPreProcess(Contract): + name = "test_cont...
null
null
namanjain12/scrapy_final:30fb54f47e0c130010db53c6e5f9b668e1e41a86
true
null
1
22
null
1,637
0
0.75
1
0.525
1
0.346167
77.751
9,396
r2e_gym::train::5094
r2e_gym
train
5,094
pyramid__e77b72dc3a0890911514ad8aab8c8bf26c4591d0
pyramid
pylons/pyramid
python
e77b72dc3a0890911514ad8aab8c8bf26c4591d0
**Title:** Inconsistent HTTP Status Messages for CSRF Exceptions **Description:** When handling Cross-Site Request Forgery (CSRF) exceptions, the HTTP status messages returned are inconsistent with standard bad request responses. Specifically, raising `BadCSRFOrigin` or `BadCSRFToken` results in status messages like `...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -44,6 +44,13 @@ See https://github.com/Pylons/pyramid/pull/3741/files +- Applications raising ``pyramid.exceptions.BadCSRFToken`` and + ``pyramid.exceptions.BadCSRFOrigin`` were returning invalid HTTP status + lines with values like ...
diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -16,12 +16,22 @@ self.assertTrue(one is two) +class TestBadCSRFOrigin(unittest.TestCase): + def test_response_equivalence(self): + from pyramid.exceptions import BadCS...
null
null
namanjain12/pyramid_final:e77b72dc3a0890911514ad8aab8c8bf26c4591d0
true
null
2
29
null
1,488
0
0.75
1
0.525
1
0.344667
77.7465
9,397
r2e_gym::train::436
r2e_gym
train
436
orange3__b08fc7e897d38f85d19823221e420a8d6d7beddb
orange3
biolab/orange3
python
b08fc7e897d38f85d19823221e420a8d6d7beddb
**Title:** Incorrect Data Type Inference for Date and Time Variables **Description:** When passing date strings to the data type guessing function, the system incorrectly identifies them as discrete variables instead of time variables. This misclassification leads to improper handling of temporal data. **Example Bugg...
diff --git a/Orange/data/io.py b/Orange/data/io.py --- a/Orange/data/io.py +++ b/Orange/data/io.py @@ -145,30 +145,39 @@ """ valuemap, values = None, orig_values is_discrete = is_discrete_values(orig_values) + orig_values = np.asarray(orig_values, dtype=str) + if namask is None: + namask = i...
diff --git a/Orange/data/tests/test_io.py b/Orange/data/tests/test_io.py --- a/Orange/data/tests/test_io.py +++ b/Orange/data/tests/test_io.py @@ -1,7 +1,8 @@ import unittest import numpy as np -from Orange.data import ContinuousVariable, DiscreteVariable, StringVariable +from Orange.data import ContinuousVariable,...
null
null
namanjain12/orange3_final:b08fc7e897d38f85d19823221e420a8d6d7beddb
true
null
2
56
null
911
0
0.75
1
0.525
1
0.3385
77.728
9,398
r2e_gym::train::4900
r2e_gym
train
4,900
datalad__fa874ed5848057a15516f4d1f74b0aae71e5e8da
datalad
datalad/datalad
python
fa874ed5848057a15516f4d1f74b0aae71e5e8da
**Title:** Conditional Markers 'CMD' and 'PY' Not Fully Removed from Documentation **Description:** When processing interface documentation, the conditional markers for command line and Python sections are not being entirely removed. This results in leftover markers like `CMD` and `PY` appearing in the final documenta...
diff --git a/datalad/interface/base.py b/datalad/interface/base.py --- a/datalad/interface/base.py +++ b/datalad/interface/base.py @@ -78,14 +78,24 @@ docs = dedent_docstring(docs) # clean cmdline sections docs = re.sub( - '\|\| Command line use only \>\>.*\<\< Command line use only \|\|', + ...
diff --git a/datalad/interface/tests/test_docs.py b/datalad/interface/tests/test_docs.py --- a/datalad/interface/tests/test_docs.py +++ b/datalad/interface/tests/test_docs.py @@ -27,17 +27,17 @@ ping pong ping pong ping pong. Ping pong ping pong ping pong ping pong. Ping pong ping pong ping pong ping pong. ...
null
null
namanjain12/datalad_final:fa874ed5848057a15516f4d1f74b0aae71e5e8da
true
null
1
32
null
1,391
0
0.75
1
0.525
1
0.3385
77.728
9,399
r2e_gym::train::6167
r2e_gym
train
6,167
pillow__eb4f669b34ab822163be19325170f1948bdc5301
pillow
python-pillow/pillow
python
eb4f669b34ab822163be19325170f1948bdc5301
**Title:** XPM Image Loading Results in Scrambled Pixels and High Pixel Difference **Description:** When loading XPM images using the Pillow library, the resulting image appears scrambled, leading to significant discrepancies compared to the expected image data. **Example Buggy Code:** ```python from PIL import Image...
diff --git a/PIL/ImageFile.py b/PIL/ImageFile.py --- a/PIL/ImageFile.py +++ b/PIL/ImageFile.py @@ -133,11 +133,27 @@ return pixel self.map = None - + use_mmap = self.filename and len(self.tile) == 1 + # As of pypy 2.1.0, memory mapping was failing here. + use_mmap = use_mmap...
diff --git a/Tests/test_file_xpm.py b/Tests/test_file_xpm.py --- a/Tests/test_file_xpm.py +++ b/Tests/test_file_xpm.py @@ -1,20 +1,33 @@ -from helper import unittest, PillowTestCase +from helper import unittest, PillowTestCase, lena from PIL import Image # sample ppm stream -file = "Tests/images/lena.xpm" -data =...
null
null
namanjain12/pillow_final:eb4f669b34ab822163be19325170f1948bdc5301
true
null
2
41
null
1,209
0
0.75
1
0.525
1
0.338167
77.727