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,500
r2e_gym::train::4092
r2e_gym
train
4,092
coveragepy__f3a70c951e838e3cfab706b9a2d0459d783e5a4f
coveragepy
nedbat/coveragepy
python
f3a70c951e838e3cfab706b9a2d0459d783e5a4f
**Title:** Missing warning when source file is absent during XML report generation **Description:** When generating an XML report with the `ignore_errors` option enabled, the system should emit a warning if a source file is missing. However, currently, no warning is issued when the source file is deleted before report...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -29,6 +29,11 @@ - Fix: Complex conditionals over excluded lines could have incorrectly reported a missing branch (`issue 1271`_). This is now fixed. +- Fix: More exceptions are now handled when trying to parse source files for + report...
diff --git a/tests/test_xml.py b/tests/test_xml.py --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -135,7 +135,12 @@ cov = coverage.Coverage() self.start_import_stop(cov, "innocuous") os.remove("innocuous.py") - cov.xml_report(ignore_errors=True) + with pytest.warns(Warning) ...
null
null
namanjain12/coveragepy_final:f3a70c951e838e3cfab706b9a2d0459d783e5a4f
true
null
3
21
null
1,216
0
0.75
1
0.525
1
0.272667
77.5305
9,501
r2e_gym::train::5079
r2e_gym
train
5,079
pyramid__e18b5f5d6a2cd73d4df99433258146856960ac50
pyramid
pylons/pyramid
python
e18b5f5d6a2cd73d4df99433258146856960ac50
**Title:** Incorrect Mapping of `pyramid_docs_branch` for Specific Version Formats **Description:** When creating a project with certain version formats, the documentation branch is incorrectly determined, leading to unexpected behavior in the generated project. **Example Buggy Code:** Suppose you attempt to scaffold...
diff --git a/pyramid/scripts/pcreate.py b/pyramid/scripts/pcreate.py --- a/pyramid/scripts/pcreate.py +++ b/pyramid/scripts/pcreate.py @@ -87,11 +87,20 @@ # get pyramid package version pyramid_version = self.pyramid_dist.version + # map pyramid package version of the documentation branch - ...
diff --git a/pyramid/tests/test_scripts/test_pcreate.py b/pyramid/tests/test_scripts/test_pcreate.py --- a/pyramid/tests/test_scripts/test_pcreate.py +++ b/pyramid/tests/test_scripts/test_pcreate.py @@ -148,6 +148,30 @@ {'project': 'Distro', 'egg': 'Distro', 'package': 'distro', 'pyramid_vers...
null
null
namanjain12/pyramid_final:e18b5f5d6a2cd73d4df99433258146856960ac50
true
null
1
15
null
1,332
0
0.75
1
0.525
1
0.272
77.5285
9,502
r2e_gym::train::366
r2e_gym
train
366
orange3__f5026689551be7f0a43ad5f0d129e5bcfff7999c
orange3
biolab/orange3
python
f5026689551be7f0a43ad5f0d129e5bcfff7999c
**Title:** Incorrect Handling of Dataset Paths on Windows Causes Migration Failures **Description:** On Windows platforms, the selected dataset ID is saved using backslashes (`\`) as path separators. This causes issues during settings migration, where the backslashes are not converted to forward slashes (`/`). As a re...
diff --git a/Orange/widgets/data/owdatasets.py b/Orange/widgets/data/owdatasets.py --- a/Orange/widgets/data/owdatasets.py +++ b/Orange/widgets/data/owdatasets.py @@ -26,7 +26,8 @@ import Orange.data from Orange.misc.environ import data_dir -from Orange.widgets import settings, gui +from Orange.widgets import gui ...
diff --git a/Orange/widgets/data/tests/test_owdatasets.py b/Orange/widgets/data/tests/test_owdatasets.py --- a/Orange/widgets/data/tests/test_owdatasets.py +++ b/Orange/widgets/data/tests/test_owdatasets.py @@ -96,6 +96,25 @@ # select the only dataset sel_type = QItemSelectionModel.ClearAndSelect | QI...
null
null
namanjain12/orange3_final:f5026689551be7f0a43ad5f0d129e5bcfff7999c
true
null
1
23
null
1,172
0
0.75
1
0.525
1
0.272
77.5285
9,503
r2e_gym::train::39
r2e_gym
train
39
orange3__3781811839a66a39aca21ab85207902bc4005863
orange3
biolab/orange3
python
3781811839a66a39aca21ab85207902bc4005863
**Title:** OWEditDomain widget does not update status bar with data summaries **Description:** The OWEditDomain widget fails to display summary information in the status bar when data is received or modified. This lack of feedback makes it difficult for users to understand the current state of the data they are worki...
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 @@ -39,6 +39,7 @@ from Orange.widgets import widget, gui, settings from Orange.widgets.utils import itemmodels from Orange.widgets.utils.widgetpre...
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 @@ -3,6 +3,7 @@ import pickle from itertools import product from unittest import TestCase +from unitte...
null
null
namanjain12/orange3_final:3781811839a66a39aca21ab85207902bc4005863
true
null
1
14
null
1,349
0
0.75
1
0.525
1
0.2715
77.527
9,504
r2e_gym::train::6451
r2e_gym
train
6,451
pillow__7928bebd654acd5ca2edba7e80904aaa59acd331
pillow
python-pillow/pillow
python
7928bebd654acd5ca2edba7e80904aaa59acd331
**Title:** Missing DeprecationWarning When Using 'hints' Parameter in `ImageDraw.getdraw` **Description** When calling `ImageDraw.getdraw` with the `hints` parameter, a `DeprecationWarning` is expected to inform users that the parameter is deprecated. However, no warning is emitted, which can lead to confusion and mis...
diff --git a/docs/deprecations.rst b/docs/deprecations.rst --- a/docs/deprecations.rst +++ b/docs/deprecations.rst @@ -114,6 +114,13 @@ Support for LibTIFF earlier than version 4 has been deprecated. Upgrade to a newer version of LibTIFF instead. + +ImageDraw.getdraw hints parameter +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py --- a/Tests/test_imagedraw.py +++ b/Tests/test_imagedraw.py @@ -1624,3 +1624,8 @@ draw.rectangle(xy) with pytest.raises(ValueError): draw.rounded_rectangle(xy) + + +def test_getdraw(): + with pytest.warns(DeprecationWarning): + ...
null
null
namanjain12/pillow_final:7928bebd654acd5ca2edba7e80904aaa59acd331
true
null
3
36
null
906
0
0.75
1
0.525
1
0.271
77.5255
9,505
r2e_gym::train::5085
r2e_gym
train
5,085
pyramid__e07af13b19b8fb00a393bb91b950b516cfca1cb6
pyramid
pylons/pyramid
python
e07af13b19b8fb00a393bb91b950b516cfca1cb6
**Title:** `strings_differ` Function Does Not Support `compare_digest`, Causing TypeError **Description:** The `strings_differ` function is designed to compare two strings securely to prevent timing attacks. However, it currently does not accept a `compare_digest` parameter, which results in a `TypeError` when a cust...
diff --git a/.travis.yml b/.travis.yml --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,20 @@ # Wire up travis language: python -python: - - 2.6 - - 2.7 - - pypy - - 3.2 - - 3.3 - - 3.4 - - pypy3 +env: + - TOXENV=py26 + - TOXENV=py27 + - TOXENV=py32 + - TOXENV=py33 + - TOXENV=py34 + - TOXENV=pypy + - T...
diff --git a/pyramid/tests/test_util.py b/pyramid/tests/test_util.py --- a/pyramid/tests/test_util.py +++ b/pyramid/tests/test_util.py @@ -216,6 +216,49 @@ self.assertEqual(len(wos), 0) self.assertEqual(list(wos), []) self.assertEqual(wos.last, None) + +class Test_strings_differ(unittest.Test...
null
null
namanjain12/pyramid_final:e07af13b19b8fb00a393bb91b950b516cfca1cb6
true
null
4
61
null
1,114
0
0.75
1
0.6375
0.85
0.389
77.52325
9,506
r2e_gym::train::5966
r2e_gym
train
5,966
tornado__02103209f18c100866e9846083779625dd50ec19
tornado
tornadoweb/tornado
python
02103209f18c100866e9846083779625dd50ec19
**Title:** Subprocess Fails to Terminate When Using Autoreload with Internal Reload **Description:** When running an application with Tornado's autoreload that triggers an internal reload, the autoreload wrapper is not preserved during the reload process. This causes the subprocess to fail to terminate properly. **Ex...
diff --git a/tornado/autoreload.py b/tornado/autoreload.py --- a/tornado/autoreload.py +++ b/tornado/autoreload.py @@ -107,6 +107,9 @@ _reload_hooks = [] _reload_attempted = False _io_loops = weakref.WeakKeyDictionary() # type: ignore +_autoreload_is_main = False +_original_argv = None +_original_spec = None d...
diff --git a/tornado/test/autoreload_test.py b/tornado/test/autoreload_test.py --- a/tornado/test/autoreload_test.py +++ b/tornado/test/autoreload_test.py @@ -1,14 +1,19 @@ from __future__ import absolute_import, division, print_function import os +import shutil import subprocess from subprocess import Popen impor...
null
null
namanjain12/tornado_final:02103209f18c100866e9846083779625dd50ec19
true
null
1
27
null
1,080
0
0.75
1
0.525
1
0.27
77.5225
9,507
r2e_gym::train::6190
r2e_gym
train
6,190
pillow__279ddf4ce6c76498ac29df2552a3023b9aaa76c1
pillow
python-pillow/pillow
python
279ddf4ce6c76498ac29df2552a3023b9aaa76c1
**Title**: ImageOps.pad Alters Palette Leading to Incorrect RGB Conversion for "P" Mode Images **Description**: When using `ImageOps.pad` on a paletted ("P" mode) image, the resulting image's content differs after converting to "RGB". This indicates that the palette is not being correctly preserved or applied during t...
diff --git a/src/PIL/ImageOps.py b/src/PIL/ImageOps.py --- a/src/PIL/ImageOps.py +++ b/src/PIL/ImageOps.py @@ -21,7 +21,7 @@ import operator import re -from . import Image +from . import Image, ImagePalette # # helpers @@ -292,7 +292,7 @@ else: out = Image.new(image.mode, size, color) if ...
diff --git a/Tests/test_imageops.py b/Tests/test_imageops.py --- a/Tests/test_imageops.py +++ b/Tests/test_imageops.py @@ -128,6 +128,20 @@ assert_image_similar_tofile( new_im, "Tests/images/imageops_pad_" + label + "_" + str(i) + ".jpg", 6 ) + + +def test_palette(): + im =...
null
null
namanjain12/pillow_final:279ddf4ce6c76498ac29df2552a3023b9aaa76c1
true
null
1
7
null
1,478
0
0.75
1
0.525
1
0.269667
77.5215
9,508
r2e_gym::train::5298
r2e_gym
train
5,298
aiohttp__750a09537324940f2b29cf62e023a94b9a1a8709
aiohttp
aio-libs/aiohttp
python
750a09537324940f2b29cf62e023a94b9a1a8709
**Title:** ProxyConnector Sets Incorrect Authentication Parameters in ClientRequest **Description:** After updating the `ProxyConnector` to use the `proxy_auth` parameter instead of separate `proxy_login` and `proxy_passwd`, certain authentication scenarios are not handled correctly. When initializing `ProxyConnector`...
diff --git a/aiohttp/connector.py b/aiohttp/connector.py --- a/aiohttp/connector.py +++ b/aiohttp/connector.py @@ -12,7 +12,7 @@ from .errors import HttpProxyError from .errors import ProxyConnectionError -from .client import ClientRequest +from .client import ClientRequest, BasicAuth class Connection(object):...
diff --git a/tests/test_connector.py b/tests/test_connector.py --- a/tests/test_connector.py +++ b/tests/test_connector.py @@ -346,9 +346,37 @@ ClientRequestMock.assert_called_with( 'GET', 'http://proxy.example.com', - auth=aiohttp.BasicAuth(None, None), + auth=None, ...
null
null
namanjain12/aiohttp_final:750a09537324940f2b29cf62e023a94b9a1a8709
true
null
1
12
null
1,378
0
0.75
1
0.525
1
0.269667
77.5215
9,509
swe_bench::test::1125
swe_bench
test
1,125
matplotlib__matplotlib-26469
matplotlib/matplotlib
matplotlib/matplotlib
python
67fa29336eda204572536d2cea1bf8a4cb04f6fa
Change PdfPages to default to keep_empty=False and eventually deprecate keep_empty PdfPages has an option, `keep_empty`, that sets whether a PdfPages object with *zero* figures is written to the disk at all or not. This was introduced in #2453; previously PdfPages behaved as if `keep_empty=True` (and this was left the...
Sorry to barge in, but this seems related: ```python from matplotlib import pyplot as plt from matplotlib.backends.backend_pdf import PdfPages fig = plt.figure() plt.plot(range(10)) PdfPages('/tmp/foo.pdf').savefig(fig) ``` …happily & silently generates an invalid PDF file like the one described above. The ...
diff --git a/lib/matplotlib/backends/backend_pdf.py b/lib/matplotlib/backends/backend_pdf.py --- a/lib/matplotlib/backends/backend_pdf.py +++ b/lib/matplotlib/backends/backend_pdf.py @@ -2669,18 +2669,19 @@ class PdfPages: In reality `PdfPages` is a thin wrapper around `PdfFile`, in order to avoid confusion w...
diff --git a/lib/matplotlib/tests/test_backend_pdf.py b/lib/matplotlib/tests/test_backend_pdf.py --- a/lib/matplotlib/tests/test_backend_pdf.py +++ b/lib/matplotlib/tests/test_backend_pdf.py @@ -3,7 +3,6 @@ import io import os from pathlib import Path -from tempfile import NamedTemporaryFile import numpy as np i...
["lib/matplotlib/tests/test_backend_pgf.py::test_multipage_keep_empty"]
["lib/matplotlib/tests/test_backend_pdf.py::test_use14corefonts[pdf]", "lib/matplotlib/tests/test_backend_pdf.py::test_embed_fonts[3-DejaVu", "lib/matplotlib/tests/test_backend_pdf.py::test_embed_fonts[42-DejaVu", "lib/matplotlib/tests/test_backend_pdf.py::test_multipage_pagecount", "lib/matplotlib/tests/test_backend_p...
null
true
2023-08-08T08:50:37Z
2
78
1
1,276
0
0.8
1
0.4
1
0.472667
77.518
9,510
r2e_gym::train::6250
r2e_gym
train
6,250
pillow__1b74bddfde5f2b186fd9ad812261adc3739d6f24
pillow
python-pillow/pillow
python
1b74bddfde5f2b186fd9ad812261adc3739d6f24
**Title:** `getcolor` Assigns New Colors to Reserved Palette Indices Like Background or Transparency **Description:** When adding a new color to the palette using the `getcolor` method, the color is sometimes assigned to an index reserved for background or transparency. This results in duplicate indices, which can lea...
diff --git a/src/PIL/ImagePalette.py b/src/PIL/ImagePalette.py --- a/src/PIL/ImagePalette.py +++ b/src/PIL/ImagePalette.py @@ -118,11 +118,19 @@ if not isinstance(self.palette, bytearray): self._palette = bytearray(self.palette) index = len(self.palette) // 3 + ...
diff --git a/Tests/test_imagepalette.py b/Tests/test_imagepalette.py --- a/Tests/test_imagepalette.py +++ b/Tests/test_imagepalette.py @@ -47,6 +47,29 @@ # Test unknown color specifier with pytest.raises(ValueError): palette.getcolor("unknown") + + +@pytest.mark.parametrize( + "index, palette", + ...
null
null
namanjain12/pillow_final:1b74bddfde5f2b186fd9ad812261adc3739d6f24
true
null
1
10
null
1,410
0
0.75
1
0.525
1
0.268333
77.5175
9,511
r2e_gym::train::6069
r2e_gym
train
6,069
pillow__f6bcf4e1ae3184ff9ed0cfcb46a0aa80423da537
pillow
python-pillow/pillow
python
f6bcf4e1ae3184ff9ed0cfcb46a0aa80423da537
**Title:** Incorrect Calculation of TIFF Strip Sizes Causes Image Corruption **Description:** When saving TIFF images, the strip size is calculated based on image dimensions. If the calculation uses runtime size attributes instead of the TIFF metadata fields `IMAGEWIDTH` and `IMAGELENGTH`, it can result in incorrect s...
diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -1704,25 +1704,26 @@ colormap += [0] * (256 - colors) ifd[COLORMAP] = colormap # data orientation - stride = len(bits) * ((im.size[0] * bits[0] + 7) // ...
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 @@ -484,13 +484,13 @@ outfile = str(tmp_path / "temp.tif") with Image.open("Tests/images/ifd_tag_type.tiff") as im: exif = im.getexif() - exif[256] = 100 +...
null
null
namanjain12/pillow_final:f6bcf4e1ae3184ff9ed0cfcb46a0aa80423da537
true
null
1
13
null
1,349
0
0.75
1
0.525
1
0.268167
77.517
9,512
r2e_gym::train::4975
r2e_gym
train
4,975
datalad__c7aa62811a6ad2d640eea7f646f7d30db35c61d7
datalad
datalad/datalad
python
c7aa62811a6ad2d640eea7f646f7d30db35c61d7
**Title:** Configuration Overrides Missing Section.Variable=Value Format Are Not Properly Handled **Description:** When providing configuration overrides without the required `section.variable=value` format, the application fails to recognize the invalid format and does not terminate as expected. This can lead to impr...
diff --git a/datalad/cmdline/main.py b/datalad/cmdline/main.py --- a/datalad/cmdline/main.py +++ b/datalad/cmdline/main.py @@ -474,6 +474,24 @@ args_ = args or sys.argv if cmdlineargs.cfg_overrides is not None: + import re + # this expression is deliberately loose as gitconfig offers + ...
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 @@ -239,6 +239,13 @@ assert_in('datalad.dummy: this', out) +def test_incorrect_cfg_override(): + run_main(['-c', 'some', 'wtf'], exit_cod...
null
null
namanjain12/datalad_final:c7aa62811a6ad2d640eea7f646f7d30db35c61d7
true
null
1
18
null
1,246
0
0.75
1
0.525
1
0.267667
77.5155
9,513
r2e_gym::train::345
r2e_gym
train
345
orange3__1d125d8ded9bbbb52420b2cd5c64867eb1e88238
orange3
biolab/orange3
python
1d125d8ded9bbbb52420b2cd5c64867eb1e88238
**Title:** `freevars` Function Misses Default Parameters in Lambda Expressions **Description:** The `freevars` function fails to identify default parameters in lambda expressions as free variables. Specifically, when a lambda function includes default arguments, the default variable is not captured correctly. **Examp...
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:1d125d8ded9bbbb52420b2cd5c64867eb1e88238
true
null
1
39
null
825
0
0.75
1
0.525
1
0.2675
77.515
9,514
r2e_gym::train::4060
r2e_gym
train
4,060
coveragepy__f668d6f32e2d0864ee84e5f556860a085bc6ecfb
coveragepy
nedbat/coveragepy
python
f668d6f32e2d0864ee84e5f556860a085bc6ecfb
**Title:** Coverage XML Report Uses Absolute Paths Instead of Relative When `relative_files` is Enabled **Description:** When generating the coverage XML report with the `relative_files` option enabled, the source paths are still being recorded as absolute paths instead of relative ones. This behavior causes inconsist...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -26,6 +26,10 @@ - Updated Python 3.9 support to 3.9a4. +- If using the ``[run] relative_files`` setting, the XML report will use + relative files in the ``<source>`` elements indicating the location of source + code. Closes `issue 948...
diff --git a/tests/test_xml.py b/tests/test_xml.py --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -370,6 +370,19 @@ dom = ElementTree.parse("coverage.xml") self.assert_source(dom, "src") + def test_relative_source(self): + self.make_file("src/mod.py", "print(17)") + cov = covera...
null
null
namanjain12/coveragepy_final:f668d6f32e2d0864ee84e5f556860a085bc6ecfb
true
null
2
13
null
1,342
0
0.75
1
0.525
1
0.267
77.5135
9,515
r2e_gym::train::33
r2e_gym
train
33
orange3__a410361107724d878c254d350715351c058050a5
orange3
biolab/orange3
python
a410361107724d878c254d350715351c058050a5
**Title:** Inconsistent Rounding in Discretizer Causes Incorrect Threshold Values **Description:** When discretizing continuous variables, the rounding of threshold points is expected to align with Python's string formatting to ensure consistency and uniqueness of labels. However, using NumPy's `round` function leads ...
diff --git a/Orange/preprocess/discretize.py b/Orange/preprocess/discretize.py --- a/Orange/preprocess/discretize.py +++ b/Orange/preprocess/discretize.py @@ -97,7 +97,7 @@ if ndigits is None or len(points) == 1: try: values = cls._get_labels(var.str_val, points) - exce...
diff --git a/Orange/preprocess/tests/test_discretize.py b/Orange/preprocess/tests/test_discretize.py --- a/Orange/preprocess/tests/test_discretize.py +++ b/Orange/preprocess/tests/test_discretize.py @@ -1233,6 +1233,28 @@ '≥ 2.1000000003']) self.assertIsInstance(to_sql, BinSq...
null
null
namanjain12/orange3_final:a410361107724d878c254d350715351c058050a5
true
null
1
6
null
1,481
0
0.75
1
0.525
1
0.266833
77.513
9,516
swe_bench::test::1483
swe_bench
test
1,483
pytest-dev__pytest-9475
pytest-dev/pytest
pytest-dev/pytest
python
71baf24b6d41da6704433ca9909b5e6d954564b9
[prerelease] `deselected` addition to `assert_outcomes()` is backwards-incompatible #9133 added a new `deselected` parameter to `assert_outcomes()`, cc @okken. However, this actually is an incompatible change: Doing e.g. `result = testdir.runpytest("-k", "test_not_found_by_ini")` followed by `result.assert_outcomes(pa...
@okken would you like to make the deselected a optional parameter to ensure this is caught i believe we have to make certain new features "explicit optionals" instead of implied optionals this one is a easy miss, i'm pretty sure at least 3 of us missed this when glancing at the pr before, and we would miss a issu...
diff --git a/src/_pytest/pytester.py b/src/_pytest/pytester.py --- a/src/_pytest/pytester.py +++ b/src/_pytest/pytester.py @@ -596,11 +596,15 @@ def assert_outcomes( errors: int = 0, xpassed: int = 0, xfailed: int = 0, - warnings: int = 0, - deselected: int = 0, + warning...
diff --git a/testing/test_pytester.py b/testing/test_pytester.py --- a/testing/test_pytester.py +++ b/testing/test_pytester.py @@ -835,6 +835,8 @@ def test_with_warning(): ) result = pytester.runpytest() result.assert_outcomes(passed=1, warnings=1) + # If warnings is not passed, it is not checked at a...
["testing/test_pytester.py::test_pytester_assert_outcomes_warnings", "testing/test_pytester.py::test_pytester_outcomes_deselected"]
["testing/test_pytester.py::test_hookrecorder_basic[apiclass]", "testing/test_pytester.py::test_hookrecorder_basic[api]", "testing/test_pytester.py::TestSysModulesSnapshot::test_remove_added", "testing/test_pytester.py::TestSysModulesSnapshot::test_add_removed", "testing/test_pytester.py::TestSysModulesSnapshot::test_r...
null
true
2022-01-04T14:01:03Z
2
27
2
2,284
0
0.8
1
0.4
1
0.470667
77.512
9,517
r2e_gym::train::6410
r2e_gym
train
6,410
pillow__231604e921092807069d36c2121fd99b653fc1f0
pillow
python-pillow/pillow
python
231604e921092807069d36c2121fd99b653fc1f0
**Title:** Incorrect Background Color Preservation When Saving GIF as WebP **Description:** When saving a GIF image that uses a palette index for its background, the background color is not correctly preserved in the resulting WebP file. This leads to significant color discrepancies when the WebP image is converted ba...
diff --git a/src/PIL/WebPImagePlugin.py b/src/PIL/WebPImagePlugin.py --- a/src/PIL/WebPImagePlugin.py +++ b/src/PIL/WebPImagePlugin.py @@ -191,7 +191,19 @@ _save(im, fp, filename) return - background = encoderinfo.get("background", (0, 0, 0, 0)) + background = (0, 0, 0, 0) + if "background"...
diff --git a/Tests/test_file_webp.py b/Tests/test_file_webp.py --- a/Tests/test_file_webp.py +++ b/Tests/test_file_webp.py @@ -153,6 +153,26 @@ Image.open(blob).load() Image.open(blob).load() + @unittest.skipUnless(HAVE_WEBP and _webp.HAVE_WEBPANIM, + "WebP save al...
null
null
namanjain12/pillow_final:231604e921092807069d36c2121fd99b653fc1f0
true
null
1
14
null
1,319
0
0.75
1
0.525
1
0.2665
77.512
9,518
r2e_gym::train::5393
r2e_gym
train
5,393
aiohttp__30850babb43a8e28dd2df036776c62fd613d3d89
aiohttp
aio-libs/aiohttp
python
30850babb43a8e28dd2df036776c62fd613d3d89
**Title:** Incorrect `close_code` When Closing WebSocket Concurrently **Description:** When attempting to close a WebSocket connection while a receive operation is running in a separate task, the `close_code` is not set correctly. This leads to unexpected behavior where `close_code` remains `None` instead of the expec...
diff --git a/CHANGES/7306.bugfix b/CHANGES/7306.bugfix --- a/CHANGES/7306.bugfix +++ b/CHANGES/7306.bugfix @@ -0,0 +1 @@ +Fixed ``ClientWebSocketResponse.close_code`` being erroneously set to ``None`` when there are concurrent async tasks receiving data and closing the connection. diff --git a/aiohttp/client_ws.py b/ai...
diff --git a/tests/test_client_ws_functional.py b/tests/test_client_ws_functional.py --- a/tests/test_client_ws_functional.py +++ b/tests/test_client_ws_functional.py @@ -233,6 +233,33 @@ assert msg.type == aiohttp.WSMsgType.CLOSED +async def test_concurrent_task_close(aiohttp_client: Any) -> None: + async ...
null
null
namanjain12/aiohttp_final:30850babb43a8e28dd2df036776c62fd613d3d89
true
null
2
6
null
1,475
0
0.75
1
0.525
1
0.265833
77.51
9,519
r2e_gym::train::5427
r2e_gym
train
5,427
aiohttp__249855ad9cdbdb3d6eca90a0a5b675c409274ab6
aiohttp
aio-libs/aiohttp
python
249855ad9cdbdb3d6eca90a0a5b675c409274ab6
**Title:** System Routes Pollute Middleware Cache Causing Memory Leaks **Description:** When using system routes in the application, the middleware cache includes these routes, leading to an unexpected increase in cache size. Over time, this can cause significant memory usage and degrade application performance. **Ex...
diff --git a/CHANGES/9852.bugfix.rst b/CHANGES/9852.bugfix.rst --- a/CHANGES/9852.bugfix.rst +++ b/CHANGES/9852.bugfix.rst @@ -0,0 +1 @@ +Fixed system routes polluting the middleware cache -- by :user:`bdraco`. diff --git a/aiohttp/web_app.py b/aiohttp/web_app.py --- a/aiohttp/web_app.py +++ b/aiohttp/web_app.py @@ -1,...
diff --git a/tests/test_web_middleware.py b/tests/test_web_middleware.py --- a/tests/test_web_middleware.py +++ b/tests/test_web_middleware.py @@ -4,7 +4,7 @@ import pytest from yarl import URL -from aiohttp import web +from aiohttp import web, web_app from aiohttp.pytest_plugin import AiohttpClient from aiohttp....
null
null
namanjain12/aiohttp_final:249855ad9cdbdb3d6eca90a0a5b675c409274ab6
true
null
2
16
null
1,271
0
0.75
1
0.525
1
0.265167
77.508
9,520
r2e_gym::train::6350
r2e_gym
train
6,350
pillow__3f9b6153495cc75c947d6a915638d99a7769b489
pillow
python-pillow/pillow
python
3f9b6153495cc75c947d6a915638d99a7769b489
### Incorrect Thumbnail Size Calculation in Image.thumbnail() **Description** When generating thumbnails using the `Image.thumbnail()` method, the resulting image size does not correctly preserve the aspect ratio, leading to unexpected dimensions. **Example Code** ```python from PIL import Image # Original image s...
diff --git a/src/PIL/Image.py b/src/PIL/Image.py --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2236,20 +2236,22 @@ :returns: None """ + x, y = map(math.floor, size) + if x >= self.width and y >= self.height: + return + + def round_aspect(number, key): + ...
diff --git a/Tests/test_image_thumbnail.py b/Tests/test_image_thumbnail.py --- a/Tests/test_image_thumbnail.py +++ b/Tests/test_image_thumbnail.py @@ -38,9 +38,9 @@ im.thumbnail((100, 50)) assert im.size == (100, 50) - im = Image.new("L", (128, 128)) + im = Image.new("L", (64, 64)) im.thumbnail((...
null
null
namanjain12/pillow_final:3f9b6153495cc75c947d6a915638d99a7769b489
true
null
1
26
null
1,071
0
0.75
1
0.525
1
0.265167
77.508
9,521
r2e_gym::train::6370
r2e_gym
train
6,370
pillow__27f5c4d8fb3e3f37ef7c16016355d5a65862d880
pillow
python-pillow/pillow
python
27f5c4d8fb3e3f37ef7c16016355d5a65862d880
**Title:** Incorrect Transparency Handling When Saving GIF Images **Description:** When saving GIF images that include transparency, the transparency information is not preserved correctly. This results in the saved GIF having incorrect transparency indices, which causes discrepancies when the image is reloaded and co...
diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py --- a/src/PIL/GifImagePlugin.py +++ b/src/PIL/GifImagePlugin.py @@ -574,10 +574,14 @@ im_frame = _normalize_mode(im_frame.copy()) if frame_count == 0: for k, v in im_frame.info.items(): + if ...
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 @@ -639,7 +639,8 @@ assert im.getpixel((0, 0)) == (255, 0, 0) -def test_transparency_in_second_frame(): +def test_transparency_in_second_frame(tmp_path): + out = str(tmp_path / "temp.gi...
null
null
namanjain12/pillow_final:27f5c4d8fb3e3f37ef7c16016355d5a65862d880
true
null
2
13
null
1,330
0
0.75
1
0.525
1
0.265
77.5075
9,522
r2e_gym::train::5033
r2e_gym
train
5,033
datalad__67054f71f137df6d5f9c1eb77c37d72c59b40e7a
datalad
datalad/datalad
python
67054f71f137df6d5f9c1eb77c37d72c59b40e7a
**Title:** Filter Function Fails to Exclude Unwanted Results **Description:** When applying a filter using a constraint or a custom filter function, the results are not properly excluded based on the provided criteria. Specifically, the filtering mechanism does not remove entries that should be excluded, leading to un...
diff --git a/datalad/interface/utils.py b/datalad/interface/utils.py --- a/datalad/interface/utils.py +++ b/datalad/interface/utils.py @@ -47,6 +47,7 @@ from datalad.distribution.dataset import resolve_path from datalad.distribution.utils import get_git_dir from datalad import cfg as dlcfg +from datalad.dochelpers i...
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 @@ -18,6 +18,7 @@ from datalad.tests.utils import with_tempfile, assert_not_equal from datalad.tests.utils import assert_in from datalad.t...
null
null
namanjain12/datalad_final:67054f71f137df6d5f9c1eb77c37d72c59b40e7a
true
null
1
24
null
1,107
0
0.75
1
0.525
1
0.2645
77.506
9,523
r2e_gym::train::5178
r2e_gym
train
5,178
pyramid__9bde7c5d7773a453c0a9c9c13be6229b83ac9c7a
pyramid
pylons/pyramid
python
9bde7c5d7773a453c0a9c9c13be6229b83ac9c7a
**Title:** Cookies Not Set on Parent Domains When Using `parent_domain` Option **Description:** When configuring authentication with the `parent_domain` option, cookies are not being set on parent domains as expected. This prevents proper authentication across subdomains, leading to users being logged out or unable to...
diff --git a/pyramid/authentication.py b/pyramid/authentication.py --- a/pyramid/authentication.py +++ b/pyramid/authentication.py @@ -865,22 +865,22 @@ if ':' in cur_domain: cur_domain = cur_domain.split(':', 1)[0] - cookies = [ - ('Set-Cookie', '%s="%s"; Path=%s%s%s' % ( - ...
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 @@ -908,11 +908,11 @@ self.assertTrue(result[0][1].startswith('auth_tkt=')) self.assertEqual(result[1][0], 'Set-Cookie') - ...
null
null
namanjain12/pyramid_final:9bde7c5d7773a453c0a9c9c13be6229b83ac9c7a
true
null
1
14
null
1,303
0
0.75
1
0.525
1
0.263833
77.504
9,524
r2e_gym::train::6590
r2e_gym
train
6,590
pillow__e6a521130e975f89529442597735a6a48cc3685f
pillow
python-pillow/pillow
python
e6a521130e975f89529442597735a6a48cc3685f
**Title:** Unnecessary Frame Transparency When Previous Disposal Method is 2 in GIF Processing **Description:** When processing GIF images, if the previous frame uses disposal method 2, the system incorrectly fills identical pixels, resulting in unnecessary frame transparency being added. This leads to the `_frame_tra...
diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py --- a/src/PIL/GifImagePlugin.py +++ b/src/PIL/GifImagePlugin.py @@ -638,7 +638,11 @@ background_im = Image.new("P", im_frame.size, background) background_im.putpalette(im_frames[0]["im"].palette) ...
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 @@ -647,6 +647,9 @@ # Center remains red every frame assert rgb_img.getpixel((50, 50)) == circle + # Check that frame transparency wasn't added unnecessarily + ...
null
null
namanjain12/pillow_final:e6a521130e975f89529442597735a6a48cc3685f
true
null
1
6
null
1,463
0
0.75
1
0.525
1
0.263833
77.504
9,525
r2e_gym::train::5767
r2e_gym
train
5,767
scrapy__7a51d370f3a59bcfe118f3ba079c5ea6eda5af75
scrapy
scrapy/scrapy
python
7a51d370f3a59bcfe118f3ba079c5ea6eda5af75
**Title:** `guess_scheme()` Misclassifies Local Paths as HTTP URLs **Description:** The `guess_scheme()` function incorrectly assigns the `http://` scheme to certain local file paths instead of the appropriate `file://` scheme. This leads to improper URL handling for local resources. **Example Buggy Code:** ```python...
diff --git a/scrapy/commands/shell.py b/scrapy/commands/shell.py --- a/scrapy/commands/shell.py +++ b/scrapy/commands/shell.py @@ -3,7 +3,7 @@ See documentation in docs/topics/shell.rst """ - +import re from six.moves.urllib.parse import urlparse from threading import Thread from w3lib.url import any_to_uri @@ -...
diff --git a/tests/test_command_shell.py b/tests/test_command_shell.py --- a/tests/test_command_shell.py +++ b/tests/test_command_shell.py @@ -11,67 +11,61 @@ class ShellURLTest(unittest.TestCase): + pass - def test_file_uri_relative001(self): - # FIXME: 'index.html' is interpreted as a domain name ...
null
null
namanjain12/scrapy_final:7a51d370f3a59bcfe118f3ba079c5ea6eda5af75
true
null
1
28
null
1,023
0
0.75
1
0.525
1
0.263833
77.504
9,526
r2e_gym::train::5129
r2e_gym
train
5,129
pyramid__15b97dc81c8bcdc039f8f2293f85812f68a076da
pyramid
pylons/pyramid
python
15b97dc81c8bcdc039f8f2293f85812f68a076da
**Title:** Missing Deprecation Warning When Using `check_csrf` in `add_view` **Description:** When adding a view with the `check_csrf` parameter set to `True`, no `DeprecationWarning` is emitted as expected. This omission can lead to developers being unaware that `check_csrf` is deprecated and should transition to usi...
diff --git a/docs/narr/sessions.rst b/docs/narr/sessions.rst --- a/docs/narr/sessions.rst +++ b/docs/narr/sessions.rst @@ -430,6 +430,10 @@ Checking CSRF Tokens with a View Predicate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. deprecated:: 1.7 + Use the ``require_csrf`` option or read :ref:`auto_csrf_checking`...
diff --git a/pyramid/tests/test_config/test_views.py b/pyramid/tests/test_config/test_views.py --- a/pyramid/tests/test_config/test_views.py +++ b/pyramid/tests/test_config/test_views.py @@ -1490,6 +1490,22 @@ request = self._makeRequest(config) request.upath_info = text_('/') self._assertNot...
null
null
namanjain12/pyramid_final:15b97dc81c8bcdc039f8f2293f85812f68a076da
true
null
2
22
null
1,142
0
0.75
1
0.525
1
0.263667
77.5035
9,527
r2e_gym::train::4106
r2e_gym
train
4,106
coveragepy__1cd6c9bba0b4ba3018bf1b28fee645a7dd98fe68
coveragepy
nedbat/coveragepy
python
1cd6c9bba0b4ba3018bf1b28fee645a7dd98fe68
**Title:** Unnecessary Metadata Increases Hash Misses During Data Combination **Description:** When writing coverage data without enabling debug options, additional metadata keys such as `sys_argv` are still being included. This unnecessary metadata causes the hash of the data file to change even when the actual cover...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -31,8 +31,8 @@ - Combining data files with ``coverage combine`` now quickly hashes the data files to skip files that provide no new information. This can reduce the - time needed. For coverage.py's own test suite, combining was about...
diff --git a/tests/test_data.py b/tests/test_data.py --- a/tests/test_data.py +++ b/tests/test_data.py @@ -904,6 +904,26 @@ assert_measured_files(covdata3, MEASURED_FILES_1_2) self.assert_file_count(glob.escape(basename) + ".*", 0) + def test_meta_data(self): + # The metadata written to th...
null
null
namanjain12/coveragepy_final:1cd6c9bba0b4ba3018bf1b28fee645a7dd98fe68
true
null
4
35
null
1,594
0
0.75
1
0.6375
0.85
0.382333
77.50325
9,528
r2e_gym::train::6437
r2e_gym
train
6,437
pillow__2072a52bb5479fc001cc030ea19fad3424a4f2ff
pillow
python-pillow/pillow
python
2072a52bb5479fc001cc030ea19fad3424a4f2ff
**Title:** GIFs with Comments Saved as GIF87a Instead of GIF89a **Description:** When saving GIF images that include comments longer than 255 characters, the GIF version is incorrectly set to GIF87a. This prevents the proper handling of comment extensions, which are supported in GIF89a. **Example Code:** ```python fr...
diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py --- a/src/PIL/GifImagePlugin.py +++ b/src/PIL/GifImagePlugin.py @@ -903,17 +903,16 @@ # https://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp version = b"87a" - for extensionKey in ["transparency", "duration", "loop", "comm...
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 @@ -807,6 +807,9 @@ with Image.open(out) as reread: assert reread.info["comment"] == im.info["comment"].encode() + # Test that GIF89a is used for comments + assert reread....
null
null
namanjain12/pillow_final:2072a52bb5479fc001cc030ea19fad3424a4f2ff
true
null
1
21
null
1,161
0
0.75
1
0.525
1
0.2635
77.503
9,529
r2e_gym::train::182
r2e_gym
train
182
orange3__ce4ad617432e04a67fdb3a6fd2b4657e566a8bf5
orange3
biolab/orange3
python
ce4ad617432e04a67fdb3a6fd2b4657e566a8bf5
**Title**: KMeans clustering produces inconsistent clusters, causing tests to fail **Description** When using the `KMeansCorrelationHeuristic` to group attributes, the clustering results are inconsistent with the expected groups. Specifically, the method returns clusters that do not match the predefined expected clust...
diff --git a/Orange/widgets/data/owcorrelations.py b/Orange/widgets/data/owcorrelations.py --- a/Orange/widgets/data/owcorrelations.py +++ b/Orange/widgets/data/owcorrelations.py @@ -70,7 +70,7 @@ :return: generator of attributes grouped by cluster """ data = Normalize()(self.data).X.T - ...
diff --git a/Orange/widgets/data/tests/test_owcorrelations.py b/Orange/widgets/data/tests/test_owcorrelations.py --- a/Orange/widgets/data/tests/test_owcorrelations.py +++ b/Orange/widgets/data/tests/test_owcorrelations.py @@ -362,7 +362,7 @@ clusters = self.heuristic.get_clusters_of_attributes() # re...
null
null
namanjain12/orange3_final:ce4ad617432e04a67fdb3a6fd2b4657e566a8bf5
true
null
2
9
null
1,398
0
0.75
1
0.525
1
0.263
77.5015
9,530
r2e_gym::train::5264
r2e_gym
train
5,264
aiohttp__eb54e6c010f55c02e49a36cb2e74b077f8aa77e4
aiohttp
aio-libs/aiohttp
python
eb54e6c010f55c02e49a36cb2e74b077f8aa77e4
**Title:** Incorrect `SERVER_PORT` in WSGI Environ Causes Test Failures **Description:** The `SERVER_PORT` variable in the WSGI environ is not correctly set to the TCP/IP port number on which the request is received from the client. Instead, it incorrectly uses the port specified in the `HOST` header, leading to incon...
diff --git a/aiohttp/wsgi.py b/aiohttp/wsgi.py --- a/aiohttp/wsgi.py +++ b/aiohttp/wsgi.py @@ -83,16 +83,23 @@ environ[key] = hdr_value + # authors should be aware that REMOTE_HOST and REMOTE_ADDR + # may not qualify the remote addr + # also SERVER_PORT variable MUST be set to the ...
diff --git a/tests/test_wsgi.py b/tests/test_wsgi.py --- a/tests/test_wsgi.py +++ b/tests/test_wsgi.py @@ -22,7 +22,8 @@ self.writer = unittest.mock.Mock() self.writer.drain.return_value = () self.transport = unittest.mock.Mock() - self.transport.get_extra_info.return_value = ('1.2.3.4...
null
null
namanjain12/aiohttp_final:eb54e6c010f55c02e49a36cb2e74b077f8aa77e4
true
null
1
15
null
1,275
0
0.75
1
0.525
1
0.2625
77.5
9,531
r2e_gym::train::6388
r2e_gym
train
6,388
pillow__e225f9f589e07d46ad5d1f79e7c233addf9c3836
pillow
python-pillow/pillow
python
e225f9f589e07d46ad5d1f79e7c233addf9c3836
**Title:** Missing DeprecationWarning When Using `hints` Argument in `ImageDraw.getdraw` **Description:** When calling `ImageDraw.getdraw` with the `hints` argument, a `DeprecationWarning` is expected to be issued to inform users that the parameter is deprecated. However, currently, no such warning is emitted. This le...
diff --git a/docs/deprecations.rst b/docs/deprecations.rst --- a/docs/deprecations.rst +++ b/docs/deprecations.rst @@ -114,6 +114,13 @@ Support for LibTIFF earlier than version 4 has been deprecated. Upgrade to a newer version of LibTIFF instead. + +ImageDraw.getdraw hints argument +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py --- a/Tests/test_imagedraw.py +++ b/Tests/test_imagedraw.py @@ -1624,3 +1624,8 @@ draw.rectangle(xy) with pytest.raises(ValueError): draw.rounded_rectangle(xy) + + +def test_getdraw(): + with pytest.warns(DeprecationWarning): + ...
null
null
namanjain12/pillow_final:e225f9f589e07d46ad5d1f79e7c233addf9c3836
true
null
3
36
null
854
0
0.75
1
0.525
1
0.262333
77.4995
9,532
r2e_gym::train::5032
r2e_gym
train
5,032
datalad__a0809ed8038e8effbf2c6e6c603ed1263f53a06f
datalad
datalad/datalad
python
a0809ed8038e8effbf2c6e6c603ed1263f53a06f
### Incorrect Subpath Construction Causes Path Duplication and Sorting Errors **Description** When processing filenames with multiple subpath delimiters, the system incorrectly constructs the subpaths, resulting in duplicated or malformed paths. This leads to inconsistencies and failures in downstream operations that ...
diff --git a/datalad/plugin/addurls.py b/datalad/plugin/addurls.py --- a/datalad/plugin/addurls.py +++ b/datalad/plugin/addurls.py @@ -176,7 +176,7 @@ spaths = [] for part in filename.split("//")[:-1]: - path = os.path.join(*(spaths + [part])) + path = os.path.join(spaths[-1], part) if spaths ...
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 @@ -12,6 +12,7 @@ import json import logging import os +import os.path as op import tempfile from mock import patch @@ -117,13 +118,34 @@ ...
null
null
namanjain12/datalad_final:a0809ed8038e8effbf2c6e6c603ed1263f53a06f
true
null
1
22
null
1,133
0
0.75
1
0.525
1
0.262167
77.499
9,533
r2e_gym::train::6652
r2e_gym
train
6,652
pillow__d33270ab51f6b62710b227394f2dadf913370d96
pillow
python-pillow/pillow
python
d33270ab51f6b62710b227394f2dadf913370d96
**Title:** Default Resampling for 'I;16*' Image Modes Incorrectly Set to NEAREST **Description:** Resizing images with modes like 'I;16', 'I;16L', 'I;16B', and 'I;16N' currently defaults to the `NEAREST` resampling filter. This leads to unexpected and lower-quality resized images when a higher-quality filter like `BIC...
diff --git a/docs/releasenotes/11.0.0.rst b/docs/releasenotes/11.0.0.rst --- a/docs/releasenotes/11.0.0.rst +++ b/docs/releasenotes/11.0.0.rst @@ -119,10 +119,11 @@ API Changes =========== -TODO -^^^^ +Default resampling filter for I;16* image modes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -TODO +The defa...
diff --git a/Tests/test_image_resize.py b/Tests/test_image_resize.py --- a/Tests/test_image_resize.py +++ b/Tests/test_image_resize.py @@ -315,14 +315,14 @@ im = im.resize((64, 64)) assert im.size == (64, 64) - @pytest.mark.parametrize("mode", ("L", "RGB", "I", "F")) + @pytest.mark.par...
null
null
namanjain12/pillow_final:d33270ab51f6b62710b227394f2dadf913370d96
true
null
2
15
null
1,271
0
0.75
1
0.525
1
0.261833
77.498
9,534
r2e_gym::train::138
r2e_gym
train
138
orange3__bafa2adcd9ea8903c568658a878911148a5fdb2c
orange3
biolab/orange3
python
bafa2adcd9ea8903c568658a878911148a5fdb2c
**Title:** OWSave Widget Displays Incorrect Data Summary in Status Bar **Description:** When loading a dataset into the OWSave widget, the information displayed in the status bar is improperly formatted. Instead of showing the number of instances as an integer along with detailed dataset information, it displays the i...
diff --git a/Orange/widgets/data/owsave.py b/Orange/widgets/data/owsave.py --- a/Orange/widgets/data/owsave.py +++ b/Orange/widgets/data/owsave.py @@ -8,6 +8,7 @@ from Orange.widgets.settings import Setting from Orange.widgets.utils.save.owsavebase import OWSaveBase from Orange.widgets.utils.widgetpreview import Wid...
diff --git a/Orange/widgets/data/tests/test_owsave.py b/Orange/widgets/data/tests/test_owsave.py --- a/Orange/widgets/data/tests/test_owsave.py +++ b/Orange/widgets/data/tests/test_owsave.py @@ -13,6 +13,7 @@ from Orange.widgets.data.owsave import OWSave, OWSaveBase from Orange.widgets.utils.save.tests.test_owsavebas...
null
null
namanjain12/orange3_final:bafa2adcd9ea8903c568658a878911148a5fdb2c
true
null
1
13
null
1,311
0
0.75
1
0.525
1
0.261833
77.498
9,535
r2e_gym::train::447
r2e_gym
train
447
orange3__819c859af40dddce7b120bb78f23770c45826dc2
orange3
biolab/orange3
python
819c859af40dddce7b120bb78f23770c45826dc2
**Title:** Output Data Does Not Preserve Subclass of Table When Using Inherited Table Types **Description:** When a subclass of `Table` is used as input, the widget is expected to maintain the subclass type in its output. However, the output data is returned as a base `Table` instance instead of the specific subclass....
diff --git a/Orange/widgets/data/owneighbors.py b/Orange/widgets/data/owneighbors.py --- a/Orange/widgets/data/owneighbors.py +++ b/Orange/widgets/data/owneighbors.py @@ -156,17 +156,16 @@ return np.argpartition(dist, up_to - 1)[:up_to] def _data_with_similarity(self, indices): - data = self.data...
diff --git a/Orange/widgets/data/tests/test_owneighbors.py b/Orange/widgets/data/tests/test_owneighbors.py --- a/Orange/widgets/data/tests/test_owneighbors.py +++ b/Orange/widgets/data/tests/test_owneighbors.py @@ -442,6 +442,16 @@ self.send_signal(w.Inputs.data, None) self.assertEqual(sb.maximum(), d...
null
null
namanjain12/orange3_final:819c859af40dddce7b120bb78f23770c45826dc2
true
null
1
21
null
1,149
0
0.75
1
0.525
1
0.2615
77.497
9,536
r2e_gym::train::392
r2e_gym
train
392
orange3__6722bb8af9aafce143effcc202e7a4d780cd750e
orange3
biolab/orange3
python
6722bb8af9aafce143effcc202e7a4d780cd750e
**Title:** Normalizer Fails to Retain Variable Attributes After Normalization **Description:** When using the `Normalizer` to normalize data, the attributes of the variables are not preserved. This leads to loss of metadata associated with each variable, which can be crucial for downstream tasks that rely on these att...
diff --git a/Orange/preprocess/normalize.py b/Orange/preprocess/normalize.py --- a/Orange/preprocess/normalize.py +++ b/Orange/preprocess/normalize.py @@ -1,6 +1,6 @@ import numpy as np -from Orange.data import ContinuousVariable, Domain +from Orange.data import Domain from Orange.statistics import distribution fr...
diff --git a/Orange/tests/test_normalize.py b/Orange/tests/test_normalize.py --- a/Orange/tests/test_normalize.py +++ b/Orange/tests/test_normalize.py @@ -142,3 +142,18 @@ [0., '2003-07-23', 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0], [0., '1967-03-12', 'a', 'b', 1., 'b', -1.225...
null
null
namanjain12/orange3_final:6722bb8af9aafce143effcc202e7a4d780cd750e
true
null
1
20
null
1,164
0
0.75
1
0.525
1
0.260667
77.4945
9,537
r2e_gym::train::5676
r2e_gym
train
5,676
scrapy__a1e8a8525d2312842c7e1cca8ba6e4e1a83084b7
scrapy
scrapy/scrapy
python
a1e8a8525d2312842c7e1cca8ba6e4e1a83084b7
**Title:** Deprecation Warning Emitted When Overriding `make_requests_from_url` in Spider Subclasses **Description:** When a Spider subclass overrides the `make_requests_from_url` method, a deprecation warning is still triggered. This behavior is unexpected because overriding the method is intended to replace the depr...
diff --git a/scrapy/spiders/__init__.py b/scrapy/spiders/__init__.py --- a/scrapy/spiders/__init__.py +++ b/scrapy/spiders/__init__.py @@ -66,11 +66,14 @@ crawler.signals.connect(self.close, signals.spider_closed) def start_requests(self): - if self.make_requests_from_url is not Spider.make_reque...
diff --git a/tests/test_spider.py b/tests/test_spider.py --- a/tests/test_spider.py +++ b/tests/test_spider.py @@ -345,7 +345,7 @@ 'http://www.example.com/sitemap-relative-url.xml']) -class BaseSpiderDeprecationTest(unittest.TestCase): +class DeprecationTest(unittest.TestCase): def...
null
null
namanjain12/scrapy_final:a1e8a8525d2312842c7e1cca8ba6e4e1a83084b7
true
null
1
11
null
1,343
0
0.75
1
0.525
1
0.2605
77.494
9,538
r2e_gym::train::6461
r2e_gym
train
6,461
pillow__e9c9f19c26c3a361c4fa17947b6b5d860e516c2c
pillow
python-pillow/pillow
python
e9c9f19c26c3a361c4fa17947b6b5d860e516c2c
**Title:** Incorrect Frame Durations Saved When Saving Multiple PNG Frames **Description:** When saving an animated PNG with multiple frames, each frame is expected to retain its individual duration. However, currently, all frames after the first one are assigned the duration of the first frame, disregarding their spe...
diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py --- a/src/PIL/PngImagePlugin.py +++ b/src/PIL/PngImagePlugin.py @@ -1105,7 +1105,7 @@ def _write_multiple_frames(im, fp, chunk, rawmode, default_image, append_images): - duration = im.encoderinfo.get("duration", im.info.get("duration", 0)) + ...
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 @@ -706,10 +706,21 @@ assert reloaded.mode == mode -def test_apng_repeated_seeks_give_correct_info() -> None: +def test_different_durations(tmp_path: Path) -> None: + test_file = st...
null
null
namanjain12/pillow_final:e9c9f19c26c3a361c4fa17947b6b5d860e516c2c
true
null
1
13
null
1,303
0
0.75
1
0.525
1
0.2605
77.494
9,539
r2e_gym::train::4904
r2e_gym
train
4,904
datalad__f75c73119236c3ff8e99800d5cb9ca4559b3b7ee
datalad
datalad/datalad
python
f75c73119236c3ff8e99800d5cb9ca4559b3b7ee
**Title**: Credential values from environment variables are not retrieved correctly **Description**: When environment variables for credentials are set, the system fails to retrieve the expected values, resulting in credentials being marked as unknown. **Bug Example**: ```python import os from datalad.downloaders.cre...
diff --git a/datalad/downloaders/credentials.py b/datalad/downloaders/credentials.py --- a/datalad/downloaders/credentials.py +++ b/datalad/downloaders/credentials.py @@ -30,6 +30,8 @@ from ..ui import ui from ..utils import auto_repr from ..support.network import iso8601_to_epoch + +from datalad import cfg as dlcfg...
diff --git a/datalad/downloaders/tests/test_credentials.py b/datalad/downloaders/tests/test_credentials.py --- a/datalad/downloaders/tests/test_credentials.py +++ b/datalad/downloaders/tests/test_credentials.py @@ -27,6 +27,7 @@ CompositeCredential, UserPassword, ) +from datalad.config import ConfigManager ...
null
null
namanjain12/datalad_final:f75c73119236c3ff8e99800d5cb9ca4559b3b7ee
true
null
1
7
null
1,422
0
0.75
1
0.525
1
0.260333
77.4935
9,540
r2e_gym::train::5629
r2e_gym
train
5,629
scrapy__3d4fe60e4780467fc682802e0de39e57578993ec
scrapy
scrapy/scrapy
python
3d4fe60e4780467fc682802e0de39e57578993ec
**Title:** Incorrect `issubclass` and `isinstance` Behavior with Subclasses of Deprecated Classes **Description:** When subclassing a deprecated class, the `issubclass` and `isinstance` functions behave unexpectedly by incorrectly identifying subclasses as related to each other, even when they shouldn't be. **Example...
diff --git a/scrapy/utils/deprecate.py b/scrapy/utils/deprecate.py --- a/scrapy/utils/deprecate.py +++ b/scrapy/utils/deprecate.py @@ -79,12 +79,18 @@ for c in {type(inst), inst.__class__}) def __subclasscheck__(cls, sub): + if cls is not DeprecatedClass.deprecated_class: +...
diff --git a/scrapy/tests/test_utils_deprecate.py b/scrapy/tests/test_utils_deprecate.py --- a/scrapy/tests/test_utils_deprecate.py +++ b/scrapy/tests/test_utils_deprecate.py @@ -145,6 +145,9 @@ class OutdatedUserClass1(DeprecatedName): pass + class OutdatedUserClass1a(Depreca...
null
null
namanjain12/scrapy_final:3d4fe60e4780467fc682802e0de39e57578993ec
true
null
1
10
null
1,361
0
0.75
1
0.525
1
0.260167
77.493
9,541
r2e_gym::train::5196
r2e_gym
train
5,196
pyramid__140fdbb54c467159313ede564dd3ad4077e30f20
pyramid
pylons/pyramid
python
140fdbb54c467159313ede564dd3ad4077e30f20
**Title:** `authenticated_userid` and `unauthenticated_userid` Return `None` When Security Policy Is Registered **Description:** When both an authentication policy and a security policy are registered, accessing `request.authenticated_userid` or `request.unauthenticated_userid` does not return the expected user ID fr...
diff --git a/src/pyramid/request.py b/src/pyramid/request.py --- a/src/pyramid/request.py +++ b/src/pyramid/request.py @@ -16,7 +16,9 @@ from pyramid.i18n import LocalizerRequestMixin from pyramid.response import Response, _get_response_factory from pyramid.security import ( - SecurityAPIMixin, AuthenticationAPIM...
diff --git a/tests/test_security.py b/tests/test_security.py --- a/tests/test_security.py +++ b/tests/test_security.py @@ -369,6 +369,12 @@ def test_with_authentication_policy(self): request = _makeRequest() _registerAuthenticationPolicy(request.registry, 'yo') + _registerSecurityPolicy(re...
null
null
namanjain12/pyramid_final:140fdbb54c467159313ede564dd3ad4077e30f20
true
null
2
24
null
1,081
0
0.75
1
0.525
1
0.260167
77.493
9,542
r2e_gym::train::5610
r2e_gym
train
5,610
scrapy__0e7ee1256c7fc98c88b7ccc143394635caa760fc
scrapy
scrapy/scrapy
python
0e7ee1256c7fc98c88b7ccc143394635caa760fc
**Title:** UrlLengthMiddleware Silently Ignores Long URLs Without Logging or Stats **Description** When `UrlLengthMiddleware` encounters a request with a URL exceeding the maximum length, it silently skips the request without logging the event or updating any statistics. This behavior makes it difficult to monitor and...
diff --git a/scrapy/spidermiddlewares/urllength.py b/scrapy/spidermiddlewares/urllength.py --- a/scrapy/spidermiddlewares/urllength.py +++ b/scrapy/spidermiddlewares/urllength.py @@ -27,9 +27,12 @@ def process_spider_output(self, response, result, spider): def _filter(request): if isinstance(...
diff --git a/tests/test_spidermiddleware_urllength.py b/tests/test_spidermiddleware_urllength.py --- a/tests/test_spidermiddleware_urllength.py +++ b/tests/test_spidermiddleware_urllength.py @@ -1,20 +1,41 @@ from unittest import TestCase + +from testfixtures import LogCapture from scrapy.spidermiddlewares.urllengt...
null
null
namanjain12/scrapy_final:0e7ee1256c7fc98c88b7ccc143394635caa760fc
true
null
1
9
null
1,380
0
0.75
1
0.525
1
0.26
77.4925
9,543
r2e_gym::train::5406
r2e_gym
train
5,406
aiohttp__af8900de0e06c187a1235acd465c4b1ed2e5e6a0
aiohttp
aio-libs/aiohttp
python
af8900de0e06c187a1235acd465c4b1ed2e5e6a0
**Title:** Cloned Request Does Not Update Scheme and Host in URL **Description:** When cloning a `Request` with a different scheme or host for absolute URLs, the cloned `Request` does not correctly reflect these changes in its URL. This leads to inconsistencies where the `Request` object's scheme or host are updated, ...
diff --git a/CHANGES/8990.bugfix.rst b/CHANGES/8990.bugfix.rst --- a/CHANGES/8990.bugfix.rst +++ b/CHANGES/8990.bugfix.rst @@ -0,0 +1 @@ +Fixed changing scheme/host in ``Response.clone()`` for absolute URLs -- by :user:`Dreamsorcerer`. diff --git a/aiohttp/web_request.py b/aiohttp/web_request.py --- a/aiohttp/web_reque...
diff --git a/tests/test_web_request.py b/tests/test_web_request.py --- a/tests/test_web_request.py +++ b/tests/test_web_request.py @@ -169,6 +169,22 @@ assert req.rel_url == URL.build(path="/path/to", query={"a": "1"}) +def test_clone_absolute_scheme() -> None: + req = make_mocked_request("GET", "https://ex...
null
null
namanjain12/aiohttp_final:af8900de0e06c187a1235acd465c4b1ed2e5e6a0
true
null
2
13
null
1,300
0
0.75
1
0.525
1
0.26
77.4925
9,544
r2e_gym::train::5505
r2e_gym
train
5,505
aiohttp__493f06797654c383242f0e8007f6e06b818a1fbc
aiohttp
aio-libs/aiohttp
python
493f06797654c383242f0e8007f6e06b818a1fbc
**Title:** HTTP Parser Accepts Non-ASCII Characters in Header Names and Incorrect Status Line Separators **Description** The HTTP parser currently accepts header names containing non-ASCII characters (`\x80-\xff`) and uses `\n` as a separator in status lines. According to RFC standards, header names should only includ...
diff --git a/CHANGES/7719.bugfix b/CHANGES/7719.bugfix --- a/CHANGES/7719.bugfix +++ b/CHANGES/7719.bugfix @@ -0,0 +1 @@ +Update parser to disallow invalid characters in header field names and stop accepting LF as a request line separator. diff --git a/aiohttp/http_parser.py b/aiohttp/http_parser.py --- a/aiohttp/http_...
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 @@ -177,6 +177,7 @@ "Baz: abc\x00def", "Foo : bar", # https://www.rfc-editor.org/rfc/rfc9112.html#section-5.1-2 "Foo\t: bar", + "\xffoo: bar", ), ) ...
null
null
namanjain12/aiohttp_final:493f06797654c383242f0e8007f6e06b818a1fbc
true
null
2
7
null
1,420
0
0.75
1
0.525
1
0.26
77.4925
9,545
r2e_gym::train::5993
r2e_gym
train
5,993
tornado__46850a7b3cee73c068b03690f1f97e8fda1326d3
tornado
tornadoweb/tornado
python
46850a7b3cee73c068b03690f1f97e8fda1326d3
**Title:** Wrapped functions return `None` when the outermost `stack_context` is deactivated **Description:** When the outermost `stack_context` is deactivated, functions wrapped by `StackContext` unexpectedly return `None` instead of their intended results. This behavior leads to loss of context information, causing ...
diff --git a/tornado/stack_context.py b/tornado/stack_context.py --- a/tornado/stack_context.py +++ b/tornado/stack_context.py @@ -240,10 +240,11 @@ while ctx is not None: parent = ctx.old_contexts[1] - while parent is not None and not parent.active: + while parent is not None: + ...
diff --git a/tornado/test/stack_context_test.py b/tornado/test/stack_context_test.py --- a/tornado/test/stack_context_test.py +++ b/tornado/test/stack_context_test.py @@ -128,6 +128,52 @@ self.io_loop.add_callback(f1) self.wait() + def test_deactivate_order(self): + # Stack context deactiv...
null
null
namanjain12/tornado_final:46850a7b3cee73c068b03690f1f97e8fda1326d3
true
null
1
11
null
1,337
0
0.75
1
0.525
1
0.2595
77.491
9,546
r2e_gym::train::5182
r2e_gym
train
5,182
pyramid__b536bd9db1c435586c476c6d03e3d314979af3ab
pyramid
pylons/pyramid
python
b536bd9db1c435586c476c6d03e3d314979af3ab
**Title:** Thread locals are inactive during `config.include` executions **Description** When using the `config.include` function to include configuration modules, the thread-local registry is not active. This causes functions executed within `config.include` to retrieve an incorrect registry instance, leading to unex...
diff --git a/CHANGES.txt b/CHANGES.txt --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,12 @@ ``server:<server_name>`` section of the config file but there is no requirement that the server is being run in this format so it may fail. See https://github.com/Pylons/pyramid/pull/2984 + +- The threadlocals are now...
diff --git a/pyramid/tests/test_config/test_init.py b/pyramid/tests/test_config/test_init.py --- a/pyramid/tests/test_config/test_init.py +++ b/pyramid/tests/test_config/test_init.py @@ -816,6 +816,16 @@ config.include(include) self.assertEqual(results['root_package'], tests) self.assertEqual...
null
null
namanjain12/pyramid_final:b536bd9db1c435586c476c6d03e3d314979af3ab
true
null
2
17
null
1,215
0
0.75
1
0.525
1
0.259167
77.49
9,547
swe_bench::test::1544
swe_bench
test
1,544
scikit-learn__scikit-learn-11596
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
51407623e4f491f00e3b465626dd5c4b55860bd0
Add sklearn.show_versions() similar to pandas.show_versions (with numpy blas binding info) Some numeric issues are related to the specific blas that numpy is using. I'm wondering if it makes sense to add the relevant ``system_info`` invocations to the template to make it easier for people to report.
I don't see why not! @lesteve suggested we could add something like `pandas.show_versions()` that would print all the relevant information for debugging. For instance, on my laptop, I get, <details> ``` >>> pd.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 3.6.5.final.0 python-b...
diff --git a/sklearn/__init__.py b/sklearn/__init__.py --- a/sklearn/__init__.py +++ b/sklearn/__init__.py @@ -62,6 +62,8 @@ else: from . import __check_build from .base import clone + from .utils._show_versions import show_versions + __check_build # avoid flakes unused variable error __all__...
diff --git a/sklearn/utils/tests/test_print_versions.py b/sklearn/utils/tests/test_print_versions.py new file mode 100644 --- /dev/null +++ b/sklearn/utils/tests/test_print_versions.py @@ -0,0 +1,32 @@ + +from sklearn.utils._show_versions import _get_sys_info +from sklearn.utils._show_versions import _get_deps_info +fr...
["sklearn/utils/tests/test_print_versions.py::test_get_sys_info", "sklearn/utils/tests/test_print_versions.py::test_get_deps_info", "sklearn/utils/tests/test_print_versions.py::test_show_versions_with_blas"]
[]
null
true
2018-07-17T15:42:55Z
2
124
3
300
0
0.8
1
0.4
1
0.463333
77.49
9,548
r2e_gym::train::4023
r2e_gym
train
4,023
coveragepy__afe6cf34d022e8dbbaa47826c487a98ca6832721
coveragepy
nedbat/coveragepy
python
afe6cf34d022e8dbbaa47826c487a98ca6832721
**Title:** Coverage Incorrectly Measures Unexecuted Lines in Doctests **Description:** When using doctests, the coverage tool incorrectly marks lines from generated code as covered, even if they aren't executed. This leads to inaccurate coverage reports. **Example Buggy Code:** ```python def return_arg_or_void(arg): ...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -30,6 +30,12 @@ - Feature: The HTML report pages for Python source files now have a sticky header so the file name and controls are always visible. +- Fix: more generated code is now excluded from measurement. Code such as + `attrs`_ ...
diff --git a/tests/test_oddball.py b/tests/test_oddball.py --- a/tests/test_oddball.py +++ b/tests/test_oddball.py @@ -393,7 +393,13 @@ """Tests invoked with doctest should measure properly.""" def test_doctest(self): - self.check_coverage('''\ + # Doctests used to be traced, with their line n...
null
null
namanjain12/coveragepy_final:afe6cf34d022e8dbbaa47826c487a98ca6832721
true
null
3
13
null
1,292
0
0.75
1
0.525
1
0.258667
77.4885
9,549
r2e_gym::train::276
r2e_gym
train
276
orange3__ef5a39c97efc73424c56aeed725e3a61f0c5731e
orange3
biolab/orange3
python
ef5a39c97efc73424c56aeed725e3a61f0c5731e
**Title:** Performance Regression Due to Improper Jittering Suspension in Scatterplot **Description:** Suspending jittering in the scatterplot widget does not correctly prevent unnecessary updates when jittering is already suspended or when the jitter size is set to zero. This leads to redundant computations during sc...
diff --git a/Orange/widgets/visualize/owscatterplotgraph.py b/Orange/widgets/visualize/owscatterplotgraph.py --- a/Orange/widgets/visualize/owscatterplotgraph.py +++ b/Orange/widgets/visualize/owscatterplotgraph.py @@ -642,12 +642,18 @@ self.tip_textitem.setHtml(text) def suspend_jittering(self): + ...
diff --git a/Orange/widgets/visualize/tests/test_owscatterplotbase.py b/Orange/widgets/visualize/tests/test_owscatterplotbase.py --- a/Orange/widgets/visualize/tests/test_owscatterplotbase.py +++ b/Orange/widgets/visualize/tests/test_owscatterplotbase.py @@ -364,6 +364,29 @@ x, y = scatterplot_item.getData() ...
null
null
namanjain12/orange3_final:ef5a39c97efc73424c56aeed725e3a61f0c5731e
true
null
1
10
null
1,350
0
0.75
1
0.525
1
0.258333
77.4875
9,550
r2e_gym::train::6633
r2e_gym
train
6,633
pillow__541d2605b9235a427379e3df51c9cdd4ffe59998
pillow
python-pillow/pillow
python
541d2605b9235a427379e3df51c9cdd4ffe59998
**Title:** GIF Saving Ignores Alpha Differences, Resulting in Incorrect Frame Count **Description:** When saving a GIF with frames that have differences in the alpha channel, the resulting GIF incorrectly registers only one frame instead of the expected multiple frames. This behavior prevents proper animation where tr...
diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py --- a/src/PIL/GifImagePlugin.py +++ b/src/PIL/GifImagePlugin.py @@ -569,9 +569,9 @@ delta = ImageChops.subtract_modulo(im_frame, base_im) else: delta = ImageChops.subtract_modulo( - im_frame.convert("RGB"), base_im.conv...
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 @@ -1130,6 +1130,18 @@ assert reread.n_frames == 2 +def test_bbox_alpha(tmp_path): + out = str(tmp_path / "temp.gif") + + im = Image.new("RGBA", (1, 2), (255, 0, 0, 255)) + im.put...
null
null
namanjain12/pillow_final:541d2605b9235a427379e3df51c9cdd4ffe59998
true
null
2
6
null
1,425
0
0.75
1
0.525
1
0.2575
77.485
9,551
r2e_gym::train::207
r2e_gym
train
207
orange3__d6ef63ae41b15730dd30b19c82bcb362981768c3
orange3
biolab/orange3
python
d6ef63ae41b15730dd30b19c82bcb362981768c3
**Title:** OWRandomize Widget Displays Incomplete Summary Information **Description:** The OWRandomize widget fails to display detailed summary information in the status bar when data is set. Specifically, the widget only shows the number of instances without additional details about the data. This issue arises becaus...
diff --git a/Orange/widgets/data/owrandomize.py b/Orange/widgets/data/owrandomize.py --- a/Orange/widgets/data/owrandomize.py +++ b/Orange/widgets/data/owrandomize.py @@ -7,6 +7,7 @@ from Orange.preprocess import Randomize from Orange.widgets.settings import Setting from Orange.widgets.utils.widgetpreview import Wid...
diff --git a/Orange/widgets/data/tests/test_owrandomize.py b/Orange/widgets/data/tests/test_owrandomize.py --- a/Orange/widgets/data/tests/test_owrandomize.py +++ b/Orange/widgets/data/tests/test_owrandomize.py @@ -7,6 +7,7 @@ from Orange.data import Table from Orange.widgets.data.owrandomize import OWRandomize from...
null
null
namanjain12/orange3_final:d6ef63ae41b15730dd30b19c82bcb362981768c3
true
null
1
13
null
1,283
0
0.75
1
0.525
1
0.257167
77.484
9,552
r2e_gym::train::6573
r2e_gym
train
6,573
pillow__375556ffb5434e58408cc0eebc507fcb3d439644
pillow
python-pillow/pillow
python
375556ffb5434e58408cc0eebc507fcb3d439644
**Thumbnail Generation Causes High Pixel Differences for Images Crossing DCT Grid** **Description** When generating thumbnails for images with dimensions that cross the Discrete Cosine Transform (DCT) grid boundaries, the resulting thumbnails exhibit significant average pixel value differences compared to the expected...
diff --git a/src/PIL/Image.py b/src/PIL/Image.py --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2212,14 +2212,17 @@ x = int(max(x * size[1] / y, 1)) y = int(size[1]) size = x, y + box = None if size == self.size: return - self.draft(None, siz...
diff --git a/Tests/test_image_thumbnail.py b/Tests/test_image_thumbnail.py --- a/Tests/test_image_thumbnail.py +++ b/Tests/test_image_thumbnail.py @@ -1,6 +1,6 @@ from PIL import Image -from .helper import PillowTestCase, hopper +from .helper import PillowTestCase, hopper, fromstring, tostring class TestImageTh...
null
null
namanjain12/pillow_final:375556ffb5434e58408cc0eebc507fcb3d439644
true
null
1
7
null
1,401
0
0.75
1
0.525
1
0.256833
77.483
9,553
r2e_gym::train::4920
r2e_gym
train
4,920
datalad__d506f925df22667910adb647463856cbcee325c5
datalad
datalad/datalad
python
d506f925df22667910adb647463856cbcee325c5
**Title:** GitRepo.merge Allows Merging Unrelated Histories Without Explicit Permission **Description:** When attempting to merge two independent repositories, the `GitRepo.merge` function proceeds without requiring explicit permission to allow unrelated histories. This behavior can lead to unintended merges, causing ...
diff --git a/changelog.d/pr-7312.md b/changelog.d/pr-7312.md --- a/changelog.d/pr-7312.md +++ b/changelog.d/pr-7312.md @@ -0,0 +1,3 @@ +### 🐛 Bug Fixes + +- BF: GitRepo.merge do not allow merging unrelated unconditionally. [PR #7312](https://github.com/datalad/datalad/pull/7312) (by [@yarikoptic](https://github.com/y...
diff --git a/datalad/distribution/tests/test_update.py b/datalad/distribution/tests/test_update.py --- a/datalad/distribution/tests/test_update.py +++ b/datalad/distribution/tests/test_update.py @@ -490,6 +490,23 @@ assert_status('impossible', ds.update(merge=True, on_failure='ignore')) +def test_unrelated_his...
null
null
namanjain12/datalad_final:d506f925df22667910adb647463856cbcee325c5
true
null
2
6
null
1,421
0
0.75
1
0.525
1
0.256833
77.483
9,554
r2e_gym::train::6223
r2e_gym
train
6,223
pillow__c70977aad7196104c975fd89fe0e3f621fa1a84b
pillow
python-pillow/pillow
python
c70977aad7196104c975fd89fe0e3f621fa1a84b
**Title:** Crop Operation Bypasses Decompression Bomb Check, Allowing Large Image Regions Without Warning **Description:** When performing a crop operation that enlarges the image dimensions, the decompression bomb check is not triggered. This oversight allows the processing of excessively large image regions without ...
diff --git a/PIL/Image.py b/PIL/Image.py --- a/PIL/Image.py +++ b/PIL/Image.py @@ -1042,6 +1042,20 @@ if box is None: return self.copy() + return self._new(self._crop(self.im, box)) + + def _crop(self, im, box): + """ + Returns a rectangular region from the core image obj...
diff --git a/Tests/test_decompression_bomb.py b/Tests/test_decompression_bomb.py --- a/Tests/test_decompression_bomb.py +++ b/Tests/test_decompression_bomb.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase +from helper import unittest, PillowTestCase, hopper from PIL import Image @@ -35,9 +35,24 @@ ...
null
null
namanjain12/pillow_final:c70977aad7196104c975fd89fe0e3f621fa1a84b
true
null
1
20
null
1,139
0
0.75
1
0.525
1
0.2565
77.482
9,555
r2e_gym::train::6634
r2e_gym
train
6,634
pillow__8cb1e294914042ebcb3670e12327ef4df1758d93
pillow
python-pillow/pillow
python
8cb1e294914042ebcb3670e12327ef4df1758d93
**Title:** Accessing `has_transparency_data` Raises AttributeError and WebP Images Lose Transparency **Description:** When handling images with transparency, attempting to access the `has_transparency_data` property on an `Image` object results in an `AttributeError`. Additionally, saving such images in WebP format d...
diff --git a/docs/reference/Image.rst b/docs/reference/Image.rst --- a/docs/reference/Image.rst +++ b/docs/reference/Image.rst @@ -351,6 +351,8 @@ .. seealso:: :attr:`~Image.is_animated`, :func:`~Image.seek` and :func:`~Image.tell` +.. autoattribute:: PIL.Image.Image.has_transparency_data + Classes ------- ...
diff --git a/Tests/test_file_webp.py b/Tests/test_file_webp.py --- a/Tests/test_file_webp.py +++ b/Tests/test_file_webp.py @@ -235,3 +235,13 @@ with Image.open(out_webp) as reloaded: reloaded.load() assert reloaded.info["duration"] == 1000 + + def test_roundtrip_rgba_palette(self, ...
null
null
namanjain12/pillow_final:8cb1e294914042ebcb3670e12327ef4df1758d93
true
null
4
41
null
1,430
0
0.75
1
0.6375
0.85
0.375
77.48125
9,556
r2e_gym::train::6315
r2e_gym
train
6,315
pillow__2c9a9b35293382882dcd58cb208006910c2d7966
pillow
python-pillow/pillow
python
2c9a9b35293382882dcd58cb208006910c2d7966
### ICO Saving in BMP Format Alters Image Mode for Non-RGBA Images When saving ICO files using the BMP format, images with modes other than "RGBA" are incorrectly converted to "RGBA" upon reloading. This behavior affects image modes such as "1", "L", "P", and "RGB", leading to unintended changes in image properties. ...
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 @@ -246,6 +246,12 @@ the size of each image. .. versionadded:: 8.1.0 + +**bitmap_format** + By default, the image data will be sav...
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 @@ -54,6 +54,35 @@ assert (32, 32) == reloaded.size assert reloaded.format == "ICO" assert_image_equal(reloaded, hopper().resize((32, 32), Image.LANCZOS)) + + +@pytest.mark.p...
null
null
namanjain12/pillow_final:2c9a9b35293382882dcd58cb208006910c2d7966
true
null
2
29
null
949
0
0.75
1
0.525
1
0.254833
77.477
9,557
r2e_gym::train::5001
r2e_gym
train
5,001
datalad__7ad7e433751fa9e2d68169b1382b92ed7855c5c9
datalad
datalad/datalad
python
7ad7e433751fa9e2d68169b1382b92ed7855c5c9
**Title**: Git Configuration Retrieval Fails When HOME Environment Variable Is Unset **Description**: When the `HOME` environment variable is not set, attempts to retrieve Git user configuration (`user.name` and `user.email`) fail, causing the configuration check to return `None` instead of the expected values. For e...
diff --git a/datalad/__init__.py b/datalad/__init__.py --- a/datalad/__init__.py +++ b/datalad/__init__.py @@ -85,16 +85,34 @@ _test_states = { 'loglevel': None, 'DATALAD_LOG_LEVEL': None, + 'HOME': None, } def setup_package(): import os + _test_states['HOME'] = os.environ.get('HOME', None...
diff --git a/datalad/tests/test_base.py b/datalad/tests/test_base.py --- a/datalad/tests/test_base.py +++ b/datalad/tests/test_base.py @@ -13,6 +13,7 @@ with_tree, assert_raises, + assert_equal, ) @@ -32,3 +33,15 @@ require_dataset, None, check_installed=True, purpose='test...
null
null
namanjain12/datalad_final:7ad7e433751fa9e2d68169b1382b92ed7855c5c9
true
null
2
30
null
927
0
0.75
1
0.525
1
0.2545
77.476
9,558
r2e_gym::train::6006
r2e_gym
train
6,006
tornado__9a8a98eae18fc0c46a345d8d441130c24c2cf490
tornado
tornadoweb/tornado
python
9a8a98eae18fc0c46a345d8d441130c24c2cf490
**Title:** Wildcard ETag '*' Not Handled Correctly, Returning 200 Instead of 304 **Description:** **Problem:** When a client sends a request with the `If-None-Match` header set to `*`, the server is expected to respond with a `304 Not Modified` status if any ETag exists for the requested resource. This behavior allow...
diff --git a/tornado/web.py b/tornado/web.py --- a/tornado/web.py +++ b/tornado/web.py @@ -1310,9 +1310,27 @@ before completing the request. The ``Etag`` header should be set (perhaps with `set_etag_header`) before calling this method. """ - etag = self._headers.get("Etag") - i...
diff --git a/maint/test/redbot/red_test.py b/maint/test/redbot/red_test.py --- a/maint/test/redbot/red_test.py +++ b/maint/test/redbot/red_test.py @@ -34,6 +34,13 @@ yield gen.Task(self.flush) self.finish() +class CacheHandler(RequestHandler): + def get(self, computed_etag): + self.write(c...
null
null
namanjain12/tornado_final:9a8a98eae18fc0c46a345d8d441130c24c2cf490
true
null
1
24
null
1,046
0
0.75
1
0.525
1
0.254333
77.4755
9,559
r2e_gym::train::5609
r2e_gym
train
5,609
scrapy__782f866572d8bf8b1673ea962ae57d7631d1d9de
scrapy
scrapy/scrapy
python
782f866572d8bf8b1673ea962ae57d7631d1d9de
**Title:** FormRequest.from_response Fails to Handle Duplicate Form Keys Correctly **Description:** When using the `FormRequest.from_response` method with form data containing duplicate keys, the additional values for the duplicated keys are not included in the generated request. Instead, only the last value for each ...
diff --git a/scrapy/http/request/form.py b/scrapy/http/request/form.py --- a/scrapy/http/request/form.py +++ b/scrapy/http/request/form.py @@ -114,10 +114,12 @@ def _get_inputs(form, formdata, dont_click, clickdata, response): try: - formdata = dict(formdata or ()) + formdata_keys = dict(formdata ...
diff --git a/tests/test_http_request.py b/tests/test_http_request.py --- a/tests/test_http_request.py +++ b/tests/test_http_request.py @@ -400,6 +400,29 @@ self.assertEqual(set(fs[u'one']), {u'two', u'three'}) self.assertEqual(fs[u'test2'], [u'xxx µ']) self.assertEqual(fs[u'six'], [u'seven'])...
null
null
namanjain12/scrapy_final:782f866572d8bf8b1673ea962ae57d7631d1d9de
true
null
1
11
null
1,300
0
0.75
1
0.525
1
0.253333
77.4725
9,560
r2e_gym::train::143
r2e_gym
train
143
orange3__1f43169ffd55745300c8429f81b95e2494e63072
orange3
biolab/orange3
python
1f43169ffd55745300c8429f81b95e2494e63072
**Title:** DBSCAN Clustering Does Not Retain Original Data IDs **Description:** When performing DBSCAN clustering on a dataset, the output annotated data fails to preserve the original data IDs. This causes inconsistencies between the input and output datasets, making it difficult to trace each data point back to its ...
diff --git a/Orange/widgets/unsupervised/owdbscan.py b/Orange/widgets/unsupervised/owdbscan.py --- a/Orange/widgets/unsupervised/owdbscan.py +++ b/Orange/widgets/unsupervised/owdbscan.py @@ -10,7 +10,7 @@ from Orange.widgets import widget, gui from Orange.widgets.utils.slidergraph import SliderGraph from Orange.widg...
diff --git a/Orange/widgets/unsupervised/tests/test_owdbscan.py b/Orange/widgets/unsupervised/tests/test_owdbscan.py --- a/Orange/widgets/unsupervised/tests/test_owdbscan.py +++ b/Orange/widgets/unsupervised/tests/test_owdbscan.py @@ -217,6 +217,11 @@ w = self.widget data = Table("titanic") s...
null
null
namanjain12/orange3_final:1f43169ffd55745300c8429f81b95e2494e63072
true
null
1
16
null
1,199
0
0.75
1
0.525
1
0.253167
77.472
9,561
r2e_gym::train::31
r2e_gym
train
31
orange3__8826e2e4a3e3a6c81b51f56115264a0141036c34
orange3
biolab/orange3
python
8826e2e4a3e3a6c81b51f56115264a0141036c34
**Title:** Duplicated Proposals Receive Identical Suffixes in `get_unique_names` **Description:** When multiple duplicate proposals are provided to the `get_unique_names` function, the suffixes appended to make the names unique are not incremented correctly. This results in duplicated names with identical suffixes ins...
diff --git a/Orange/data/util.py b/Orange/data/util.py --- a/Orange/data/util.py +++ b/Orange/data/util.py @@ -213,8 +213,31 @@ return get_unique_names(names, [proposed])[0] indices = {name: get_indices(names, name) for name in proposed} indices = {name: max(ind) + 1 for name, ind in indices.items() ...
diff --git a/Orange/data/tests/test_util.py b/Orange/data/tests/test_util.py --- a/Orange/data/tests/test_util.py +++ b/Orange/data/tests/test_util.py @@ -120,6 +120,47 @@ ["foo (1)", "bar (1)", "baz (4)"] ) + def test_get_unique_names_duplicated_proposals(self): + names = ["foo", "bar...
null
null
namanjain12/orange3_final:8826e2e4a3e3a6c81b51f56115264a0141036c34
true
null
1
23
null
1,052
0
0.75
1
0.525
1
0.252
77.4685
9,562
r2e_gym::train::6584
r2e_gym
train
6,584
pillow__af672b1d7e8a4545400777acdd6ce514f37d6cee
pillow
python-pillow/pillow
python
af672b1d7e8a4545400777acdd6ce514f37d6cee
**Title:** Incorrect RGBA Conversion for 'P' Mode Images with Integer Transparency **Description:** When working with palette-based ('P' mode) images, setting the transparency using an integer value and converting the image to 'RGBA' results in incorrect transparency handling. This leads to discrepancies between the o...
diff --git a/PIL/Image.py b/PIL/Image.py --- a/PIL/Image.py +++ b/PIL/Image.py @@ -867,7 +867,17 @@ trns = trns_im.getpixel((0,0)) elif self.mode == 'P' and mode == 'RGBA': + t = self.info['transparency'] delete_trns = True + + ...
diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -347,8 +347,8 @@ im2 = Image.open(f) self.assertIn('transparency', im2.info) - self.assert_image_similar(im2.convert('RGBA'), im.convert('RGBA'), - ...
null
null
namanjain12/pillow_final:af672b1d7e8a4545400777acdd6ce514f37d6cee
true
null
1
10
null
1,312
0
0.75
1
0.525
1
0.252
77.4685
9,563
r2e_gym::train::6386
r2e_gym
train
6,386
pillow__ba7502c0567c57cab9a192df5dd2720743a042c0
pillow
python-pillow/pillow
python
ba7502c0567c57cab9a192df5dd2720743a042c0
**Title:** TIFF Saving Lacks EXIF Data Support, Causing Metadata Loss **Description:** When saving TIFF images without specifying the `exif` keyword argument, the EXIF metadata is not preserved. This leads to discrepancies between the original and saved images' metadata, causing related tests to fail. **Example Code:...
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 @@ -903,6 +903,11 @@ require a matching type in :py:attr:`~PIL.TiffImagePlugin.ImageFileDirectory_v2.tagtype` tagtype. +**exif** + ...
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 @@ -403,10 +403,8 @@ with Image.open("Tests/images/ifd_tag_type.tiff") as im: assert 0x8825 in im.tag_v2 - def test_exif(self): - with Image.open("Tests/images/ifd...
null
null
namanjain12/pillow_final:ba7502c0567c57cab9a192df5dd2720743a042c0
true
null
2
32
null
869
0
0.75
1
0.525
1
0.2515
77.467
9,564
r2e_gym::train::4035
r2e_gym
train
4,035
coveragepy__3760b9876cc837f7d5d22fbadf6a0da51eb9cec5
coveragepy
nedbat/coveragepy
python
3760b9876cc837f7d5d22fbadf6a0da51eb9cec5
**Title:** `lcov` Command Fails to Report Total Coverage, Breaking `--fail-under` Option **Description:** When using the `lcov` command to generate coverage reports, the total coverage percentage is not being reported. This issue causes the `--fail-under` option to malfunction, as it relies on the total coverage value...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -29,6 +29,9 @@ `issue 1516`_. - Fix: adjusted how decorators are traced on PyPy 7.3.10, fixing `issue 1515`_. + +- Fix: the ``coverage lcov`` report did not properly implement the + ``--fail-under=MIN`` option. This has been fixed. ...
diff --git a/tests/test_lcov.py b/tests/test_lcov.py --- a/tests/test_lcov.py +++ b/tests/test_lcov.py @@ -3,6 +3,7 @@ """Test LCOV-based summary reporting for coverage.py.""" +import math import textwrap from tests.coveragetest import CoverageTest @@ -75,7 +76,8 @@ self.assert_doesnt_exist(".coverage...
null
null
namanjain12/coveragepy_final:3760b9876cc837f7d5d22fbadf6a0da51eb9cec5
true
null
2
10
null
1,305
0
0.75
1
0.525
1
0.250833
77.465
9,565
r2e_gym::train::6127
r2e_gym
train
6,127
pillow__de6158f5f1d0b464d1f3817790d6a299dcf4b19c
pillow
python-pillow/pillow
python
de6158f5f1d0b464d1f3817790d6a299dcf4b19c
**Title:** Incorrect Handling of 'progressive' Flag Causes Compatibility Test to Fail **Description:** When saving JPEG images with the `progressive` or `progression` option set to `0`, the metadata should indicate that the image is not progressive. However, the current implementation incorrectly sets the `progressive...
diff --git a/PIL/JpegImagePlugin.py b/PIL/JpegImagePlugin.py --- a/PIL/JpegImagePlugin.py +++ b/PIL/JpegImagePlugin.py @@ -682,13 +682,16 @@ o8(len(markers)) + marker) i += 1 + # "progressive" is the official name, but older documentation + # says "progression" + # FIXME: ...
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 @@ -227,12 +227,20 @@ def test_progressive_compat(self): im1 = self.roundtrip(hopper()) + self.assertFalse(im1.info.get("progressive")) + self.assertFalse(im1.info.get...
null
null
namanjain12/pillow_final:de6158f5f1d0b464d1f3817790d6a299dcf4b19c
true
null
1
13
null
1,243
0
0.75
1
0.525
1
0.2505
77.464
9,566
r2e_gym::train::119
r2e_gym
train
119
orange3__40847cd66c140e58c940c50449aa173c752b5ded
orange3
biolab/orange3
python
40847cd66c140e58c940c50449aa173c752b5ded
**Title:** OWPreprocess Widget Fails to Update Status Bar with Data Summaries **Description:** When data is set or cleared in the `OWPreprocess` widget, the status bar does not display the number of input and output data instances. This leads to tests that verify the status bar updates to fail, indicating that the wid...
diff --git a/Orange/widgets/data/owpreprocess.py b/Orange/widgets/data/owpreprocess.py --- a/Orange/widgets/data/owpreprocess.py +++ b/Orange/widgets/data/owpreprocess.py @@ -1144,6 +1144,9 @@ box = gui.vBox(self.controlArea, "Output") gui.auto_send(box, self, "autocommit", box=False) + self....
diff --git a/Orange/widgets/data/tests/test_owpreprocess.py b/Orange/widgets/data/tests/test_owpreprocess.py --- a/Orange/widgets/data/tests/test_owpreprocess.py +++ b/Orange/widgets/data/tests/test_owpreprocess.py @@ -1,5 +1,6 @@ # Test methods with long descriptive names can omit docstrings -# pylint: disable=missin...
null
null
namanjain12/orange3_final:40847cd66c140e58c940c50449aa173c752b5ded
true
null
1
9
null
1,323
0
0.75
1
0.525
1
0.2505
77.464
9,567
r2e_gym::train::5682
r2e_gym
train
5,682
scrapy__c961438d5d9998344460d930ea502fae40553043
scrapy
scrapy/scrapy
python
c961438d5d9998344460d930ea502fae40553043
**Title:** Misleading Error When `process_spider_output` Returns a Coroutine **Description:** When a middleware's `process_spider_output` method returns a coroutine instead of an asynchronous generator, Scrapy raises an `_InvalidOutput` exception with an unclear error message. Instead of specifying that an asynchronou...
diff --git a/scrapy/core/spidermw.py b/scrapy/core/spidermw.py --- a/scrapy/core/spidermw.py +++ b/scrapy/core/spidermw.py @@ -4,7 +4,7 @@ See documentation in docs/topics/spider-middleware.rst """ import logging -from inspect import isasyncgenfunction +from inspect import isasyncgenfunction, iscoroutine from itert...
diff --git a/tests/test_spidermiddleware.py b/tests/test_spidermiddleware.py --- a/tests/test_spidermiddleware.py +++ b/tests/test_spidermiddleware.py @@ -123,6 +123,11 @@ start_index = 10 return {i: c for c, i in enumerate(mw_classes, start=start_index)} + def _scrape_func(self, *args, **kwa...
null
null
namanjain12/scrapy_final:c961438d5d9998344460d930ea502fae40553043
true
null
1
19
null
1,122
0
0.75
1
0.525
1
0.250333
77.4635
9,568
r2e_gym::train::5211
r2e_gym
train
5,211
pyramid__1bdb556e2122204e84429e9b1001d10367203a6c
pyramid
pylons/pyramid
python
1bdb556e2122204e84429e9b1001d10367203a6c
**Title:** Route Data Incorrectly References Class-Based Views Without Attributes **Description:** When configuring a route with a class-based view and specifying an attribute to use as the view callable, the routing system fails to include the attribute in the view reference. This results in the route data referencin...
diff --git a/pyramid/scripts/proutes.py b/pyramid/scripts/proutes.py --- a/pyramid/scripts/proutes.py +++ b/pyramid/scripts/proutes.py @@ -184,8 +184,15 @@ request_method = view.get('request_methods') if request_method is not None: - view_callable = view['callable'...
diff --git a/pyramid/tests/test_scripts/dummy.py b/pyramid/tests/test_scripts/dummy.py --- a/pyramid/tests/test_scripts/dummy.py +++ b/pyramid/tests/test_scripts/dummy.py @@ -69,6 +69,9 @@ class DummyView(object): def __init__(self, **attrs): self.__request_attrs__ = attrs + + def view(context, reques...
null
null
namanjain12/pyramid_final:1bdb556e2122204e84429e9b1001d10367203a6c
true
null
1
11
null
1,282
0
0.75
1
0.525
1
0.250333
77.4635
9,569
swe_bench::test::1198
swe_bench
test
1,198
psf__requests-4106
psf/requests
psf/requests
python
2d763c90ae6ccee1a3c64bf70add776a2ba395ef
AttributeError: module 'requests.packages' has no attribute 'urllib3' This [commit](https://github.com/requests/requests/commit/588e8f7f640f774e71d61b53ccb34d310172e0ad) seems to have broken requests.packages. ## Expected Result requests.packages.urllib3 to be the urllib3 package ## Actual Result AttributeError: mo...
diff --git a/requests/packages.py b/requests/packages.py --- a/requests/packages.py +++ b/requests/packages.py @@ -4,7 +4,7 @@ # I don't like it either. Just look the other way. :) for package in ('urllib3', 'idna', 'chardet'): - __import__(package) + locals()[package] = __import__(package) # This traver...
diff --git a/tests/test_packages.py b/tests/test_packages.py new file mode 100644 --- /dev/null +++ b/tests/test_packages.py @@ -0,0 +1,13 @@ +import requests + + +def test_can_access_urllib3_attribute(): + requests.packages.urllib3 + + +def test_can_access_idna_attribute(): + requests.packages.idna + + +def test...
["tests/test_packages.py::test_can_access_urllib3_attribute", "tests/test_packages.py::test_can_access_idna_attribute", "tests/test_packages.py::test_can_access_chardet_attribute"]
[]
null
true
2017-05-29T21:28:15Z
1
2
3
986
0
0.8
1
1
0.4
0.171
77.463
9,570
r2e_gym::train::6075
r2e_gym
train
6,075
pillow__f8d061c88efcd42cfccfbe9f3e57dba9bd7a1854
pillow
python-pillow/pillow
python
f8d061c88efcd42cfccfbe9f3e57dba9bd7a1854
**Title:** Error Logged When Closing Image Without `fp` Attribute **Description:** When attempting to close an `Image` object that does not have the `fp` attribute, an error is logged indicating that the `'Image' object has no attribute 'fp'`. This occurs during the closing process, leading to unexpected debug message...
diff --git a/src/PIL/Image.py b/src/PIL/Image.py --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -549,16 +549,17 @@ :py:meth:`~PIL.Image.Image.load` method. See :ref:`file-handling` for more information. """ - try: - if getattr(self, "_fp", False): - if self....
diff --git a/Tests/test_image.py b/Tests/test_image.py --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -1,4 +1,5 @@ import io +import logging import os import shutil import sys @@ -1014,6 +1015,15 @@ except OSError as e: assert str(e) == "buffer overrun when reading image file" ...
null
null
namanjain12/pillow_final:f8d061c88efcd42cfccfbe9f3e57dba9bd7a1854
true
null
1
21
null
1,079
0
0.75
1
0.525
1
0.249833
77.462
9,571
r2e_gym::train::5602
r2e_gym
train
5,602
scrapy__13735bcf34b0caf60a52e95a907ef390324fdddc
scrapy
scrapy/scrapy
python
13735bcf34b0caf60a52e95a907ef390324fdddc
**Title:** Unregistered Media Extensions Included in File Paths **Description:** When processing media URLs with extensions that are not registered with IANA, the file paths incorrectly include these unregistered extensions. This leads to inconsistencies in how media files are stored and managed. For example, process...
diff --git a/scrapy/pipelines/files.py b/scrapy/pipelines/files.py --- a/scrapy/pipelines/files.py +++ b/scrapy/pipelines/files.py @@ -5,6 +5,7 @@ """ import functools import hashlib +import mimetypes import os import os.path import time @@ -13,6 +14,7 @@ from six.moves.urllib.parse import urlparse from collect...
diff --git a/tests/test_pipeline_files.py b/tests/test_pipeline_files.py --- a/tests/test_pipeline_files.py +++ b/tests/test_pipeline_files.py @@ -57,6 +57,12 @@ response=Response("http://www.dorma.co.uk/images/product_details/2532"), info=object()...
null
null
namanjain12/scrapy_final:13735bcf34b0caf60a52e95a907ef390324fdddc
true
null
1
9
null
1,318
0
0.75
1
0.525
1
0.249667
77.4615
9,572
r2e_gym::train::349
r2e_gym
train
349
orange3__a248b962b2e6a39556985aa6817d1eb6236e33e8
orange3
biolab/orange3
python
a248b962b2e6a39556985aa6817d1eb6236e33e8
**[ISSUE]** **Title:** `widget.attr_pairs` incorrectly updated when `attr_pairs` is missing in context **Description:** When the `attr_pairs` key is not present in the context values, the `MergeDataContextHandler` incorrectly sets `widget.attr_pairs` to an empty list instead of retaining its default value. **Example...
diff --git a/Orange/widgets/data/owmergedata.py b/Orange/widgets/data/owmergedata.py --- a/Orange/widgets/data/owmergedata.py +++ b/Orange/widgets/data/owmergedata.py @@ -221,8 +221,13 @@ context = widget.current_context if context is None: return - pairs = context.values.get("attr...
diff --git a/Orange/widgets/data/tests/test_owmergedata.py b/Orange/widgets/data/tests/test_owmergedata.py --- a/Orange/widgets/data/tests/test_owmergedata.py +++ b/Orange/widgets/data/tests/test_owmergedata.py @@ -4,6 +4,7 @@ # pylint: disable=too-many-lines,too-many-public-methods, protected-access from itertools i...
null
null
namanjain12/orange3_final:a248b962b2e6a39556985aa6817d1eb6236e33e8
true
null
1
16
null
1,178
0
0.75
1
0.525
1
0.249667
77.4615
9,573
r2e_gym::train::168
r2e_gym
train
168
orange3__0a83c6c2e785f5f7554c39f38fe70aa38c199f65
orange3
biolab/orange3
python
0a83c6c2e785f5f7554c39f38fe70aa38c199f65
**Title: Pivot Widget Displays Numerical Timestamps Instead of Formatted Dates When Grouping by TimeVariable** **Description** When using the Pivot widget to group data by a `TimeVariable`, the output table incorrectly displays numerical timestamps instead of human-readable date strings. This makes it difficult to in...
diff --git a/Orange/widgets/data/owpivot.py b/Orange/widgets/data/owpivot.py --- a/Orange/widgets/data/owpivot.py +++ b/Orange/widgets/data/owpivot.py @@ -14,7 +14,7 @@ QGridLayout) from Orange.data import (Table, DiscreteVariable, Variable, Domain, - ContinuousV...
diff --git a/Orange/widgets/data/tests/test_owpivot.py b/Orange/widgets/data/tests/test_owpivot.py --- a/Orange/widgets/data/tests/test_owpivot.py +++ b/Orange/widgets/data/tests/test_owpivot.py @@ -10,7 +10,8 @@ from AnyQt.QtTest import QTest from Orange.data import (Table, Domain, ContinuousVariable as Cv, - ...
null
null
namanjain12/orange3_final:0a83c6c2e785f5f7554c39f38fe70aa38c199f65
true
null
1
10
null
1,297
0
0.75
1
0.525
1
0.2495
77.461
9,574
r2e_gym::train::5323
r2e_gym
train
5,323
aiohttp__2ac5bbce5c7c6e3a442951ef7638b23f61b76a25
aiohttp
aio-libs/aiohttp
python
2ac5bbce5c7c6e3a442951ef7638b23f61b76a25
**Title:** Access logs use UTC time without timezone, causing discrepancies in log entries **Description:** When generating access logs, the system records timestamps using UTC without including timezone information. This leads to inconsistencies, especially when tests expect logs to use local time with the appropriat...
diff --git a/CHANGES/3853.feature b/CHANGES/3853.feature --- a/CHANGES/3853.feature +++ b/CHANGES/3853.feature @@ -0,0 +1 @@ +Make access log use local time with timezone diff --git a/aiohttp/web_log.py b/aiohttp/web_log.py --- a/aiohttp/web_log.py +++ b/aiohttp/web_log.py @@ -3,6 +3,7 @@ import logging import os im...
diff --git a/tests/test_web_log.py b/tests/test_web_log.py --- a/tests/test_web_log.py +++ b/tests/test_web_log.py @@ -1,6 +1,7 @@ import datetime import logging import platform +from typing import Any from unittest import mock import pytest @@ -51,13 +52,46 @@ Ref: https://stackoverflow.com/a/46102240/5952...
null
null
namanjain12/aiohttp_final:2ac5bbce5c7c6e3a442951ef7638b23f61b76a25
true
null
2
7
null
1,356
0
0.75
1
0.525
1
0.249333
77.4605
9,575
r2e_gym::train::5071
r2e_gym
train
5,071
datalad__19f5b45096cadaa4677c9b15f18a6d303497eaeb
datalad
datalad/datalad
python
19f5b45096cadaa4677c9b15f18a6d303497eaeb
**Title:** `datalad run` Exits with Incorrect Non-Zero Exit Code on Failure **Description:** When executing the `datalad run` command with a task that is expected to fail with a specific non-zero exit code, the command does not exit with the intended code. Instead, it exits with a different non-zero exit code, leading...
diff --git a/changelog.d/pr-7641.md b/changelog.d/pr-7641.md --- a/changelog.d/pr-7641.md +++ b/changelog.d/pr-7641.md @@ -0,0 +1,3 @@ +### 🐛 Bug Fixes + +- Exit with the original non-0 exit code if underlying functionality, in particular "datalad run", returned incomplete result record with a non-0 exit code. Fixes ...
diff --git a/datalad/cli/tests/test_main.py b/datalad/cli/tests/test_main.py --- a/datalad/cli/tests/test_main.py +++ b/datalad/cli/tests/test_main.py @@ -211,6 +211,18 @@ assert_in("too few arguments", stderr) +# https://github.com/datalad/datalad/issues/7504 +@with_tempfile(mkdir=True) +def test_run_exit_cod...
null
null
namanjain12/datalad_final:19f5b45096cadaa4677c9b15f18a6d303497eaeb
true
null
2
18
null
1,134
0
0.75
1
0.525
1
0.249
77.4595
9,576
r2e_gym::train::361
r2e_gym
train
361
orange3__c86388cdfa52cb5be7ea27e2713cc4e38e115dda
orange3
biolab/orange3
python
c86388cdfa52cb5be7ea27e2713cc4e38e115dda
**Title:** Unpickling Table Fails to Restore 'X' Attribute in State **Description:** When unpickling a `Table` object, the internal state does not include the 'X' attribute. This omission causes the deserialized `Table` to lack essential data, leading to inconsistencies and potential errors in subsequent operations. ...
diff --git a/Orange/data/table.py b/Orange/data/table.py --- a/Orange/data/table.py +++ b/Orange/data/table.py @@ -447,7 +447,23 @@ for k in ("X", "W", "metas"): if k in state: setattr(self, k, state.pop(k)) + if "_Y" in state: + setattr(self,...
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 @@ -3,6 +3,7 @@ import copy import os +import pickle import random import unittest import warnings @@ -591,8 +592,6 @@ self.assertEqual(len(new.ids), 300) def tes...
null
null
namanjain12/orange3_final:c86388cdfa52cb5be7ea27e2713cc4e38e115dda
true
null
1
16
null
1,173
0
0.75
1
0.525
1
0.248833
77.459
9,577
r2e_gym::train::354
r2e_gym
train
354
orange3__97e9b719ef9942896e94f59d9cb3c01dc14702db
orange3
biolab/orange3
python
97e9b719ef9942896e94f59d9cb3c01dc14702db
**Title:** Incorrect Handling of Reversed Slices in `Table.from_table` Causes Invalid Slices **Description:** When using reversed slices with `Table.from_table`, the slicing mechanism can produce invalid slice objects. Specifically, if a slice with a negative step has a negative stop value, the resulting slice becomes...
diff --git a/Orange/data/table.py b/Orange/data/table.py --- a/Orange/data/table.py +++ b/Orange/data/table.py @@ -2508,14 +2508,23 @@ Try to keep slices as slices. Args: source_indices: 1D sequence, slice or Ellipsis - selection_indices: 1D sequence or slice + selection_indices: slice ...
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 @@ -21,7 +21,8 @@ ContinuousVariable, Domain, StringVariable) from Orange.data.util import SharedComputeValue from Orange.tests import test_dirname -from Ora...
null
null
namanjain12/orange3_final:97e9b719ef9942896e94f59d9cb3c01dc14702db
true
null
1
13
null
1,232
0
0.75
1
0.525
1
0.248667
77.4585
9,578
r2e_gym::train::6192
r2e_gym
train
6,192
pillow__d71cf168eeb4584e8424a0a8d371d01dc943a0dc
pillow
python-pillow/pillow
python
d71cf168eeb4584e8424a0a8d371d01dc943a0dc
**Title:** Image retains 'fp' attribute after using context manager, preventing proper closure **Description:** When creating an image using a context manager, the `fp` attribute remains attached to the image object after exiting the block. This prevents the file pointer from being properly closed, which can lead to u...
diff --git a/src/PIL/Image.py b/src/PIL/Image.py --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -530,15 +530,19 @@ def __enter__(self): return self + def _close_fp(self): + if getattr(self, "_fp", False): + if self._fp != self.fp: + self._fp.close() + sel...
diff --git a/Tests/test_image.py b/Tests/test_image.py --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -1016,6 +1016,11 @@ except OSError as e: assert str(e) == "buffer overrun when reading image file" + def test_exit_fp(self): + with Image.new("L", (1, 1)) as im: + ...
null
null
namanjain12/pillow_final:d71cf168eeb4584e8424a0a8d371d01dc943a0dc
true
null
1
27
null
947
0
0.75
1
0.525
1
0.247833
77.456
9,579
r2e_gym::train::4933
r2e_gym
train
4,933
datalad__6b6fa3898546793fa3517def09f85a74d51ec4bb
datalad
datalad/datalad
python
6b6fa3898546793fa3517def09f85a74d51ec4bb
**Title:** Incorrect Parsing of SSH Implicit URLs Causes Parsing Failures **Description:** When parsing SSH implicit URLs that include a hostname followed by a colon and a path, the URL is incorrectly interpreted using the `file:implicit` scheme instead of `ssh:implicit`. This leads to incorrect separation of the host...
diff --git a/datalad/support/network.py b/datalad/support/network.py --- a/datalad/support/network.py +++ b/datalad/support/network.py @@ -348,10 +348,16 @@ pref = 'ssh:implicit://' assert(url.startswith(pref)) url = url[len(pref):] - # and we should replace leading / - url = ur...
diff --git a/datalad/tests/test_network.py b/datalad/tests/test_network.py --- a/datalad/tests/test_network.py +++ b/datalad/tests/test_network.py @@ -113,6 +113,7 @@ """just a helper to carry out few checks on urls""" url_ = URL(**fields) eq_(URL(url), url_) + eq_(str(URL(url)), url) eq_(url, ur...
null
null
namanjain12/datalad_final:6b6fa3898546793fa3517def09f85a74d51ec4bb
true
null
1
20
null
1,082
0
0.75
1
0.525
1
0.247
77.4535
9,580
r2e_gym::train::4930
r2e_gym
train
4,930
datalad__ae60a378de415bbd1039eef3719ff04b4266a4af
datalad
datalad/datalad
python
ae60a378de415bbd1039eef3719ff04b4266a4af
**Title:** `color_enabled` returns `False` instead of `True` when `datalad.ui.color` is set to `'on'` and terminal is interactive **Description:** When the configuration `datalad.ui.color` is set to `'on'` and the terminal is interactive, the `color_enabled` function incorrectly returns `False`. This prevents colored ...
diff --git a/datalad/support/ansi_colors.py b/datalad/support/ansi_colors.py --- a/datalad/support/ansi_colors.py +++ b/datalad/support/ansi_colors.py @@ -44,24 +44,19 @@ def color_enabled(): """Check for whether color output is enabled - Color is only enabled if the terminal is interactive. - If the data...
diff --git a/datalad/support/tests/test_ansi_colors.py b/datalad/support/tests/test_ansi_colors.py --- a/datalad/support/tests/test_ansi_colors.py +++ b/datalad/support/tests/test_ansi_colors.py @@ -17,35 +17,26 @@ def test_color_enabled(): - # In the absence of NO_COLOR, default to enable, failing if non-inter...
null
null
namanjain12/datalad_final:ae60a378de415bbd1039eef3719ff04b4266a4af
true
null
1
19
null
1,102
0
0.75
1
0.525
1
0.247
77.4535
9,581
r2e_gym::train::283
r2e_gym
train
283
orange3__1b044ca49e69a4263f71c0e527cced50238d8071
orange3
biolab/orange3
python
1b044ca49e69a4263f71c0e527cced50238d8071
**Title: Inability to Predict Probabilities for Classless Data in Predictions Widget** **Description:** When working with datasets that do not have a class variable (classless data), the Predictions widget fails to display probability prediction options. This prevents users from obtaining probability estimates for the...
diff --git a/Orange/widgets/evaluate/owpredictions.py b/Orange/widgets/evaluate/owpredictions.py --- a/Orange/widgets/evaluate/owpredictions.py +++ b/Orange/widgets/evaluate/owpredictions.py @@ -215,8 +215,7 @@ self.predictionsview)) self._set_target_combos() - if self.is_discrete...
diff --git a/Orange/widgets/evaluate/tests/test_owpredictions.py b/Orange/widgets/evaluate/tests/test_owpredictions.py --- a/Orange/widgets/evaluate/tests/test_owpredictions.py +++ b/Orange/widgets/evaluate/tests/test_owpredictions.py @@ -39,6 +39,7 @@ def setUp(self): self.widget = self.create_widget(OWP...
null
null
namanjain12/orange3_final:1b044ca49e69a4263f71c0e527cced50238d8071
true
null
1
11
null
1,260
0
0.75
1
0.525
1
0.246667
77.4525
9,582
r2e_gym::train::6115
r2e_gym
train
6,115
pillow__28b818974e0602d9f38858c9e979d4755550c8e5
pillow
python-pillow/pillow
python
28b818974e0602d9f38858c9e979d4755550c8e5
**Example Issue:** [ISSUE] **Title:** Saving TIFF stacks from separate images results in single-frame output **Description:** When attempting to save a TIFF stack composed of multiple separate images, only the first image is saved. This results in a single-frame TIFF file instead of the expected multi-frame stack. *...
diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -1737,17 +1737,28 @@ self.rewriteLastLong(offset) def _save_all(im, fp, filename): - if not hasattr(im, "n_frames"): + encoderinfo = im.encoderinfo.copy() + encoderconfi...
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 @@ -473,6 +473,18 @@ with Image.open(mp) as im: self.assertEqual(im.n_frames, 3) + # Test appending images + mp = io.BytesIO() + im = Image.new('RGB', (...
null
null
namanjain12/pillow_final:28b818974e0602d9f38858c9e979d4755550c8e5
true
null
1
23
null
1,020
0
0.75
1
0.525
1
0.246667
77.4525
9,583
r2e_gym::train::4956
r2e_gym
train
4,956
datalad__830be96b9b28ce986a028839897d8bfbe622c894
datalad
datalad/datalad
python
830be96b9b28ce986a028839897d8bfbe622c894
Title: Documentation processing leaves 'REFLOW' markers in output **Description** When altering interface documentation, the `REFLOW` markers are not properly removed or processed. This results in `REFLOW` tags appearing in the final documentation, leading to formatting issues and unexpected text in the output. **Ex...
diff --git a/datalad/interface/base.py b/datalad/interface/base.py --- a/datalad/interface/base.py +++ b/datalad/interface/base.py @@ -14,6 +14,7 @@ import sys import re +import textwrap from ..ui import ui @@ -98,6 +99,11 @@ lambda match: match.group(1), docs, flags=re.MULTILINE | r...
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 @@ -28,14 +28,18 @@ pong ping pong ping pong ping pong. || CMDLINE >> + || REFLOW >> Something for the cmdline only Mult...
null
null
namanjain12/datalad_final:830be96b9b28ce986a028839897d8bfbe622c894
true
null
1
17
null
1,136
0
0.75
1
0.525
1
0.246
77.4505
9,584
r2e_gym::train::4083
r2e_gym
train
4,083
coveragepy__35e249ff74cfcbc44889107cfcca785696dc4288
coveragepy
nedbat/coveragepy
python
35e249ff74cfcbc44889107cfcca785696dc4288
**Title:** Coverage Report Fails to Parse Source Files with Special Characters **Description:** When generating coverage reports for Python source files containing certain special characters, the reporting process fails due to incorrect line splitting. This issue arises because the method used to split the text into l...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -23,9 +23,13 @@ - File pattern rules were too strict, forbidding plus signs and curly braces in directory and file names. This is now fixed, closing `issue 1513`_. +- Unusual Unicode or control characters in source files could prevent ...
diff --git a/tests/test_html.py b/tests/test_html.py --- a/tests/test_html.py +++ b/tests/test_html.py @@ -468,6 +468,38 @@ formfeed_html = self.get_html_report_content("formfeed.py") assert "line_two" in formfeed_html + + def test_splitlines_special_chars(self): + # https://github.com/ned...
null
null
namanjain12/coveragepy_final:35e249ff74cfcbc44889107cfcca785696dc4288
true
null
2
7
null
1,335
0
0.75
1
0.525
1
0.245833
77.45
9,585
r2e_gym::train::472
r2e_gym
train
472
orange3__7d3c11f1f415a03376ff292bde3e7b8458902f75
orange3
biolab/orange3
python
7d3c11f1f415a03376ff292bde3e7b8458902f75
**Title:** VizRank Includes Hidden Attributes in Informative Projections **Description:** When certain attributes are marked as hidden, VizRank still includes them when determining informative projections. This leads to projections that consider attributes that should be excluded, potentially causing misleading visual...
diff --git a/Orange/widgets/visualize/owscatterplot.py b/Orange/widgets/visualize/owscatterplot.py --- a/Orange/widgets/visualize/owscatterplot.py +++ b/Orange/widgets/visualize/owscatterplot.py @@ -1,4 +1,3 @@ -from itertools import chain from xml.sax.saxutils import escape import numpy as np @@ -87,9 +86,11 @@ ...
diff --git a/Orange/widgets/visualize/tests/test_owscatterplot.py b/Orange/widgets/visualize/tests/test_owscatterplot.py --- a/Orange/widgets/visualize/tests/test_owscatterplot.py +++ b/Orange/widgets/visualize/tests/test_owscatterplot.py @@ -471,6 +471,20 @@ self.assertFalse(self.widget.vizrank_button.isEnabl...
null
null
namanjain12/orange3_final:7d3c11f1f415a03376ff292bde3e7b8458902f75
true
null
1
9
null
1,295
0
0.75
1
0.525
1
0.245833
77.45
9,586
r2e_gym::train::16
r2e_gym
train
16
orange3__b983e25212aa3c006c37089ef970688e3c01c369
orange3
biolab/orange3
python
b983e25212aa3c006c37089ef970688e3c01c369
**Title**: `ContextHandler.match` Returns Incorrect Score When No Specific Match Criteria Are Provided **Description**: When attempting to match a context without any specific match criteria, the `match` function incorrectly returns a score of `0.1` instead of the expected `1`. This causes contexts that fully satisfy ...
diff --git a/Orange/widgets/settings.py b/Orange/widgets/settings.py --- a/Orange/widgets/settings.py +++ b/Orange/widgets/settings.py @@ -66,9 +66,10 @@ MATCH_VALUES_NONE, MATCH_VALUES_CLASS, MATCH_VALUES_ALL = range(3) - def __init__(self, *, match_values=0, **kwargs): + def __init__(self, *, match_val...
diff --git a/Orange/widgets/tests/test_domain_context_handler.py b/Orange/widgets/tests/test_domain_context_handler.py --- a/Orange/widgets/tests/test_domain_context_handler.py +++ b/Orange/widgets/tests/test_domain_context_handler.py @@ -68,11 +68,6 @@ self.assertEqual(encoded_metas, ...
null
null
namanjain12/orange3_final:b983e25212aa3c006c37089ef970688e3c01c369
true
null
1
13
null
1,215
0
0.75
1
0.525
1
0.245833
77.45
9,587
r2e_gym::train::6477
r2e_gym
train
6,477
pillow__47513c54304114225c1e68e2cb0cd291267de565
pillow
python-pillow/pillow
python
47513c54304114225c1e68e2cb0cd291267de565
**Title:** Saving TIFF Metadata with Large Negative Values Causes struct.error **Description:** When attempting to save TIFF metadata with large negative values, the process fails due to incorrect range checks. This issue arises when assigning values that exceed the valid range for a signed short data type, leading to...
diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py --- a/src/PIL/TiffImagePlugin.py +++ b/src/PIL/TiffImagePlugin.py @@ -575,12 +575,10 @@ else TiffTags.SIGNED_RATIONAL ) elif all(isinstance(v, int) for v in values): - i...
diff --git a/Tests/test_file_tiff_metadata.py b/Tests/test_file_tiff_metadata.py --- a/Tests/test_file_tiff_metadata.py +++ b/Tests/test_file_tiff_metadata.py @@ -274,6 +274,18 @@ self.assertEqual(numerator, reloaded.tag_v2[37380].numerator) self.assertEqual(denominator, reloaded.tag_v2[37380].denomin...
null
null
namanjain12/pillow_final:47513c54304114225c1e68e2cb0cd291267de565
true
null
1
10
null
1,270
0
0.75
1
0.525
1
0.245
77.4475
9,588
r2e_gym::train::5936
r2e_gym
train
5,936
tornado__2595586281e739aafc912e260872d490724c7cb6
tornado
tornadoweb/tornado
python
2595586281e739aafc912e260872d490724c7cb6
**Title:** Multipart form data fails to parse non-ASCII filenames correctly **Description:** When uploading a file with a non-ASCII filename using multipart form data, the filename is not correctly parsed. The expected filename includes the non-ASCII character, but the parsed filename lacks it. **Example Code:** ```p...
diff --git a/tornado/httputil.py b/tornado/httputil.py --- a/tornado/httputil.py +++ b/tornado/httputil.py @@ -891,7 +891,8 @@ # The original 2.7 version of this code did not correctly support some # combinations of semicolons and double quotes. # It has also been modified to support valueless parameters as seen in ...
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 @@ -175,6 +175,20 @@ file = files["files"][0] self.assertEqual(file["filename"], filename) self.assertEqual(file["body"], b"Foo") + + ...
null
null
namanjain12/tornado_final:2595586281e739aafc912e260872d490724c7cb6
true
null
1
31
null
850
0
0.75
1
0.525
1
0.245
77.4475
9,589
r2e_gym::train::5655
r2e_gym
train
5,655
scrapy__b6c761d2b4c9cafe94010075ebf39807921dec9c
scrapy
scrapy/scrapy
python
b6c761d2b4c9cafe94010075ebf39807921dec9c
**Title:** Referer header not set correctly for non-TLS to non-TLS and HTTP to HTTPS transitions **Description:** When making requests that transition from non-TLS protocols (like FTP) to HTTP or from HTTP to HTTPS, the `Referer` header is not being set as expected. This affects how referrer information is passed betw...
diff --git a/scrapy/spidermiddlewares/referer.py b/scrapy/spidermiddlewares/referer.py --- a/scrapy/spidermiddlewares/referer.py +++ b/scrapy/spidermiddlewares/referer.py @@ -159,7 +159,8 @@ name = POLICY_STRICT_ORIGIN def referrer(self, response, request): - if ((self.tls_protected(response) and sel...
diff --git a/tests/test_spidermiddleware_referer.py b/tests/test_spidermiddleware_referer.py --- a/tests/test_spidermiddleware_referer.py +++ b/tests/test_spidermiddleware_referer.py @@ -232,7 +232,13 @@ # downgrade ('https://example4.com/page.html', 'http://example4.com/not-page.html', None), ...
null
null
namanjain12/scrapy_final:b6c761d2b4c9cafe94010075ebf39807921dec9c
true
null
1
7
null
1,323
0
0.75
1
0.525
1
0.243833
77.444
9,590
swe_bench::test::1045
swe_bench
test
1,045
matplotlib__matplotlib-24538
matplotlib/matplotlib
matplotlib/matplotlib
python
c1588e695d04c4520b1b0bc915add22cedd481f4
document Legend.legendHandles ### Problem The [legendHandles](https://github.com/matplotlib/matplotlib/blob/14b34fd18685d037fc4d67d40df69b602b22ec7f/lib/matplotlib/legend.py#L381) attribute of legend isn't documented, nor does it have a `get_legendHandles()` method. I would have found either option useful when trying ...
attributes should be documented if possible, though I'm always a little confused how we document them. They go in the class docstring: https://github.com/matplotlib/matplotlib/blob/a0306bdcb8633f21c2e127099ec4b1008ed8bb7d/lib/matplotlib/figure.py#L2108-L2126 Since this is not documented, it's probably not widely used....
diff --git a/lib/matplotlib/legend.py b/lib/matplotlib/legend.py --- a/lib/matplotlib/legend.py +++ b/lib/matplotlib/legend.py @@ -360,12 +360,19 @@ def __init__( labels : list of str A list of labels to show next to the artists. The length of handles and labels should be the same. If...
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py --- a/lib/matplotlib/tests/test_legend.py +++ b/lib/matplotlib/tests/test_legend.py @@ -147,7 +147,7 @@ def test_legend_label_with_leading_underscore(): with pytest.warns(UserWarning, match=r"starts with '...
["lib/matplotlib/tests/test_legend.py::test_legend_label_with_leading_underscore", "lib/matplotlib/tests/test_legend.py::test_linecollection_scaled_dashes", "lib/matplotlib/tests/test_legend.py::test_alpha_handles", "lib/matplotlib/tests/test_legend.py::test_handlerline2d", "lib/mpl_toolkits/mplot3d/tests/test_legend3d...
["lib/matplotlib/tests/test_legend.py::test_legend_ordereddict", "lib/matplotlib/tests/test_legend.py::test_legend_auto1[png]", "lib/matplotlib/tests/test_legend.py::test_legend_auto1[pdf]", "lib/matplotlib/tests/test_legend.py::test_legend_auto2[png]", "lib/matplotlib/tests/test_legend.py::test_legend_auto2[pdf]", "li...
null
true
2022-11-23T18:37:48Z
3
89
6
901
0
0.8
1
0.4
1
0.446833
77.4405
9,591
r2e_gym::train::5107
r2e_gym
train
5,107
pyramid__2f66ff514717b29bf1cd5fea668164ac67d70cea
pyramid
pylons/pyramid
python
2f66ff514717b29bf1cd5fea668164ac67d70cea
**Title:** Scaffold Incorrectly Sets `pyramid_docs_branch` for Development Pyramid Versions **Description:** When creating a new project scaffold with a development version of Pyramid (versions ending with `dev`), the `pyramid_docs_branch` is incorrectly assigned based on the major version instead of being set to `mas...
diff --git a/pyramid/scripts/pcreate.py b/pyramid/scripts/pcreate.py --- a/pyramid/scripts/pcreate.py +++ b/pyramid/scripts/pcreate.py @@ -88,13 +88,19 @@ # get pyramid package version pyramid_version = self.pyramid_dist.version - # map pyramid package version of the documentation branch - ...
diff --git a/pyramid/tests/test_scripts/test_pcreate.py b/pyramid/tests/test_scripts/test_pcreate.py --- a/pyramid/tests/test_scripts/test_pcreate.py +++ b/pyramid/tests/test_scripts/test_pcreate.py @@ -183,7 +183,7 @@ scaffold.vars, {'project': 'Distro', 'egg': 'Distro', 'package': 'distro', ...
null
null
namanjain12/pyramid_final:2f66ff514717b29bf1cd5fea668164ac67d70cea
true
null
1
18
null
1,096
0
0.75
1
0.525
1
0.242667
77.4405
9,592
r2e_gym::train::6263
r2e_gym
train
6,263
pillow__e0845f06d8d063fbf78708dd20a692041b60596c
pillow
python-pillow/pillow
python
e0845f06d8d063fbf78708dd20a692041b60596c
**Title:** Missing DeprecationWarning When Using `Image.isImageType` **Description:** When using the `Image.isImageType` function, no `DeprecationWarning` is emitted as expected. This oversight prevents developers from being informed that the function is deprecated and should be replaced with `isinstance(im, Image.Ima...
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/ + +Image isImageType() +^^^^^^^^^^^^^^^^...
diff --git a/Tests/test_image.py b/Tests/test_image.py --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -1117,6 +1117,10 @@ assert len(caplog.records) == 0 assert im.fp is None + def test_deprecation(self) -> None: + with pytest.warns(DeprecationWarning): + assert ...
null
null
namanjain12/pillow_final:e0845f06d8d063fbf78708dd20a692041b60596c
true
null
3
33
null
796
0
0.75
1
0.525
1
0.242667
77.4405
9,593
r2e_gym::train::5354
r2e_gym
train
5,354
aiohttp__6198a56e67a65a4bc68d1661a1c4cb9201d455cd
aiohttp
aio-libs/aiohttp
python
6198a56e67a65a4bc68d1661a1c4cb9201d455cd
**Title:** Proxy headers incorrectly included in ConnectionKey when no proxy is used **Description:** When creating a client request without specifying a proxy, the proxy headers are still included in the connection key. This leads to the `proxy_headers_hash` being set even when no proxy is in use, which is unexpected...
diff --git a/CHANGES/9368.bugfix.rst b/CHANGES/9368.bugfix.rst --- a/CHANGES/9368.bugfix.rst +++ b/CHANGES/9368.bugfix.rst @@ -0,0 +1,3 @@ +Fixed proxy headers being used in the ``ConnectionKey`` hash when a proxy was not being used -- by :user:`bdraco`. + +If default headers are used, they are also used for proxy head...
diff --git a/tests/test_client_request.py b/tests/test_client_request.py --- a/tests/test_client_request.py +++ b/tests/test_client_request.py @@ -1467,3 +1467,30 @@ """Test that no Authorization header is sent when netrc is empty""" req = make_request("get", "http://example.com", trust_env=True) assert ...
null
null
namanjain12/aiohttp_final:6198a56e67a65a4bc68d1661a1c4cb9201d455cd
true
null
2
11
null
1,236
0
0.75
1
0.525
1
0.242667
77.4405
9,594
r2e_gym::train::6603
r2e_gym
train
6,603
pillow__22837c37e279a5fb3fb7b482d81e2c4d44c8cdcc
pillow
python-pillow/pillow
python
22837c37e279a5fb3fb7b482d81e2c4d44c8cdcc
**Title:** Textual chunks after IDAT are not read, resulting in missing text metadata **Description:** When a PNG file contains textual chunks (like `tEXt` or `iTXt`) after the IDAT chunks, the text metadata is not properly loaded. As a result, accessing the `text` attribute returns an empty dictionary instead of the ...
diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py --- a/src/PIL/PngImagePlugin.py +++ b/src/PIL/PngImagePlugin.py @@ -579,7 +579,7 @@ self.mode = self.png.im_mode self._size = self.png.im_size self.info = self.png.im_info - self.text = self.png.im_text # experimental ...
diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -557,6 +557,28 @@ chunks = PngImagePlugin.getchunks(im) self.assertEqual(len(chunks), 3) + def test_textual_chunks_after_idat(self): + im = Image.open("Tests/images/hop...
null
null
namanjain12/pillow_final:22837c37e279a5fb3fb7b482d81e2c4d44c8cdcc
true
null
1
28
null
893
0
0.75
1
0.525
1
0.242167
77.439
9,595
r2e_gym::train::6483
r2e_gym
train
6,483
pillow__b8ff91ab3bcc788c612f5d879e0483d295c395d9
pillow
python-pillow/pillow
python
b8ff91ab3bcc788c612f5d879e0483d295c395d9
**Title:** GIFs Saved with Incorrect Version Identifier When Transparency is Applied **Description:** When saving GIF images that include transparency, the version identifier is incorrectly set to `GIF87a` instead of `GIF89a`. This incorrect versioning can lead to compatibility issues and unexpected behavior when hand...
diff --git a/PIL/GifImagePlugin.py b/PIL/GifImagePlugin.py --- a/PIL/GifImagePlugin.py +++ b/PIL/GifImagePlugin.py @@ -537,8 +537,19 @@ # Header Block # http://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp + + version = b"87a" + for extensionKey in ["transparency", "duration", "loop"]: ...
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:b8ff91ab3bcc788c612f5d879e0483d295c395d9
true
null
1
13
null
1,192
0
0.75
1
0.525
1
0.242
77.4385
9,596
r2e_gym::train::4107
r2e_gym
train
4,107
coveragepy__6cbbc90dcd89d8499191a75133a6e2b29f52270a
coveragepy
nedbat/coveragepy
python
6cbbc90dcd89d8499191a75133a6e2b29f52270a
**Title:** `.gitignore` is incorrectly created in non-empty directories when generating HTML reports **Description:** When generating HTML coverage reports, a `.gitignore` file is created even if the target directory already contains files. This unexpected behavior can interfere with existing version control settings ...
diff --git a/CHANGES.rst b/CHANGES.rst --- a/CHANGES.rst +++ b/CHANGES.rst @@ -23,6 +23,10 @@ ---------- - Dropped support for Python 3.6, which ended support on 2021-12-23. + +- Fix: a .gitignore file will only be written into the HTML report output + directory if the directory is empty. This should prevent cert...
diff --git a/tests/test_html.py b/tests/test_html.py --- a/tests/test_html.py +++ b/tests/test_html.py @@ -290,6 +290,13 @@ self.run_coverage() with open("htmlcov/.gitignore") as fgi: assert fgi.read() == "# ignore nothing" + + def test_dont_write_gitignore_into_existing_directory(self...
null
null
namanjain12/coveragepy_final:6cbbc90dcd89d8499191a75133a6e2b29f52270a
true
null
2
13
null
1,187
0
0.75
1
0.525
1
0.241167
77.436
9,597
r2e_gym::train::284
r2e_gym
train
284
orange3__99bbe6ffabd298be4ec5903fddc14fc128997ebb
orange3
biolab/orange3
python
99bbe6ffabd298be4ec5903fddc14fc128997ebb
**Title:** Correlation Output Missing 'uncorrected p' Column Causing Test Failures **Description:** When generating the correlation table, the output is missing the 'uncorrected p' column. Tests that expect the correlation table to include ["Correlation", "uncorrected p", "FDR"] fail because only ["Correlation", "FDR"...
diff --git a/Orange/widgets/data/owcorrelations.py b/Orange/widgets/data/owcorrelations.py --- a/Orange/widgets/data/owcorrelations.py +++ b/Orange/widgets/data/owcorrelations.py @@ -393,18 +393,24 @@ self.Outputs.correlations.send(None) return - attrs = [ContinuousVariable("Correlati...
diff --git a/Orange/widgets/data/tests/test_owcorrelations.py b/Orange/widgets/data/tests/test_owcorrelations.py --- a/Orange/widgets/data/tests/test_owcorrelations.py +++ b/Orange/widgets/data/tests/test_owcorrelations.py @@ -158,10 +158,14 @@ self.assertIsInstance(correlations, Table) self.assertEqu...
null
null
namanjain12/orange3_final:99bbe6ffabd298be4ec5903fddc14fc128997ebb
true
null
1
22
null
1,005
0
0.75
1
0.525
1
0.240833
77.435
9,598
swe_bench::test::1097
swe_bench
test
1,097
matplotlib__matplotlib-25779
matplotlib/matplotlib
matplotlib/matplotlib
python
06305a2f5dc589888697b3b909859103b8259153
Plot ellipse with arrow showing rotation ### Problem I'm trying to plot an [ellipse](https://matplotlib.org/stable/api/_as_gen/matplotlib.patches.Ellipse.html#matplotlib.patches.Ellipse) together with an arrow showing a rotation clockwise or counterclockwise as it is shown in that image. ![image](https://user-images....
I don't think we would add this to a low level patch like ellipse. It's certainly possible to get the effect you want with an annotation arrow and a basic ellipses. If you need help with that discourse.Matplotlib.org is a good place to ask. I agree that this is probably too specific to put into the core library, but ...
diff --git a/galleries/examples/shapes_and_collections/ellipse_arrow.py b/galleries/examples/shapes_and_collections/ellipse_arrow.py new file mode 100644 --- /dev/null +++ b/galleries/examples/shapes_and_collections/ellipse_arrow.py @@ -0,0 +1,53 @@ +""" +=================================== +Ellipse with orientation ar...
diff --git a/lib/matplotlib/tests/test_patches.py b/lib/matplotlib/tests/test_patches.py --- a/lib/matplotlib/tests/test_patches.py +++ b/lib/matplotlib/tests/test_patches.py @@ -104,6 +104,57 @@ def test_corner_center(): assert_almost_equal(ellipse.get_corners(), corners_rot) +def test_ellipse_vertices(): + ...
["lib/matplotlib/tests/test_patches.py::test_ellipse_vertices"]
["lib/matplotlib/tests/test_patches.py::test_Polygon_close", "lib/matplotlib/tests/test_patches.py::test_corner_center", "lib/matplotlib/tests/test_patches.py::test_rotate_rect", "lib/matplotlib/tests/test_patches.py::test_rotate_rect_draw[png]", "lib/matplotlib/tests/test_patches.py::test_dash_offset_patch_draw[png]",...
null
true
2023-04-27T11:44:41Z
2
84
1
989
0
0.8
1
0.4
1
0.444833
77.4345
9,599
swe_bench::dev::39
swe_bench
dev
39
pvlib__pvlib-python-1395
pvlib/pvlib-python
pvlib/pvlib-python
python
26579bec7e65296223503b9e05da4af914af6777
Add retrieval function for horizon profile from MINES Paris Tech - [x] I am familiar with the [contributing guidelines](https://pvlib-python.readthedocs.io/en/latest/contributing.html) - [x] Tests added - [x] Updates entries to [`docs/sphinx/source/api.rst`](https://github.com/pvlib/pvlib-python/blob/master/docs/sp...
@mikofski @cwhanse I saw your discussions in #758 and #1290 and figured I'd share the code I had laying around for downloading the local horizon profile from SRTM. Does this have any interest to you? I'm lovin' this! Could we also look into retrieving pvgis horizon data, how do they compare to the SRTM from MINES?
diff --git a/pvlib/iotools/__init__.py b/pvlib/iotools/__init__.py --- a/pvlib/iotools/__init__.py +++ b/pvlib/iotools/__init__.py @@ -15,6 +15,7 @@ from pvlib.iotools.pvgis import get_pvgis_tmy, read_pvgis_tmy # noqa: F401 from pvlib.iotools.pvgis import read_pvgis_hourly # noqa: F401 from pvlib.iotools.pvgis imp...
diff --git a/pvlib/data/test_read_pvgis_horizon.csv b/pvlib/data/test_read_pvgis_horizon.csv new file mode 100644 --- /dev/null +++ b/pvlib/data/test_read_pvgis_horizon.csv @@ -0,0 +1,49 @@ +horizon_azimuth,horizon_elevation +0,9.9 +7.5,13 +15,14.5 +22.5,15.7 +30,14.9 +37.5,15.3 +45,15.7 +52.5,15.7 +60,13 +67.5,11.5 +7...
["pvlib/tests/iotools/test_pvgis.py::test_read_pvgis_hourly[testfile0-expected_radiation_csv-metadata_exp0-inputs_exp0-False-None]", "pvlib/tests/iotools/test_pvgis.py::test_read_pvgis_hourly[testfile1-expected_radiation_csv_mapped-metadata_exp1-inputs_exp1-True-csv]", "pvlib/tests/iotools/test_pvgis.py::test_read_pvgi...
[]
null
true
2022-01-26T20:24:16Z
2
55
19
1,565
0
0.8
1
0.4
1
0.444167
77.4325