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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8,700 | r2e_gym::train::5668 | r2e_gym | train | 5,668 | scrapy__0117c811c954fd3f25ed5c6dc05185c3ef3e18a1 | scrapy | scrapy/scrapy | python | 0117c811c954fd3f25ed5c6dc05185c3ef3e18a1 | **Title:** `xmliter` Fails to Handle Node Names with Dots, Causing IndexError
**Description:**
When using `xmliter` with node names that include dots, such as `'matchme...'`, the iterator fails to locate the specified nodes. This results in an empty selection, and subsequent operations on the empty list cause an `Inde... | diff --git a/scrapy/utils/iterators.py b/scrapy/utils/iterators.py
--- a/scrapy/utils/iterators.py
+++ b/scrapy/utils/iterators.py
@@ -25,8 +25,10 @@
- a unicode string
- a string encoded as utf-8
"""
- HEADER_START_RE = re.compile(r'^(.*?)<\s*%s(?:\s|>)' % nodename, re.S)
- HEADER_END_RE = re.comp... | diff --git a/tests/test_utils_iterators.py b/tests/test_utils_iterators.py
--- a/tests/test_utils_iterators.py
+++ b/tests/test_utils_iterators.py
@@ -32,6 +32,19 @@
self.assertEqual(attrs,
[(['001'], ['Name 1'], ['Type 1']), (['002'], ['Name 2'], ['Type 2'])])
+
+ def test_xmlit... | null | null | namanjain12/scrapy_final:0117c811c954fd3f25ed5c6dc05185c3ef3e18a1 | true | null | 1 | 8 | null | 1,386 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.257667 | 80.69175 | ||
8,701 | r2e_gym::train::6568 | r2e_gym | train | 6,568 | pillow__d1b66e9dfd4add8a77909ad287d1a9d277fcdd2c | pillow | python-pillow/pillow | python | d1b66e9dfd4add8a77909ad287d1a9d277fcdd2c | **Title:** `floodfill()` Method Raises TypeError When Using `thresh` Parameter
**Description:**
When attempting to use the `thresh` parameter with the `floodfill()` method from `ImageDraw`, a `TypeError` is raised indicating that `floodfill()` received an unexpected keyword argument `thresh`.
**Example Code:**
```pyt... | diff --git a/PIL/ImageDraw.py b/PIL/ImageDraw.py
--- a/PIL/ImageDraw.py
+++ b/PIL/ImageDraw.py
@@ -315,7 +315,7 @@
return im, handler
-def floodfill(image, xy, value, border=None):
+def floodfill(image, xy, value, border=None, thresh=0):
"""
(experimental) Fills a bounded region with a given color.
... | diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py
--- a/Tests/test_imagedraw.py
+++ b/Tests/test_imagedraw.py
@@ -396,6 +396,26 @@
border=ImageColor.getrgb("black"))
del draw
+ # Assert
+ self.assert_image_equal(
+ im, Image.open("Tests/images/imagedraw_floo... | null | null | namanjain12/pillow_final:d1b66e9dfd4add8a77909ad287d1a9d277fcdd2c | true | null | 1 | 17 | null | 1,206 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.257667 | 80.69175 | ||
8,702 | r2e_gym::train::5667 | r2e_gym | train | 5,667 | scrapy__469e8a23f819b51781ed95c7d103f2a1b704c062 | scrapy | scrapy/scrapy | python | 469e8a23f819b51781ed95c7d103f2a1b704c062 | **Title:** Unable to Load Referrer Policy with Multiple Tokens
**Description:**
When configuring the `REFERRER_POLICY` with multiple comma-separated tokens, the middleware fails to load the appropriate referrer policy, resulting in a runtime error.
**Example Code:**
```python
from scrapy.settings import Settings
from... | diff --git a/scrapy/spidermiddlewares/referer.py b/scrapy/spidermiddlewares/referer.py
--- a/scrapy/spidermiddlewares/referer.py
+++ b/scrapy/spidermiddlewares/referer.py
@@ -323,15 +323,18 @@
try:
return cast(Type[ReferrerPolicy], load_object(policy))
except ValueError:
- try:
- re... | 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
@@ -884,6 +884,53 @@
with self.assertRaises(RuntimeError):
RefererMiddleware(settings)
+ def test_multiple_pol... | null | null | namanjain12/scrapy_final:469e8a23f819b51781ed95c7d103f2a1b704c062 | true | null | 1 | 21 | null | 1,125 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2575 | 80.69125 | ||
8,703 | r2e_gym::train::293 | r2e_gym | train | 293 | orange3__7c74e8a72032a42b2113d89d72d477974bd0dea2 | orange3 | biolab/orange3 | python | 7c74e8a72032a42b2113d89d72d477974bd0dea2 | **Title:** TypeError When Passing 'values' Argument to `create_groups_table`
**Description:**
When attempting to customize group names by providing the `values` parameter to the `create_groups_table` function, a `TypeError` is raised. This prevents users from setting meaningful names for their groups, forcing them to ... | diff --git a/Orange/widgets/utils/annotated_data.py b/Orange/widgets/utils/annotated_data.py
--- a/Orange/widgets/utils/annotated_data.py
+++ b/Orange/widgets/utils/annotated_data.py
@@ -64,15 +64,18 @@
def create_groups_table(data, selection,
include_unselected=True,
- ... | diff --git a/Orange/widgets/utils/tests/test_annotated_data.py b/Orange/widgets/utils/tests/test_annotated_data.py
--- a/Orange/widgets/utils/tests/test_annotated_data.py
+++ b/Orange/widgets/utils/tests/test_annotated_data.py
@@ -109,7 +109,18 @@
selection[group_indices[:10]] = 1
selection[group_indi... | null | null | namanjain12/orange3_final:7c74e8a72032a42b2113d89d72d477974bd0dea2 | true | null | 1 | 9 | null | 1,365 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2575 | 80.69125 | ||
8,704 | r2e_gym::train::4296 | r2e_gym | train | 4,296 | numpy__c3a887e55e0a14e3a31460e7a79e5f7f965fea68 | numpy | numpy/numpy | python | c3a887e55e0a14e3a31460e7a79e5f7f965fea68 | **Title:** `digitize` function raises TypeError when using the `edge` argument
**Description:**
When calling the `digitize` function with the `edge` keyword argument, a `TypeError` is raised because the function does not recognize the additional parameter.
**Example Code:**
```python
import numpy as np
x = [-1, 0, 1... | diff --git a/doc/release/upcoming_changes/16248.new_feature.rst b/doc/release/upcoming_changes/16248.new_feature.rst
--- a/doc/release/upcoming_changes/16248.new_feature.rst
+++ b/doc/release/upcoming_changes/16248.new_feature.rst
@@ -0,0 +1,13 @@
+Digitize Keyword Egde
+---------------------
+A keyword argument has be... | diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -1712,6 +1712,12 @@
bins = [1, 1, 0]
assert_array_equal(digitize(x, bins, False), [3, 2, 0, 0])
assert_array_eq... | null | null | namanjain12/numpy_final:c3a887e55e0a14e3a31460e7a79e5f7f965fea68 | true | null | 2 | 39 | null | 764 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.257333 | 80.69075 | ||
8,705 | r2e_gym::train::4566 | r2e_gym | train | 4,566 | numpy__235dbe1f9ea0955c0119f79a5c6614cd0268ef05 | numpy | numpy/numpy | python | 235dbe1f9ea0955c0119f79a5c6614cd0268ef05 | **RuntimeError When Using `in1d` with Mixed Integer Dtypes and `kind='table'`**
**Description**
When using NumPy's `in1d` function with mixed integer data types and specifying `kind='table'`, a `RuntimeError` is raised. This occurs even when the range of values does not exceed the maximum integer size of the involved ... | diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -649,8 +649,24 @@
ar2_range = int(ar2_max) - int(ar2_min)
# Constraints on whether we can actually use the table method:
- range_safe_from_overflow = ar2_range < n... | diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py
--- a/numpy/lib/tests/test_arraysetops.py
+++ b/numpy/lib/tests/test_arraysetops.py
@@ -414,13 +414,48 @@
with pytest.raises(ValueError):
in1d(a, b, kind="table")
+ @pytest.mark.parametrize(
+ "dtype... | null | null | namanjain12/numpy_final:235dbe1f9ea0955c0119f79a5c6614cd0268ef05 | true | null | 1 | 20 | null | 1,144 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.257333 | 80.69075 | ||
8,706 | r2e_gym::train::4979 | r2e_gym | train | 4,979 | datalad__77ce648eb80246d9aadb5be1596a98859f4b05cb | datalad | datalad/datalad | python | 77ce648eb80246d9aadb5be1596a98859f4b05cb | **Title:** TypeError Occurs When `sys.stdout.encoding` Is None in Python 2
**Description:**
When using the `ls` interface in an environment where `stdout` is piped in Python 2, `sys.stdout.encoding` returns `None`. The current implementation attempts to encode unicode characters based on `sys.getdefaultencoding`, whic... | diff --git a/datalad/interface/ls.py b/datalad/interface/ls.py
--- a/datalad/interface/ls.py
+++ b/datalad/interface/ls.py
@@ -375,23 +375,25 @@
# TODO: we might want to just ignore and force utf8 while explicitly .encode()'ing output!
# unicode versions which look better but which blow during tests etc
... | diff --git a/datalad/interface/tests/test_ls.py b/datalad/interface/tests/test_ls.py
--- a/datalad/interface/tests/test_ls.py
+++ b/datalad/interface/tests/test_ls.py
@@ -276,13 +276,10 @@
def test_ls_formatter():
- # we will use those unicode symbols only whenever both are supporting
- # UTF-8
- for syse... | null | null | namanjain12/datalad_final:77ce648eb80246d9aadb5be1596a98859f4b05cb | true | null | 1 | 26 | null | 1,021 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.256833 | 80.68925 | ||
8,707 | r2e_gym::train::6283 | r2e_gym | train | 6,283 | pillow__2b061b68dbbf4fb590ab532b6fdffea8ee063ae8 | pillow | python-pillow/pillow | python | 2b061b68dbbf4fb590ab532b6fdffea8ee063ae8 | **Title:** TypeError When Handling Warnings After Adding `formats` Parameter to `Image.open`
**Description:**
After introducing the `formats` parameter to `Image.open` to restrict the supported image formats, handling warnings during image operations leads to a `TypeError`. Specifically, when attempting to save an ima... | diff --git a/src/PIL/Image.py b/src/PIL/Image.py
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -2836,7 +2836,7 @@
)
-def open(fp, mode="r"):
+def open(fp, mode="r", formats=None):
"""
Opens and identifies the given image file.
@@ -2867,6 +2867,11 @@
"Binary data must be used ins... | diff --git a/Tests/test_image.py b/Tests/test_image.py
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -86,6 +86,26 @@
# with pytest.raises(MemoryError):
# Image.new("L", (1000000, 1000000))
+ def test_open_formats(self):
+ PNGFILE = "Tests/images/hopper.png"
+ JPGFILE = "T... | null | null | namanjain12/pillow_final:2b061b68dbbf4fb590ab532b6fdffea8ee063ae8 | true | null | 1 | 15 | null | 1,240 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.256667 | 80.68875 | ||
8,708 | r2e_gym::train::6422 | r2e_gym | train | 6,422 | pillow__143e08c92c803d28d0517693c3aece3499f2f45d | pillow | python-pillow/pillow | python | 143e08c92c803d28d0517693c3aece3499f2f45d | **Title:** Saving RGB Images as DDS Raises KeyError: 'DDS'
**Description:**
When attempting to save an image in RGB mode to the DDS format, a `KeyError` is raised with the message `'DDS'`. This error occurs because the DDS format is not properly registered for saving RGB images, preventing the save operation from reco... | diff --git a/src/PIL/DdsImagePlugin.py b/src/PIL/DdsImagePlugin.py
--- a/src/PIL/DdsImagePlugin.py
+++ b/src/PIL/DdsImagePlugin.py
@@ -14,6 +14,7 @@
from io import BytesIO
from . import Image, ImageFile
+from ._binary import o32le as o32
# Magic ("DDS ")
DDS_MAGIC = 0x20534444
@@ -201,9 +202,43 @@
pass... | diff --git a/Tests/test_file_dds.py b/Tests/test_file_dds.py
--- a/Tests/test_file_dds.py
+++ b/Tests/test_file_dds.py
@@ -5,7 +5,7 @@
from PIL import DdsImagePlugin, Image
-from .helper import assert_image_equal, assert_image_equal_tofile
+from .helper import assert_image_equal, assert_image_equal_tofile, hopper
... | null | null | namanjain12/pillow_final:143e08c92c803d28d0517693c3aece3499f2f45d | true | null | 1 | 35 | null | 836 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.256 | 80.68675 | ||
8,709 | r2e_gym::train::379 | r2e_gym | train | 379 | orange3__4f4539a8e35226041cb7c66b9329961751766284 | orange3 | biolab/orange3 | python | 4f4539a8e35226041cb7c66b9329961751766284 | **Title:** PLSRegressionLearner Raises ValueError When Target Values Are Missing
**Description:**
When training a Partial Least Squares (PLS) regression model, if the target variable contains missing values (`NaN`), the learner raises a `ValueError`. This prevents the model from being trained on datasets with incomple... | diff --git a/Orange/regression/pls.py b/Orange/regression/pls.py
--- a/Orange/regression/pls.py
+++ b/Orange/regression/pls.py
@@ -36,7 +36,16 @@
u = y_center @ pls.y_rotations_
"""
pls = self.pls_model.skl_model
- t, u = pls.transform(X, Y)
+ mask = np.isnan(Y).any(axis=1)
+ ... | diff --git a/Orange/regression/tests/test_pls.py b/Orange/regression/tests/test_pls.py
--- a/Orange/regression/tests/test_pls.py
+++ b/Orange/regression/tests/test_pls.py
@@ -154,6 +154,38 @@
m = PLSRegressionLearner()(table(10, 5, 2))
self.assertNotEqual(hash(transformer), hash(_PLSCommonTransform(m)... | null | null | namanjain12/orange3_final:4f4539a8e35226041cb7c66b9329961751766284 | true | null | 1 | 11 | null | 1,316 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.256 | 80.68675 | ||
8,710 | r2e_gym::train::5020 | r2e_gym | train | 5,020 | datalad__9670bc78ef2601fc3f4dda507c9591f90232efd1 | datalad | datalad/datalad | python | 9670bc78ef2601fc3f4dda507c9591f90232efd1 | **Title:** ConfigManager Missing `overrides` Attribute Causes AttributeError
**Description:**
When using the `ConfigManager` without providing an `overrides` parameter, attempting to access the `overrides` attribute results in an `AttributeError`. This prevents users from setting override configurations as intended.
... | diff --git a/datalad/config.py b/datalad/config.py
--- a/datalad/config.py
+++ b/datalad/config.py
@@ -114,11 +114,16 @@
written during normal operation. If such need arises, various solutions are
possible (via GitPython, or an independent writer).
+ Each instance carries a public `overrides` attribute. ... | diff --git a/datalad/tests/test_config.py b/datalad/tests/test_config.py
--- a/datalad/tests/test_config.py
+++ b/datalad/tests/test_config.py
@@ -179,6 +179,14 @@
globalcfg.remove_section('datalad.unittest', where='global')
ok_file_has_content(global_gitconfig, "")
+ cfg = ConfigManager(
+ ... | null | null | namanjain12/datalad_final:9670bc78ef2601fc3f4dda507c9591f90232efd1 | true | null | 1 | 35 | null | 836 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.256 | 80.68675 | ||
8,711 | r2e_gym::train::6434 | r2e_gym | train | 6,434 | pillow__5071692039805253ab37dad9fac2f375935a38af | pillow | python-pillow/pillow | python | 5071692039805253ab37dad9fac2f375935a38af | **Title: `Image.frombytes()` Raises ValueError for Images with Zero Dimensions**
[ISSUE]
**Description**
When attempting to create an image with zero width or height using `Image.frombytes()`, a `ValueError` is raised indicating that the tile cannot extend outside the image. This behavior prevents the creation of ima... | diff --git a/src/PIL/Image.py b/src/PIL/Image.py
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -2967,15 +2967,16 @@
_check_size(size)
- # may pass tuple instead of argument list
- if len(args) == 1 and isinstance(args[0], tuple):
- args = args[0]
-
- if decoder_name == "raw" and args == ():
... | diff --git a/Tests/test_image.py b/Tests/test_image.py
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -906,6 +906,10 @@
im = Image.new("RGB", size)
assert im.tobytes() == b""
+ @pytest.mark.parametrize("size", ((1, 0), (0, 1), (0, 0)))
+ def test_zero_frombytes(self, size):
+ Im... | null | null | namanjain12/pillow_final:5071692039805253ab37dad9fac2f375935a38af | true | null | 1 | 17 | null | 1,193 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2555 | 80.68525 | ||
8,712 | r2e_gym::train::6259 | r2e_gym | train | 6,259 | pillow__ba6399cad14d816cafc44c25782d6a3153082ae4 | pillow | python-pillow/pillow | python | ba6399cad14d816cafc44c25782d6a3153082ae4 | **Title:** PerspectiveTransform Missing in PIL.ImageTransform Causes AttributeError
**Description:**
Attempting to use `PerspectiveTransform` from `PIL.ImageTransform` results in an `AttributeError` because the class is not defined in the module. This prevents users from performing perspective transformations on image... | diff --git a/docs/reference/ImageTransform.rst b/docs/reference/ImageTransform.rst
--- a/docs/reference/ImageTransform.rst
+++ b/docs/reference/ImageTransform.rst
@@ -19,6 +19,11 @@
:undoc-members:
:show-inheritance:
+.. autoclass:: PerspectiveTransform
+ :members:
+ :undoc-members:
+ :show-inherit... | diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py
--- a/Tests/test_image_transform.py
+++ b/Tests/test_image_transform.py
@@ -15,6 +15,8 @@
seq = tuple(range(10))
transform = ImageTransform.AffineTransform(seq[:6])
+ im.transform((100, 100), transform)
+ transf... | null | null | namanjain12/pillow_final:ba6399cad14d816cafc44c25782d6a3153082ae4 | true | null | 2 | 25 | null | 1,033 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2555 | 80.68525 | ||
8,713 | r2e_gym::train::4502 | r2e_gym | train | 4,502 | numpy__22f2dc50fdd305a3b6da91b9efdf40a67a58a1e8 | numpy | numpy/numpy | python | 22f2dc50fdd305a3b6da91b9efdf40a67a58a1e8 | **Title:** `genfromtxt` Fails with `TypeError` When Using `max_rows` Parameter
**Description:**
When attempting to limit the number of rows read from a text file using the `max_rows` keyword argument in `numpy.genfromtxt`, a `TypeError` is raised.
**Example Code:**
```python
from io import StringIO
import numpy as np... | diff --git a/doc/release/1.10.0-notes.rst b/doc/release/1.10.0-notes.rst
--- a/doc/release/1.10.0-notes.rst
+++ b/doc/release/1.10.0-notes.rst
@@ -78,6 +78,13 @@
The parallelization is limited to files within one extension so projects using
Cython will not profit because it builds extensions from single files.
+*ge... | diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py
--- a/numpy/lib/tests/test_io.py
+++ b/numpy/lib/tests/test_io.py
@@ -1641,6 +1641,60 @@
self.assertTrue(isinstance(test, np.recarray))
assert_equal(test, control)
+ def test_max_rows(self):
+ # Test the `max_rows` keywor... | null | null | namanjain12/numpy_final:22f2dc50fdd305a3b6da91b9efdf40a67a58a1e8 | true | null | 2 | 33 | null | 870 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.255 | 80.68375 | ||
8,714 | r2e_gym::train::202 | r2e_gym | train | 202 | orange3__4b03401ac36061e32db14c22c10a1cbc9201bfb3 | orange3 | biolab/orange3 | python | 4b03401ac36061e32db14c22c10a1cbc9201bfb3 | **Title:** TypeError when parsing indices in `table_from_frames` with integer indices
**Description:**
When using `table_from_frames` with dataframes that have indices starting with `_o` followed by numbers, the function raises a `TypeError`. This occurs because the method incorrectly attempts to determine the length ... | diff --git a/Orange/data/pandas_compat.py b/Orange/data/pandas_compat.py
--- a/Orange/data/pandas_compat.py
+++ b/Orange/data/pandas_compat.py
@@ -382,11 +382,13 @@
XYM = (xXYM[0], yXYM[1], mXYM[2])
domain = Domain(xDomain.attributes, yDomain.class_vars, mDomain.metas)
- index_iter = (filter(lambda ind: ... | diff --git a/Orange/data/tests/test_pandas.py b/Orange/data/tests/test_pandas.py
--- a/Orange/data/tests/test_pandas.py
+++ b/Orange/data/tests/test_pandas.py
@@ -427,6 +427,21 @@
self.assertEqual(type(df), pd.DataFrame, assert_message)
self.assertEqual(len(df), len(table), assert_message)
... | null | null | namanjain12/orange3_final:4b03401ac36061e32db14c22c10a1cbc9201bfb3 | true | null | 1 | 12 | null | 1,288 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.254667 | 80.68275 | ||
8,715 | r2e_gym::train::407 | r2e_gym | train | 407 | orange3__f7ff577a4b2b94719c53eb37d63191c0f683a286 | orange3 | biolab/orange3 | python | f7ff577a4b2b94719c53eb37d63191c0f683a286 | **Title:** ValueError When Calculating `number_of_decimals` with NaN Difference
**Description:**
When normalizing data, if the calculated difference (`diff`) becomes NaN, the process of determining `number_of_decimals` fails. This happens because the code attempts to convert a NaN value to an integer, resulting in a `... | diff --git a/Orange/preprocess/normalize.py b/Orange/preprocess/normalize.py
--- a/Orange/preprocess/normalize.py
+++ b/Orange/preprocess/normalize.py
@@ -52,8 +52,14 @@
compute_val = Norm(var, avg, 1 / sd)
else:
compute_val = Norm(var, 0, 1 / sd)
- num_decimals = var.number_of... | 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
@@ -159,14 +159,12 @@
data = Table.from_list(Domain((foo,)), [[1], [2], [3]])
normalized = Normalize()(data)
- norm_foo = normalized.domain.at... | null | null | namanjain12/orange3_final:f7ff577a4b2b94719c53eb37d63191c0f683a286 | true | null | 1 | 19 | null | 1,148 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.254667 | 80.68275 | ||
8,716 | r2e_gym::train::4333 | r2e_gym | train | 4,333 | numpy__6df0b6e2b79aad40715f933b561660f951693289 | numpy | numpy/numpy | python | 6df0b6e2b79aad40715f933b561660f951693289 | **Title:** Array Representation Contains Trailing Spaces and Incorrect Newlines with Truncated Edge Items
**Description:**
When configuring NumPy to print arrays with `edgeitems=1` and `threshold=1`, the string representation of multi-dimensional arrays includes unnecessary trailing spaces and inconsistent newlines. T... | diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py
--- a/numpy/core/arrayprint.py
+++ b/numpy/core/arrayprint.py
@@ -662,16 +662,20 @@
else:
s = '['
sep = separator.rstrip()
+ line_sep = '\n'*max(rank-1, 1)
for i in range(leading_items):
if i > 0:
... | diff --git a/numpy/core/tests/test_arrayprint.py b/numpy/core/tests/test_arrayprint.py
--- a/numpy/core/tests/test_arrayprint.py
+++ b/numpy/core/tests/test_arrayprint.py
@@ -509,6 +509,77 @@
array(['1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'],
dtype='{}')""".format(styp))... | null | null | namanjain12/numpy_final:6df0b6e2b79aad40715f933b561660f951693289 | true | null | 1 | 10 | null | 1,326 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.254333 | 80.68175 | ||
8,717 | r2e_gym::train::4423 | r2e_gym | train | 4,423 | numpy__9df514382c0b7c8fdaa979f66054285d69afee4d | numpy | numpy/numpy | python | 9df514382c0b7c8fdaa979f66054285d69afee4d | **[ISSUE]**
**Title:** `np.ma.polyfit` Raises ValueError When Handling Masked NaNs
**Description:**
When using `numpy.ma.polyfit` with masked arrays containing NaN values, the function incorrectly handles the masked NaNs. This improper handling leads to a `ValueError` because invalid parameters are passed to the unde... | diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py
--- a/numpy/ma/extras.py
+++ b/numpy/ma/extras.py
@@ -1921,12 +1921,12 @@
m = mask_or(m, getmask(w))
if m is not nomask:
+ not_m = ~m
if w is not None:
- w = ~m*w
- else:
- w = ~m
-
- return np.polyfit(x... | diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py
--- a/numpy/ma/tests/test_extras.py
+++ b/numpy/ma/tests/test_extras.py
@@ -734,6 +734,21 @@
for (a, a_) in zip((C, R, K, S, D), (c, r, k, s, d)):
assert_almost_equal(a, a_)
+ def test_polyfit_with_masked_NaNs(self):
+... | null | null | namanjain12/numpy_final:9df514382c0b7c8fdaa979f66054285d69afee4d | true | null | 1 | 10 | null | 1,326 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.254333 | 80.68175 | ||
8,718 | r2e_gym::train::5535 | r2e_gym | train | 5,535 | aiohttp__bce6e3c7324f53342bcd225103771c509fc4a67f | aiohttp | aio-libs/aiohttp | python | bce6e3c7324f53342bcd225103771c509fc4a67f | **Title:** Invalid UTF-8 Bytes in Multipart Forms Raise `UnicodeDecodeError` Instead of `ValueError`
**Description:**
When processing multipart form data that contains invalid UTF-8 bytes, the system raises a `UnicodeDecodeError` instead of the expected `ValueError`. This inconsistency can lead to unhandled exceptions... | diff --git a/CHANGES/7044.bugfix b/CHANGES/7044.bugfix
--- a/CHANGES/7044.bugfix
+++ b/CHANGES/7044.bugfix
@@ -0,0 +1 @@
+Avoid raising UnicodeDecodeError in multipart and in HTTP headers parsing.
diff --git a/aiohttp/http_parser.py b/aiohttp/http_parser.py
--- a/aiohttp/http_parser.py
+++ b/aiohttp/http_parser.py
@@ -... | 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
@@ -115,6 +115,14 @@
assert not msg.should_close
assert msg.compression is None
assert not msg.upgrade
+
+
+def test_parse_headers_longline(parser: Any) -> None:
+ invalid... | null | null | namanjain12/aiohttp_final:bce6e3c7324f53342bcd225103771c509fc4a67f | true | null | 3 | 14 | null | 1,245 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.254167 | 80.68125 | ||
8,719 | r2e_gym::train::5815 | r2e_gym | train | 5,815 | tornado__e704489dd1a897ca66c8a7becb963556929cfef6 | tornado | tornadoweb/tornado | python | e704489dd1a897ca66c8a7becb963556929cfef6 | **Title:** `TCPClient.connect()` Raises TypeError When Using `source_ip` and `source_port`
**Description:**
When attempting to establish a TCP connection using `TCPClient.connect()` with the `source_ip` and `source_port` keyword arguments, a `TypeError` is raised indicating that these arguments are unexpected.
**Exam... | diff --git a/tornado/tcpclient.py b/tornado/tcpclient.py
--- a/tornado/tcpclient.py
+++ b/tornado/tcpclient.py
@@ -155,16 +155,27 @@
@gen.coroutine
def connect(self, host, port, af=socket.AF_UNSPEC, ssl_options=None,
- max_buffer_size=None):
+ max_buffer_size=None, source_ip=No... | diff --git a/tornado/test/tcpclient_test.py b/tornado/test/tcpclient_test.py
--- a/tornado/test/tcpclient_test.py
+++ b/tornado/test/tcpclient_test.py
@@ -25,7 +25,7 @@
from tornado.tcpclient import TCPClient, _Connector
from tornado.tcpserver import TCPServer
from tornado.testing import AsyncTestCase, gen_test
-fro... | null | null | namanjain12/tornado_final:e704489dd1a897ca66c8a7becb963556929cfef6 | true | null | 1 | 38 | null | 764 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.254 | 80.68075 | ||
8,720 | r2e_gym::train::226 | r2e_gym | train | 226 | orange3__2435635b0eb4bf4973efbd480fdb5404fe11ca80 | orange3 | biolab/orange3 | python | 2435635b0eb4bf4973efbd480fdb5404fe11ca80 | **Title:** Status bar fails to display correct output count after data sampling
**Description:**
After performing data sampling in the Data Sampler widget, the status bar does not show the correct number of output instances. This inconsistency makes it difficult to verify the results of the sampling process.
**Exampl... | diff --git a/Orange/widgets/data/owdatasampler.py b/Orange/widgets/data/owdatasampler.py
--- a/Orange/widgets/data/owdatasampler.py
+++ b/Orange/widgets/data/owdatasampler.py
@@ -70,9 +70,8 @@
self.indices = None
self.sampled_instances = self.remaining_instances = None
- box = gui.vBox(self.c... | diff --git a/Orange/widgets/data/tests/test_owdatasampler.py b/Orange/widgets/data/tests/test_owdatasampler.py
--- a/Orange/widgets/data/tests/test_owdatasampler.py
+++ b/Orange/widgets/data/tests/test_owdatasampler.py
@@ -1,5 +1,7 @@
# Test methods with long descriptive names can omit docstrings
-# pylint: disable=mi... | null | null | namanjain12/orange3_final:2435635b0eb4bf4973efbd480fdb5404fe11ca80 | true | null | 1 | 25 | null | 1,023 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.253833 | 80.68025 | ||
8,721 | r2e_gym::train::4010 | r2e_gym | train | 4,010 | coveragepy__6bb1c275ba6e1a77f7e8fe13445dbd899c3122b5 | coveragepy | nedbat/coveragepy | python | 6bb1c275ba6e1a77f7e8fe13445dbd899c3122b5 | **Title:** Coverage Reports Empty Files as 0% Instead of 100%
**Description:**
When generating coverage reports, empty Python files are incorrectly reported as having 0% line coverage. Since these files contain no executable lines, they should be marked as 100% covered to accurately reflect that there's nothing to co... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,15 @@
------------------------------
Change history for Coverage.py
------------------------------
+
+
+Latest
+------
+
+- Empty files are now reported as 100% covered in the XML report, not 0%
+ covered, as reported in `issue 34... | diff --git a/tests/test_xml.py b/tests/test_xml.py
--- a/tests/test_xml.py
+++ b/tests/test_xml.py
@@ -96,7 +96,14 @@
xml = self.stdout()
empty_line = re_line(xml, "class.*empty")
self.assertIn('filename="empty.py"', empty_line)
- self.assertIn('line-rate="0"', empty_line)
+ sel... | null | null | namanjain12/coveragepy_final:6bb1c275ba6e1a77f7e8fe13445dbd899c3122b5 | true | null | 2 | 32 | null | 881 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2535 | 80.67925 | ||
8,722 | r2e_gym::train::5154 | r2e_gym | train | 5,154 | pyramid__8f22d846af8faba71a2e20e0fb9da52ec4ec5a5e | pyramid | pylons/pyramid | python | 8f22d846af8faba71a2e20e0fb9da52ec4ec5a5e | **Title:** `setUp()` Function Does Not Accept `package` Argument, Causing Test Failures
**Description:**
When configuring the testing environment with a specific package, passing the `package` argument to the `setUp()` function results in a `TypeError`. This prevents setting up the package relative to the caller, lead... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -11,6 +11,11 @@
introspectable but not when passed for registration. This would mean that
add_route_predicate for example can not take a string and turn it into the
actual callable function.
+
+- Fix ``pyramid.testing.setUp`` to retu... | diff --git a/pyramid/tests/test_testing.py b/pyramid/tests/test_testing.py
--- a/pyramid/tests/test_testing.py
+++ b/pyramid/tests/test_testing.py
@@ -347,6 +347,7 @@
self.assertEqual(config.registry, current['registry'])
self.assertEqual(current['registry'].__class__, Registry)
self.assertEq... | null | null | namanjain12/pyramid_final:8f22d846af8faba71a2e20e0fb9da52ec4ec5a5e | true | null | 2 | 25 | null | 1,021 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2535 | 80.67925 | ||
8,723 | r2e_gym::train::5856 | r2e_gym | train | 5,856 | tornado__f6c4790b46a995b7400219d8e0430adac7f1d62c | tornado | tornadoweb/tornado | python | f6c4790b46a995b7400219d8e0430adac7f1d62c | **Title:** Autoreload Fails to Preserve Reload Wrapper in Python 3, Causing Incomplete Reloads
**Description:**
When using Tornado's autoreload with Python 3, the reload wrapper is not preserved correctly during application restart. This leads to incomplete reloads where initialization steps are not executed as expec... | diff --git a/tornado/autoreload.py b/tornado/autoreload.py
--- a/tornado/autoreload.py
+++ b/tornado/autoreload.py
@@ -109,6 +109,7 @@
_io_loops = weakref.WeakKeyDictionary() # type: ignore
_autoreload_is_main = False
_original_argv = None
+_original_spec = None
def start(check_time=500):
@@ -216,11 +217,15 @@... | 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,12 +1,13 @@
from __future__ import absolute_import, division, print_function
import os
+import shutil
import subprocess
from subprocess import Popen
impor... | null | null | namanjain12/tornado_final:f6c4790b46a995b7400219d8e0430adac7f1d62c | true | null | 1 | 20 | null | 1,121 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2535 | 80.67925 | ||
8,724 | r2e_gym::train::5659 | r2e_gym | train | 5,659 | scrapy__d4872940dbb450fcd0fa688766af0aa6dfccc861 | scrapy | scrapy/scrapy | python | d4872940dbb450fcd0fa688766af0aa6dfccc861 | **Title:** NameError: name 'unicode' is not defined when using xmliter with Response objects in Python 3
**Description:**
After porting `scrapy/utils/iterators.py` to Python 3, attempting to use the `xmliter` function with a `Response` object results in a `NameError`. This error occurs because the code still reference... | diff --git a/scrapy/utils/iterators.py b/scrapy/utils/iterators.py
--- a/scrapy/utils/iterators.py
+++ b/scrapy/utils/iterators.py
@@ -8,6 +8,8 @@
from io import BytesIO
import six
+if six.PY3:
+ from io import StringIO
from scrapy.http import TextResponse, Response
from scrapy.selector import Selector
@... | diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt
--- a/tests/py3-ignores.txt
+++ b/tests/py3-ignores.txt
@@ -16,7 +16,6 @@
tests/test_pipeline_images.py
tests/test_proxy_connect.py
tests/test_spidermiddleware_httperror.py
-tests/test_utils_iterators.py
tests/test_utils_template.py
tests/test_webclient.py... | null | null | namanjain12/scrapy_final:d4872940dbb450fcd0fa688766af0aa6dfccc861 | true | null | 1 | 14 | null | 1,240 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.253333 | 80.67875 | ||
8,725 | r2e_gym::train::6185 | r2e_gym | train | 6,185 | pillow__b2b737b68b06ac448d6c6f799347f244652bedcb | pillow | python-pillow/pillow | python | b2b737b68b06ac448d6c6f799347f244652bedcb | **Title:** GIF comments longer than 255 bytes are not preserved when saving and reloading
**Description:**
When saving a GIF with a comment exceeding 255 bytes, the comment is not retained upon reloading the image. This results in the absence of the `'comment'` key in the image information, leading to errors when atte... | diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py
--- a/src/PIL/GifImagePlugin.py
+++ b/src/PIL/GifImagePlugin.py
@@ -201,9 +201,13 @@
#
# comment extension
#
- info["comment"] = block
- if not block:
-... | 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
@@ -435,6 +435,18 @@
self.assertEqual(reread.info['comment'], im.info['comment'])
+ def test_comment_over_255(self):
+ out = self.tempfile('temp.gif')
+ im = Image.new('L'... | null | null | namanjain12/pillow_final:b2b737b68b06ac448d6c6f799347f244652bedcb | true | null | 1 | 22 | null | 1,078 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.253 | 80.67775 | ||
8,726 | r2e_gym::train::5576 | r2e_gym | train | 5,576 | scrapy__db408528928b2d15043593032913fe40d6eb6783 | scrapy | scrapy/scrapy | python | db408528928b2d15043593032913fe40d6eb6783 | **Title:** Incorrect Percent-Encoding of Non-ASCII Characters in "Location" Header
**Description:**
When a server responds with a "Location" header containing non-ASCII characters, the redirect middleware incorrectly decodes these bytes using `latin1`. This results in improper percent-encoding of the URL, leading to u... | diff --git a/scrapy/downloadermiddlewares/redirect.py b/scrapy/downloadermiddlewares/redirect.py
--- a/scrapy/downloadermiddlewares/redirect.py
+++ b/scrapy/downloadermiddlewares/redirect.py
@@ -1,9 +1,10 @@
import logging
from six.moves.urllib.parse import urljoin
+from w3lib.url import safe_url_string
+
from scr... | diff --git a/tests/test_downloadermiddleware_redirect.py b/tests/test_downloadermiddleware_redirect.py
--- a/tests/test_downloadermiddleware_redirect.py
+++ b/tests/test_downloadermiddleware_redirect.py
@@ -157,15 +157,15 @@
latin1_location = u'/ação'.encode('latin1') # HTTP historically supports latin1
... | null | null | namanjain12/scrapy_final:db408528928b2d15043593032913fe40d6eb6783 | true | null | 1 | 6 | null | 1,397 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.252833 | 80.67725 | ||
8,727 | r2e_gym::train::4924 | r2e_gym | train | 4,924 | datalad__7b0b8d096f46ebc653d1559bf77e3fe7fc20bc23 | datalad | datalad/datalad | python | 7b0b8d096f46ebc653d1559bf77e3fe7fc20bc23 | **Title:** CLI Always Includes `result_filter`, Ignoring Default Filter Unless Specified
**Description:**
When using the command-line interface (CLI) without explicitly specifying a `result_filter`, the `result_filter` parameter is still included in the keyword arguments with a value of `None`. This causes the defaul... | diff --git a/datalad/interface/base.py b/datalad/interface/base.py
--- a/datalad/interface/base.py
+++ b/datalad/interface/base.py
@@ -413,7 +413,12 @@
if args.common_on_failure:
kwargs['on_failure'] = args.common_on_failure
# compose filter function from to be invented cmdlin... | diff --git a/datalad/interface/tests/test_base.py b/datalad/interface/tests/test_base.py
--- a/datalad/interface/tests/test_base.py
+++ b/datalad/interface/tests/test_base.py
@@ -90,6 +90,22 @@
eq_(val, ["nothing is", "magical"])
+def test_call_from_parser_result_filter():
+ class DummyOne(Interface):
+... | null | null | namanjain12/datalad_final:7b0b8d096f46ebc653d1559bf77e3fe7fc20bc23 | true | null | 1 | 7 | null | 1,373 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.252167 | 80.67525 | ||
8,728 | r2e_gym::train::6261 | r2e_gym | train | 6,261 | pillow__9898613c4d276f8065d5e3bbb5fda7f4715e90d0 | pillow | python-pillow/pillow | python | 9898613c4d276f8065d5e3bbb5fda7f4715e90d0 | **Title:** EXIF Data Not Preserved When Saving MPO Files
**Description:**
When saving an MPO (Multi-Picture Object) file with EXIF data, the EXIF information is not retained. After saving and reloading the MPO file, attempting to access specific EXIF tags results in a `TypeError` because the EXIF data is missing.
**E... | diff --git a/src/PIL/MpoImagePlugin.py b/src/PIL/MpoImagePlugin.py
--- a/src/PIL/MpoImagePlugin.py
+++ b/src/PIL/MpoImagePlugin.py
@@ -52,14 +52,22 @@
_save(im, fp, filename)
return
+ mpf_offset = 28
offsets = []
for imSequence in itertools.chain([im], append_images):
f... | diff --git a/Tests/test_file_mpo.py b/Tests/test_file_mpo.py
--- a/Tests/test_file_mpo.py
+++ b/Tests/test_file_mpo.py
@@ -80,7 +80,10 @@
@pytest.mark.parametrize("test_file", test_files)
def test_exif(test_file):
- with Image.open(test_file) as im:
+ with Image.open(test_file) as im_original:
+ im_rel... | null | null | namanjain12/pillow_final:9898613c4d276f8065d5e3bbb5fda7f4715e90d0 | true | null | 1 | 14 | null | 1,231 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.251833 | 80.67425 | ||
8,729 | r2e_gym::train::4449 | r2e_gym | train | 4,449 | numpy__3461ea868bc7520d4569f7d61397044cf4e593d0 | numpy | numpy/numpy | python | 3461ea868bc7520d4569f7d61397044cf4e593d0 | **Title:** Incorrect Alignment in `repr` for Subclasses of `ndarray`
**Description:**
When creating subclasses of NumPy's `ndarray`, the string representation (`repr`) does not align multi-dimensional arrays correctly. Specifically, the indentation for nested arrays is inconsistent, leading to misleading representati... | diff --git a/doc/release/1.13.0-notes.rst b/doc/release/1.13.0-notes.rst
--- a/doc/release/1.13.0-notes.rst
+++ b/doc/release/1.13.0-notes.rst
@@ -174,6 +174,11 @@
For consistency with ``ndarray`` and ``broadcast``, ``d.ndim`` is a shorthand
for ``len(d.shape)``.
+Better default repr for ``ndarray`` subclasses
+~~~... | diff --git a/numpy/core/tests/test_arrayprint.py b/numpy/core/tests/test_arrayprint.py
--- a/numpy/core/tests/test_arrayprint.py
+++ b/numpy/core/tests/test_arrayprint.py
@@ -13,6 +13,28 @@
def test_nan_inf(self):
x = np.array([np.nan, np.inf])
assert_equal(repr(x), 'array([ nan, inf])')
+
+ ... | null | null | namanjain12/numpy_final:3461ea868bc7520d4569f7d61397044cf4e593d0 | true | null | 2 | 25 | null | 1,010 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.251667 | 80.67375 | ||
8,730 | r2e_gym::train::5133 | r2e_gym | train | 5,133 | pyramid__248669dbaedc4848e627c449e4e43928628b86be | pyramid | pylons/pyramid | python | 248669dbaedc4848e627c449e4e43928628b86be | **Title:** Unable to Automatically Open Browser with `open_url` Configuration
**Description:**
When using the `open_url` setting in the `pserve` configuration, the application fails to open the browser automatically because it cannot determine the server's URL. This results in an `AttributeError`, making the `open_url... | diff --git a/pyramid/scripts/pserve.py b/pyramid/scripts/pserve.py
--- a/pyramid/scripts/pserve.py
+++ b/pyramid/scripts/pserve.py
@@ -150,7 +150,7 @@
try:
items = dict(config.items('pserve'))
except configparser.NoSectionError:
- items = {}
+ return
watch... | diff --git a/pyramid/tests/test_scripts/test_pserve.py b/pyramid/tests/test_scripts/test_pserve.py
--- a/pyramid/tests/test_scripts/test_pserve.py
+++ b/pyramid/tests/test_scripts/test_pserve.py
@@ -80,6 +80,32 @@
os.path.abspath(os.path.join(here, '*.py')),
]))
+ def test_config_file_finds_o... | null | null | namanjain12/pyramid_final:248669dbaedc4848e627c449e4e43928628b86be | true | null | 1 | 29 | null | 930 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.251667 | 80.67375 | ||
8,731 | r2e_gym::train::5460 | r2e_gym | train | 5,460 | aiohttp__2e4b0337e1ee4db3ceb5adc8276f94e11f8b09c3 | aiohttp | aio-libs/aiohttp | python | 2e4b0337e1ee4db3ceb5adc8276f94e11f8b09c3 | **Title:** RequestHandler lacks informative `__repr__`, complicating debugging
**Description:**
When working with `RequestHandler` instances, the string representation does not provide useful information about the handler's state. This makes it difficult to debug and understand the current method, path, and connection... | diff --git a/aiohttp/web.py b/aiohttp/web.py
--- a/aiohttp/web.py
+++ b/aiohttp/web.py
@@ -26,6 +26,9 @@
class RequestHandler(ServerHttpProtocol):
+ _meth = 'none'
+ _path = 'none'
+
def __init__(self, manager, app, router, **kwargs):
super().__init__(**kwargs)
@@ -34,6 +37,11 @@
sel... | diff --git a/tests/test_web.py b/tests/test_web.py
--- a/tests/test_web.py
+++ b/tests/test_web.py
@@ -104,6 +104,20 @@
def tearDown(self):
self.loop.close()
+ def test_repr(self):
+ app = web.Application(loop=self.loop)
+ manager = app.make_handler()
+ handler = manager()
+
+ ... | null | null | namanjain12/aiohttp_final:2e4b0337e1ee4db3ceb5adc8276f94e11f8b09c3 | true | null | 1 | 14 | null | 1,229 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2515 | 80.67325 | ||
8,732 | r2e_gym::train::5289 | r2e_gym | train | 5,289 | aiohttp__c054f579dd04bfa5d3f0ee78d4cca4107f96d4c4 | aiohttp | aio-libs/aiohttp | python | c054f579dd04bfa5d3f0ee78d4cca4107f96d4c4 | **Title:** UrlDispatcher Fails to Raise ValueError for Invalid HTTP Methods and Paths
**Description:**
When adding a route to the `UrlDispatcher` with an unsupported HTTP method or a path that doesn't start with a `/`, the dispatcher does not raise a `ValueError` as expected. Instead, it either raises an `AssertionErr... | diff --git a/aiohttp/web_urldispatcher.py b/aiohttp/web_urldispatcher.py
--- a/aiohttp/web_urldispatcher.py
+++ b/aiohttp/web_urldispatcher.py
@@ -356,13 +356,17 @@
def add_route(self, method, path, handler,
*, name=None, expect_handler=None):
+ if not path.startswith('/'):
+ ... | diff --git a/tests/test_urldispatch.py b/tests/test_urldispatch.py
--- a/tests/test_urldispatch.py
+++ b/tests/test_urldispatch.py
@@ -545,3 +545,13 @@
})
self.loop.run_until_complete(go())
+
+ def test_add_route_not_started_with_slash(self):
+ with self.assertRaises(ValueError):
+ ... | null | null | namanjain12/aiohttp_final:c054f579dd04bfa5d3f0ee78d4cca4107f96d4c4 | true | null | 2 | 14 | null | 1,228 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.251333 | 80.67275 | ||
8,733 | r2e_gym::train::4678 | r2e_gym | train | 4,678 | numpy__2b7fff08567fd1e06df66b8ad2b71959dee63070 | numpy | numpy/numpy | python | 2b7fff08567fd1e06df66b8ad2b71959dee63070 | **Title:** Passing `axis` Keyword to `np.gradient` Raises TypeError
**Description:**
When attempting to calculate the gradient over specific axes using the `axis` keyword with `np.gradient`, a `TypeError` is raised. This prevents users from specifying the axes along which the gradient should be computed.
**Example Co... | diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -1122,14 +1122,21 @@
----------
f : array_like
An N-dimensional array containing samples of a scalar function.
- varargs : list of scalar, optional
+ varargs... | diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -600,6 +600,31 @@
analytical = 6 * x ** 2 + 8 * x + 2
num_error = np.abs((np.gradient(y, dx, edge_order=2) / analytical)... | null | null | namanjain12/numpy_final:2b7fff08567fd1e06df66b8ad2b71959dee63070 | true | null | 1 | 40 | null | 707 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.251167 | 80.67225 | ||
8,734 | r2e_gym::train::5652 | r2e_gym | train | 5,652 | scrapy__91991e0bdcb9342813523bf393c3ed61c3a12def | scrapy | scrapy/scrapy | python | 91991e0bdcb9342813523bf393c3ed61c3a12def | **Title:** Serialization of Request Fails with AttributeError Due to Incorrect String Decoding in Python 3
**Description:**
When attempting to serialize a `Request` object, the serialization process tries to decode the URL using the `decode` method. In Python 3, strings are already Unicode and do not have a `decode` m... | diff --git a/scrapy/utils/reqser.py b/scrapy/utils/reqser.py
--- a/scrapy/utils/reqser.py
+++ b/scrapy/utils/reqser.py
@@ -1,8 +1,11 @@
"""
Helper functions for serializing (and deserializing) requests.
"""
+import six
from scrapy.http import Request
+from scrapy.utils.python import to_unicode, to_native_str
+
... | diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt
--- a/tests/py3-ignores.txt
+++ b/tests/py3-ignores.txt
@@ -39,7 +39,6 @@
tests/test_stats.py
tests/test_utils_iterators.py
tests/test_utils_log.py
-tests/test_utils_reqser.py
tests/test_utils_template.py
tests/test_webclient.py
diff --git a/tests/test_u... | null | null | namanjain12/scrapy_final:91991e0bdcb9342813523bf393c3ed61c3a12def | true | null | 1 | 21 | null | 1,084 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.250667 | 80.67075 | ||
8,735 | r2e_gym::train::6415 | r2e_gym | train | 6,415 | pillow__639bdd3c02e7cc40a002866edccebea1a10adcda | pillow | python-pillow/pillow | python | 639bdd3c02e7cc40a002866edccebea1a10adcda | **Title:** Loading PNG with Corrupted Ancillary Chunk Raises SyntaxError Despite Truncated Image Settings
**Description:**
When attempting to load a PNG image that contains a corrupted CRC in an ancillary chunk, a `SyntaxError` is raised even when the `LOAD_TRUNCATED_IMAGES` flag is enabled. Ancillary chunks are non-e... | diff --git a/PIL/PngImagePlugin.py b/PIL/PngImagePlugin.py
--- a/PIL/PngImagePlugin.py
+++ b/PIL/PngImagePlugin.py
@@ -137,6 +137,12 @@
def crc(self, cid, data):
"Read and verify checksum"
+
+ # Skip CRC checks for ancillary chunks if allowed to load truncated images
+ # 5th byte of first ... | 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
@@ -3,6 +3,7 @@
from io import BytesIO
from PIL import Image
+from PIL import ImageFile
from PIL import PngImagePlugin
import zlib
@@ -318,6 +319,33 @@
im = Image.open(BytesIO(test... | null | null | namanjain12/pillow_final:639bdd3c02e7cc40a002866edccebea1a10adcda | true | null | 1 | 6 | null | 1,383 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2505 | 80.67025 | ||
8,736 | r2e_gym::train::4944 | r2e_gym | train | 4,944 | datalad__47614e0b75cefc0ba59b2efe579c5ce540ebdcd9 | datalad | datalad/datalad | python | 47614e0b75cefc0ba59b2efe579c5ce540ebdcd9 | **Title:** Documentation Does Not Reflect Overridden Default Options in `eval_params`
**Description:**
When overriding default options in `eval_params`, the generated documentation fails to display the updated default values. Specifically, overriding attributes like `result_renderer` and `return_type` should update th... | diff --git a/datalad/interface/base.py b/datalad/interface/base.py
--- a/datalad/interface/base.py
+++ b/datalad/interface/base.py
@@ -514,10 +514,19 @@
# build standard doc and insert eval_doc
spec = getattr(cls, '_params_', dict())
+
+
+ # update class attributes that may override defaults
+ if has... | 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
@@ -206,6 +206,9 @@
class TestUtils(Interface):
"""TestUtil's fake command"""
+ result_renderer = 'tailored' # overrides None defa... | null | null | namanjain12/datalad_final:47614e0b75cefc0ba59b2efe579c5ce540ebdcd9 | true | null | 1 | 11 | null | 1,283 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2505 | 80.67025 | ||
8,737 | r2e_gym::train::5172 | r2e_gym | train | 5,172 | pyramid__4e2ee7de7d7362f8ab60eecc8fffbb614efa3108 | pyramid | pylons/pyramid | python | 4e2ee7de7d7362f8ab60eecc8fffbb614efa3108 | **Title:** `get_root` Fails with AttributeError Due to Missing `threadlocal_manager` in Application
**Description:**
When invoking the `get_root` function without providing a request or with a request, it raises an `AttributeError` because the application object lacks the `threadlocal_manager` attribute.
**Example Co... | diff --git a/pyramid/scripting.py b/pyramid/scripting.py
--- a/pyramid/scripting.py
+++ b/pyramid/scripting.py
@@ -8,7 +8,7 @@
from pyramid.request import Request
from pyramid.request import apply_request_extensions
-from pyramid.threadlocal import manager as threadlocal_manager
+from pyramid.threadlocal import Req... | diff --git a/pyramid/tests/test_scripting.py b/pyramid/tests/test_scripting.py
--- a/pyramid/tests/test_scripting.py
+++ b/pyramid/tests/test_scripting.py
@@ -8,38 +8,35 @@
def _makeRegistry(self):
return DummyRegistry([DummyFactory])
+ def setUp(self):
+ from pyramid.threadlocal import manage... | null | null | namanjain12/pyramid_final:4e2ee7de7d7362f8ab60eecc8fffbb614efa3108 | true | null | 1 | 19 | null | 1,123 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2505 | 80.67025 | ||
8,738 | r2e_gym::train::5769 | r2e_gym | train | 5,769 | scrapy__cfed9b6659c90e0799361911b1d72ed127edf471 | scrapy | scrapy/scrapy | python | cfed9b6659c90e0799361911b1d72ed127edf471 | **Title:** Middleware Settings Fail When Passing Python Objects Directly
**Description:**
When configuring middleware by passing Python objects directly within the settings dictionary, an `AttributeError` is raised. This occurs because the system expects string paths for middleware classes and attempts to call string ... | diff --git a/scrapy/middleware.py b/scrapy/middleware.py
--- a/scrapy/middleware.py
+++ b/scrapy/middleware.py
@@ -1,4 +1,5 @@
from collections import defaultdict
+from inspect import isclass
import logging
import pprint
@@ -31,7 +32,9 @@
for clspath in mwlist:
try:
mwcls = l... | diff --git a/tests/test_middleware.py b/tests/test_middleware.py
--- a/tests/test_middleware.py
+++ b/tests/test_middleware.py
@@ -91,3 +91,16 @@
mwman = TestMiddlewareManager.from_settings(settings)
classes = [x.__class__ for x in mwman.middlewares]
self.assertEqual(classes, [M1, M3])
+
+ ... | null | null | namanjain12/scrapy_final:cfed9b6659c90e0799361911b1d72ed127edf471 | true | null | 2 | 12 | null | 1,262 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.250333 | 80.66975 | ||
8,739 | r2e_gym::train::5132 | r2e_gym | train | 5,132 | pyramid__b0d20b5c3fe7df472633899024cdab685483807a | pyramid | pylons/pyramid | python | b0d20b5c3fe7df472633899024cdab685483807a | **Title:** Unable to Register Exception-Only Views Using `exception_only` Argument
**Description:**
When attempting to register a view with the `exception_only` parameter set to `True`, a `ConfigurationError` is raised indicating that `exception_only` is an unknown view option. This prevents the registration of views ... | diff --git a/pyramid/config/views.py b/pyramid/config/views.py
--- a/pyramid/config/views.py
+++ b/pyramid/config/views.py
@@ -213,6 +213,7 @@
match_param=None,
check_csrf=None,
require_csrf=None,
+ exception_only=False,
**view_options):
""" Add a :term:`view configur... | 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
@@ -1814,6 +1814,38 @@
config.add_view(view=DummyViewClass.run, renderer=null_renderer)
self.assertRaises(Con... | null | null | namanjain12/pyramid_final:b0d20b5c3fe7df472633899024cdab685483807a | true | null | 1 | 25 | null | 1,000 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.25 | 80.66875 | ||
8,740 | swe_bench::test::1467 | swe_bench | test | 1,467 | pytest-dev__pytest-8428 | pytest-dev/pytest | pytest-dev/pytest | python | fe51121f39ca48c1af21733a60ae069b316b1cdb | Generate an error when a mark is applied to a fixture
Follow up from #1014.
We should generate an error if a `@pytest.mark` is applied to a fixture.
There is a warning in `doc/en/fixture.rst` about this problem which should be updated once this issue is dealt with. | [GitMate.io](https://gitmate.io) thinks possibly related issues are https://github.com/pytest-dev/pytest/issues/3346 (Please error when fixtures conflict), https://github.com/pytest-dev/pytest/issues/2872 (mark fixtures ), https://github.com/pytest-dev/pytest/issues/2399 (marks should propogate through fixtures), https... | diff --git a/src/_pytest/deprecated.py b/src/_pytest/deprecated.py
--- a/src/_pytest/deprecated.py
+++ b/src/_pytest/deprecated.py
@@ -122,6 +122,11 @@
"#configuring-hook-specs-impls-using-markers",
)
+MARKED_FIXTURE = PytestRemovedIn8Warning(
+ "Marks applied to fixtures have no effect\n"
+ "See docs: ht... | diff --git a/testing/deprecated_test.py b/testing/deprecated_test.py
--- a/testing/deprecated_test.py
+++ b/testing/deprecated_test.py
@@ -281,6 +281,57 @@ def test_importing_instance_is_deprecated(pytester: Pytester) -> None:
from _pytest.python import Instance # noqa: F401
+def test_fixture_disallow_on_... | ["testing/deprecated_test.py::test_fixture_disallow_on_marked_functions", "testing/deprecated_test.py::test_fixture_disallow_marks_on_fixtures", "testing/deprecated_test.py::test_fixture_disallowed_between_marks"] | ["testing/deprecated_test.py::test_hookspec_via_function_attributes_are_deprecated", "testing/deprecated_test.py::test_hookimpl_via_function_attributes_are_deprecated", "testing/deprecated_test.py::test_yield_fixture_is_deprecated", "testing/deprecated_test.py::test_private_is_deprecated", "testing/deprecated_test.py::... | null | true | 2021-03-10T14:02:46Z | 3 | 16 | 3 | 267 | 0 | 0.8 | 1 | 0.55 | 1 | 0.097833 | 80.6685 | |
8,741 | r2e_gym::train::5965 | r2e_gym | train | 5,965 | tornado__bb00b7edc82c63227dab1d2c19ab1e76f1a7c572 | tornado | tornadoweb/tornado | python | bb00b7edc82c63227dab1d2c19ab1e76f1a7c572 | **Title:** Unable to Set `locale` Property on `RequestHandler`, Causes Internal Server Error
**Description:**
When attempting to set the `locale` property on a `RequestHandler` instance, the application encounters an internal server error. This issue arises because the `locale` property currently lacks a setter method... | diff --git a/docs/releases/next.rst b/docs/releases/next.rst
--- a/docs/releases/next.rst
+++ b/docs/releases/next.rst
@@ -26,3 +26,4 @@
`.WebSocketHandler.get_compression_options` to enable on the server
side, and use the ``compression_options`` keyword argument to
`.websocket_connect` on the client side.
+* ... | diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py
--- a/tornado/test/web_test.py
+++ b/tornado/test/web_test.py
@@ -4,6 +4,7 @@
from tornado.escape import json_decode, utf8, to_unicode, recursive_unicode, native_str, to_basestring
from tornado.httputil import format_timestamp
from tornado.iostream imp... | null | null | namanjain12/tornado_final:bb00b7edc82c63227dab1d2c19ab1e76f1a7c572 | true | null | 3 | 11 | null | 1,277 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2495 | 80.66725 | ||
8,742 | r2e_gym::train::6016 | r2e_gym | train | 6,016 | tornado__5ee7f4573e7542bc2c2dc4f5b5d162ad58499383 | tornado | tornadoweb/tornado | python | 5ee7f4573e7542bc2c2dc4f5b5d162ad58499383 | Title: `run_in_executor` Raises TypeError When Awaiting Returned Future
**Description**
When using `IOLoop.run_in_executor` within an asynchronous function and attempting to `await` the returned future, a `TypeError` is raised. This happens because the method returns a concurrent `Future` that is incompatible with Tor... | diff --git a/tornado/ioloop.py b/tornado/ioloop.py
--- a/tornado/ioloop.py
+++ b/tornado/ioloop.py
@@ -44,7 +44,7 @@
import traceback
import math
-from tornado.concurrent import TracebackFuture, is_future
+from tornado.concurrent import TracebackFuture, is_future, chain_future
from tornado.log import app_log, gen_... | diff --git a/tornado/test/ioloop_test.py b/tornado/test/ioloop_test.py
--- a/tornado/test/ioloop_test.py
+++ b/tornado/test/ioloop_test.py
@@ -604,56 +604,70 @@
event1 = threading.Event()
event2 = threading.Event()
- def callback(self_event, other_event):
+ def sync_func(self_event, ot... | null | null | namanjain12/tornado_final:5ee7f4573e7542bc2c2dc4f5b5d162ad58499383 | true | null | 1 | 10 | null | 1,295 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.249167 | 80.66625 | ||
8,743 | r2e_gym::train::5005 | r2e_gym | train | 5,005 | datalad__4579b3f7d7cc3c5c3b67a4cf35527f7869e08004 | datalad | datalad/datalad | python | 4579b3f7d7cc3c5c3b67a4cf35527f7869e08004 | **Title:** Crashes with TypeError When Creating GitLab Sibling for Uninstalled Subdatasets
**Description:**
When attempting to create a GitLab sibling for a dataset that has uninstalled subdatasets, the operation crashes unexpectedly. This occurs during a dry run of the sibling creation process.
**Example Buggy Code:... | diff --git a/changelog.d/pr-7430.md b/changelog.d/pr-7430.md
--- a/changelog.d/pr-7430.md
+++ b/changelog.d/pr-7430.md
@@ -0,0 +1,3 @@
+### 🐛 Bug Fixes
+
+- BF: create-sibling-gitlab used to raise a TypeError when attempting a recursive operation in a dataset with uninstalled subdatasets. It now raises an impossible r... | diff --git a/datalad/distributed/tests/test_create_sibling_gitlab.py b/datalad/distributed/tests/test_create_sibling_gitlab.py
--- a/datalad/distributed/tests/test_create_sibling_gitlab.py
+++ b/datalad/distributed/tests/test_create_sibling_gitlab.py
@@ -8,7 +8,7 @@
"""Test create publication target on gitlab"""
im... | null | null | namanjain12/datalad_final:4579b3f7d7cc3c5c3b67a4cf35527f7869e08004 | true | null | 2 | 26 | null | 975 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.249167 | 80.66625 | ||
8,744 | r2e_gym::train::5538 | r2e_gym | train | 5,538 | aiohttp__ee0657dfc26dc9f2aecf87f651b9dae0d14d9740 | aiohttp | aio-libs/aiohttp | python | ee0657dfc26dc9f2aecf87f651b9dae0d14d9740 | **Title:** AttributeError Occurs When Accessing `_allowed_methods` in `StaticResource`
**Description**
When adding a static resource, attempting to modify the `_allowed_methods` set results in an `AttributeError`. This issue affects scenarios where external modules, such as `aiohttp-cors`, try to access and modify the... | diff --git a/CHANGES/9972.bugfix.rst b/CHANGES/9972.bugfix.rst
--- a/CHANGES/9972.bugfix.rst
+++ b/CHANGES/9972.bugfix.rst
@@ -1,3 +1 @@
-Reverted an optimization to avoid rebuilding the allowed methods for ``StaticResource`` on every request -- by :user:`bdraco`.
-
-``aiohttp-cors`` needs to be able to modify the allo... | diff --git a/tests/test_urldispatch.py b/tests/test_urldispatch.py
--- a/tests/test_urldispatch.py
+++ b/tests/test_urldispatch.py
@@ -498,6 +498,7 @@
"/st", pathlib.Path(aiohttp.__file__).parent, name="static"
)
resource._routes[hdrs.METH_OPTIONS] = resource._routes[hdrs.METH_GET]
+ resource._all... | null | null | namanjain12/aiohttp_final:ee0657dfc26dc9f2aecf87f651b9dae0d14d9740 | true | null | 3 | 9 | null | 1,314 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.249 | 80.66575 | ||
8,745 | r2e_gym::train::5019 | r2e_gym | train | 5,019 | datalad__2c4c6735e39077339e479aa3e7cc00719396631d | datalad | datalad/datalad | python | 2c4c6735e39077339e479aa3e7cc00719396631d | **Title:** `enter_new` Method Accepts Invalid Credential Fields Without Raising Errors
**Description:**
When using the `enter_new` method to add new credentials, providing fields that are not recognized by the system does not trigger any errors. This oversight allows the inclusion of unintended fields, which can lead ... | diff --git a/datalad/downloaders/credentials.py b/datalad/downloaders/credentials.py
--- a/datalad/downloaders/credentials.py
+++ b/datalad/downloaders/credentials.py
@@ -123,6 +123,16 @@
Any given key value pairs with non-None values are used to set the
field `key` to the given value, without ask... | 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
@@ -12,6 +12,7 @@
from datalad.tests.utils import with_testsui
from datalad.tests.utils import assert_equ... | null | null | namanjain12/datalad_final:2c4c6735e39077339e479aa3e7cc00719396631d | true | null | 1 | 10 | null | 1,292 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.248667 | 80.66475 | ||
8,746 | r2e_gym::train::5080 | r2e_gym | train | 5,080 | pyramid__d6fb00161a4d482dcfff856ce59b9dc34f78c2b1 | pyramid | pylons/pyramid | python | d6fb00161a4d482dcfff856ce59b9dc34f78c2b1 | **Title:** `registry` Attribute Missing on Request When Using `prepare` with an Existing Request
**Description**
When using `pyramid.scripting.prepare` with an existing request object, the `registry` attribute is not set on the request. This causes parts of the application that rely on `request.registry` to fail unex... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,19 @@
+Next release
+============
+
+Bug Fixes
+---------
+
+- 1.4a ``pyramid.scripting.prepare`` behaved differently than 1.3 series
+ function of same name. In particular, if passed a request, it would not
+ set the ``registry`` ... | diff --git a/pyramid/tests/test_scripting.py b/pyramid/tests/test_scripting.py
--- a/pyramid/tests/test_scripting.py
+++ b/pyramid/tests/test_scripting.py
@@ -72,7 +72,7 @@
self.assertEqual(self.default, self.manager.get())
self.assertEqual(request.context, root)
- def test_it_withrequest(self):
... | null | null | namanjain12/pyramid_final:d6fb00161a4d482dcfff856ce59b9dc34f78c2b1 | true | null | 2 | 20 | null | 1,085 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2475 | 80.66125 | ||
8,747 | r2e_gym::train::6284 | r2e_gym | train | 6,284 | pillow__445451c0b9347b50e0f603db33f196e207de470d | pillow | python-pillow/pillow | python | 445451c0b9347b50e0f603db33f196e207de470d | **Title:** `Image.new` Raises `TypeError` Instead of `ValueError` for Invalid Size Input
**Description:**
When creating a new image using `Image.new`, providing an invalid `size` parameter such as a non-tuple or a tuple with incorrect length results in a `TypeError`. This error is not descriptive and makes it difficul... | diff --git a/PIL/Image.py b/PIL/Image.py
--- a/PIL/Image.py
+++ b/PIL/Image.py
@@ -1985,6 +1985,22 @@
return Image()._new(core.wedge("L"))
+def _check_size(size):
+ """
+ Common check to enforce type and sanity check on size tuples
+
+ :param size: Should be a 2 tuple of (width, height)
+ :returns:... | diff --git a/Tests/test_image.py b/Tests/test_image.py
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -237,5 +237,17 @@
im3 = Image.open('Tests/images/effect_spread.png')
self.assert_image_similar(im2, im3, 110)
+ def test_check_size(self):
+ # Checking that the _check_size functio... | null | null | namanjain12/pillow_final:445451c0b9347b50e0f603db33f196e207de470d | true | null | 1 | 22 | null | 1,044 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.247333 | 80.66075 | ||
8,748 | r2e_gym::train::5961 | r2e_gym | train | 5,961 | tornado__58434a0419c8de02d08efe990e7aeaafedfbbeb0 | tornado | tornadoweb/tornado | python | 58434a0419c8de02d08efe990e7aeaafedfbbeb0 | **Title:** `OverrideResolver.resolve` Raises `socket.gaierror` When Using Address Family Parameter
**Description:**
When using the `resolve` method of `OverrideResolver` with an address family parameter, a `socket.gaierror` is raised, indicating that the address family for the hostname is not supported.
**Example Cod... | diff --git a/tornado/netutil.py b/tornado/netutil.py
--- a/tornado/netutil.py
+++ b/tornado/netutil.py
@@ -464,7 +464,8 @@
This can be used to make local DNS changes (e.g. for testing)
without modifying system-wide settings.
- The mapping can contain either host strings or host-port pairs.
+ The mappi... | diff --git a/tornado/test/netutil_test.py b/tornado/test/netutil_test.py
--- a/tornado/test/netutil_test.py
+++ b/tornado/test/netutil_test.py
@@ -8,7 +8,7 @@
import sys
import time
-from tornado.netutil import BlockingResolver, ThreadedResolver, is_valid_ip, bind_sockets
+from tornado.netutil import BlockingResolv... | null | null | namanjain12/tornado_final:58434a0419c8de02d08efe990e7aeaafedfbbeb0 | true | null | 1 | 11 | null | 1,262 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.247 | 80.65975 | ||
8,749 | r2e_gym::train::4195 | r2e_gym | train | 4,195 | numpy__59a7b250d4076d58c8b48bdf3800f2b1eac41e1b | numpy | numpy/numpy | python | 59a7b250d4076d58c8b48bdf3800f2b1eac41e1b | **Title:** Incorrect String Representation for Large 1D Masked Arrays
**Description:**
When creating a large 1D masked array with numerous masked elements, the string representation (`repr`) does not condense the masked sections as expected. Instead of using an ellipsis (`...`) to indicate skipped sections, it displa... | diff --git a/numpy/ma/core.py b/numpy/ma/core.py
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -2709,8 +2709,11 @@
_defaultmask = nomask
_defaulthardmask = False
_baseclass = ndarray
- # Maximum number of elements per axis used when printing an array.
+
+ # Maximum number of elements per axis us... | diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -450,6 +450,15 @@
assert_equal(repr(a), 'masked_array(data = [0 -- 2],\n'
' mask = [False True False],\n'
... | null | null | namanjain12/numpy_final:59a7b250d4076d58c8b48bdf3800f2b1eac41e1b | true | null | 1 | 11 | null | 1,257 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.246167 | 80.65725 | ||
8,750 | r2e_gym::train::5788 | r2e_gym | train | 5,788 | tornado__5d230aa01b0cfa9185ee75c408dd5b1b81b34f20 | tornado | tornadoweb/tornado | python | 5d230aa01b0cfa9185ee75c408dd5b1b81b34f20 | **Title:** Callback Executes Despite Immediate Exception in `@return_future` Function
**Description:**
When a function decorated with `@return_future` raises an exception immediately, the provided callback is still executed. This leads to unexpected behavior where the callback attempts to handle a future that was neve... | diff --git a/tornado/concurrent.py b/tornado/concurrent.py
--- a/tornado/concurrent.py
+++ b/tornado/concurrent.py
@@ -150,8 +150,6 @@
future = Future()
callback, args, kwargs = replacer.replace(future.set_result,
args, kwargs)
- if callback is... | diff --git a/tornado/test/concurrent_test.py b/tornado/test/concurrent_test.py
--- a/tornado/test/concurrent_test.py
+++ b/tornado/test/concurrent_test.py
@@ -55,17 +55,14 @@
with self.assertRaises(ZeroDivisionError):
# The caller sees the error just like a normal function.
self.immed... | null | null | namanjain12/tornado_final:5d230aa01b0cfa9185ee75c408dd5b1b81b34f20 | true | null | 1 | 11 | null | 1,256 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.246 | 80.65675 | ||
8,751 | r2e_gym::train::4693 | r2e_gym | train | 4,693 | numpy__8b6effadd7836f7e80f0f3e7dd9dd43d20ad1590 | numpy | numpy/numpy | python | 8b6effadd7836f7e80f0f3e7dd9dd43d20ad1590 | **Title:** AttributeError When Using `dot` Method on MaskedArray
**Description:**
When attempting to perform a dot product using the `dot` method on a `MaskedArray`, an `AttributeError` is raised. This occurs because the method tries to call `filled` on a `numpy.float64` object, which does not have a `filled` attribut... | diff --git a/numpy/ma/core.py b/numpy/ma/core.py
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -4522,6 +4522,26 @@
return D.astype(dtype).filled(0).sum(axis=None, out=out)
trace.__doc__ = ndarray.trace.__doc__
+ def dot(self, other, out=None):
+ am = ~getmaskarray(self)
+ bm = ~g... | diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -2982,6 +2982,30 @@
X.trace() - sum(mXdiag.mask * X.diagonal(),
axis=0))
+ def test_dot(self):
+ ... | null | null | namanjain12/numpy_final:8b6effadd7836f7e80f0f3e7dd9dd43d20ad1590 | true | null | 2 | 28 | null | 915 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.245833 | 80.65625 | ||
8,752 | r2e_gym::train::470 | r2e_gym | train | 470 | orange3__67b6068235e01a7efb7d457509b7439b039724f4 | orange3 | biolab/orange3 | python | 67b6068235e01a7efb7d457509b7439b039724f4 | **Title:** OWScatterPlotBase Raises AttributeError When Handling 'Other' Color Regions
**Description:**
When using the `OWScatterPlotBase` widget to display color regions, the system attempts to reference a `MAX_COLORS` attribute to limit the number of colors, including the 'Other' category. However, `MAX_COLORS` is n... | 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
@@ -42,6 +42,9 @@
SELECTION_WIDTH = 5
MAX_N_VALID_SIZE_ANIMATE = 1000
+
+# maximum number of colors (... | 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
@@ -940,6 +940,46 @@
np.testing.assert_equal(y_data, y_d... | null | null | namanjain12/orange3_final:67b6068235e01a7efb7d457509b7439b039724f4 | true | null | 2 | 13 | null | 1,214 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.245667 | 80.65575 | ||
8,753 | r2e_gym::train::4331 | r2e_gym | train | 4,331 | numpy__5992098524c9f36288093ef3298d44343735842e | numpy | numpy/numpy | python | 5992098524c9f36288093ef3298d44343735842e | **Title:** `mask_rows` and `mask_cols` Do Not Emit DeprecationWarning When Using `axis` Argument
**Description:**
The `mask_rows` and `mask_cols` functions are expected to deprecate the `axis` argument and raise a `DeprecationWarning` when it is used. However, currently, passing the `axis` argument does not emit any w... | diff --git a/doc/release/upcoming_changes/14996.deprecation.rst b/doc/release/upcoming_changes/14996.deprecation.rst
--- a/doc/release/upcoming_changes/14996.deprecation.rst
+++ b/doc/release/upcoming_changes/14996.deprecation.rst
@@ -0,0 +1,3 @@
+The ``axis`` argument to `numpy.ma.mask_cols` and `numpy.ma.mask_row` is... | diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py
--- a/numpy/ma/tests/test_extras.py
+++ b/numpy/ma/tests/test_extras.py
@@ -11,6 +11,7 @@
import warnings
import itertools
+import pytest
import numpy as np
from numpy.testing import (
@@ -551,6 +552,18 @@
assert_(mask_rowcols(x... | null | null | namanjain12/numpy_final:5992098524c9f36288093ef3298d44343735842e | true | null | 2 | 19 | null | 1,093 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2455 | 80.65525 | ||
8,754 | r2e_gym::train::228 | r2e_gym | train | 228 | orange3__83fd5aedc6833585d31e2c34fc277537ae6bced6 | orange3 | biolab/orange3 | python | 83fd5aedc6833585d31e2c34fc277537ae6bced6 | **Title:** Status bar does not update with data summaries in OWRank widget
**Description:**
When data is sent to the OWRank widget, the status bar is expected to display summaries of the input and output data. However, the status bar remains empty, and the summary update methods are not invoked. This prevents develope... | diff --git a/Orange/widgets/data/owrank.py b/Orange/widgets/data/owrank.py
--- a/Orange/widgets/data/owrank.py
+++ b/Orange/widgets/data/owrank.py
@@ -34,6 +34,7 @@
from Orange.widgets.utils.itemmodels import PyTableModel
from Orange.widgets.utils.sql import check_sql_input
from Orange.widgets.utils.widgetpreview im... | diff --git a/Orange/widgets/data/tests/test_owrank.py b/Orange/widgets/data/tests/test_owrank.py
--- a/Orange/widgets/data/tests/test_owrank.py
+++ b/Orange/widgets/data/tests/test_owrank.py
@@ -1,6 +1,7 @@
+# pylint: disable=unsubscriptable-object
import warnings
import unittest
-from unittest.mock import patch
+fro... | null | null | namanjain12/orange3_final:83fd5aedc6833585d31e2c34fc277537ae6bced6 | true | null | 1 | 11 | null | 1,251 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.245167 | 80.65425 | ||
8,755 | r2e_gym::train::4779 | r2e_gym | train | 4,779 | numpy__b3a66e88b005c4ca783c11e5d934451b7ca72477 | numpy | numpy/numpy | python | b3a66e88b005c4ca783c11e5d934451b7ca72477 | **Title:** `nanvar` Fails with AttributeError on Object-Dtype Arrays
**Description:**
When using the `nanvar` function with arrays of dtype `object`, an `AttributeError` is raised instead of correctly computing the variance. This issue occurs because the function attempts to access the `ndim` attribute on a float obje... | diff --git a/numpy/lib/nanfunctions.py b/numpy/lib/nanfunctions.py
--- a/numpy/lib/nanfunctions.py
+++ b/numpy/lib/nanfunctions.py
@@ -160,8 +160,12 @@
True if `res` can be modified in place, given the constraint on the
input
"""
-
- c = np.isnan(arr1d)
+ if arr1d.dtype == object:
+ ... | diff --git a/numpy/lib/tests/test_nanfunctions.py b/numpy/lib/tests/test_nanfunctions.py
--- a/numpy/lib/tests/test_nanfunctions.py
+++ b/numpy/lib/tests/test_nanfunctions.py
@@ -231,79 +231,77 @@
assert_(res.shape == ())
-class TestNanFunctions_IntTypes:
-
- int_types = (np.int8, np.int16, np.int32... | null | null | namanjain12/numpy_final:b3a66e88b005c4ca783c11e5d934451b7ca72477 | true | null | 1 | 26 | null | 951 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.245167 | 80.65425 | ||
8,756 | r2e_gym::train::4501 | r2e_gym | train | 4,501 | numpy__0ec93b048c401b61aadbbb143bec6f40c6a2027c | numpy | numpy/numpy | python | 0ec93b048c401b61aadbbb143bec6f40c6a2027c | **Title:** Error When Comparing Masked and Unmasked Structured Arrays
**Description:**
When performing comparisons between masked and unmasked structured arrays, unexpected errors occur, preventing correct comparison operations.
**Example Code:**
```python
import numpy as np
from numpy.ma import masked_array
# Creat... | diff --git a/numpy/ma/core.py b/numpy/ma/core.py
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -4140,6 +4140,9 @@
# Now take care of the mask; the merged mask should have an item
# masked if all fields were masked (in one and/or other).
mask = (mask == np.ones((), mask.dtype))
... | diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -1310,7 +1310,7 @@
m1 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
xm = masked_array(x, mask=m1)
xm.set_fill_value(1e+20)
- float_dtypes = [np.float16... | null | null | namanjain12/numpy_final:0ec93b048c401b61aadbbb143bec6f40c6a2027c | true | null | 1 | 12 | null | 1,229 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.244833 | 80.65325 | ||
8,757 | r2e_gym::train::5290 | r2e_gym | train | 5,290 | aiohttp__4b6ff686b6d032aff74174e3c96712230172f1c7 | aiohttp | aio-libs/aiohttp | python | 4b6ff686b6d032aff74174e3c96712230172f1c7 | **Title**: Registering Routes with Invalid or Reserved Names Does Not Raise Errors
**Description**:
When attempting to register routes with names that are either not valid Python identifiers or are reserved keywords, the system does not raise any errors. This oversight allows the addition of routes with names like `'1... | diff --git a/aiohttp/web_urldispatcher.py b/aiohttp/web_urldispatcher.py
--- a/aiohttp/web_urldispatcher.py
+++ b/aiohttp/web_urldispatcher.py
@@ -1,6 +1,7 @@
import abc
import asyncio
+import keyword
import collections
import mimetypes
import re
@@ -442,8 +443,12 @@
assert isinstance(route, Route), 'In... | diff --git a/tests/test_urldispatch.py b/tests/test_urldispatch.py
--- a/tests/test_urldispatch.py
+++ b/tests/test_urldispatch.py
@@ -77,6 +77,12 @@
self.router.register_route(route)
self.assertRaises(ValueError, self.router.register_route, route)
+ route = PlainRoute('GET', handler, '1bad n... | null | null | namanjain12/aiohttp_final:4b6ff686b6d032aff74174e3c96712230172f1c7 | true | null | 1 | 7 | null | 1,328 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.244667 | 80.65275 | ||
8,758 | r2e_gym::train::5022 | r2e_gym | train | 5,022 | datalad__797b45501c495eb6a556812b5af7092dceafd8b2 | datalad | datalad/datalad | python | 797b45501c495eb6a556812b5af7092dceafd8b2 | **Title:** Documentation Processing Retains 'REFLOW' Markers, Causing Formatting Issues
**Description:**
When processing interface documentation for API and command-line usage, the `REFLOW` markers are not properly removed. This results in `REFLOW` tags remaining in the final documentation, leading to unexpected forma... | 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:797b45501c495eb6a556812b5af7092dceafd8b2 | true | null | 1 | 22 | null | 1,027 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2445 | 80.65225 | ||
8,759 | r2e_gym::train::6034 | r2e_gym | train | 6,034 | tornado__207ff24d273195043cc8d8e874da890160619b90 | tornado | tornadoweb/tornado | python | 207ff24d273195043cc8d8e874da890160619b90 | **Title**: Adding a Callback While IOLoop Is Closing Raises RuntimeError
**Description**:
When the `IOLoop` is in the process of closing, attempting to add a callback results in a `RuntimeError` with the message "IOLoop is closing". This behavior is unexpected because callbacks added during the shutdown process should... | diff --git a/tornado/platform/asyncio.py b/tornado/platform/asyncio.py
--- a/tornado/platform/asyncio.py
+++ b/tornado/platform/asyncio.py
@@ -130,13 +130,17 @@
timeout.cancel()
def add_callback(self, callback, *args, **kwargs):
- if self.closing:
- # TODO: this is racy; we need a lock... | diff --git a/tornado/test/ioloop_test.py b/tornado/test/ioloop_test.py
--- a/tornado/test/ioloop_test.py
+++ b/tornado/test/ioloop_test.py
@@ -171,10 +171,9 @@
other_ioloop.close()
def test_add_callback_while_closing(self):
- # Issue #635: add_callback() should raise a clean exception
- # ... | null | null | namanjain12/tornado_final:207ff24d273195043cc8d8e874da890160619b90 | true | null | 1 | 18 | null | 1,102 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.243667 | 80.64975 | ||
8,760 | r2e_gym::train::5442 | r2e_gym | train | 5,442 | aiohttp__66921d58f5d7a07cc92f88cfe0a32d1f07e351cb | aiohttp | aio-libs/aiohttp | python | 66921d58f5d7a07cc92f88cfe0a32d1f07e351cb | **Title:** `add_route` Allows Paths Without Leading Slash and Invalid HTTP Methods
**Description:**
When adding a new route using the `add_route` method, providing a path that does not start with a slash (`/`) or using an unsupported HTTP method does not raise an error. This leads to unexpected behavior and causes ass... | diff --git a/aiohttp/web_urldispatcher.py b/aiohttp/web_urldispatcher.py
--- a/aiohttp/web_urldispatcher.py
+++ b/aiohttp/web_urldispatcher.py
@@ -356,13 +356,17 @@
def add_route(self, method, path, handler,
*, name=None, expect_handler=None):
+ if not path.startswith('/'):
+ ... | diff --git a/tests/test_urldispatch.py b/tests/test_urldispatch.py
--- a/tests/test_urldispatch.py
+++ b/tests/test_urldispatch.py
@@ -545,3 +545,13 @@
})
self.loop.run_until_complete(go())
+
+ def test_add_route_not_started_with_slash(self):
+ with self.assertRaises(ValueError):
+ ... | null | null | namanjain12/aiohttp_final:66921d58f5d7a07cc92f88cfe0a32d1f07e351cb | true | null | 2 | 12 | null | 1,220 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.243333 | 80.64875 | ||
8,761 | r2e_gym::train::5991 | r2e_gym | train | 5,991 | tornado__22d884c5b94fed3b602bef6798cb732b4c916421 | tornado | tornadoweb/tornado | python | 22d884c5b94fed3b602bef6798cb732b4c916421 | **Title:** `repr()` of `HTTPError` Causes Stack Overflow Due to Cyclic References
**Description:**
When attempting to obtain the representation of an `HTTPError` instance, calling `repr(e)` leads to excessively verbose output or a stack overflow. This issue arises because there is a cyclic reference between the `HTTPE... | diff --git a/tornado/httpclient.py b/tornado/httpclient.py
--- a/tornado/httpclient.py
+++ b/tornado/httpclient.py
@@ -615,6 +615,12 @@
def __str__(self):
return "HTTP %d: %s" % (self.code, self.message)
+ # There is a cyclic reference between self and self.response,
+ # which breaks the default _... | diff --git a/tornado/test/httpclient_test.py b/tornado/test/httpclient_test.py
--- a/tornado/test/httpclient_test.py
+++ b/tornado/test/httpclient_test.py
@@ -655,6 +655,15 @@
self.assertIsNot(e, e2)
self.assertEqual(e.code, e2.code)
- def test_str(self):
+ def test_plain_error(self):
... | null | null | namanjain12/tornado_final:22d884c5b94fed3b602bef6798cb732b4c916421 | true | null | 1 | 6 | null | 1,339 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.243167 | 80.64825 | ||
8,762 | r2e_gym::train::396 | r2e_gym | train | 396 | orange3__fa539f4db5f76db430b7dacc8363fcf3269a5d60 | orange3 | biolab/orange3 | python | fa539f4db5f76db430b7dacc8363fcf3269a5d60 | **Title:** Pending selections are cleared when data is set to `None`, causing errors upon reloading data
**Description:**
When the data input is temporarily set to `None`, any pending selections for rows and columns are cleared. As a result, when valid data is reloaded, the widget fails to retain the previous selectio... | diff --git a/Orange/widgets/data/owtable.py b/Orange/widgets/data/owtable.py
--- a/Orange/widgets/data/owtable.py
+++ b/Orange/widgets/data/owtable.py
@@ -519,20 +519,17 @@
if current is not None:
# pylint: disable=protected-access
self.set_info(current._input_slot.summary... | diff --git a/Orange/widgets/data/tests/test_owtable.py b/Orange/widgets/data/tests/test_owtable.py
--- a/Orange/widgets/data/tests/test_owtable.py
+++ b/Orange/widgets/data/tests/test_owtable.py
@@ -66,6 +66,15 @@
self.send_signal(self.widget.Inputs.data, self.data)
commit.assert_called()
+ ... | null | null | namanjain12/orange3_final:fa539f4db5f76db430b7dacc8363fcf3269a5d60 | true | null | 1 | 7 | null | 1,319 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.243167 | 80.64825 | ||
8,763 | r2e_gym::train::4893 | r2e_gym | train | 4,893 | numpy__8066b45451eff24228bb5af96aad2fe0bd548383 | numpy | numpy/numpy | python | 8066b45451eff24228bb5af96aad2fe0bd548383 | **Title:** `digitize` Function Raises TypeError When Using `edge` Keyword Argument
**Description:**
When attempting to use the `edge` keyword argument with the `numpy.digitize` function, a `TypeError` is raised. This prevents users from specifying edge inclusion behavior, which is essential for accurately categorizing... | diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -4733,12 +4733,12 @@
return concatenate((arr, values), axis=axis)
-def _digitize_dispatcher(x, bins, right=None):
+def _digitize_dispatcher(x, bins, right=None, edge=None):
... | diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -1712,6 +1712,9 @@
bins = [1, 1, 0]
assert_array_equal(digitize(x, bins, False), [3, 2, 0, 0])
assert_array_equ... | null | null | namanjain12/numpy_final:8066b45451eff24228bb5af96aad2fe0bd548383 | true | null | 1 | 20 | null | 1,058 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.243 | 80.64775 | ||
8,764 | r2e_gym::train::6504 | r2e_gym | train | 6,504 | pillow__9e4c54e10f40051011cdec4342021e4c2f202809 | pillow | python-pillow/pillow | python | 9e4c54e10f40051011cdec4342021e4c2f202809 | **Title:** Saving TGA Files with `id_section` Keyword Raises KeyError
**Description:**
When attempting to save a TGA image with a custom `id_section`, the process fails because the `id_section` keyword argument is not properly handled. This results in a `KeyError` when the code tries to access the `'id_section'` key f... | diff --git a/src/PIL/TgaImagePlugin.py b/src/PIL/TgaImagePlugin.py
--- a/src/PIL/TgaImagePlugin.py
+++ b/src/PIL/TgaImagePlugin.py
@@ -151,11 +151,19 @@
except KeyError:
raise IOError("cannot write mode %s as TGA" % im.mode)
- rle = im.encoderinfo.get("rle", False)
-
+ if "rle" in im.encoderinfo:
... | diff --git a/Tests/test_file_tga.py b/Tests/test_file_tga.py
--- a/Tests/test_file_tga.py
+++ b/Tests/test_file_tga.py
@@ -53,10 +53,10 @@
# Generate a new test name every time so the
# test will not fail with permission error
# on Windows.
- ... | null | null | namanjain12/pillow_final:9e4c54e10f40051011cdec4342021e4c2f202809 | true | null | 1 | 20 | null | 1,058 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.243 | 80.64775 | ||
8,765 | r2e_gym::train::4508 | r2e_gym | train | 4,508 | numpy__1466e788a43b8d4356fe35951bf0c3b0aedb554f | numpy | numpy/numpy | python | 1466e788a43b8d4356fe35951bf0c3b0aedb554f | **Title:** Unable to Create NumPy dtype from ctypes Union - Raises NotImplementedError
**Description:**
When attempting to convert a `ctypes.Union` type to a NumPy dtype using `np.dtype`, a `NotImplementedError` is raised. This prevents the creation of NumPy dtypes for Union types, limiting interoperability between ct... | diff --git a/numpy/core/_dtype_ctypes.py b/numpy/core/_dtype_ctypes.py
--- a/numpy/core/_dtype_ctypes.py
+++ b/numpy/core/_dtype_ctypes.py
@@ -78,6 +78,22 @@
return np.dtype(t._type_)
+def dtype_from_ctypes_union(t):
+ formats = []
+ offsets = []
+ names = []
+ for fname, ftyp in t._fields_:
+ ... | diff --git a/numpy/core/tests/test_dtype.py b/numpy/core/tests/test_dtype.py
--- a/numpy/core/tests/test_dtype.py
+++ b/numpy/core/tests/test_dtype.py
@@ -807,9 +807,6 @@
p_uint8 = ctypes.POINTER(ctypes.c_uint8)
assert_raises(TypeError, np.dtype, p_uint8)
- @pytest.mark.xfail(
- reason="Un... | null | null | namanjain12/numpy_final:1466e788a43b8d4356fe35951bf0c3b0aedb554f | true | null | 1 | 21 | null | 1,036 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.242667 | 80.64675 | ||
8,766 | r2e_gym::train::5663 | r2e_gym | train | 5,663 | scrapy__8dbbbd13950dcb21dda759b073c64ffdca85c2d6 | scrapy | scrapy/scrapy | python | 8dbbbd13950dcb21dda759b073c64ffdca85c2d6 | **Title:** Custom `request_cls` in contracts causes `TypeError` with unexpected `formdata` argument
**Description:**
When defining a contract with a custom `request_cls`, initializing the request results in a `TypeError` because the `formdata` argument is not expected by the default `Request` class.
**Example Buggy C... | diff --git a/docs/topics/contracts.rst b/docs/topics/contracts.rst
--- a/docs/topics/contracts.rst
+++ b/docs/topics/contracts.rst
@@ -86,8 +86,9 @@
.. method:: Contract.adjust_request_args(args)
This receives a ``dict`` as an argument containing default arguments
- for request object. :class:`~s... | diff --git a/tests/test_contracts.py b/tests/test_contracts.py
--- a/tests/test_contracts.py
+++ b/tests/test_contracts.py
@@ -27,9 +27,9 @@
class CustomFormContract(Contract):
name = 'custom_form'
+ request_cls = FormRequest
def adjust_request_args(self, args):
- args['request_cls'] = FormRequ... | null | null | namanjain12/scrapy_final:8dbbbd13950dcb21dda759b073c64ffdca85c2d6 | true | null | 2 | 20 | null | 1,055 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2425 | 80.64625 | ||
8,767 | r2e_gym::train::6113 | r2e_gym | train | 6,113 | pillow__1d33dfbced183a658caf3857c4b395a07d9b876a | pillow | python-pillow/pillow | python | 1d33dfbced183a658caf3857c4b395a07d9b876a | ### Title
`alpha_composite` method raises `TypeError` when using the `source` parameter
### Description
When using the `alpha_composite` method with the `source` parameter, a `TypeError` is raised because the method does not accept the additional argument.
**Example Code:**
```python
from PIL import Image
src = Imag... | diff --git a/PIL/Image.py b/PIL/Image.py
--- a/PIL/Image.py
+++ b/PIL/Image.py
@@ -1373,16 +1373,27 @@
else:
self.im.paste(im, box)
- def alpha_composite(self, im, box=None):
+ def alpha_composite(self, im, box=None, source=(0,0)):
""" 'In-place' analog of Image.alpha_composite
... | diff --git a/Tests/test_image.py b/Tests/test_image.py
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -231,7 +231,14 @@
self.assert_image_equal(box.crop((96, 96, 128, 128)),
src.crop((0, 0, 32, 32)))
self.assertEqual(box.size, (128, 128))
-
+
+ #... | null | null | namanjain12/pillow_final:1d33dfbced183a658caf3857c4b395a07d9b876a | true | null | 1 | 25 | null | 954 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.242333 | 80.64575 | ||
8,768 | r2e_gym::train::5776 | r2e_gym | train | 5,776 | tornado__b5ec807edc83c8e7d1d12553d635ebe765e5c614 | tornado | tornadoweb/tornado | python | b5ec807edc83c8e7d1d12553d635ebe765e5c614 | **Title:** Passing HTTPRequest Object to `websocket_connect` Raises AttributeError
**Description:**
When using `websocket_connect` with a preconstructed `HTTPRequest` object that includes custom headers for authentication, an unexpected error occurs, preventing the websocket connection from being established.
**Examp... | diff --git a/tornado/websocket.py b/tornado/websocket.py
--- a/tornado/websocket.py
+++ b/tornado/websocket.py
@@ -33,7 +33,7 @@
from tornado.concurrent import TracebackFuture
from tornado.escape import utf8, native_str
-from tornado import httpclient
+from tornado import httpclient, httputil
from tornado.ioloop i... | diff --git a/tornado/test/websocket_test.py b/tornado/test/websocket_test.py
--- a/tornado/test/websocket_test.py
+++ b/tornado/test/websocket_test.py
@@ -1,6 +1,5 @@
from tornado.concurrent import Future
-from tornado import gen
-from tornado.httpclient import HTTPError
+from tornado.httpclient import HTTPError, HTTP... | null | null | namanjain12/tornado_final:b5ec807edc83c8e7d1d12553d635ebe765e5c614 | true | null | 1 | 11 | null | 1,233 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.242167 | 80.64525 | ||
8,769 | r2e_gym::train::4011 | r2e_gym | train | 4,011 | coveragepy__59b07a12de95de776fa2f44a2101f63a156fee75 | coveragepy | nedbat/coveragepy | python | 59b07a12de95de776fa2f44a2101f63a156fee75 | **Title:** Annotate Command Missing Deprecation Warnings Leading to Test Failures
**Description:**
When using the `annotate` command, the expected deprecation warnings are not displayed. This absence of warnings causes confusion for developers who rely on these messages to update their workflows. Additionally, tests t... | diff --git a/CHANGES.rst b/CHANGES.rst
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -23,6 +23,10 @@
Unreleased
----------
+- Deprecated: The ``annotate`` command and the ``Coverage.annotate`` function
+ will be removed in a future version, unless people let me know that they are
+ using it. Get in touch if you do: ned... | diff --git a/tests/test_annotate.py b/tests/test_annotate.py
--- a/tests/test_annotate.py
+++ b/tests/test_annotate.py
@@ -123,5 +123,10 @@
cov = coverage.Coverage()
self.start_import_stop(cov, "mae")
cov.annotate()
- assert self.stdout() == "1\n2\n"
+ assert self.stdout() == (
... | null | null | namanjain12/coveragepy_final:59b07a12de95de776fa2f44a2101f63a156fee75 | true | null | 3 | 19 | null | 1,072 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.242 | 80.64475 | ||
8,770 | r2e_gym::train::4304 | r2e_gym | train | 4,304 | numpy__fed44d7c309d0c2fd7c193efa39ba59652a43c44 | numpy | numpy/numpy | python | fed44d7c309d0c2fd7c193efa39ba59652a43c44 | **Title:** Structured dtypes Do Not Display Field Information in Array Representation
**Description:**
When creating a NumPy array with a structured dtype that includes field names, the array's representation (`repr`) does not display the field information. This omission leads to ambiguity about the array's structure,... | diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py
--- a/numpy/core/arrayprint.py
+++ b/numpy/core/arrayprint.py
@@ -1254,6 +1254,11 @@
dtype = np.dtype(dtype)
if _format_options['legacy'] == '1.13' and dtype.type == bool_:
return False
+
+ # not just void types can be structured, an... | diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -485,7 +485,8 @@
# gh-9821
arr_int = np.zeros(4, dt_int)
- assert_equal(repr(arr_int), "array([0, 0, 0, 0])")
+ ... | null | null | namanjain12/numpy_final:fed44d7c309d0c2fd7c193efa39ba59652a43c44 | true | null | 1 | 17 | null | 1,112 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.242 | 80.64475 | ||
8,771 | r2e_gym::train::235 | r2e_gym | train | 235 | orange3__4da3acd9008a843aa8253398c9a55e998b2ee1b1 | orange3 | biolab/orange3 | python | 4da3acd9008a843aa8253398c9a55e998b2ee1b1 | **Title:** `Table.concatenate` does not accept `ignore_domains` parameter, causing error when skipping domain checks
**Description:**
When attempting to concatenate tables with differing domains while skipping domain checks, passing the `ignore_domains` parameter to the `Table.concatenate` method results in a `TypeErr... | diff --git a/Orange/data/table.py b/Orange/data/table.py
--- a/Orange/data/table.py
+++ b/Orange/data/table.py
@@ -1325,7 +1325,7 @@
return s
@classmethod
- def concatenate(cls, tables, axis=0):
+ def concatenate(cls, tables, axis=0, *, ignore_domains=None):
"""
Concatenate table... | diff --git a/Orange/data/tests/test_table.py b/Orange/data/tests/test_table.py
--- a/Orange/data/tests/test_table.py
+++ b/Orange/data/tests/test_table.py
@@ -199,6 +199,16 @@
joined = Table.concatenate((tab1, tab2, tab3), axis=1)
self.assertEqual(joined.name, "tab2")
+
+ def test_concatenate_che... | null | null | namanjain12/orange3_final:4da3acd9008a843aa8253398c9a55e998b2ee1b1 | true | null | 1 | 12 | null | 1,212 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.242 | 80.64475 | ||
8,772 | r2e_gym::train::4671 | r2e_gym | train | 4,671 | numpy__a419ebb9a19be74c7ec7887eff81cf7ea0636e16 | numpy | numpy/numpy | python | a419ebb9a19be74c7ec7887eff81cf7ea0636e16 | **Title:** `tile()` raises ValueError when tiling zero-sized arrays
**Description:**
When attempting to tile an array that has zero-sized dimensions, the `tile()` function raises a `ValueError` unexpectedly. This behavior prevents users from working with empty arrays in scenarios where tiling should logically result i... | diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py
--- a/numpy/lib/shape_base.py
+++ b/numpy/lib/shape_base.py
@@ -857,16 +857,16 @@
# numpy array and the repetitions are 1 in all dimensions
return _nx.array(A, copy=True, subok=True, ndmin=d)
else:
+ # Note that no copy of zero... | diff --git a/numpy/lib/tests/test_shape_base.py b/numpy/lib/tests/test_shape_base.py
--- a/numpy/lib/tests/test_shape_base.py
+++ b/numpy/lib/tests/test_shape_base.py
@@ -332,7 +332,10 @@
def test_empty(self):
a = np.array([[[]]])
+ b = np.array([[], []])
+ c = tile(b, 2).shape
d ... | null | null | namanjain12/numpy_final:a419ebb9a19be74c7ec7887eff81cf7ea0636e16 | true | null | 1 | 20 | null | 1,048 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.241333 | 80.64275 | ||
8,773 | r2e_gym::train::4705 | r2e_gym | train | 4,705 | numpy__52dcc5ddf7260c1e53956aec235d0ba37fe3dbdf | numpy | numpy/numpy | python | 52dcc5ddf7260c1e53956aec235d0ba37fe3dbdf | **Title:** Histogram Raises ValueError When Data Contains NaNs and Explicit Bins Are Used
**Description:**
When using the `numpy.histogram` function with explicit bin edges and providing data that includes `NaN` values, a `ValueError` is raised indicating that the range parameter must be finite. This behavior prevents... | diff --git a/doc/release/1.15.0-notes.rst b/doc/release/1.15.0-notes.rst
--- a/doc/release/1.15.0-notes.rst
+++ b/doc/release/1.15.0-notes.rst
@@ -64,6 +64,16 @@
Code that does ``from np.lib.function_base import *`` will need to be updated
with the new location, and should consider not using ``import *`` in future.
... | diff --git a/numpy/lib/tests/test_histograms.py b/numpy/lib/tests/test_histograms.py
--- a/numpy/lib/tests/test_histograms.py
+++ b/numpy/lib/tests/test_histograms.py
@@ -248,6 +248,31 @@
# these should not crash
np.histogram([np.array([0.5]) for i in range(10)] + [.500000000000001])
np.histo... | null | null | namanjain12/numpy_final:52dcc5ddf7260c1e53956aec235d0ba37fe3dbdf | true | null | 2 | 16 | null | 1,127 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.241167 | 80.64225 | ||
8,774 | r2e_gym::train::5362 | r2e_gym | train | 5,362 | aiohttp__087aecba1dc979b2aa0c2652475feaed7d96a71d | aiohttp | aio-libs/aiohttp | python | 087aecba1dc979b2aa0c2652475feaed7d96a71d | ### RuntimeError when initializing UrlDispatcher without an event loop
**Description**
When creating an instance of `UrlDispatcher` without explicitly passing an event loop, a `RuntimeError` is raised if there is no current event loop set in the thread. This issue occurs during the URL resolution process, preventing r... | diff --git a/aiohttp/web.py b/aiohttp/web.py
--- a/aiohttp/web.py
+++ b/aiohttp/web.py
@@ -522,10 +522,7 @@
METHODS = {'POST', 'GET', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'}
- def __init__(self, *, loop=None):
- if loop is None:
- loop = asyncio.get_event_loop()
- self._loop = ... | diff --git a/tests/test_urldispatch.py b/tests/test_urldispatch.py
--- a/tests/test_urldispatch.py
+++ b/tests/test_urldispatch.py
@@ -11,7 +11,7 @@
def setUp(self):
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(None)
- self.router = UrlDispatcher(loop=self.loop)
+ sel... | null | null | namanjain12/aiohttp_final:087aecba1dc979b2aa0c2652475feaed7d96a71d | true | null | 1 | 7 | null | 1,307 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.241167 | 80.64225 | ||
8,775 | r2e_gym::train::427 | r2e_gym | train | 427 | orange3__b7b003b2e84e9d7f6b454b6a95e9f40571075e06 | orange3 | biolab/orange3 | python | b7b003b2e84e9d7f6b454b6a95e9f40571075e06 | **Title:** Venn Diagram Crashes When Handling Tables Without Attributes
**Description:**
When using the Venn Diagram widget with a table that has no attributes, the application crashes unexpectedly.
**Example Buggy Code:**
```python
def test_no_attributes(self):
domain = Domain([], class_vars=self.data.domain.att... | diff --git a/Orange/widgets/visualize/owvenndiagram.py b/Orange/widgets/visualize/owvenndiagram.py
--- a/Orange/widgets/visualize/owvenndiagram.py
+++ b/Orange/widgets/visualize/owvenndiagram.py
@@ -379,16 +379,19 @@
X = np.hstack(values['attributes'])
if 'metas' in values:
metas = np... | diff --git a/Orange/widgets/visualize/tests/test_owvenndiagram.py b/Orange/widgets/visualize/tests/test_owvenndiagram.py
--- a/Orange/widgets/visualize/tests/test_owvenndiagram.py
+++ b/Orange/widgets/visualize/tests/test_owvenndiagram.py
@@ -12,10 +12,10 @@
from Orange.widgets.tests.base import WidgetTest, WidgetOutp... | null | null | namanjain12/orange3_final:b7b003b2e84e9d7f6b454b6a95e9f40571075e06 | true | null | 1 | 13 | null | 1,187 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.241167 | 80.64225 | ||
8,776 | r2e_gym::train::4178 | r2e_gym | train | 4,178 | numpy__88f8310d8c3049881f78883b70766867e9147177 | numpy | numpy/numpy | python | 88f8310d8c3049881f78883b70766867e9147177 | **Title:** Legacy Printing Does Not Preserve Stray Comma in Array Representation
**Description:**
When using legacy printing options (`legacy='1.13'`), the string representation of large NumPy arrays does not include a stray comma before the ellipsis. This behavior deviates from the expected legacy format, potentially... | diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py
--- a/numpy/core/arrayprint.py
+++ b/numpy/core/arrayprint.py
@@ -443,8 +443,8 @@
next_line_prefix += " "*len(prefix)
lst = _formatArray(a, format_function, a.ndim, options['linewidth'],
- next_line_prefix, separator,
- ... | diff --git a/numpy/core/tests/test_arrayprint.py b/numpy/core/tests/test_arrayprint.py
--- a/numpy/core/tests/test_arrayprint.py
+++ b/numpy/core/tests/test_arrayprint.py
@@ -487,6 +487,13 @@
'1.1234567891234568')
assert_equal(str(np.complex128(complex(1, np.nan))), '(1+nanj)')
+ def... | null | null | namanjain12/numpy_final:88f8310d8c3049881f78883b70766867e9147177 | true | null | 1 | 19 | null | 1,066 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.241 | 80.64175 | ||
8,777 | r2e_gym::train::4212 | r2e_gym | train | 4,212 | numpy__9aff656065f2749b83abf127472cafc28e235222 | numpy | numpy/numpy | python | 9aff656065f2749b83abf127472cafc28e235222 | **[ISSUE]**
**Title:** `linspace` Fails When Start and Stop Implement `__array_interface__`
**Description:**
When using the `numpy.linspace` function with `start` and `stop` parameters that are objects implementing the `__array_interface__`, a `TypeError` is raised instead of processing them correctly.
**Example Bug... | diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py
--- a/numpy/core/function_base.py
+++ b/numpy/core/function_base.py
@@ -5,7 +5,7 @@
from . import numeric as _nx
from .numeric import (result_type, NaN, shares_memory, MAY_SHARE_BOUNDS,
- TooHardError)
+ ... | diff --git a/numpy/core/tests/test_function_base.py b/numpy/core/tests/test_function_base.py
--- a/numpy/core/tests/test_function_base.py
+++ b/numpy/core/tests/test_function_base.py
@@ -262,6 +262,42 @@
assert type(ls) is PhysicalQuantity2
assert_equal(ls, linspace(0.0, 1.0, 1))
+ def test_array... | null | null | namanjain12/numpy_final:9aff656065f2749b83abf127472cafc28e235222 | true | null | 1 | 7 | null | 1,305 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.240833 | 80.64125 | ||
8,778 | r2e_gym::train::5871 | r2e_gym | train | 5,871 | tornado__542c8a51b1cfa6150349a541bf4e09a2b00ea805 | tornado | tornadoweb/tornado | python | 542c8a51b1cfa6150349a541bf4e09a2b00ea805 | **Title:** HTTP client raises `AssertionError` instead of `ValueError` for invalid request bodies
**Description:**
When making HTTP requests with inappropriate bodies for the specified method, the client raises an `AssertionError` with messages like "Body must be empty for GET request" or "Body must not be empty for P... | diff --git a/tornado/curl_httpclient.py b/tornado/curl_httpclient.py
--- a/tornado/curl_httpclient.py
+++ b/tornado/curl_httpclient.py
@@ -377,11 +377,11 @@
# Handle curl's cryptic options for every individual HTTP method
if request.method == "GET":
if request.body is not None:
- ... | diff --git a/tornado/test/httpclient_test.py b/tornado/test/httpclient_test.py
--- a/tornado/test/httpclient_test.py
+++ b/tornado/test/httpclient_test.py
@@ -416,17 +416,17 @@
self.assertEqual(response.body, b'OTHER')
@gen_test
- def test_body(self):
+ def test_body_sanity_checks(self):
... | null | null | namanjain12/tornado_final:542c8a51b1cfa6150349a541bf4e09a2b00ea805 | true | null | 2 | 30 | null | 844 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.240667 | 80.64075 | ||
8,779 | r2e_gym::train::6314 | r2e_gym | train | 6,314 | pillow__805dc447076dc580816d730d360de08917d86a9e | pillow | python-pillow/pillow | python | 805dc447076dc580816d730d360de08917d86a9e | **Title:** Color3DLUT Parser Raises ValueError for Valid Cube Files
**Description:**
When attempting to parse a valid 3D LUT cube file, the `Color3DLUT` parser raises a `ValueError` indicating an incorrect table size. This prevents the creation of a `Color3DLUT` instance from properly formatted cube files.
**Example ... | diff --git a/src/PIL/ImageFilter.py b/src/PIL/ImageFilter.py
--- a/src/PIL/ImageFilter.py
+++ b/src/PIL/ImageFilter.py
@@ -16,6 +16,7 @@
#
import functools
+from itertools import chain
from ._util import isPath
@@ -402,8 +403,6 @@
for i, line in enumerate(iterator, 1):
line = li... | diff --git a/Tests/test_color_lut.py b/Tests/test_color_lut.py
--- a/Tests/test_color_lut.py
+++ b/Tests/test_color_lut.py
@@ -300,7 +300,6 @@
def test_from_cube_file_minimal(self):
lut = ImageFilter.Color3DLUT.from_cube_file([
"LUT_3D_SIZE 2",
- "",
"0 0 0.031",
... | null | null | namanjain12/pillow_final:805dc447076dc580816d730d360de08917d86a9e | true | null | 1 | 15 | null | 1,142 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.240333 | 80.63975 | ||
8,780 | r2e_gym::train::4137 | r2e_gym | train | 4,137 | numpy__49916f66479d7a6b14087f39e06290941e07596d | numpy | numpy/numpy | python | 49916f66479d7a6b14087f39e06290941e07596d | **Title:** `drop_fields` Returns `None` When All Fields Are Dropped Instead of an Empty Array
**Description:**
When using `recfunctions.drop_fields` to remove all fields from a structured NumPy array, the function returns `None` instead of an empty array. This behavior is undocumented and unexpected, making it difficu... | diff --git a/doc/release/upcoming_changes/14510.compatibility.rst b/doc/release/upcoming_changes/14510.compatibility.rst
--- a/doc/release/upcoming_changes/14510.compatibility.rst
+++ b/doc/release/upcoming_changes/14510.compatibility.rst
@@ -0,0 +1,10 @@
+`numpy.lib.recfunctions.drop_fields` can no longer return ``Non... | diff --git a/numpy/lib/tests/test_recfunctions.py b/numpy/lib/tests/test_recfunctions.py
--- a/numpy/lib/tests/test_recfunctions.py
+++ b/numpy/lib/tests/test_recfunctions.py
@@ -91,8 +91,10 @@
control = np.array([(1,), (4,)], dtype=[('a', int)])
assert_equal(test, control)
+ # dropping all f... | null | null | namanjain12/numpy_final:49916f66479d7a6b14087f39e06290941e07596d | true | null | 2 | 18 | null | 1,082 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.240333 | 80.63975 | ||
8,781 | r2e_gym::train::76 | r2e_gym | train | 76 | orange3__3d137078b2b5cafcaa1ab510bf03a6f70ed240b0 | orange3 | biolab/orange3 | python | 3d137078b2b5cafcaa1ab510bf03a6f70ed240b0 | **Title:** Incorrect Number of Resizing Steps in Point Animation Causes Test Failures
**Description:**
The `OWScatterPlotBase` widget's point resize animation performs fewer resizing steps than expected, leading to test failures. The animation is intended to smoothly resize points over half a second, but currently, it... | 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
@@ -933,8 +933,9 @@
widget = self
class Timeout:
- # 0.5 - np.... | 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
@@ -514,10 +514,10 @@
step_resizing.wait(200)
e... | null | null | namanjain12/orange3_final:3d137078b2b5cafcaa1ab510bf03a6f70ed240b0 | true | null | 1 | 8 | null | 1,282 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.240333 | 80.63975 | ||
8,782 | r2e_gym::train::6126 | r2e_gym | train | 6,126 | pillow__d49884e40c204db7ce89b621823b2ac37ad51a10 | pillow | python-pillow/pillow | python | d49884e40c204db7ce89b621823b2ac37ad51a10 | **Title:** Saving JPEG with Excessively Large XMP Data Raises Internal Struct Error
**Description:**
When attempting to save a JPEG image with XMP metadata that exceeds the allowable size, the process fails with an internal `struct.error` instead of a clear and descriptive `ValueError`. This makes it difficult to unde... | diff --git a/src/PIL/JpegImagePlugin.py b/src/PIL/JpegImagePlugin.py
--- a/src/PIL/JpegImagePlugin.py
+++ b/src/PIL/JpegImagePlugin.py
@@ -746,23 +746,28 @@
extra = info.get("extra", b"")
+ MAX_BYTES_IN_MARKER = 65533
xmp = info.get("xmp")
if xmp:
- size = o16(31 + len(xmp))
+ overhe... | 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
@@ -993,10 +993,16 @@
def test_save_xmp(self, tmp_path: Path) -> None:
f = str(tmp_path / "temp.jpg")
- hopper().save(f, xmp=b"XMP test")
+ im = hopper()
+ im.s... | null | null | namanjain12/pillow_final:d49884e40c204db7ce89b621823b2ac37ad51a10 | true | null | 1 | 19 | null | 1,060 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.24 | 80.63875 | ||
8,783 | r2e_gym::train::5184 | r2e_gym | train | 5,184 | pyramid__4b13e0dfcdf47b3ef9befd529c0d78af8a2712d5 | pyramid | pylons/pyramid | python | 4b13e0dfcdf47b3ef9befd529c0d78af8a2712d5 | **Title:** JSONP Renderer Raises KeyError When Request is Absent
**Description:**
When attempting to render a JSONP response without providing a request object, the JSONP renderer fails by raising a `KeyError`. This issue occurs because the renderer tries to access the `'request'` key from the system, which is not pre... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -120,6 +120,11 @@
- Fix route generation for static view asset specifications having no path.
See https://github.com/Pylons/pyramid/pull/1377
+- Allow the ``pyramid.renderers.JSONP`` renderer to work even if there is no
+ valid request... | diff --git a/pyramid/tests/test_renderers.py b/pyramid/tests/test_renderers.py
--- a/pyramid/tests/test_renderers.py
+++ b/pyramid/tests/test_renderers.py
@@ -602,6 +602,12 @@
self.assertEqual(request.response.content_type,
'application/json')
+ def test_render_without_request(se... | null | null | namanjain12/pyramid_final:4b13e0dfcdf47b3ef9befd529c0d78af8a2712d5 | true | null | 2 | 29 | null | 856 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.239333 | 80.63675 | ||
8,784 | r2e_gym::train::4325 | r2e_gym | train | 4,325 | numpy__2d140f11857fc1353d6b2dcbb801e693128fd09a | numpy | numpy/numpy | python | 2d140f11857fc1353d6b2dcbb801e693128fd09a | **Title:** `np.in1d` Raises TypeError with Unorderable Object Arrays
**Description:**
When using `np.in1d` with arrays that contain unorderable objects, such as mixing `None` with integers or having all elements as `None`, the function raises a `TypeError`. This issue prevents checking for element-wise inclusion in ob... | diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -448,8 +448,14 @@
ar1 = np.asarray(ar1).ravel()
ar2 = np.asarray(ar2).ravel()
- # This code is significantly faster when the condition is satisfied.
- if len(ar2) < 10 * le... | diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py
--- a/numpy/lib/tests/test_arraysetops.py
+++ b/numpy/lib/tests/test_arraysetops.py
@@ -208,6 +208,37 @@
assert_array_equal(in1d(a, long_b, assume_unique=True), ec)
assert_array_equal(in1d(a, long_b, assume_unique=F... | null | null | namanjain12/numpy_final:2d140f11857fc1353d6b2dcbb801e693128fd09a | true | null | 1 | 10 | null | 1,235 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.239167 | 80.63625 | ||
8,785 | r2e_gym::train::5716 | r2e_gym | train | 5,716 | scrapy__b4b1e4834376e8565d727a1a5087cae31450f931 | scrapy | scrapy/scrapy | python | b4b1e4834376e8565d727a1a5087cae31450f931 | **Title:** TypeError Occurs When Using 'formdata' in Contracts
**Description:**
When attempting to include form data in contracts, the system raises a `TypeError` because it incorrectly tries to create a `Request` object with the `formdata` parameter, which is not supported by `Request`.
**Example Code:**
```python
c... | diff --git a/docs/topics/contracts.rst b/docs/topics/contracts.rst
--- a/docs/topics/contracts.rst
+++ b/docs/topics/contracts.rst
@@ -86,8 +86,11 @@
.. method:: Contract.adjust_request_args(args)
This receives a ``dict`` as an argument containing default arguments
- for :class:`~scrapy.http.Requ... | diff --git a/tests/test_contracts.py b/tests/test_contracts.py
--- a/tests/test_contracts.py
+++ b/tests/test_contracts.py
@@ -3,11 +3,12 @@
from twisted.python import failure
from twisted.trial import unittest
+from scrapy import FormRequest
from scrapy.spidermiddlewares.httperror import HttpError
from scrapy.sp... | null | null | namanjain12/scrapy_final:b4b1e4834376e8565d727a1a5087cae31450f931 | true | null | 2 | 14 | null | 1,154 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.239 | 80.63575 | ||
8,786 | r2e_gym::train::5931 | r2e_gym | train | 5,931 | tornado__491ec5cebb34e5f3b318f9f8c15988f3ce88ff75 | tornado | tornadoweb/tornado | python | 491ec5cebb34e5f3b318f9f8c15988f3ce88ff75 | **Title:** WebSocketClientConnection Missing `close` Method Causes AttributeError in Python 3.4
**Description:**
When attempting to close a WebSocket connection in Python 3.4, an `AttributeError` is raised because the `WebSocketClientConnection` class does not have a `close` method. This issue affects tests that try t... | diff --git a/tornado/websocket.py b/tornado/websocket.py
--- a/tornado/websocket.py
+++ b/tornado/websocket.py
@@ -793,6 +793,12 @@
io_loop, None, request, lambda: None, self._on_http_response,
104857600, self.resolver)
+ def close(self):
+ """Closes the websocket connection."""
+ ... | diff --git a/tornado/test/websocket_test.py b/tornado/test/websocket_test.py
--- a/tornado/test/websocket_test.py
+++ b/tornado/test/websocket_test.py
@@ -5,19 +5,24 @@
from tornado.web import Application, RequestHandler
from tornado.websocket import WebSocketHandler, websocket_connect, WebSocketError
+class TestWe... | null | null | namanjain12/tornado_final:491ec5cebb34e5f3b318f9f8c15988f3ce88ff75 | true | null | 1 | 6 | null | 1,314 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.239 | 80.63575 | ||
8,787 | r2e_gym::train::4728 | r2e_gym | train | 4,728 | numpy__cb52fd63627fa7547f5467324726d151af3aff84 | numpy | numpy/numpy | python | cb52fd63627fa7547f5467324726d151af3aff84 | **Title:**
TypeError When Using `propagate_mask` Parameter with `np.ma.convolve`
**Description:**
When using the `propagate_mask` parameter with the `np.ma.convolve` function, a `TypeError` is raised indicating that `propagate_mask` is an unexpected keyword argument.
**Example Code:**
```python
import numpy as np
a ... | diff --git a/numpy/ma/core.py b/numpy/ma/core.py
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -7366,8 +7366,8 @@
outerproduct = outer
-def _convolve_or_correlate(f, a, v, mode, contagious):
- if contagious:
+def _convolve_or_correlate(f, a, v, mode, propagate_mask):
+ if propagate_mask:
# result... | diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -4092,7 +4092,7 @@
test = np.ma.convolve(a, b)
assert_equal(test, masked_equal([0, 1, -1, -1, 7, 4], -1))
- test = np.ma.convolve(a, b, contagious=Fals... | null | null | namanjain12/numpy_final:cb52fd63627fa7547f5467324726d151af3aff84 | true | null | 1 | 25 | null | 934 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.239 | 80.63575 | ||
8,788 | r2e_gym::train::6491 | r2e_gym | train | 6,491 | pillow__5d0ad5e2e9a5065d69a00890342334f374277d1c | pillow | python-pillow/pillow | python | 5d0ad5e2e9a5065d69a00890342334f374277d1c | **Title:** Incorrect Exceptions Raised for Malformed PPM Headers
**Description:**
When attempting to open a PPM image file with a truncated header or non-decimal values in the header, the `PpmImagePlugin` raises an unexpected exception type. This behavior makes it difficult to handle specific error cases, as the excep... | diff --git a/src/PIL/PpmImagePlugin.py b/src/PIL/PpmImagePlugin.py
--- a/src/PIL/PpmImagePlugin.py
+++ b/src/PIL/PpmImagePlugin.py
@@ -73,7 +73,7 @@
continue
if c in B_WHITESPACE: # found whitespace, ignore it
if c == b"": # reached EOF
- raise EOFErro... | diff --git a/Tests/test_file_ppm.py b/Tests/test_file_ppm.py
--- a/Tests/test_file_ppm.py
+++ b/Tests/test_file_ppm.py
@@ -64,7 +64,7 @@
with open(path, "wb") as f:
f.write(b"P6\n128\x00")
- with pytest.raises(UnidentifiedImageError):
+ with pytest.raises(ValueError):
Image.open(path)
... | null | null | namanjain12/pillow_final:5d0ad5e2e9a5065d69a00890342334f374277d1c | true | null | 1 | 8 | null | 1,274 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.239 | 80.63575 | ||
8,789 | r2e_gym::train::114 | r2e_gym | train | 114 | orange3__d5ac697dfc124344b15b64b56f1867bd0a31d6f7 | orange3 | biolab/orange3 | python | d5ac697dfc124344b15b64b56f1867bd0a31d6f7 | **Title:** ValueError When Applying 'Leave' Treatment to Continuous Features
**Description:**
When using the `OWContinuize` widget to apply the 'Leave' treatment to continuous features, a `ValueError` is raised. This error occurs even when valid data is provided, preventing the widget from processing the continuous fe... | diff --git a/Orange/widgets/data/owcontinuize.py b/Orange/widgets/data/owcontinuize.py
--- a/Orange/widgets/data/owcontinuize.py
+++ b/Orange/widgets/data/owcontinuize.py
@@ -206,7 +206,7 @@
def continuize_domain(data,
multinomial_treatment=Continuize.Indicators,
- continu... | diff --git a/Orange/widgets/data/tests/test_owcontinuize.py b/Orange/widgets/data/tests/test_owcontinuize.py
--- a/Orange/widgets/data/tests/test_owcontinuize.py
+++ b/Orange/widgets/data/tests/test_owcontinuize.py
@@ -61,6 +61,11 @@
self.assertEqual(input_sum.call_args[0][0].brief, "")
output_sum.ass... | null | null | namanjain12/orange3_final:d5ac697dfc124344b15b64b56f1867bd0a31d6f7 | true | null | 1 | 16 | null | 1,114 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.239 | 80.63575 | ||
8,790 | r2e_gym::train::4925 | r2e_gym | train | 4,925 | datalad__27bfd015eb7de221ea9b6090f6fb7c8450848891 | datalad | datalad/datalad | python | 27bfd015eb7de221ea9b6090f6fb7c8450848891 | **Title:** Version Retrieval Fails Due to Name Collision Between Command-Line Tools and Python Modules
**Description:**
When attempting to retrieve the version of command-line tools, a name collision with Python modules causes the retrieval to fail, resulting in unexpected behavior.
**Example Buggy Code:**
```python
... | diff --git a/datalad/support/external_versions.py b/datalad/support/external_versions.py
--- a/datalad/support/external_versions.py
+++ b/datalad/support/external_versions.py
@@ -17,6 +17,8 @@
from datalad.dochelpers import exc_str
from datalad.log import lgr
+__all__ = ['UnknownVersion', 'ExternalVersions', 'exter... | diff --git a/datalad/support/tests/test_external_versions.py b/datalad/support/tests/test_external_versions.py
--- a/datalad/support/tests/test_external_versions.py
+++ b/datalad/support/tests/test_external_versions.py
@@ -101,9 +101,11 @@
def test_custom_versions():
ev = ExternalVersions()
- assert(ev['anne... | null | null | namanjain12/datalad_final:27bfd015eb7de221ea9b6090f6fb7c8450848891 | true | null | 1 | 23 | null | 971 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2385 | 80.63425 | ||
8,791 | r2e_gym::train::4913 | r2e_gym | train | 4,913 | datalad__fbb05051f6c01ff8c3257ce4458cfe47644f8ddb | datalad | datalad/datalad | python | fbb05051f6c01ff8c3257ce4458cfe47644f8ddb | **Title:** SSH URLs Generated with Incorrect Host-Path Delimiter
**Description:**
When generating SSH URLs for RIA repositories, the URLs incorrectly use a colon (`:`) to separate the host and path. This results in malformed URLs that do not conform to the expected format.
**Buggy Code Example:**
```python
spec = '... | diff --git a/datalad/core/distributed/clone.py b/datalad/core/distributed/clone.py
--- a/datalad/core/distributed/clone.py
+++ b/datalad/core/distributed/clone.py
@@ -717,16 +717,23 @@
uuid_regex = r'[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}'
if not re.match(uuid_regex, dsid):
... | diff --git a/datalad/core/distributed/tests/test_clone.py b/datalad/core/distributed/tests/test_clone.py
--- a/datalad/core/distributed/tests/test_clone.py
+++ b/datalad/core/distributed/tests/test_clone.py
@@ -546,10 +546,9 @@
eq_(decode_source_spec(spec),
dict(
source=spec,
- ... | null | null | namanjain12/datalad_final:fbb05051f6c01ff8c3257ce4458cfe47644f8ddb | true | null | 1 | 23 | null | 971 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2385 | 80.63425 | ||
8,792 | r2e_gym::train::6325 | r2e_gym | train | 6,325 | pillow__95c867dabfdb322b51d58ff55c606add2bfcb22c | pillow | python-pillow/pillow | python | 95c867dabfdb322b51d58ff55c606add2bfcb22c | **Title:** Saving JPEG with XMP Metadata Raises KeyError: 'xmp'
**Description:**
When attempting to save a JPEG image with XMP metadata, a `KeyError` is raised because the `'xmp'` key is missing from the image info. This prevents the image from being saved properly with the desired metadata.
**Example Code:**
```pyth... | diff --git a/src/PIL/JpegImagePlugin.py b/src/PIL/JpegImagePlugin.py
--- a/src/PIL/JpegImagePlugin.py
+++ b/src/PIL/JpegImagePlugin.py
@@ -747,17 +747,27 @@
extra = info.get("extra", b"")
MAX_BYTES_IN_MARKER = 65533
+ xmp = info.get("xmp", im.info.get("xmp"))
+ if xmp:
+ overhead_len = 29 # b"... | 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
@@ -991,6 +991,21 @@
else:
assert im.getxmp() == {"xmpmeta": None}
+ def test_save_xmp(self, tmp_path: Path) -> None:
+ f = str(tmp_path / "temp.jpg")
+ ... | null | null | namanjain12/pillow_final:95c867dabfdb322b51d58ff55c606add2bfcb22c | true | null | 1 | 20 | null | 1,028 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.238 | 80.63275 | ||
8,793 | r2e_gym::train::5106 | r2e_gym | train | 5,106 | pyramid__4b552e539a1725356b9982261b73fd88de7d59a1 | pyramid | pylons/pyramid | python | 4b552e539a1725356b9982261b73fd88de7d59a1 | **Title:** `view_execution_permitted` Does Not Raise Exception for Non-Existent Views
**Description:**
When invoking `view_execution_permitted` with a view name that hasn't been registered, the function does not raise an exception as expected. This behavior can lead to scenarios where unauthorized or undefined views a... | diff --git a/pyramid/security.py b/pyramid/security.py
--- a/pyramid/security.py
+++ b/pyramid/security.py
@@ -4,6 +4,7 @@
IAuthenticationPolicy,
IAuthorizationPolicy,
ISecuredView,
+ IView,
IViewClassifier,
)
@@ -140,6 +141,11 @@
provides = [IViewClassifier] + map_(providedBy, (reque... | diff --git a/pyramid/tests/test_security.py b/pyramid/tests/test_security.py
--- a/pyramid/tests/test_security.py
+++ b/pyramid/tests/test_security.py
@@ -131,6 +131,28 @@
return checker
def test_no_permission(self):
+ from zope.interface import Interface
+ from pyramid.threadlocal import ... | null | null | namanjain12/pyramid_final:4b552e539a1725356b9982261b73fd88de7d59a1 | true | null | 1 | 6 | null | 1,308 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.238 | 80.63275 | ||
8,794 | r2e_gym::train::5678 | r2e_gym | train | 5,678 | scrapy__518e56046e45d38c505db9e2bc00677ad08ac58c | scrapy | scrapy/scrapy | python | 518e56046e45d38c505db9e2bc00677ad08ac58c | **Title:** Contracts Do Not Detect Async Callbacks, Leading to Unexpected Behavior
**Description:**
When an asynchronous callback is used within a contract, the system fails to detect it and does not raise an error. This oversight allows async callbacks to slip through, causing unexpected behavior since contracts are ... | diff --git a/scrapy/contracts/__init__.py b/scrapy/contracts/__init__.py
--- a/scrapy/contracts/__init__.py
+++ b/scrapy/contracts/__init__.py
@@ -2,7 +2,8 @@
import sys
from functools import wraps
from inspect import getmembers
-from typing import Dict
+from types import CoroutineType
+from typing import AsyncGener... | diff --git a/tests/test_contracts.py b/tests/test_contracts.py
--- a/tests/test_contracts.py
+++ b/tests/test_contracts.py
@@ -63,6 +63,13 @@
"""
return Request("http://scrapy.org", callback=self.returns_item)
+ async def returns_request_async(self, response):
+ """async method which retur... | null | null | namanjain12/scrapy_final:518e56046e45d38c505db9e2bc00677ad08ac58c | true | null | 1 | 13 | null | 1,168 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.238 | 80.63275 | ||
8,795 | r2e_gym::train::173 | r2e_gym | train | 173 | orange3__d44ca9782bf3574049ec83deb8b8b326ace91334 | orange3 | biolab/orange3 | python | d44ca9782bf3574049ec83deb8b8b326ace91334 | **Title:** Correlation Table Displays Incorrect Number of Columns, Causing Index Errors
**Description:**
When generating the correlation table for datasets with continuous or mixed attributes, the table only displays 3 columns instead of the expected 4. This discrepancy leads to failures when attempting to access the ... | 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
@@ -153,12 +153,16 @@
def row_for_state(self, score, state):
attrs = sorted((self.attrs[x] for x in state), key=attrgetter("nam... | 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
@@ -38,7 +38,7 @@
self.wait_until_finished()
n_attrs = len(self.data_cont.domai... | null | null | namanjain12/orange3_final:d44ca9782bf3574049ec83deb8b8b326ace91334 | true | null | 1 | 9 | null | 1,247 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.237833 | 80.63225 | ||
8,796 | r2e_gym::train::5548 | r2e_gym | train | 5,548 | aiohttp__45d6e4f14572bfc4cfc3f32a2c7c72a9cc28f125 | aiohttp | aio-libs/aiohttp | python | 45d6e4f14572bfc4cfc3f32a2c7c72a9cc28f125 | **Title:** `run_app()` Logs Exceptions That Are Also Raised, Causing Redundant Error Messages
**Description:**
When an exception is raised within the `run_app()` function, it not only propagates the exception but also logs it through the event loop's exception handler. This results in duplicate error messages, which c... | diff --git a/CHANGES/6807.bugfix.rst b/CHANGES/6807.bugfix.rst
--- a/CHANGES/6807.bugfix.rst
+++ b/CHANGES/6807.bugfix.rst
@@ -0,0 +1 @@
+Stopped logging exceptions from ``web.run_app()`` that would be raised regardless -- by :user:`Dreamsorcerer`.
diff --git a/aiohttp/web.py b/aiohttp/web.py
--- a/aiohttp/web.py
+++ b... | diff --git a/tests/test_run_app.py b/tests/test_run_app.py
--- a/tests/test_run_app.py
+++ b/tests/test_run_app.py
@@ -979,6 +979,23 @@
assert count == 3
+def test_run_app_raises_exception(patched_loop: asyncio.AbstractEventLoop) -> None:
+ async def context(app: web.Application) -> AsyncIterator[None]:
+ ... | null | null | namanjain12/aiohttp_final:45d6e4f14572bfc4cfc3f32a2c7c72a9cc28f125 | true | null | 2 | 16 | null | 1,106 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.237667 | 80.63175 | ||
8,797 | r2e_gym::train::130 | r2e_gym | train | 130 | orange3__3cb2f093249c5a7ab5413445c94c093abd2a93da | orange3 | biolab/orange3 | python | 3cb2f093249c5a7ab5413445c94c093abd2a93da | **Title: OWDiscretize Widget Status Bar Lacks Detailed Data Information**
**Description:**
When loading a dataset into the OWDiscretize widget, the status bar only displays the number of data instances without providing additional details about the dataset. This omission makes it difficult for users to get a quick ove... | diff --git a/Orange/widgets/data/owdiscretize.py b/Orange/widgets/data/owdiscretize.py
--- a/Orange/widgets/data/owdiscretize.py
+++ b/Orange/widgets/data/owdiscretize.py
@@ -10,6 +10,7 @@
from Orange.widgets import widget, gui, settings
from Orange.widgets.utils import itemmodels, vartype
from Orange.widgets.utils.... | diff --git a/Orange/widgets/data/tests/test_owdiscretize.py b/Orange/widgets/data/tests/test_owdiscretize.py
--- a/Orange/widgets/data/tests/test_owdiscretize.py
+++ b/Orange/widgets/data/tests/test_owdiscretize.py
@@ -5,7 +5,7 @@
from Orange.data import Table
from Orange.widgets.data.owdiscretize import OWDiscretize... | null | null | namanjain12/orange3_final:3cb2f093249c5a7ab5413445c94c093abd2a93da | true | null | 1 | 11 | null | 1,206 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.237667 | 80.63175 | ||
8,798 | r2e_gym::train::5589 | r2e_gym | train | 5,589 | scrapy__e1fa1fd8ad62cb8958d21d3a33648ed4de6af757 | scrapy | scrapy/scrapy | python | e1fa1fd8ad62cb8958d21d3a33648ed4de6af757 | **Title:** `follow_all` Raises TypeError When Handling Invalid URLs
**Description:**
When using the `follow_all` method with invalid URLs, such as `None` or non-string types, it raises a `TypeError` instead of gracefully skipping the invalid links. This causes the spider to crash or terminate unexpectedly, hindering t... | diff --git a/scrapy/http/response/text.py b/scrapy/http/response/text.py
--- a/scrapy/http/response/text.py
+++ b/scrapy/http/response/text.py
@@ -180,13 +180,27 @@
In addition, ``css`` and ``xpath`` arguments are accepted to perform the link extraction
within the ``follow_all`` method (only one of ... | diff --git a/tests/sample_data/link_extractor/sgml_linkextractor_no_href.html b/tests/sample_data/link_extractor/sgml_linkextractor_no_href.html
--- a/tests/sample_data/link_extractor/sgml_linkextractor_no_href.html
+++ b/tests/sample_data/link_extractor/sgml_linkextractor_no_href.html
@@ -0,0 +1,25 @@
+<html>
+ <head... | null | null | namanjain12/scrapy_final:e1fa1fd8ad62cb8958d21d3a33648ed4de6af757 | true | null | 1 | 28 | null | 865 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2375 | 80.63125 | ||
8,799 | r2e_gym::train::5585 | r2e_gym | train | 5,585 | scrapy__f042ad0f39594d59a1a2032e6294ff1890638138 | scrapy | scrapy/scrapy | python | f042ad0f39594d59a1a2032e6294ff1890638138 | **Title:** HttpProxyMiddleware Raises TypeError When Handling Proxy Authentication
**Description:**
When configuring proxy authentication using Scrapy's `HttpProxyMiddleware`, the middleware fails to process the proxy credentials correctly, resulting in a `TypeError`. This occurs because the credentials are handled as... | diff --git a/scrapy/downloadermiddlewares/httpproxy.py b/scrapy/downloadermiddlewares/httpproxy.py
--- a/scrapy/downloadermiddlewares/httpproxy.py
+++ b/scrapy/downloadermiddlewares/httpproxy.py
@@ -9,7 +9,7 @@
from scrapy.utils.httpobj import urlparse_cached
from scrapy.exceptions import NotConfigured
-
+from scra... | diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt
--- a/tests/py3-ignores.txt
+++ b/tests/py3-ignores.txt
@@ -2,8 +2,6 @@
tests/test_exporters.py
tests/test_linkextractors_deprecated.py
tests/test_crawl.py
-tests/test_downloadermiddleware_httpproxy.py
-tests/test_downloadermiddleware_retry.py
tests/test_ma... | null | null | namanjain12/scrapy_final:f042ad0f39594d59a1a2032e6294ff1890638138 | true | null | 1 | 6 | null | 1,305 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2375 | 80.63125 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.