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,500 | swe_smith::train::30182 | swe_smith | train | 30,182 | pyca__pyopenssl.04766a49.combine_file__12o1o8ad | swesmith/pyca__pyopenssl.04766a49 | pyca/pyopenssl | python | null | Connection.set_context raises TypeError with valid Context instance
Description
When calling `Connection.set_context()` with a valid `Context` instance, it incorrectly raises a `TypeError` claiming the context must be a Context instance.
Steps/Code to Reproduce
```python
from OpenSSL.SSL import Context, Connection,... | diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py
index eed27a0..fb35fc4 100644
--- a/src/OpenSSL/SSL.py
+++ b/src/OpenSSL/SSL.py
@@ -1558,7 +1558,7 @@ class Context:
:return: The session timeout
"""
- return _lib.SSL_CTX_get_timeout(self._context)
+ return _lib.SSL_CTX_get_timeout(... | ["tests/test_ssl.py::TestContext::test_timeout", "tests/test_ssl.py::TestApplicationLayerProtoNegotiation::test_alpn_success", "tests/test_ssl.py::TestApplicationLayerProtoNegotiation::test_alpn_set_on_connection", "tests/test_ssl.py::TestApplicationLayerProtoNegotiation::test_alpn_no_server_overlap", "tests/test_ssl.p... | ["tests/test_crypto.py::TestX509Ext::test_str", "tests/test_crypto.py::TestX509Ext::test_type", "tests/test_crypto.py::TestX509Ext::test_construction", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[thisIsMadeUp-False-hi]", "tests/test_crypto.py::TestX509Ext::test_invalid_extension[proxyCertInfo-True-langua... | jyangballin/swesmith.x86_64.pyca_1776_pyopenssl.04766a49 | true | null | 1 | 18 | 10 | 805 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194167 | 80.8575 | |||
8,501 | swe_smith::train::50789 | swe_smith | train | 50,789 | python-hyper__h11.bed0dd4a.combine_file__l33rncez | swesmith/python-hyper__h11.bed0dd4a | python-hyper/h11 | python | null | ConnectionState broken after recent changes
I'm getting a bunch of NameError exceptions when trying to use h11. Looks like there's an issue with the ConnectionState class where `start_states` is referenced but not defined.
#### Steps/Code to Reproduce
```python
import h11
# Basic client connection
conn = h11.Connec... | diff --git a/h11/_state.py b/h11/_state.py
index 3ad444b..9f951bc 100644
--- a/h11/_state.py
+++ b/h11/_state.py
@@ -265,7 +265,7 @@ class ConnectionState:
self._fire_state_triggered_transitions()
def process_keep_alive_disabled(self) -> None:
- self.keep_alive = False
+ self.keep_alive = ... | ["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_conne... | ["h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_idle_receive_nothing", "h11/tests/test_events.py::test_events", "h11/tests/test_events.py::test_intenum_status_code", "h11/tests/test_events.py::test_header_casing", "h11/tests/test... | jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a | true | null | 1 | 20 | 38 | 765 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194167 | 80.8575 | |||
8,502 | swe_smith::train::49355 | swe_smith | train | 49,355 | mozilla__bleach.73871d76.func_basic__uecdhp5u | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | HTML parser incorrectly handles `</p>` end tags causing infinite recursion
#### Description
When processing HTML with `</p>` end tags, the parser enters an infinite recursion loop. This appears to be related to how the parser handles paragraph element scoping and implied end tag generation.
#### Steps/Code to Reprod... | diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py
index 5427b7d..2c2f82d 100644
--- a/bleach/_vendor/html5lib/html5parser.py
+++ b/bleach/_vendor/html5lib/html5parser.py
@@ -1306,14 +1306,15 @@ def getPhases(debug):
self.tree.insertElement(token)
def en... | ["tests/test_linkify.py::test_recognized_tags_arg"] | ["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread... | jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76 | true | null | 1 | 9 | 1 | 985 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194167 | 80.8575 | |||
8,503 | swe_smith::train::7958 | swe_smith | train | 7,958 | cantools__cantools.0c6a7871.func_pm_ctrl_shuffle__cd9ecrip | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | `cantools dump` command fails with UnboundLocalError for WIDTH variable
#### Description
The `cantools dump` command is crashing with a `UnboundLocalError: local variable 'WIDTH' referenced before assignment` error when trying to dump CAN database files.
#### Steps/Code to Reproduce
```bash
cantools dump tests/file... | diff --git a/src/cantools/subparsers/dump/__init__.py b/src/cantools/subparsers/dump/__init__.py
index da71713..481d807 100644
--- a/src/cantools/subparsers/dump/__init__.py
+++ b/src/cantools/subparsers/dump/__init__.py
@@ -103,21 +103,20 @@ def _dump_can_message(message, with_comments=False, name_prefix='', WIDTH=Non... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_dump", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_j1939", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_no_sender", "tests/test_command_line.py::CanToolsCommandLineTest::test_dump_signal_choices", "tests/test_command_line... | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc", "tests/test_command_line.py::CanToolsCo... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 17 | 21 | 824 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194 | 80.857 | |||
8,504 | swe_smith::train::27997 | swe_smith | train | 27,997 | jsvine__pdfplumber.02ff4313.func_pm_remove_cond__y8l2oexj | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | Structure tree parsing fails with KeyError: 'Pg' when processing certain PDF elements
#### Description
When parsing PDF structure trees, the code crashes with a `KeyError: 'Pg'` when encountering elements that don't have a 'Pg' key. This affects multiple PDF files and prevents structure tree extraction from working p... | diff --git a/pdfplumber/structure.py b/pdfplumber/structure.py
index 88749d7..89008b4 100644
--- a/pdfplumber/structure.py
+++ b/pdfplumber/structure.py
@@ -337,17 +337,10 @@ class PDFStructTree(Findable):
self._resolve_children(s)
def on_parsed_page(self, obj: Dict[str, Any]) -> bool:
- if "Pg" ... | ["tests/test_convert.py::Test::test_cli_structure_text", "tests/test_structure.py::TestClass::test_all_mcids", "tests/test_structure.py::TestUnparsed::test_unparsed_pages", "tests/test_structure.py::TestMany::test_chelsea_pdta", "tests/test_structure.py::TestMany::test_missing_parenttree", "tests/test_structure.py::Tes... | ["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te... | jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313 | true | null | 1 | 7 | 8 | 1,024 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194 | 80.857 | |||
8,505 | swe_smith::train::20425 | swe_smith | train | 20,425 | tobymao__sqlglot.036601ba.combine_module__aq4aottt | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | UnboundLocalError in SQLite and PRQL dialects after recent changes
#### Description
Getting `UnboundLocalError` when using certain SQLite DATEDIFF functions and PRQL order by syntax. The errors seem to be related to variables being referenced before assignment.
#### Steps/Code to Reproduce
For SQLite DATEDIFF with ... | diff --git a/sqlglot/dialects/prql.py b/sqlglot/dialects/prql.py
index 2fc2594..5306b30 100644
--- a/sqlglot/dialects/prql.py
+++ b/sqlglot/dialects/prql.py
@@ -150,12 +150,11 @@ class PRQL(Dialect):
return term
def _parse_order_by(self, query: exp.Select) -> t.Optional[exp.Query]:
- ... | ["tests/dialects/test_prql.py::TestPRQL::test_prql", "tests/dialects/test_sqlite.py::TestSQLite::test_datediff"] | ["tests/dialects/test_athena.py::TestAthena::test_athena", "tests/dialects/test_athena.py::TestAthena::test_ctas", "tests/dialects/test_athena.py::TestAthena::test_ddl", "tests/dialects/test_athena.py::TestAthena::test_ddl_quoting", "tests/dialects/test_athena.py::TestAthena::test_dml", "tests/dialects/test_athena.py::... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 2 | 9 | 2 | 984 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194 | 80.857 | |||
8,506 | swe_smith::train::31617 | swe_smith | train | 31,617 | benoitc__gunicorn.bacbf8aa.func_pm_ctrl_shuffle__fopnp2gp | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | Config file loading fails with NameError when file doesn't exist
#### Description
When trying to load a configuration file that doesn't exist, gunicorn crashes with a `NameError: name 'ext' is not defined` instead of the expected `RuntimeError` about the file not existing.
#### Steps/Code to Reproduce
```python
fro... | diff --git a/gunicorn/app/base.py b/gunicorn/app/base.py
index 9bf7a4f..645e7f3 100644
--- a/gunicorn/app/base.py
+++ b/gunicorn/app/base.py
@@ -91,11 +91,6 @@ class Application(BaseApplication):
def get_config_from_filename(self, filename):
- if not os.path.exists(filename):
- raise RuntimeE... | ["tests/test_config.py::test_load_config", "tests/test_config.py::test_load_config_explicit_file", "tests/test_config.py::test_cli_overrides_config", "tests/test_config.py::test_default_config_file", "tests/test_config.py::test_config_file_environment_variable", "tests/test_config.py::test_cli_overrides_enviroment_vari... | ["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes... | jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa | true | null | 1 | 11 | 10 | 944 | 0 | 0.6 | 1 | 0.75 | 1 | 0.194 | 80.857 | |||
8,507 | swe_smith::train::36585 | swe_smith | train | 36,585 | lincolnloop__python-qrcode.456b01d4.func_basic__6w1cbum0 | swesmith/lincolnloop__python-qrcode.456b01d4 | lincolnloop/python-qrcode | python | null | **Issue Text**
<START WRITING>
QR code PNG generation broken in PyPNGImage
Description
The PyPNGImage class in qrcode/image/pure.py is not generating valid PNG files anymore. When trying to generate a QR code using the PyPNGImage factory, it fails with a png.ProtocolError.
To reproduce:
```python
import qrcode
impo... | diff --git a/qrcode/image/pure.py b/qrcode/image/pure.py
index 5a8b2c5..16a57b2 100644
--- a/qrcode/image/pure.py
+++ b/qrcode/image/pure.py
@@ -31,18 +31,18 @@ class PyPNGImage(BaseImage):
def rows_iter(self):
yield from self.border_rows_iter()
- border_col = [1] * (self.box_size * self.border)
... | ["qrcode/tests/test_qrcode_pypng.py::test_render_pypng", "qrcode/tests/test_qrcode_pypng.py::test_render_pypng_to_str"] | ["qrcode/tests/test_example.py::test_example", "qrcode/tests/test_qrcode.py::test_basic", "qrcode/tests/test_qrcode.py::test_large", "qrcode/tests/test_qrcode.py::test_invalid_version", "qrcode/tests/test_qrcode.py::test_invalid_border", "qrcode/tests/test_qrcode.py::test_overflow", "qrcode/tests/test_qrcode.py::test_a... | jyangballin/swesmith.x86_64.lincolnloop_1776_python-qrcode.456b01d4 | true | null | 1 | 8 | 2 | 1,003 | 0 | 0.6 | 1 | 0.75 | 1 | 0.193833 | 80.8565 | |||
8,508 | swe_bench::test::1488 | swe_bench | test | 1,488 | pytest-dev__pytest-9780 | pytest-dev/pytest | pytest-dev/pytest | python | d52a6e6074844581f5f89653bd4071fb6ea847d3 | Version 7.1.0 seems like not picking up conftest.py
Over SciPy we have started to see the message in the title in our Azure Pipelines which started picking up 7.1.0 instead of 7.0.1 lastn ight. From the deprecation and removal list we couldn't see which item might have caused it.
One speculation we might generate is t... | In the meantime I'll try to add the mark registration
Nevermind, the markers are added already somewhere else
https://github.com/scipy/scipy/blob/main/scipy/conftest.py#L13
So then the speculation is wrong and we don't know what might have caused it.
My guess is that support for the way you register the marker ... | diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py
--- a/src/_pytest/config/__init__.py
+++ b/src/_pytest/config/__init__.py
@@ -540,11 +540,7 @@ def _is_in_confcutdir(self, path: Path) -> bool:
"""
if self._confcutdir is None:
return True
- try:
- ... | diff --git a/testing/test_conftest.py b/testing/test_conftest.py
--- a/testing/test_conftest.py
+++ b/testing/test_conftest.py
@@ -252,6 +252,34 @@ def pytest_addoption(parser):
result.stdout.no_fnmatch_line("*warning: could not load initial*")
+def test_installed_conftest_is_picked_up(pytester: Pytester, tmp_... | ["testing/test_conftest.py::test_installed_conftest_is_picked_up"] | ["testing/test_conftest.py::TestConftestValueAccessGlobal::test_basic_init[global]", "testing/test_conftest.py::TestConftestValueAccessGlobal::test_immediate_initialiation_and_incremental_are_the_same[global]", "testing/test_conftest.py::TestConftestValueAccessGlobal::test_value_access_not_existing[global]", "testing/t... | null | true | 2022-03-16T21:02:19Z | 1 | 6 | 1 | 840 | 0 | 0.8 | 1 | 0.55 | 1 | 0.16 | 80.855 | |
8,509 | r2e_gym::train::5628 | r2e_gym | train | 5,628 | scrapy__bc1f5353ddd70288e8fd9b295f4b280a7e929cd4 | scrapy | scrapy/scrapy | python | bc1f5353ddd70288e8fd9b295f4b280a7e929cd4 | **Title:** XML Iterator Fails to Handle Unicode Tag Names, Causing Selector Errors
**Description:**
When parsing XML documents that contain Unicode tag names, the XML iterator does not correctly identify and yield the desired nodes. This results in empty selector lists, leading to errors when attempting to access elem... | diff --git a/scrapy/utils/iterators.py b/scrapy/utils/iterators.py
--- a/scrapy/utils/iterators.py
+++ b/scrapy/utils/iterators.py
@@ -17,7 +17,7 @@
def xmliter(obj, nodename):
"""Return a iterator of Selector's over all nodes of a XML document,
- given tha name of the node to iterate. Useful for parsing ... | 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
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
import os
import six
from twisted.trial import unittest
@@ -46,6 +47,60 @@
for e in self.xmliter(response, 'mat... | null | null | namanjain12/scrapy_final:bc1f5353ddd70288e8fd9b295f4b280a7e929cd4 | true | null | 1 | 13 | null | 1,609 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3115 | 80.85325 | ||
8,510 | r2e_gym::train::4034 | r2e_gym | train | 4,034 | coveragepy__d08e6d08cb01d07209bcc5a96807e48eeb593ed9 | coveragepy | nedbat/coveragepy | python | d08e6d08cb01d07209bcc5a96807e48eeb593ed9 | **Title:** PathAliases with `relative=True` Fails to Map Relative Paths Correctly
**Description:**
When configuring `PathAliases` with the `relative` parameter set to `True`, adding a relative path pattern does not correctly map input paths to the expected relative output. This causes the aliasing mechanism to fail in... | diff --git a/CHANGES.rst b/CHANGES.rst
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -20,6 +20,10 @@
Unreleased
----------
+- Fix: when using the ``[run] relative_files = True`` setting, a relative
+ ``[paths]`` pattern was still being made absolute. This is now fixed,
+ closing `issue 1519`_.
+
- Fix: if Python doesn... | diff --git a/tests/test_files.py b/tests/test_files.py
--- a/tests/test_files.py
+++ b/tests/test_files.py
@@ -17,7 +17,9 @@
GlobMatcher, ModuleMatcher, PathAliases, TreeMatcher, abs_file,
actual_path, find_python_files, flat_rootname, globs_to_regex,
)
+
from tests.coveragetest import CoverageTest
+from te... | null | null | namanjain12/coveragepy_final:d08e6d08cb01d07209bcc5a96807e48eeb593ed9 | true | null | 2 | 18 | null | 1,509 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3115 | 80.85325 | ||
8,511 | swe_bench::test::53 | swe_bench | test | 53 | astropy__astropy-14371 | astropy/astropy | astropy/astropy | python | e2a2ca3eab1defc71aedf4cf3982f7d4793faacf | Add ``atol`` argument to function ``is_O3``
Or at least use the maximum precision of the matrix dtype instead of the arbitrarily chosen 1e-15.
https://github.com/astropy/astropy/blob/3912916dad56920514ba648be400a5f82add041a/astropy/coordinates/matrix_utilities.py#L137-L163 | Sounds like a reasonable request, especially given you were the one who added it in https://github.com/astropy/astropy/pull/11444 . 😸
Yeah 😆 . An effective, if somewhat incompletely-implemented solution. | diff --git a/astropy/coordinates/matrix_utilities.py b/astropy/coordinates/matrix_utilities.py
--- a/astropy/coordinates/matrix_utilities.py
+++ b/astropy/coordinates/matrix_utilities.py
@@ -136,7 +136,7 @@ def angle_axis(matrix):
return Angle(angle, u.radian), -axis / r
-def is_O3(matrix):
+def is_O3(matrix, ... | diff --git a/astropy/coordinates/tests/test_matrix_utilities.py b/astropy/coordinates/tests/test_matrix_utilities.py
--- a/astropy/coordinates/tests/test_matrix_utilities.py
+++ b/astropy/coordinates/tests/test_matrix_utilities.py
@@ -72,6 +72,10 @@ def test_is_O3():
# and (M, 3, 3)
n1 = np.tile(m1, (2, 1, 1)... | ["astropy/coordinates/tests/test_matrix_utilities.py::test_is_O3", "astropy/coordinates/tests/test_matrix_utilities.py::test_is_rotation"] | ["astropy/coordinates/tests/test_matrix_utilities.py::test_rotation_matrix", "astropy/coordinates/tests/test_matrix_utilities.py::test_angle_axis", "astropy/coordinates/tests/test_matrix_utilities.py::test_matrix_product_deprecation"] | null | true | 2023-02-08T19:31:02Z | 1 | 34 | 2 | 274 | 0 | 0.8 | 1 | 0.55 | 1 | 0.159 | 80.852 | |
8,512 | r2e_gym::train::5627 | r2e_gym | train | 5,627 | scrapy__080fecd8900b6b1f94e8e143e90338279ba8d6e5 | scrapy | scrapy/scrapy | python | 080fecd8900b6b1f94e8e143e90338279ba8d6e5 | **Title:** Authorization header is retained during cross-domain redirects
**Description:**
When a request containing both `Cookie` and `Authorization` headers is redirected to a different domain, the `Authorization` header is not removed. This behavior can inadvertently expose sensitive authorization information to ex... | diff --git a/docs/news.rst b/docs/news.rst
--- a/docs/news.rst
+++ b/docs/news.rst
@@ -2,6 +2,20 @@
Release notes
=============
+
+.. _release-2.11.1:
+
+Scrapy 2.11.1 (unreleased)
+--------------------------
+
+**Security bug fix:**
+
+- The ``Authorization`` header is now dropped on redirects to a different
+ ... | diff --git a/tests/test_downloadermiddleware_redirect.py b/tests/test_downloadermiddleware_redirect.py
--- a/tests/test_downloadermiddleware_redirect.py
+++ b/tests/test_downloadermiddleware_redirect.py
@@ -246,6 +246,37 @@
req_result = self.mw.process_response(req, resp, self.spider)
perc_encoded_utf... | null | null | namanjain12/scrapy_final:080fecd8900b6b1f94e8e143e90338279ba8d6e5 | true | null | 2 | 37 | null | 1,124 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.310667 | 80.85075 | ||
8,513 | r2e_gym::train::382 | r2e_gym | train | 382 | orange3__a32c0acaf4b8166585fb8cafbe37b679271fb6bd | orange3 | biolab/orange3 | python | a32c0acaf4b8166585fb8cafbe37b679271fb6bd | **Title:** Incorrect Coefficient Calculations in PLS Widget Causing Mismatched Data Shapes and Divergent Predictions
**Description:**
When using the Partial Least Squares (PLS) widget with the housing dataset, the calculated coefficients are incorrect. This results in the coefficients data having unexpected dimensions... | diff --git a/Orange/widgets/model/owpls.py b/Orange/widgets/model/owpls.py
--- a/Orange/widgets/model/owpls.py
+++ b/Orange/widgets/model/owpls.py
@@ -76,7 +76,6 @@
n_components = x_rotations.shape[1]
names = [f"coef ({v.name})" for v in self.model.domain.class_vars]
- names += [f"coef/X_sd (... | diff --git a/Orange/widgets/model/tests/test_owpls.py b/Orange/widgets/model/tests/test_owpls.py
--- a/Orange/widgets/model/tests/test_owpls.py
+++ b/Orange/widgets/model/tests/test_owpls.py
@@ -1,5 +1,6 @@
import unittest
import numpy as np
+from sklearn.cross_decomposition import PLSRegression
from Orange.data i... | null | null | namanjain12/orange3_final:a32c0acaf4b8166585fb8cafbe37b679271fb6bd | true | null | 2 | 12 | null | 1,620 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.31 | 80.84875 | ||
8,514 | swe_bench::dev::57 | swe_bench | dev | 57 | pvlib__pvlib-python-1738 | pvlib/pvlib-python | pvlib/pvlib-python | python | 275e6718caf7486cb5b7dcf29acd59499ad51f7f | `pvlib.soiling.hsu` takes `tilt` instead of `surface_tilt`
`pvlib.soiling.hsu` takes a `tilt` parameter representing the same thing we normally call `surface_tilt`:
https://github.com/pvlib/pvlib-python/blob/7a2ec9b4765124463bf0ddd0a49dcfedc4cbcad7/pvlib/soiling.py#L13-L14
https://github.com/pvlib/pvlib-python/blob/7... | On second thought, I'm not seeing how this can be deprecated without reordering the parameters, which doesn't seem worth it to me. I'm inclined to rename it without deprecation in 0.10.0. | diff --git a/pvlib/soiling.py b/pvlib/soiling.py
--- a/pvlib/soiling.py
+++ b/pvlib/soiling.py
@@ -10,7 +10,7 @@
from pvlib.tools import cosd
-def hsu(rainfall, cleaning_threshold, tilt, pm2_5, pm10,
+def hsu(rainfall, cleaning_threshold, surface_tilt, pm2_5, pm10,
depo_veloc=None, rain_accum_period=pd.Ti... | diff --git a/pvlib/tests/test_soiling.py b/pvlib/tests/test_soiling.py
--- a/pvlib/tests/test_soiling.py
+++ b/pvlib/tests/test_soiling.py
@@ -92,7 +92,7 @@ def test_hsu_no_cleaning(rainfall_input, expected_output):
tilt = 0.
expected_no_cleaning = expected_output
- result = hsu(rainfall=rainfall, cleani... | ["pvlib/tests/test_soiling.py::test_hsu_no_cleaning", "pvlib/tests/test_soiling.py::test_hsu", "pvlib/tests/test_soiling.py::test_hsu_defaults", "pvlib/tests/test_soiling.py::test_hsu_variable_time_intervals"] | ["pvlib/tests/test_soiling.py::test_kimber_nowash", "pvlib/tests/test_soiling.py::test_kimber_manwash", "pvlib/tests/test_soiling.py::test_kimber_norain", "pvlib/tests/test_soiling.py::test_kimber_initial_soil"] | null | true | 2023-05-16T21:31:11Z | 1 | 6 | 4 | 827 | 0 | 0.8 | 1 | 0.55 | 1 | 0.157833 | 80.8485 | |
8,515 | r2e_gym::train::4174 | r2e_gym | train | 4,174 | numpy__f9bed20bffd88bce06dbc8be200179edfe7580a4 | numpy | numpy/numpy | python | f9bed20bffd88bce06dbc8be200179edfe7580a4 | **Title:** TypeError Occurs When Using `np.in1d` with `timedelta64` Dtype
**Description:**
When using `np.in1d` with arrays of `timedelta64` dtype, a `TypeError` is unexpectedly raised. This issue arises because `timedelta64` is incorrectly treated as a subtype of `numpy.integer`, leading to improper type handling wit... | diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -621,27 +621,27 @@
# Ensure that iteration through object arrays yields size-1 arrays
if ar2.dtype == object:
ar2 = ar2.reshape(-1, 1)
- # Convert booleans to uint8 so ... | 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
@@ -396,6 +396,37 @@
assert_array_equal(np.invert(expected),
in1d(a, b, invert=True, kind=kind))
+ @pytest.... | null | null | namanjain12/numpy_final:f9bed20bffd88bce06dbc8be200179edfe7580a4 | true | null | 1 | 22 | null | 1,418 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.309667 | 80.84775 | ||
8,516 | r2e_gym::train::67 | r2e_gym | train | 67 | orange3__8bbf987f017642eaf6b116d1f3d34572c6984e0c | orange3 | biolab/orange3 | python | 8bbf987f017642eaf6b116d1f3d34572c6984e0c | **Title:** Neighbors Widget Does Not Sort Instances by Distance
**Description:**
The Neighbors widget returns the nearest instances without sorting them in ascending order of their distances. This causes the output data to have neighbors in an unexpected order, which can lead to incorrect interpretations and downstrea... | diff --git a/Orange/widgets/data/owneighbors.py b/Orange/widgets/data/owneighbors.py
--- a/Orange/widgets/data/owneighbors.py
+++ b/Orange/widgets/data/owneighbors.py
@@ -153,7 +153,12 @@
up_to = len(dist) - np.sum(inrefs)
if self.limit_neighbors and self.n_neighbors < up_to:
up_to = self... | diff --git a/Orange/widgets/data/tests/test_owneighbors.py b/Orange/widgets/data/tests/test_owneighbors.py
--- a/Orange/widgets/data/tests/test_owneighbors.py
+++ b/Orange/widgets/data/tests/test_owneighbors.py
@@ -452,6 +452,25 @@
self.send_signal(self.widget.Inputs.reference, data[0:1])
self.assertI... | null | null | namanjain12/orange3_final:8bbf987f017642eaf6b116d1f3d34572c6984e0c | true | null | 1 | 7 | null | 1,717 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3095 | 80.84725 | ||
8,517 | r2e_gym::train::117 | r2e_gym | train | 117 | orange3__3863320bff46e08822743783abb3f02cc22c956d | orange3 | biolab/orange3 | python | 3863320bff46e08822743783abb3f02cc22c956d | **Title:** Equal Variable Instances Have Different Hashes Causing Inconsistent Behavior
**Description:**
When creating Variable instances that are logically equal, their hash values differ. This inconsistency leads to unexpected behavior when using these variables in hash-based collections like sets or dictionaries.
... | diff --git a/Orange/data/variable.py b/Orange/data/variable.py
--- a/Orange/data/variable.py
+++ b/Orange/data/variable.py
@@ -347,34 +347,26 @@
return var
def __eq__(self, other):
+ if type(self) is not type(other):
+ return False
+
+ var1 = self._get_identical_source(self)
+ ... | diff --git a/Orange/data/tests/test_variable.py b/Orange/data/tests/test_variable.py
--- a/Orange/data/tests/test_variable.py
+++ b/Orange/data/tests/test_variable.py
@@ -163,6 +163,7 @@
a._compute_value = Identity(a1)
self.assertEqual(a, a)
self.assertEqual(a, b)
+ self.assertEqual(ha... | null | null | namanjain12/orange3_final:3863320bff46e08822743783abb3f02cc22c956d | true | null | 1 | 44 | null | 976 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.309333 | 80.84675 | ||
8,518 | r2e_gym::train::5146 | r2e_gym | train | 5,146 | pyramid__693cb098a7bc8fbff5fb97c1ac031d0b6e397060 | pyramid | pylons/pyramid | python | 693cb098a7bc8fbff5fb97c1ac031d0b6e397060 | **Title:** `extract_http_basic_credentials` Returns Tuple Instead of NamedTuple, Causing Attribute Access Errors
**Description:**
The `extract_http_basic_credentials` function is designed to extract HTTP Basic credentials from a request and return them in a structured format. However, it currently returns a plain tupl... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -16,6 +16,11 @@
Features
--------
+
+- The `_get_credentials` private method of `BasicAuthAuthenticationPolicy`
+ has been extracted into standalone function `extract_http_basic_credentials`
+ in `pyramid.authentication` module, this fu... | diff --git a/pyramid/tests/test_authentication.py b/pyramid/tests/test_authentication.py
--- a/pyramid/tests/test_authentication.py
+++ b/pyramid/tests/test_authentication.py
@@ -1535,6 +1535,18 @@
b'm\xc3\xb6rk\xc3\xb6'.decode('utf-8'),
b'm\xc3\xb6rk\xc3\xb6password'.decode('utf-8')
... | null | null | namanjain12/pyramid_final:693cb098a7bc8fbff5fb97c1ac031d0b6e397060 | true | null | 2 | 18 | null | 1,492 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.308667 | 80.84475 | ||
8,519 | r2e_gym::train::4184 | r2e_gym | train | 4,184 | numpy__170d1bbf566937452fd9bf14a84a69c9edb43277 | numpy | numpy/numpy | python | 170d1bbf566937452fd9bf14a84a69c9edb43277 | **Title:** `count_nonzero` Function Raises TypeError When Using `keepdims` Argument
**Description:**
When attempting to use the `keepdims` parameter with `numpy.count_nonzero`, a `TypeError` is raised indicating that an unexpected keyword argument `keepdims` was received. This prevents retaining the reduced dimensions... | diff --git a/doc/release/upcoming_changes/15870.new_feature.rst b/doc/release/upcoming_changes/15870.new_feature.rst
--- a/doc/release/upcoming_changes/15870.new_feature.rst
+++ b/doc/release/upcoming_changes/15870.new_feature.rst
@@ -0,0 +1,5 @@
+``keepdims`` parameter for `numpy.count_nonzero`
+----------------------... | diff --git a/numpy/core/tests/test_numeric.py b/numpy/core/tests/test_numeric.py
--- a/numpy/core/tests/test_numeric.py
+++ b/numpy/core/tests/test_numeric.py
@@ -1200,6 +1200,17 @@
def test_countnonzero_axis_empty(self):
a = np.array([[0, 0, 1], [1, 0, 1]])
assert_equal(np.count_nonzero(a, axis=... | null | null | namanjain12/numpy_final:170d1bbf566937452fd9bf14a84a69c9edb43277 | true | null | 2 | 36 | null | 1,131 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3085 | 80.84425 | ||
8,520 | r2e_gym::train::6616 | r2e_gym | train | 6,616 | pillow__35d6a6608f648691e382222e5e84f0dcfd17a059 | pillow | python-pillow/pillow | python | 35d6a6608f648691e382222e5e84f0dcfd17a059 | **Title:** `PerspectiveTransform` Class Missing in `PIL.ImageTransform` Causes AttributeError
**Description:**
When attempting to apply a perspective transformation to an image, an `AttributeError` is raised because the `PerspectiveTransform` class is not defined within the `PIL.ImageTransform` module. This prevents ... | 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
@@ -10,18 +10,25 @@
class TestImageTransform:
def test_sanity(self):
- im = Image.new("L", (100, 100))
-
- seq = tuple(range(10))
-
- transform ... | null | null | namanjain12/pillow_final:35d6a6608f648691e382222e5e84f0dcfd17a059 | true | null | 3 | 33 | null | 1,189 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.308167 | 80.84325 | ||
8,521 | swe_bench::test::1628 | swe_bench | test | 1,628 | scikit-learn__scikit-learn-14024 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 4a6264db68b28a2e65efdecc459233911c9aee95 | Zero division error in HistGradientBoosting
```python
from sklearn.datasets import fetch_openml
from sklearn.model_selection import cross_val_score
from sklearn.experimental import enable_hist_gradient_boosting
from sklearn.ensemble import HistGradientBoostingClassifier
import numpy as np
# one hundred plants - margi... | I am just adding the traceback
```pytb
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
<ipython-input-3-b0953fbb1d6e> in <module>
----> 1 clf.fit(X, y)
~/Documents/code/toolbox/scikit-learn/sklearn/ensemb... | diff --git a/sklearn/ensemble/_hist_gradient_boosting/grower.py b/sklearn/ensemble/_hist_gradient_boosting/grower.py
--- a/sklearn/ensemble/_hist_gradient_boosting/grower.py
+++ b/sklearn/ensemble/_hist_gradient_boosting/grower.py
@@ -16,6 +16,10 @@
from .predictor import TreePredictor
from .utils import sum_parallel... | diff --git a/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py b/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
--- a/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
+++ b/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
@... | ["sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py::test_zero_division_hessians[binary_crossentropy]", "sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py::test_zero_division_hessians[categorical_crossentropy]"] | ["sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py::test_init_parameters_validation[params0-Loss", "sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py::test_init_parameters_validation[params1-learning_rate=0", "sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_bo... | null | true | 2019-06-04T15:15:31Z | 2 | 13 | 2 | 676 | 0 | 0.8 | 1 | 0.55 | 1 | 0.156 | 80.843 | |
8,522 | r2e_gym::train::5992 | r2e_gym | train | 5,992 | tornado__52bec504f714785a3c30e76f6925fd65d2298848 | tornado | tornadoweb/tornado | python | 52bec504f714785a3c30e76f6925fd65d2298848 | **Title:** Autoreload Fails to Reload `__main__` Module with Relative Imports
**Description:**
When running a Tornado application using `autoreload` as the `__main__` module with relative imports, the autoreload mechanism does not properly reload the module. This results in the application not restarting as expected u... | diff --git a/tornado/autoreload.py b/tornado/autoreload.py
--- a/tornado/autoreload.py
+++ b/tornado/autoreload.py
@@ -63,12 +63,11 @@
# file.py gets added to the path, which can cause confusion as imports
# may become relative in spite of the future import.
#
-# We address the former problem by setting the $PYTHONP... | 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
@@ -0,0 +1,48 @@
+from __future__ import absolute_import, division, print_function
+import os
+import subprocess
+from subprocess import Popen
+import sys
+from temp... | null | null | namanjain12/tornado_final:52bec504f714785a3c30e76f6925fd65d2298848 | true | null | 1 | 44 | null | 966 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.307667 | 80.84175 | ||
8,523 | swe_bench::dev::114 | swe_bench | dev | 114 | pydicom__pydicom-897 | pydicom/pydicom | pydicom/pydicom | python | b682e1dc71eda183786ad724da25f2fb30b5a621 | Inconsistencies in value testing for PersonName3
```python
from pydicom.dataset import Dataset
ds = Dataset()
ds.PatientName = None # or ''
if ds.PatientName:
print('Has a value')
else:
print('Has no value')
if None: # or ''
print('Evaluates as True')
else:
print('Evaluates as False')
```
Prints `Ha... | Should that `if None` read `if ds.PatientName is None`?
I can see the inconsistency if assigning `None` - which results in an empty value instead of `None`. Assigning an empty string works as expected (has an empty string afterwards).
For other string tags `None` or `''` can be assigned, though I now wonder if this... | diff --git a/pydicom/dataelem.py b/pydicom/dataelem.py
--- a/pydicom/dataelem.py
+++ b/pydicom/dataelem.py
@@ -378,7 +378,7 @@ def _convert(self, val):
elif self.VR == 'TM' and config.datetime_conversion:
return pydicom.valuerep.TM(val)
elif self.VR == "UI":
- return UID(val)
+... | diff --git a/pydicom/tests/test_dataelem.py b/pydicom/tests/test_dataelem.py
--- a/pydicom/tests/test_dataelem.py
+++ b/pydicom/tests/test_dataelem.py
@@ -15,6 +15,7 @@
DataElement_from_raw,
)
from pydicom.dataset import Dataset
+from pydicom.multival import MultiValue
from pydicom.tag import Tag
from pydicom.... | ["pydicom/tests/test_dataelem.py::DataElementTests::test_empty_text_values", "pydicom/tests/test_multival.py::TestMultiValue::test_str_rep"] | ["pydicom/tests/test_dataelem.py::DataElementTests::testBackslash", "pydicom/tests/test_dataelem.py::DataElementTests::testDSFloatConversion", "pydicom/tests/test_dataelem.py::DataElementTests::testEqualityInheritance", "pydicom/tests/test_dataelem.py::DataElementTests::testEqualityNotElement", "pydicom/tests/test_data... | null | true | 2019-07-24T18:43:18Z | 3 | 23 | 2 | 473 | 0 | 0.8 | 1 | 0.55 | 1 | 0.1555 | 80.8415 | |
8,524 | r2e_gym::train::217 | r2e_gym | train | 217 | orange3__e9f54cc7b7f1d6e6d25e11fddc88f9c4ab36b594 | orange3 | biolab/orange3 | python | e9f54cc7b7f1d6e6d25e11fddc88f9c4ab36b594 | **Title:** SelectRows widget incorrectly handles conditions with missing variables during partial matches
**Description:**
When configuring the SelectRows widget to allow partial context matches, conditions that reference variables missing from the input data are not handled correctly. This results in the widget misco... | diff --git a/Orange/widgets/data/owselectrows.py b/Orange/widgets/data/owselectrows.py
--- a/Orange/widgets/data/owselectrows.py
+++ b/Orange/widgets/data/owselectrows.py
@@ -80,12 +80,29 @@
conditions = context.values["conditions"]
all_vars = attrs.copy()
all_vars.update(metas)
- # Us... | diff --git a/Orange/widgets/data/tests/test_owselectrows.py b/Orange/widgets/data/tests/test_owselectrows.py
--- a/Orange/widgets/data/tests/test_owselectrows.py
+++ b/Orange/widgets/data/tests/test_owselectrows.py
@@ -191,6 +191,20 @@
self.assertEqual(condition[1], 2)
self.assertTrue(condition[2][0].... | null | null | namanjain12/orange3_final:e9f54cc7b7f1d6e6d25e11fddc88f9c4ab36b594 | true | null | 1 | 27 | null | 1,305 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3075 | 80.84125 | ||
8,525 | r2e_gym::train::4435 | r2e_gym | train | 4,435 | numpy__c3cd4bfa57992bb804f5efc41e93e5354d7dfef3 | numpy | numpy/numpy | python | c3cd4bfa57992bb804f5efc41e93e5354d7dfef3 | **Title:** `nan_to_num` raises AttributeError when input is a list
**Description:**
Using the `nan_to_num` function with a list as input results in an `AttributeError` because the function attempts to access the `shape` attribute, which does not exist for Python lists.
**Example Code:**
```python
import numpy as np
... | diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py
--- a/numpy/lib/type_check.py
+++ b/numpy/lib/type_check.py
@@ -324,12 +324,13 @@
Returns
-------
- out : ndarray, float
- Array with the same shape as `x` and dtype of the element in `x` with
- the greatest precision. NaN is r... | diff --git a/numpy/lib/tests/test_type_check.py b/numpy/lib/tests/test_type_check.py
--- a/numpy/lib/tests/test_type_check.py
+++ b/numpy/lib/tests/test_type_check.py
@@ -277,6 +277,8 @@
def test_integer(self):
vals = nan_to_num(1)
assert_all(vals == 1)
+ vals = nan_to_num([1])
+ as... | null | null | namanjain12/numpy_final:c3cd4bfa57992bb804f5efc41e93e5354d7dfef3 | true | null | 1 | 56 | null | 722 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.307 | 80.83975 | ||
8,526 | r2e_gym::train::4431 | r2e_gym | train | 4,431 | numpy__911015e445f94340ab41900c4d96f81569978f6f | numpy | numpy/numpy | python | 911015e445f94340ab41900c4d96f81569978f6f | **Title:** TypeError Raised When Using `equal_nan` Parameter in `np.unique`
**Description:**
When using the `np.unique` function with the `equal_nan` parameter, a `TypeError` is raised indicating that an unexpected keyword argument was received. This issue arises despite other related functions, such as `np.array_equa... | diff --git a/doc/release/upcoming_changes/21623.new_feature.rst b/doc/release/upcoming_changes/21623.new_feature.rst
--- a/doc/release/upcoming_changes/21623.new_feature.rst
+++ b/doc/release/upcoming_changes/21623.new_feature.rst
@@ -1,6 +1,6 @@
-New parameter ``equal_nans`` added to `np.unique`
----------------------... | 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
@@ -770,6 +770,6 @@
# issue 20326
a = np.array([1, 1, np.nan, np.nan, np.nan])
unq = np.unique(a)
- not_unq = np.un... | null | null | namanjain12/numpy_final:911015e445f94340ab41900c4d96f81569978f6f | true | null | 2 | 27 | null | 1,298 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.306333 | 80.83775 | ||
8,527 | r2e_gym::train::6065 | r2e_gym | train | 6,065 | pillow__fac2d2781e19b037ec1579323ca77abd79653af9 | pillow | python-pillow/pillow | python | fac2d2781e19b037ec1579323ca77abd79653af9 | **[ISSUE]**
**Title:** `Image.open` Raises `TypeError` When Using `formats` Parameter
**Description:**
When attempting to open an image file using the `formats` parameter with the `Image.open` function, a `TypeError` is raised indicating that the `formats` keyword argument is unexpected. This prevents users from spec... | diff --git a/docs/releasenotes/8.0.0.rst b/docs/releasenotes/8.0.0.rst
--- a/docs/releasenotes/8.0.0.rst
+++ b/docs/releasenotes/8.0.0.rst
@@ -50,6 +50,17 @@
API Additions
=============
+Image.open: add formats parameter
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Added a new ``formats`` parameter to :py:func:`.Image.ope... | diff --git a/Tests/test_image.py b/Tests/test_image.py
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -87,6 +87,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:fac2d2781e19b037ec1579323ca77abd79653af9 | true | null | 2 | 32 | null | 1,196 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.306 | 80.83675 | ||
8,528 | r2e_gym::train::4741 | r2e_gym | train | 4,741 | numpy__4b1d5cbf24174b1ed96824e706f74c84841633bc | numpy | numpy/numpy | python | 4b1d5cbf24174b1ed96824e706f74c84841633bc | **Title:** `nan_to_num` Fails When Using `nan`, `posinf`, and `neginf` Keyword Arguments
**Description:**
When using the `nan_to_num` function with the `nan`, `posinf`, and `neginf` keyword arguments to specify custom replacement values, a `TypeError` is raised instead of performing the replacements.
**Example Code:*... | diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py
--- a/numpy/lib/type_check.py
+++ b/numpy/lib/type_check.py
@@ -363,18 +363,23 @@
return f.max, f.min
-def _nan_to_num_dispatcher(x, copy=None):
+def _nan_to_num_dispatcher(x, copy=None, nan=None, posinf=None, neginf=None):
return (x,)
@a... | diff --git a/numpy/lib/tests/test_type_check.py b/numpy/lib/tests/test_type_check.py
--- a/numpy/lib/tests/test_type_check.py
+++ b/numpy/lib/tests/test_type_check.py
@@ -360,6 +360,15 @@
assert_(vals[1] == 0)
assert_all(vals[2] > 1e10) and assert_all(np.isfinite(vals[2]))
assert_equal(type(v... | null | null | namanjain12/numpy_final:4b1d5cbf24174b1ed96824e706f74c84841633bc | true | null | 1 | 50 | null | 836 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.306 | 80.83675 | ||
8,529 | r2e_gym::train::4759 | r2e_gym | train | 4,759 | numpy__9d69ad78cdcb93b378a734e938372941cb3e9a23 | numpy | numpy/numpy | python | 9d69ad78cdcb93b378a734e938372941cb3e9a23 | **Title:** distutils: Named templates not removed from processed output
**Description:**
**Problem:**
When processing template strings containing named templates using the `process_str` function, the named templates are not removed as expected. This results in the processed output retaining unwanted template markers,... | diff --git a/numpy/distutils/from_template.py b/numpy/distutils/from_template.py
--- a/numpy/distutils/from_template.py
+++ b/numpy/distutils/from_template.py
@@ -98,6 +98,11 @@
names[name] = thelist
return names
+def find_and_remove_repl_patterns(astr):
+ names = find_repl_patterns(astr)
+ astr =... | diff --git a/numpy/distutils/tests/test_from_template.py b/numpy/distutils/tests/test_from_template.py
--- a/numpy/distutils/tests/test_from_template.py
+++ b/numpy/distutils/tests/test_from_template.py
@@ -0,0 +1,48 @@
+
+from numpy.distutils.from_template import process_str
+from numpy.testing import assert_equal, ru... | null | null | namanjain12/numpy_final:9d69ad78cdcb93b378a734e938372941cb3e9a23 | true | null | 1 | 12 | null | 1,595 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.305833 | 80.83625 | ||
8,530 | r2e_gym::train::5578 | r2e_gym | train | 5,578 | scrapy__ecde166ee18935456bcf4c6fce89ab909bbffbaf | scrapy | scrapy/scrapy | python | ecde166ee18935456bcf4c6fce89ab909bbffbaf | **Title:** AttributeError when setting MEDIA_HTTPSTATUS_LIST due to missing RedirectMiddleware.allowed_status
**Description:**
When configuring the `MEDIA_HTTPSTATUS_LIST` setting, initializing the `MediaPipeline` results in an `AttributeError`. The pipeline attempts to access `RedirectMiddleware.allowed_status`, whic... | diff --git a/docs/topics/media-pipeline.rst b/docs/topics/media-pipeline.rst
--- a/docs/topics/media-pipeline.rst
+++ b/docs/topics/media-pipeline.rst
@@ -322,21 +322,18 @@
.. _topics-media-pipeline-override:
-Allowing redirection and handling various http statuses
-------------------------------------------------... | diff --git a/tests/test_pipeline_media.py b/tests/test_pipeline_media.py
--- a/tests/test_pipeline_media.py
+++ b/tests/test_pipeline_media.py
@@ -24,11 +24,12 @@
class BaseMediaPipelineTestCase(unittest.TestCase):
pipeline_class = MediaPipeline
+ settings = None
def setUp(self):
self.spider ... | null | null | namanjain12/scrapy_final:ecde166ee18935456bcf4c6fce89ab909bbffbaf | true | null | 2 | 41 | null | 1,014 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.305667 | 80.83575 | ||
8,531 | r2e_gym::train::5190 | r2e_gym | train | 5,190 | pyramid__190f82aa2294e340e89e22bbe4fa2ff3788e5cbe | pyramid | pylons/pyramid | python | 190f82aa2294e340e89e22bbe4fa2ff3788e5cbe | **Title:** ConfigurationError Raised When Adding Forbidden or NotFound View Without Specifying a View Callable
**Description:**
When configuring forbidden or notfound views without providing a specific view callable, a `ConfigurationError` is raised instead of using a default exception response view. This behavior fo... | diff --git a/pyramid/config/views.py b/pyramid/config/views.py
--- a/pyramid/config/views.py
+++ b/pyramid/config/views.py
@@ -53,6 +53,7 @@
from pyramid.httpexceptions import (
HTTPForbidden,
HTTPNotFound,
+ default_exceptionresponse_view,
)
from pyramid.registry import (
@@ -1591,9 +1592,12 @@
... | 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
@@ -1783,6 +1783,21 @@
result = view(None, request)
self.assertEqual(result, 'OK')
+ def test_add_forbidden_vi... | null | null | namanjain12/pyramid_final:190f82aa2294e340e89e22bbe4fa2ff3788e5cbe | true | null | 1 | 15 | null | 1,528 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.304667 | 80.83275 | ||
8,532 | r2e_gym::train::157 | r2e_gym | train | 157 | orange3__f813020a9c0a0450df07ba20529b117665426249 | orange3 | biolab/orange3 | python | f813020a9c0a0450df07ba20529b117665426249 | **Title:** `allot` Class Missing `_allot__timer` Attribute Causing Test Failures
**Description:**
When running tests that attempt to patch the `_allot__timer` attribute of the `allot` class, an `AttributeError` is raised because the attribute does not exist. This prevents the tests from properly mocking the timer func... | diff --git a/Orange/util.py b/Orange/util.py
--- a/Orange/util.py
+++ b/Orange/util.py
@@ -216,14 +216,20 @@
The decorator also adds two attributes:
- f.last_call_duration is the duration of the last call (in seconds)
- - f.no_call_before contains the time (time.perf_counter) when the next
- call ... | diff --git a/Orange/tests/test_util.py b/Orange/tests/test_util.py
--- a/Orange/tests/test_util.py
+++ b/Orange/tests/test_util.py
@@ -2,7 +2,7 @@
import time
import os
import unittest
-from unittest.mock import Mock
+from unittest.mock import Mock, patch
import warnings
import numpy as np
@@ -245,6 +245,14 @@
... | null | null | namanjain12/orange3_final:f813020a9c0a0450df07ba20529b117665426249 | true | null | 1 | 16 | null | 1,507 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3045 | 80.83225 | ||
8,533 | r2e_gym::train::4322 | r2e_gym | train | 4,322 | numpy__fdedd16f31ee8f35b500d3585bf934b97154d878 | numpy | numpy/numpy | python | fdedd16f31ee8f35b500d3585bf934b97154d878 | **Title:** `matrix.ravel()` Does Not Accept `order` Parameter, Causing TypeError
**Description:**
When attempting to flatten a matrix using a specific order, passing the `order` argument to the `ravel` method results in a `TypeError`. The `ravel` method should accept the `order` parameter to determine the flattening o... | diff --git a/numpy/matrixlib/defmatrix.py b/numpy/matrixlib/defmatrix.py
--- a/numpy/matrixlib/defmatrix.py
+++ b/numpy/matrixlib/defmatrix.py
@@ -927,24 +927,42 @@
return self.__array__().ravel()
- def ravel(self):
- """
- Return a flattened array.
-
- Refer to `numpy.ravel` for fu... | diff --git a/numpy/matrixlib/tests/test_defmatrix.py b/numpy/matrixlib/tests/test_defmatrix.py
--- a/numpy/matrixlib/tests/test_defmatrix.py
+++ b/numpy/matrixlib/tests/test_defmatrix.py
@@ -386,6 +386,7 @@
assert_array_equal(x[:, [1, 0]], x[:, ::-1])
assert_array_equal(x[[2, 1, 0],:], x[::-1,:])
+
... | null | null | namanjain12/numpy_final:fdedd16f31ee8f35b500d3585bf934b97154d878 | true | null | 1 | 54 | null | 745 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.304167 | 80.83125 | ||
8,534 | r2e_gym::train::4207 | r2e_gym | train | 4,207 | numpy__7ad33a22736ed12a41251be6aa6a6f413143a8c3 | numpy | numpy/numpy | python | 7ad33a22736ed12a41251be6aa6a6f413143a8c3 | **Title:** `genfromtxt` Raises OverflowError on 32-bit Systems with Large Integers and `dtype=None`
**Description:**
When using `numpy.genfromtxt` to parse large integer values on a 32-bit system with `dtype` set to `None`, an `OverflowError` is raised. This prevents the successful reading of datasets containing large... | 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
@@ -162,6 +162,12 @@
compare NaNs as equal by setting ``equal_nan=True``. Subclasses, such as
*np.ma.MaskedArray*, are also preserved now.
+*np.genfromtxt* now handles large... | diff --git a/numpy/lib/tests/test__iotools.py b/numpy/lib/tests/test__iotools.py
--- a/numpy/lib/tests/test__iotools.py
+++ b/numpy/lib/tests/test__iotools.py
@@ -152,17 +152,31 @@
def test_upgrade(self):
"Tests the upgrade method."
+
converter = StringConverter()
assert_equal(converte... | null | null | namanjain12/numpy_final:7ad33a22736ed12a41251be6aa6a6f413143a8c3 | true | null | 2 | 39 | null | 1,044 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.304 | 80.83075 | ||
8,535 | r2e_gym::train::5619 | r2e_gym | train | 5,619 | scrapy__7f927f68e1d3eae71550a48c5484099ca7dd9ce1 | scrapy | scrapy/scrapy | python | 7f927f68e1d3eae71550a48c5484099ca7dd9ce1 | **Title:** TypeError Occurs When Handling Response Bodies Due to Mixing Bytes and Strings
**Description:**
When processing HTTP responses, certain utility functions fail to handle byte strings correctly, leading to type errors. This issue arises when bytes and strings are inadvertently mixed during operations, causing... | diff --git a/scrapy/utils/response.py b/scrapy/utils/response.py
--- a/scrapy/utils/response.py
+++ b/scrapy/utils/response.py
@@ -2,7 +2,6 @@
This module provides some useful functions for working with
scrapy.http.Response objects
"""
-
import os
import re
import weakref
@@ -11,6 +10,7 @@
from twisted.web imp... | diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt
--- a/tests/py3-ignores.txt
+++ b/tests/py3-ignores.txt
@@ -42,7 +42,6 @@
tests/test_utils_iterators.py
tests/test_utils_log.py
tests/test_utils_reqser.py
-tests/test_utils_response.py
tests/test_utils_template.py
tests/test_webclient.py
diff --git a/tes... | null | null | namanjain12/scrapy_final:7f927f68e1d3eae71550a48c5484099ca7dd9ce1 | true | null | 1 | 29 | null | 1,244 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.304 | 80.83075 | ||
8,536 | r2e_gym::train::5251 | r2e_gym | train | 5,251 | pyramid__ae7bcd7cabc53e0b500c6a79f30606e67217ad1d | pyramid | pylons/pyramid | python | ae7bcd7cabc53e0b500c6a79f30606e67217ad1d | ### Title: Setting `response.app_iter` Causes AttributeError with ResponseFactory
### Description
After merging the recent changes, attempts to set `response.app_iter` when the result is iterable are causing unexpected errors. Specifically, when the renderer receives an iterable result, it tries to assign it to `respo... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -64,6 +64,10 @@
a factory that will return a custom ``Response`` class.
See https://github.com/Pylons/pyramid/pull/1499
+- Allow an iterator to be returned from a renderer. Previously it was only
+ possible to return bytes or unicode... | 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
@@ -194,8 +194,8 @@
helper = self._makeOne('loo.foo')
response = helper.render_to_response('values', {},
... | null | null | namanjain12/pyramid_final:ae7bcd7cabc53e0b500c6a79f30606e67217ad1d | true | null | 2 | 8 | null | 1,661 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3035 | 80.82925 | ||
8,537 | r2e_gym::train::5762 | r2e_gym | train | 5,762 | scrapy__489c76b83ef8bccd04f113964a346951f3cff1f4 | scrapy | scrapy/scrapy | python | 489c76b83ef8bccd04f113964a346951f3cff1f4 | **Title:** RedirectMiddleware Ignores `handle_httpstatus` Meta Keys, Causing TypeError on Response Processing
**Description:**
When using `RedirectMiddleware`, setting `handle_httpstatus_list` or `handle_httpstatus_all` in the request's meta should prevent the middleware from processing certain HTTP status codes. Howe... | diff --git a/docs/topics/downloader-middleware.rst b/docs/topics/downloader-middleware.rst
--- a/docs/topics/downloader-middleware.rst
+++ b/docs/topics/downloader-middleware.rst
@@ -724,6 +724,12 @@
class MySpider(CrawlSpider):
handle_httpstatus_list = [301, 302]
+The ``handle_httpstatus_list`` key of ... | 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
@@ -138,6 +138,17 @@
rsp = Response(url, headers={'Location': url2}, status=301)
r = self.mw.proces... | null | null | namanjain12/scrapy_final:489c76b83ef8bccd04f113964a346951f3cff1f4 | true | null | 2 | 10 | null | 1,619 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.303167 | 80.82825 | ||
8,538 | r2e_gym::train::6604 | r2e_gym | train | 6,604 | pillow__5c9bc6517f8f37c613fa963092546dc15423a2a4 | pillow | python-pillow/pillow | python | 5c9bc6517f8f37c613fa963092546dc15423a2a4 | **Title:** Unable to Open BMP Images with RLE4 Compression
**Description:**
When attempting to open BMP images that use RLE4 compression, an error is raised indicating that the compression type is unsupported. This prevents users from working with BMP images that utilize this compression method.
**Example Code:**
```... | diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst
--- a/docs/handbook/image-file-formats.rst
+++ b/docs/handbook/image-file-formats.rst
@@ -45,9 +45,9 @@
^^^
Pillow reads and writes Windows and OS/2 BMP files containing ``1``, ``L``, ``P``,
-or ``RGB`` data. 16-colour images a... | diff --git a/Tests/test_file_bmp.py b/Tests/test_file_bmp.py
--- a/Tests/test_file_bmp.py
+++ b/Tests/test_file_bmp.py
@@ -174,6 +174,11 @@
with Image.open(io.BytesIO(data)) as im:
with pytest.raises(ValueError):
im.load()
+
+
+def test_rle4():
+ with Image.open("Tests/images/b... | null | null | namanjain12/pillow_final:5c9bc6517f8f37c613fa963092546dc15423a2a4 | true | null | 2 | 50 | null | 818 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.303 | 80.82775 | ||
8,539 | r2e_gym::train::4515 | r2e_gym | train | 4,515 | numpy__26a02cd702d9ccfc48978dcf81c80225f324bf3b | numpy | numpy/numpy | python | 26a02cd702d9ccfc48978dcf81c80225f324bf3b | **Title**: `as_strided()` Raises TypeError When Using `subok` with ndarray Subclasses
**Description**
When attempting to use the `as_strided` function with subclasses of `numpy.ndarray` and passing the `subok=True` argument, a `TypeError` is raised because the `subok` parameter is not recognized.
**Example Code**
```... | diff --git a/numpy/lib/stride_tricks.py b/numpy/lib/stride_tricks.py
--- a/numpy/lib/stride_tricks.py
+++ b/numpy/lib/stride_tricks.py
@@ -20,7 +20,7 @@
self.__array_interface__ = interface
self.base = base
-def as_strided(x, shape=None, strides=None):
+def as_strided(x, shape=None, strides=None, su... | diff --git a/numpy/lib/tests/test_stride_tricks.py b/numpy/lib/tests/test_stride_tricks.py
--- a/numpy/lib/tests/test_stride_tricks.py
+++ b/numpy/lib/tests/test_stride_tricks.py
@@ -3,7 +3,7 @@
import numpy as np
from numpy.testing import (
run_module_suite, assert_equal, assert_array_equal,
- assert_raises
... | null | null | namanjain12/numpy_final:26a02cd702d9ccfc48978dcf81c80225f324bf3b | true | null | 1 | 24 | null | 1,330 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.301667 | 80.82375 | ||
8,540 | r2e_gym::train::5231 | r2e_gym | train | 5,231 | pyramid__5688b6e76ba8059826ba6ff756b3e94b311320d2 | pyramid | pylons/pyramid | python | 5688b6e76ba8059826ba6ff756b3e94b311320d2 | Title: Basic Authentication Fails with Non-ASCII Encoded Credentials
**Description**
When using Basic Authentication with credentials that include non-ASCII characters, the authentication process fails due to a decoding error. The system attempts to decode the Base64-encoded credentials using ASCII, which does not su... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -50,6 +50,12 @@
See https://github.com/Pylons/pyramid/issues/1104
- Remove unused ``renderer`` argument from ``Configurator.add_route``.
+
+- Allow the ``BasicAuthenticationPolicy`` to work with non-ascii usernames
+ and passwords. The... | diff --git a/pyramid/tests/test_authentication.py b/pyramid/tests/test_authentication.py
--- a/pyramid/tests/test_authentication.py
+++ b/pyramid/tests/test_authentication.py
@@ -1373,6 +1373,32 @@
return []
policy = self._makeOne(check)
self.assertEqual(policy.authenticated_userid(reques... | null | null | namanjain12/pyramid_final:5688b6e76ba8059826ba6ff756b3e94b311320d2 | true | null | 2 | 15 | null | 1,508 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.301333 | 80.82275 | ||
8,541 | r2e_gym::train::5224 | r2e_gym | train | 5,224 | pyramid__6b180cbb77d6c5bee0e75220d93fc1800d1217df | pyramid | pylons/pyramid | python | 6b180cbb77d6c5bee0e75220d93fc1800d1217df | **Title:** `Configurator` Lacks `add_permission` Method, Causing AttributeError
**Description:**
When attempting to register a standalone permission using the `add_permission` directive, an `AttributeError` is raised because the `Configurator` does not have the `add_permission` method defined. This prevents frameworks... | diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -85,3 +85,18 @@
- When there is a predicate mismatch exception (seen when no view matches for
a given request due to predicates not working), the exception now contains
a textual description of the predicate which didn't match.
+
+- An... | diff --git a/pyramid/tests/test_config/test_security.py b/pyramid/tests/test_config/test_security.py
--- a/pyramid/tests/test_config/test_security.py
+++ b/pyramid/tests/test_config/test_security.py
@@ -89,3 +89,12 @@
self.assertEqual(config.registry.getUtility(IDefaultPermission),
'v... | null | null | namanjain12/pyramid_final:6b180cbb77d6c5bee0e75220d93fc1800d1217df | true | null | 3 | 36 | null | 1,087 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.301167 | 80.82225 | ||
8,542 | r2e_gym::train::79 | r2e_gym | train | 79 | orange3__91b7fcba46404c556fe1a46191bde463f6764d4f | orange3 | biolab/orange3 | python | 91b7fcba46404c556fe1a46191bde463f6764d4f | **Title**: PLS Regression Without Scaling Results in Incorrect Coefficients Shape and Missing Scale Attribute
**Description**
When the scaling option is disabled in the PLSRegression widget, the coefficients data output has an incorrect shape, and the widget lacks the 'scale' attribute. This leads to inconsistencies ... | diff --git a/Orange/widgets/model/owpls.py b/Orange/widgets/model/owpls.py
--- a/Orange/widgets/model/owpls.py
+++ b/Orange/widgets/model/owpls.py
@@ -33,6 +33,7 @@
n_components = Setting(2)
max_iter = Setting(500)
+ scale = Setting(True)
def add_main_layout(self):
optimization_box = gui.... | diff --git a/Orange/widgets/model/tests/test_owpls.py b/Orange/widgets/model/tests/test_owpls.py
--- a/Orange/widgets/model/tests/test_owpls.py
+++ b/Orange/widgets/model/tests/test_owpls.py
@@ -34,41 +34,50 @@
self.send_signal(self.widget.Inputs.data, self._data)
coefsdata = self.get_output(self.widg... | null | null | namanjain12/orange3_final:91b7fcba46404c556fe1a46191bde463f6764d4f | true | null | 1 | 30 | null | 1,206 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.301 | 80.82175 | ||
8,543 | r2e_gym::train::5544 | r2e_gym | train | 5,544 | aiohttp__9bfc8660ff2fcb80437e644ddbc26ebb44f921ee | aiohttp | aio-libs/aiohttp | python | 9bfc8660ff2fcb80437e644ddbc26ebb44f921ee | **Title:** Inconsistent Error Handling When Adding Static Paths with Invalid Directories
**Description:**
When adding a static path using a directory that either does not exist or is not a directory, the system raises unclear and inconsistent error messages. This makes it difficult to identify the exact issue and lead... | diff --git a/CHANGES/8491.misc.rst b/CHANGES/8491.misc.rst
--- a/CHANGES/8491.misc.rst
+++ b/CHANGES/8491.misc.rst
@@ -0,0 +1 @@
+Simplified path checks for ``UrlDispatcher.add_static()`` method -- by :user:`steverep`.
diff --git a/aiohttp/web_urldispatcher.py b/aiohttp/web_urldispatcher.py
--- a/aiohttp/web_urldispatc... | diff --git a/tests/test_urldispatch.py b/tests/test_urldispatch.py
--- a/tests/test_urldispatch.py
+++ b/tests/test_urldispatch.py
@@ -337,6 +337,21 @@
url = route2.url_for(name="John")
assert "/get/John" == str(url)
assert route is route2
+
+
+def test_add_static_path_checks(router: any, tmp_path: pathl... | null | null | namanjain12/aiohttp_final:9bfc8660ff2fcb80437e644ddbc26ebb44f921ee | true | null | 2 | 14 | null | 1,525 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.300833 | 80.82125 | ||
8,544 | r2e_gym::train::5939 | r2e_gym | train | 5,939 | tornado__44e28cf32ca120189026b55395587415e731f905 | tornado | tornadoweb/tornado | python | 44e28cf32ca120189026b55395587415e731f905 | **Issue Title:**
Creating Multiple IOLoop Instances with the Same asyncio Loop Does Not Raise an Error
**Issue Description:**
When attempting to associate multiple `IOLoop` instances with the same `asyncio` loop, no error is raised. This behavior can lead to conflicts and unexpected issues within the application.
**... | diff --git a/tornado/platform/asyncio.py b/tornado/platform/asyncio.py
--- a/tornado/platform/asyncio.py
+++ b/tornado/platform/asyncio.py
@@ -129,6 +129,14 @@
del IOLoop._ioloop_for_asyncio[loop]
except KeyError:
pass
+
+ # Make sure we don't already ha... | 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
@@ -432,6 +432,9 @@
asyncio_loop = asyncio.new_event_loop()
loop = IOLoop(asyncio_loop=asyncio_loop, make_current=False)
assert loop.asyncio_loop is async... | null | null | namanjain12/tornado_final:44e28cf32ca120189026b55395587415e731f905 | true | null | 1 | 8 | null | 1,644 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.300667 | 80.82075 | ||
8,545 | r2e_gym::train::312 | r2e_gym | train | 312 | orange3__4828c557ac3c69073869ec78a9afe8bb39db32a5 | orange3 | biolab/orange3 | python | 4828c557ac3c69073869ec78a9afe8bb39db32a5 | **Title:** `encode_setting` Raises TypeError When Handling Deprecated String Variable Settings
**Description:**
When attempting to encode settings that use variables stored as strings, the `encode_setting` method raises a `TypeError` due to a missing required argument. This issue prevents the proper handling of deprec... | diff --git a/Orange/widgets/settings.py b/Orange/widgets/settings.py
--- a/Orange/widgets/settings.py
+++ b/Orange/widgets/settings.py
@@ -937,6 +937,13 @@
.format(name), OrangeDeprecationWarning
)
+ @staticmethod
+ def _warn_about_str_var_settings(setting):
+ warnings.warn(... | diff --git a/Orange/widgets/tests/test_domain_context_handler.py b/Orange/widgets/tests/test_domain_context_handler.py
--- a/Orange/widgets/tests/test_domain_context_handler.py
+++ b/Orange/widgets/tests/test_domain_context_handler.py
@@ -1,14 +1,17 @@
import warnings
+from distutils.version import LooseVersion
from ... | null | null | namanjain12/orange3_final:4828c557ac3c69073869ec78a9afe8bb39db32a5 | true | null | 1 | 30 | null | 1,203 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.3005 | 80.82025 | ||
8,546 | r2e_gym::train::6036 | r2e_gym | train | 6,036 | tornado__9ba61c636899ed0f7472fb2f4975a53720d1b0ff | tornado | tornadoweb/tornado | python | 9ba61c636899ed0f7472fb2f4975a53720d1b0ff | **Title:** `network_interface` Parameter Not Supported by `SimpleAsyncHTTPClient`
**Description:**
When attempting to use the `network_interface` parameter with `SimpleAsyncHTTPClient`, it raises a `NotImplementedError`. This prevents binding HTTP requests to a specific local IP address, which is necessary for certain... | diff --git a/tornado/httpclient.py b/tornado/httpclient.py
--- a/tornado/httpclient.py
+++ b/tornado/httpclient.py
@@ -422,8 +422,8 @@
New in Tornado 4.0.
:arg bool use_gzip: Deprecated alias for ``decompress_response``
since Tornado 4.0.
- :arg str network_interface: Network int... | 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
@@ -467,6 +467,18 @@
response2 = yield self.http_client.fetch(response.request)
self.assertEqual(response2.body, b"Hello world!")
+ @gen_test
... | null | null | namanjain12/tornado_final:9ba61c636899ed0f7472fb2f4975a53720d1b0ff | true | null | 2 | 23 | null | 1,342 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.300333 | 80.81975 | ||
8,547 | r2e_gym::train::4193 | r2e_gym | train | 4,193 | numpy__ba9f93d8ad9763ef9867bac5761a40fa4770aa82 | numpy | numpy/numpy | python | ba9f93d8ad9763ef9867bac5761a40fa4770aa82 | **Title:** `array_equal` Does Not Support `equal_nan` Keyword Argument
**Description:**
When using the `equal_nan` keyword argument with `numpy.array_equal`, a `TypeError` is raised because the function does not recognize the argument. This prevents the comparison of arrays containing `NaN` values as equal when `equal... | diff --git a/doc/release/upcoming_changes/16128.new_feature.rst b/doc/release/upcoming_changes/16128.new_feature.rst
--- a/doc/release/upcoming_changes/16128.new_feature.rst
+++ b/doc/release/upcoming_changes/16128.new_feature.rst
@@ -0,0 +1,6 @@
+``equal_nan`` parameter for `numpy.array_equal`
+-----------------------... | diff --git a/numpy/core/tests/test_numeric.py b/numpy/core/tests/test_numeric.py
--- a/numpy/core/tests/test_numeric.py
+++ b/numpy/core/tests/test_numeric.py
@@ -1445,6 +1445,36 @@
np.array([('a', 1)], dtype='S1,u4'))
assert_(res)
assert_(type(res) is bool)
+
+ def te... | null | null | namanjain12/numpy_final:ba9f93d8ad9763ef9867bac5761a40fa4770aa82 | true | null | 2 | 42 | null | 957 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2995 | 80.81725 | ||
8,548 | r2e_gym::train::183 | r2e_gym | train | 183 | orange3__84eafd2dd232faaac7745e0a6efbef1c7f4fbbfb | orange3 | biolab/orange3 | python | 84eafd2dd232faaac7745e0a6efbef1c7f4fbbfb | **Title:** Scatter Plot Widget Fails When Input Features Include Hidden Attributes
**Description:**
When providing input data that contains hidden features to the Scatter Plot widget, the widget fails to handle these hidden attributes properly. This results in an error when attempting to set the X and Y attributes, ca... | diff --git a/Orange/widgets/visualize/owscatterplot.py b/Orange/widgets/visualize/owscatterplot.py
--- a/Orange/widgets/visualize/owscatterplot.py
+++ b/Orange/widgets/visualize/owscatterplot.py
@@ -526,6 +526,7 @@
def can_draw_regresssion_line(self):
return self.data is not None and \
sel... | diff --git a/Orange/widgets/visualize/tests/test_owscatterplot.py b/Orange/widgets/visualize/tests/test_owscatterplot.py
--- a/Orange/widgets/visualize/tests/test_owscatterplot.py
+++ b/Orange/widgets/visualize/tests/test_owscatterplot.py
@@ -346,6 +346,38 @@
self.assertFalse(self.widget.vizrank.isEnabled())
... | null | null | namanjain12/orange3_final:84eafd2dd232faaac7745e0a6efbef1c7f4fbbfb | true | null | 1 | 14 | null | 1,514 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.299 | 80.81575 | ||
8,549 | r2e_gym::train::4722 | r2e_gym | train | 4,722 | numpy__9babf6596876be7be02e823688a2b359756e27f3 | numpy | numpy/numpy | python | 9babf6596876be7be02e823688a2b359756e27f3 | **Title:** Vectorize Raises ValueError with Default Keyword Arguments in Varying Call Orders
**Description:**
When using `numpy.vectorize` on functions that have default keyword arguments, calling the vectorized function with and without specifying these keywords in different orders leads to unexpected `ValueError` ex... | 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
@@ -2050,7 +2050,7 @@
self.pyfunc = pyfunc
self.cache = cache
self.signature = signature
- self._ufunc = None # Caching to improve default performan... | 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
@@ -3,6 +3,7 @@
import sys
import decimal
from fractions import Fraction
+import math
import pytest
import numpy as np
@@ -1221,6 +122... | null | null | namanjain12/numpy_final:9babf6596876be7be02e823688a2b359756e27f3 | true | null | 1 | 24 | null | 1,313 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.298833 | 80.81525 | ||
8,550 | swe_bench::test::54 | swe_bench | test | 54 | astropy__astropy-14379 | astropy/astropy | astropy/astropy | python | 01c96c8cf1289c25172d538e1309f89cac88d41c | Space between value and unit
Currently, ``Angle.to_string`` doesn't include a space between the value and unit:
```python
In [30]: from astropy.coordinates import Angle
In [31]: a = Angle(3, 'deg')
In [32]: a.to_string(unit='mas')
Out[32]: '1.08e+07mas'
```
I think there are cases where it would make sense to allow... | isn't it good form to always have a space between the value and the unit?
:+1: for consistency between Quantity and Angle (by having space as default).
However, if you worry about backward compatibility, maybe instead add an option for "old style" (without space), but would that be useful for anyone?
Well the one pl... | diff --git a/astropy/coordinates/angles.py b/astropy/coordinates/angles.py
--- a/astropy/coordinates/angles.py
+++ b/astropy/coordinates/angles.py
@@ -314,10 +314,21 @@ def to_string(
)
func = ("{:g}" if precision is None else f"{{0:0.{precision}f}}").format
# Don't add unit b... | diff --git a/astropy/coordinates/tests/test_angles.py b/astropy/coordinates/tests/test_angles.py
--- a/astropy/coordinates/tests/test_angles.py
+++ b/astropy/coordinates/tests/test_angles.py
@@ -352,7 +352,7 @@ def string(self, unit=DEGREE, decimal=False, sep=" ", precision=5,
f"Angle as DMS: {angle.to_string(... | ["astropy/coordinates/tests/test_angles.py::test_angle_formatting", "astropy/coordinates/tests/test_angles.py::test_angle_string", "astropy/coordinates/tests/test_angles.py::test_str_repr_angles_nan[input9-[nan", "astropy/coordinates/tests/test_angles.py::test_str_repr_angles_nan[input10-[1.5", "astropy/coordinates/tes... | ["astropy/coordinates/tests/test_angles.py::test_create_angles", "astropy/coordinates/tests/test_angles.py::test_angle_from_view", "astropy/coordinates/tests/test_angles.py::test_angle_ops", "astropy/coordinates/tests/test_angles.py::test_angle_methods", "astropy/coordinates/tests/test_angles.py::test_angle_convert", "... | null | true | 2023-02-13T20:28:24Z | 1 | 13 | 7 | 619 | 0 | 0.8 | 1 | 0.55 | 1 | 0.1465 | 80.8145 | |
8,551 | r2e_gym::train::5193 | r2e_gym | train | 5,193 | pyramid__4a7029f6b313b65ba94d0726042ea3adbad38e81 | pyramid | pylons/pyramid | python | 4a7029f6b313b65ba94d0726042ea3adbad38e81 | **Title:** Passing Unbound Methods as Views Without Specifying 'attr' Raises ImportError
**Description:**
When configuring a view by passing an unbound method without specifying the `attr` parameter, an `ImportError` is raised because `is_unbound_method` cannot be imported from `pyramid.compat`. This prevents proper ... | diff --git a/pyramid/compat.py b/pyramid/compat.py
--- a/pyramid/compat.py
+++ b/pyramid/compat.py
@@ -244,3 +244,20 @@
def is_bound_method(ob):
return inspect.ismethod(ob) and getattr(ob, im_self, None) is not None
+def is_unbound_method(fn):
+ """
+ This consistently verifies that the callable is bound ... | diff --git a/pyramid/tests/test_compat.py b/pyramid/tests/test_compat.py
--- a/pyramid/tests/test_compat.py
+++ b/pyramid/tests/test_compat.py
@@ -0,0 +1,46 @@
+import unittest
+
+class TestUnboundMethods(unittest.TestCase):
+ def test_old_style_bound(self):
+ from pyramid.compat import is_unbound_method
+
+ ... | null | null | namanjain12/pyramid_final:4a7029f6b313b65ba94d0726042ea3adbad38e81 | true | null | 2 | 32 | null | 1,144 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.297333 | 80.81075 | ||
8,552 | swe_bench::test::1195 | swe_bench | test | 1,195 | psf__requests-3362 | psf/requests | psf/requests | python | 36453b95b13079296776d11b09cab2567ea3e703 | Uncertain about content/text vs iter_content(decode_unicode=True/False)
When requesting an application/json document, I'm seeing `next(r.iter_content(16*1024, decode_unicode=True))` returning bytes, whereas `r.text` returns unicode. My understanding was that both should return a unicode object. In essence, I thought "i... | what does (your response object).encoding return?
There's at least one key difference: `decode_unicode=True` doesn't fall back to `apparent_encoding`, which means it'll never autodetect the encoding. This means if `response.encoding` is None it is a no-op: in fact, it's a no-op that yields bytes.
That behaviour seems... | diff --git a/requests/utils.py b/requests/utils.py
--- a/requests/utils.py
+++ b/requests/utils.py
@@ -358,13 +358,20 @@ def get_encoding_from_headers(headers):
def stream_decode_response_unicode(iterator, r):
"""Stream decodes a iterator."""
+ encoding = r.encoding
- if r.encoding is None:
- for... | diff --git a/tests/test_requests.py b/tests/test_requests.py
--- a/tests/test_requests.py
+++ b/tests/test_requests.py
@@ -980,6 +980,13 @@ def test_response_decode_unicode(self):
chunks = r.iter_content(decode_unicode=True)
assert all(isinstance(chunk, str) for chunk in chunks)
+ # check for... | ["tests/test_requests.py::TestRequests::test_response_decode_unicode"] | ["tests/test_requests.py::TestRequests::test_entry_points", "tests/test_requests.py::TestRequests::test_invalid_url[MissingSchema-hiwpefhipowhefopw]", "tests/test_requests.py::TestRequests::test_invalid_url[InvalidSchema-localhost:3128]", "tests/test_requests.py::TestRequests::test_invalid_url[InvalidSchema-localhost.l... | null | true | 2016-06-24T13:31:31Z | 1 | 17 | 1 | 529 | 0 | 0.8 | 1 | 0.55 | 1 | 0.144833 | 80.8095 | |
8,553 | r2e_gym::train::6424 | r2e_gym | train | 6,424 | pillow__40eceec70db497385eb00b649288e326cc2da12e | pillow | python-pillow/pillow | python | 40eceec70db497385eb00b649288e326cc2da12e | **Title:** AttributeError: ImageOps module has no attribute "contain"
**Description:**
When attempting to use the `contain` method from the `ImageOps` module to resize an image, an `AttributeError` is raised indicating that the `contain` attribute does not exist in `ImageOps`.
**Example Code:**
```python
from PIL imp... | diff --git a/src/PIL/ImageOps.py b/src/PIL/ImageOps.py
--- a/src/PIL/ImageOps.py
+++ b/src/PIL/ImageOps.py
@@ -236,6 +236,34 @@
return _lut(image, red + green + blue)
+def contain(image, size, method=Image.BICUBIC):
+ """
+ Returns a sized version of the image, expanded to fill the requested aspect ratio... | diff --git a/Tests/test_imageops.py b/Tests/test_imageops.py
--- a/Tests/test_imageops.py
+++ b/Tests/test_imageops.py
@@ -36,6 +36,9 @@
ImageOps.pad(hopper("L"), (128, 128))
ImageOps.pad(hopper("RGB"), (128, 128))
+
+ ImageOps.contain(hopper("L"), (128, 128))
+ ImageOps.contain(hopper("RGB"), (128, 1... | null | null | namanjain12/pillow_final:40eceec70db497385eb00b649288e326cc2da12e | true | null | 1 | 54 | null | 700 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.296667 | 80.80875 | ||
8,554 | r2e_gym::train::32 | r2e_gym | train | 32 | orange3__91ad02f1eed16fcc6d445cb1013a5832a8a9a907 | orange3 | biolab/orange3 | python | 91ad02f1eed16fcc6d445cb1013a5832a8a9a907 | **Title:** SelectRows widget fails to save meta variables in context
**Description:**
When configuring the SelectRows widget with conditions that include meta variables, the widget does not correctly save these meta variables in its context. As a result, when the widget receives the same data again, it fails to restor... | diff --git a/Orange/widgets/data/owselectrows.py b/Orange/widgets/data/owselectrows.py
--- a/Orange/widgets/data/owselectrows.py
+++ b/Orange/widgets/data/owselectrows.py
@@ -62,8 +62,13 @@
values = [QLocale().toDouble(v)[0] for v in values]
elif isinstance(attr, DiscreteVariable):... | diff --git a/Orange/widgets/data/tests/test_owselectrows.py b/Orange/widgets/data/tests/test_owselectrows.py
--- a/Orange/widgets/data/tests/test_owselectrows.py
+++ b/Orange/widgets/data/tests/test_owselectrows.py
@@ -518,6 +518,36 @@
expected = (expected == 2).astype(float)
np.testing.assert_equal(o... | null | null | namanjain12/orange3_final:91ad02f1eed16fcc6d445cb1013a5832a8a9a907 | true | null | 1 | 9 | null | 1,590 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.295 | 80.80375 | ||
8,555 | r2e_gym::train::5149 | r2e_gym | train | 5,149 | pyramid__83a3fcec68bfa998bce7f69f61bc2e4ec4a31da1 | pyramid | pylons/pyramid | python | 83a3fcec68bfa998bce7f69f61bc2e4ec4a31da1 | **Title:** `urlencode` Function Does Not Accept `quote_via` Argument, Raising TypeError
**Description:**
When trying to use a custom quoting function with the `urlencode` method by passing the `quote_via` argument, a `TypeError` is raised. This prevents the use of alternative quoting mechanisms, limiting flexibility i... | diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -304,3 +304,5 @@
- Fang-Pen Lin, 2017/05/22
- Volker Diels-Grabsch, 2017/06/09
+
+- Denis Rykov, 2017/06/15
diff --git a/pyramid/encode.py b/pyramid/encode.py
--- a/pyramid/encode.py
+++ b/pyramid/encode.py
@@ -14,13 +... | diff --git a/pyramid/tests/test_encode.py b/pyramid/tests/test_encode.py
--- a/pyramid/tests/test_encode.py
+++ b/pyramid/tests/test_encode.py
@@ -5,9 +5,9 @@
)
class UrlEncodeTests(unittest.TestCase):
- def _callFUT(self, query, doseq=False):
+ def _callFUT(self, query, doseq=False, **kw):
from ... | null | null | namanjain12/pyramid_final:83a3fcec68bfa998bce7f69f61bc2e4ec4a31da1 | true | null | 2 | 47 | null | 823 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.293833 | 80.80025 | ||
8,556 | swe_bench::test::1435 | swe_bench | test | 1,435 | pytest-dev__pytest-7231 | pytest-dev/pytest | pytest-dev/pytest | python | 85a06cfafbe49f2c56e22cef4fa88adcf7b54f59 | warn when logging fails
```python
def func():
logging.error("%s" , "a", "b")
def test_func():
func()
```
Now an expectation will be thrown and written on the output... but no warning is thrown... so the test run can't be marked as failed. 🤔 | this is the logging default behaviour
```pycon
>>> import logging
>>> logging.error("%s" , "a", "b")
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib64/python3.7/logging/__init__.py", line 1025, in emit
msg = self.format(record)
File "/usr/lib64/python3.7/logging/__init__.py", l... | diff --git a/src/_pytest/logging.py b/src/_pytest/logging.py
--- a/src/_pytest/logging.py
+++ b/src/_pytest/logging.py
@@ -312,6 +312,14 @@ def reset(self) -> None:
self.records = []
self.stream = StringIO()
+ def handleError(self, record: logging.LogRecord) -> None:
+ if logging.raiseExce... | diff --git a/testing/logging/test_reporting.py b/testing/logging/test_reporting.py
--- a/testing/logging/test_reporting.py
+++ b/testing/logging/test_reporting.py
@@ -3,6 +3,7 @@
import re
import pytest
+from _pytest.pytester import Testdir
def test_nothing_logged(testdir):
@@ -1101,3 +1102,48 @@ def test_foo(... | ["testing/logging/test_reporting.py::test_logging_emit_error"] | ["[100%]", "[", "[100%]------------------------------", "testing/logging/test_reporting.py::test_live_logging_suspends_capture[True]", "testing/logging/test_reporting.py::test_live_logging_suspends_capture[False]", "testing/logging/test_reporting.py::test_nothing_logged", "testing/logging/test_reporting.py::test_messag... | null | true | 2020-05-19T08:17:40Z | 1 | 30 | 1 | 250 | 0 | 0.8 | 1 | 0.55 | 1 | 0.141667 | 80.8 | |
8,557 | r2e_gym::train::6159 | r2e_gym | train | 6,159 | pillow__3fdaecb0255abab55d7269fc80b26e532307886c | pillow | python-pillow/pillow | python | 3fdaecb0255abab55d7269fc80b26e532307886c | **Title:** AttributeError: 'PIL.Image' object has no attribute 'WARN_POSSIBLE_FORMATS' when enabling verbose format warnings
**Description:**
Attempting to enable verbose warnings for possible image formats results in an `AttributeError`. This prevents developers from receiving detailed warnings when opening images wi... | diff --git a/docs/reference/Image.rst b/docs/reference/Image.rst
--- a/docs/reference/Image.rst
+++ b/docs/reference/Image.rst
@@ -381,6 +381,11 @@
Set to 89,478,485, approximately 0.25GB for a 24-bit (3 bpp) image.
See :py:meth:`~PIL.Image.open` for more information about how this is used.
+.. data:: WARN_... | diff --git a/Tests/test_image.py b/Tests/test_image.py
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -131,6 +131,15 @@
with Image.open(file, formats=None) as im:
assert im.mode == "RGB"
assert im.size == (128, 128)
+
+ def test_open_verbose_failure(self, monkey... | null | null | namanjain12/pillow_final:3fdaecb0255abab55d7269fc80b26e532307886c | true | null | 2 | 21 | null | 1,342 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.293667 | 80.79975 | ||
8,558 | r2e_gym::train::74 | r2e_gym | train | 74 | orange3__78406f9e22e20923b311def5561673b53cf8de1c | orange3 | biolab/orange3 | python | 78406f9e22e20923b311def5561673b53cf8de1c | **Title:** Error When Appending Data Due to Duplicate 'Source ID' Variable Names
**Description:**
When trying to append a new data instance to existing data, the system creates duplicate 'Source ID' variables. This duplication leads to conflicts within the domain object, resulting in errors that prevent successful dat... | diff --git a/Orange/widgets/data/owcreateinstance.py b/Orange/widgets/data/owcreateinstance.py
--- a/Orange/widgets/data/owcreateinstance.py
+++ b/Orange/widgets/data/owcreateinstance.py
@@ -16,6 +16,7 @@
from Orange.data import DiscreteVariable, ContinuousVariable, \
TimeVariable, Table, StringVariable, Variab... | diff --git a/Orange/widgets/data/tests/test_owcreateinstance.py b/Orange/widgets/data/tests/test_owcreateinstance.py
--- a/Orange/widgets/data/tests/test_owcreateinstance.py
+++ b/Orange/widgets/data/tests/test_owcreateinstance.py
@@ -54,6 +54,8 @@
self.assertIn("Source ID", [m.name for m in output.domain.meta... | null | null | namanjain12/orange3_final:78406f9e22e20923b311def5561673b53cf8de1c | true | null | 1 | 20 | null | 1,359 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.293167 | 80.79825 | ||
8,559 | r2e_gym::train::5500 | r2e_gym | train | 5,500 | aiohttp__7fd5e73eb44d3f6a5df807d2393d46481a8c1c56 | aiohttp | aio-libs/aiohttp | python | 7fd5e73eb44d3f6a5df807d2393d46481a8c1c56 | **Title:** AttributeError When Adding Query Params with Older yarl Versions
**Description:**
When using `aiohttp` with `yarl` versions earlier than 1.11, attempting to add query parameters to a `ClientRequest` results in an `AttributeError`. This occurs because the internal flag `_YARL_SUPPORTS_EXTEND_QUERY` is not de... | diff --git a/CHANGES/9068.misc.rst b/CHANGES/9068.misc.rst
--- a/CHANGES/9068.misc.rst
+++ b/CHANGES/9068.misc.rst
@@ -0,0 +1,3 @@
+Use :meth:`URL.extend_query() <yarl.URL.extend_query>` to extend query params (requires yarl 1.11.0+) -- by :user:`bdraco`.
+
+If yarl is older than 1.11.0, the previous slower hand rolled... | diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py
--- a/tests/test_client_functional.py
+++ b/tests/test_client_functional.py
@@ -20,7 +20,7 @@
from yarl import URL
import aiohttp
-from aiohttp import Fingerprint, ServerFingerprintMismatch, hdrs, web
+from aiohttp import Fingerprint, Se... | null | null | namanjain12/aiohttp_final:7fd5e73eb44d3f6a5df807d2393d46481a8c1c56 | true | null | 2 | 17 | null | 1,415 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2925 | 80.79625 | ||
8,560 | r2e_gym::train::4278 | r2e_gym | train | 4,278 | numpy__e3ed705e5d91b584e9191a20f3a4780d354271ff | numpy | numpy/numpy | python | e3ed705e5d91b584e9191a20f3a4780d354271ff | **Title: Reduction Functions Fail to Detect Duplicate Axes with Negative Indices**
**Description**
When using reduction functions like `np.percentile` or `np.median` with multiple axes, specifying negative axis indices can lead to duplicate axes not being properly detected. This causes the functions to raise unexpecte... | 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
@@ -12,7 +12,7 @@
from numpy.core.numeric import (
ones, zeros, arange, concatenate, array, asarray, asanyarray, empty,
empty_like, ndarray, around, floor, ceil, take, dot, w... | 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
@@ -2973,11 +2973,14 @@
def test_extended_axis_invalid(self):
d = np.ones((3, 5, 7, 11))
- assert_raises(IndexError, n... | null | null | namanjain12/numpy_final:e3ed705e5d91b584e9191a20f3a4780d354271ff | true | null | 1 | 31 | null | 1,133 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.292167 | 80.79525 | ||
8,561 | r2e_gym::train::5686 | r2e_gym | train | 5,686 | scrapy__8307c1212f48c83faf1f331f0bcafb439dbeb89c | scrapy | scrapy/scrapy | python | 8307c1212f48c83faf1f331f0bcafb439dbeb89c | **Title:** ExecutionEngine.close() Method Missing, Causing AttributeError on Shutdown
**Description:**
When attempting to gracefully shut down the execution engine, calling the `close()` method on an `ExecutionEngine` instance results in an `AttributeError`. This prevents proper closure of spiders and the downloader, ... | diff --git a/scrapy/core/engine.py b/scrapy/core/engine.py
--- a/scrapy/core/engine.py
+++ b/scrapy/core/engine.py
@@ -83,6 +83,21 @@
self.running = False
dfd = self._close_all_spiders()
return dfd.addBoth(lambda _: self._finish_stopping_engine())
+
+ def close(self):
+ """Close the... | diff --git a/tests/test_crawl.py b/tests/test_crawl.py
--- a/tests/test_crawl.py
+++ b/tests/test_crawl.py
@@ -226,3 +226,24 @@
s = dict(est[0])
self.assertEqual(s['engine.spider.name'], crawler.spider.name)
self.assertEqual(s['len(engine.scraper.slot.active)'], 1)
+
+ @defer.inlineCallbac... | null | null | namanjain12/scrapy_final:8307c1212f48c83faf1f331f0bcafb439dbeb89c | true | null | 2 | 20 | null | 1,352 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.292 | 80.79475 | ||
8,562 | r2e_gym::train::5083 | r2e_gym | train | 5,083 | pyramid__e1d1af88e314fe59d9197182f8c2b56ecdcbd115 | pyramid | pylons/pyramid | python | e1d1af88e314fe59d9197182f8c2b56ecdcbd115 | **Title:** Tests Fail with ImportError After Updating `pshell.py` Due to Missing `setup_logging`
**Description:**
After updating the `pshell.py` module, several tests are failing because they attempt to import `setup_logging` from `pyramid.scripts.common`, which has been removed in the latest commit.
**Example Buggy ... | diff --git a/pyramid/scripts/pshell.py b/pyramid/scripts/pshell.py
--- a/pyramid/scripts/pshell.py
+++ b/pyramid/scripts/pshell.py
@@ -5,15 +5,14 @@
import textwrap
import pkg_resources
-from pyramid.compat import configparser
from pyramid.compat import exec_
from pyramid.util import DottedNameResolver
from pyra... | diff --git a/pyramid/tests/test_scripts/test_pshell.py b/pyramid/tests/test_scripts/test_pshell.py
--- a/pyramid/tests/test_scripts/test_pshell.py
+++ b/pyramid/tests/test_scripts/test_pshell.py
@@ -8,16 +8,16 @@
from pyramid.scripts.pshell import PShellCommand
return PShellCommand
- def _makeOne... | null | null | namanjain12/pyramid_final:e1d1af88e314fe59d9197182f8c2b56ecdcbd115 | true | null | 1 | 33 | null | 1,092 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.292 | 80.79475 | ||
8,563 | swe_bench::test::1615 | swe_bench | test | 1,615 | scikit-learn__scikit-learn-13726 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 22b0eabfd04fa554768568a8b309fae8115102ce | n_components kwarg missing in SpectralClustering
The `n_components` kwarg defined in the `spectral_clustering` function allow the user to choose how many eigenvalues/eigenvectors should be used in the classification.
However this kwarg cannot be accessed/modified when using `SpectralClustering` class, and is set to def... | I don't know the history of this. Maybe someone wants to go digging to find out whether this was a reasoned choice by the developers
I looked at the code, and obviously `n_components` is not a instance variable of the `SpectralClustering` class, and when an instance of `SpectralClustering` class calls fit, `n_component... | diff --git a/sklearn/cluster/spectral.py b/sklearn/cluster/spectral.py
--- a/sklearn/cluster/spectral.py
+++ b/sklearn/cluster/spectral.py
@@ -307,6 +307,9 @@ class SpectralClustering(BaseEstimator, ClusterMixin):
to be installed. It can be faster on very large, sparse problems,
but may also lead to i... | diff --git a/sklearn/cluster/tests/test_spectral.py b/sklearn/cluster/tests/test_spectral.py
--- a/sklearn/cluster/tests/test_spectral.py
+++ b/sklearn/cluster/tests/test_spectral.py
@@ -107,8 +107,7 @@ def test_affinities():
# a dataset that yields a stable eigen decomposition both when built
# on OSX and Li... | ["sklearn/cluster/tests/test_spectral.py::test_n_components"] | ["sklearn/cluster/tests/test_spectral.py::test_spectral_clustering[kmeans-arpack]", "sklearn/cluster/tests/test_spectral.py::test_spectral_clustering[kmeans-lobpcg]", "sklearn/cluster/tests/test_spectral.py::test_spectral_clustering[discretize-arpack]", "sklearn/cluster/tests/test_spectral.py::test_spectral_clustering[... | null | true | 2019-04-25T19:27:07Z | 1 | 17 | 1 | 490 | 0 | 0.8 | 1 | 0.55 | 1 | 0.138333 | 80.79 | |
8,564 | r2e_gym::train::291 | r2e_gym | train | 291 | orange3__6b465291adff43e5696432561e0a8ba0bc743934 | orange3 | biolab/orange3 | python | 6b465291adff43e5696432561e0a8ba0bc743934 | **Title:** Widget Fails to Handle Multiple Target Variables Properly
**Description:**
When the input data contains multiple target variables, the widget does not handle it correctly, resulting in unclear error messages and test failures. This behavior makes it difficult for users to understand the root cause and how t... | diff --git a/Orange/widgets/utils/owlearnerwidget.py b/Orange/widgets/utils/owlearnerwidget.py
--- a/Orange/widgets/utils/owlearnerwidget.py
+++ b/Orange/widgets/utils/owlearnerwidget.py
@@ -136,8 +136,14 @@
self.set_input_summary()
if data is not None and data.domain.class_var is None:
- ... | diff --git a/Orange/widgets/utils/tests/test_owlearnerwidget.py b/Orange/widgets/utils/tests/test_owlearnerwidget.py
--- a/Orange/widgets/utils/tests/test_owlearnerwidget.py
+++ b/Orange/widgets/utils/tests/test_owlearnerwidget.py
@@ -1,10 +1,12 @@
+from unittest.mock import Mock
+
import scipy.sparse as sp
# pylin... | null | null | namanjain12/orange3_final:6b465291adff43e5696432561e0a8ba0bc743934 | true | null | 2 | 26 | null | 1,221 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.290167 | 80.78925 | ||
8,565 | r2e_gym::train::5091 | r2e_gym | train | 5,091 | pyramid__d545eef5f5411c0236f04ead9e4e52d93d9a2451 | pyramid | pylons/pyramid | python | d545eef5f5411c0236f04ead9e4e52d93d9a2451 | **Title:** Incorrect HTTP Status Lines Returned by BadCSRFOrigin and BadCSRFToken Exceptions
**Description:**
The `BadCSRFOrigin` and `BadCSRFToken` exceptions are returning non-standard HTTP status lines. Instead of the expected `"400 Bad Request"`, they return custom status messages like `"400 Bad CSRF Origin"` and ... | diff --git a/src/pyramid/exceptions.py b/src/pyramid/exceptions.py
--- a/src/pyramid/exceptions.py
+++ b/src/pyramid/exceptions.py
@@ -10,12 +10,11 @@
origin validation.
"""
- title = "Bad CSRF Origin"
explanation = (
- "Access is denied. This server can not verify that the origin or "
- ... | diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py
--- a/tests/test_exceptions.py
+++ b/tests/test_exceptions.py
@@ -16,12 +16,22 @@
self.assertTrue(one is two)
+class TestBadCSRFOrigin(unittest.TestCase):
+ def test_response_equivalence(self):
+ from pyramid.exceptions import BadCS... | null | null | namanjain12/pyramid_final:d545eef5f5411c0236f04ead9e4e52d93d9a2451 | true | null | 1 | 22 | null | 1,301 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.290167 | 80.78925 | ||
8,566 | r2e_gym::train::4 | r2e_gym | train | 4 | orange3__e48a32f29bd3736e53efb7290cae64d5688357d6 | orange3 | biolab/orange3 | python | e48a32f29bd3736e53efb7290cae64d5688357d6 | **Title:** Incorrect Handling of Duplicate Names with Existing Indices in `get_unique_names_duplicates`
**Description:**
When generating unique names from a list that includes duplicates and already indexed names, the `get_unique_names_duplicates` function fails to assign the correct unique indices. This results in co... | diff --git a/Orange/data/util.py b/Orange/data/util.py
--- a/Orange/data/util.py
+++ b/Orange/data/util.py
@@ -2,8 +2,8 @@
Data-manipulation utilities.
"""
import re
-from collections import Counter, defaultdict
-from itertools import chain
+from collections import Counter
+from itertools import chain, count
from t... | diff --git a/Orange/data/tests/test_util.py b/Orange/data/tests/test_util.py
--- a/Orange/data/tests/test_util.py
+++ b/Orange/data/tests/test_util.py
@@ -59,10 +59,39 @@
["x (2)", "x (3)", "x (1)"])
self.assertEqual(
get_unique_names_duplicates(["x (2)", "x", "x", "x (2)", "x (3)"]),... | null | null | namanjain12/orange3_final:e48a32f29bd3736e53efb7290cae64d5688357d6 | true | null | 1 | 36 | null | 1,020 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.29 | 80.78875 | ||
8,567 | r2e_gym::train::6014 | r2e_gym | train | 6,014 | tornado__06be57c11f98b24ce0f6ee2d04f0cfe8bfdb3b4d | tornado | tornadoweb/tornado | python | 06be57c11f98b24ce0f6ee2d04f0cfe8bfdb3b4d | **Title:** Server Raises Error on Unknown HTTP Status Codes Instead of Responding Gracefully
**Description:**
When specifying an unknown HTTP status code without providing a reason, the server raises a `ValueError` instead of responding with the provided status code and a default reason message. This behavior is unexp... | diff --git a/tornado/web.py b/tornado/web.py
--- a/tornado/web.py
+++ b/tornado/web.py
@@ -319,10 +319,7 @@
if reason is not None:
self._reason = escape.native_str(reason)
else:
- try:
- self._reason = httputil.responses[status_code]
- except KeyError:... | 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
@@ -917,6 +917,10 @@
self.assertEqual(response.code, 503)
self.assertTrue(b"503: Service Unavailable" in response.body)
+ response = self.fetch("/default?... | null | null | namanjain12/tornado_final:06be57c11f98b24ce0f6ee2d04f0cfe8bfdb3b4d | true | null | 1 | 11 | null | 1,518 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.289667 | 80.78775 | ||
8,568 | r2e_gym::train::415 | r2e_gym | train | 415 | orange3__127e1340a571417fd116d3256a12e85c0b158485 | orange3 | biolab/orange3 | python | 127e1340a571417fd116d3256a12e85c0b158485 | **Title:** Feature Constructor Raises KeyError When Variables Are Missing Instead of Returning NaN
**Description:**
When using the `FeatureFunc` to construct a feature, if certain variables are missing from the input data, a `KeyError` is raised. This prevents the feature constructor from handling incomplete data grac... | diff --git a/Orange/widgets/data/owfeatureconstructor.py b/Orange/widgets/data/owfeatureconstructor.py
--- a/Orange/widgets/data/owfeatureconstructor.py
+++ b/Orange/widgets/data/owfeatureconstructor.py
@@ -1069,9 +1069,12 @@
if isinstance(instance, Orange.data.Table):
return [self(inst) for inst ... | diff --git a/Orange/widgets/data/tests/test_owfeatureconstructor.py b/Orange/widgets/data/tests/test_owfeatureconstructor.py
--- a/Orange/widgets/data/tests/test_owfeatureconstructor.py
+++ b/Orange/widgets/data/tests/test_owfeatureconstructor.py
@@ -274,6 +274,17 @@
self.assertEqual(r, [x[0] for x in zoo.meta... | null | null | namanjain12/orange3_final:127e1340a571417fd116d3256a12e85c0b158485 | true | null | 1 | 9 | null | 1,556 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.289333 | 80.78675 | ||
8,569 | r2e_gym::train::5773 | r2e_gym | train | 5,773 | scrapy__75450e75d269b2a2b00b6303af1033df1f69cc67 | scrapy | scrapy/scrapy | python | 75450e75d269b2a2b00b6303af1033df1f69cc67 | **Title:** Using `fetch` in Scrapy Shell with Asyncio Reactor Raises RuntimeError: No Current Event Loop
**Description:**
When using the Scrapy shell with the `AsyncioSelectorReactor`, attempting to fetch a URL results in a `RuntimeError` indicating that there is no current event loop in the thread. This issue prevent... | diff --git a/scrapy/shell.py b/scrapy/shell.py
--- a/scrapy/shell.py
+++ b/scrapy/shell.py
@@ -21,6 +21,7 @@
from scrapy.utils.datatypes import SequenceExclude
from scrapy.utils.misc import load_object
from scrapy.utils.response import open_in_browser
+from scrapy.utils.reactor import is_asyncio_reactor_installed, s... | diff --git a/tests/test_command_shell.py b/tests/test_command_shell.py
--- a/tests/test_command_shell.py
+++ b/tests/test_command_shell.py
@@ -115,3 +115,14 @@
errcode, out, err = yield self.execute([url, '-c', 'item'], check_code=False)
self.assertEqual(errcode, 1, out or err)
self.assertIn(... | null | null | namanjain12/scrapy_final:75450e75d269b2a2b00b6303af1033df1f69cc67 | true | null | 2 | 33 | null | 1,075 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.289167 | 80.78625 | ||
8,570 | r2e_gym::train::5065 | r2e_gym | train | 5,065 | datalad__0937bb311a2c86f3f5b8d7bfbb9fcc63b6959020 | datalad | datalad/datalad | python | 0937bb311a2c86f3f5b8d7bfbb9fcc63b6959020 | **Title:** Passing `result_filter` Argument Causes TypeError in Save Function
**Description:**
After updating result-related keyword arguments to use the `result_` prefix, attempting to use the `result_filter` argument with the `save` function results in a `TypeError`. This prevents proper filtering of save operations... | diff --git a/datalad/cmdline/main.py b/datalad/cmdline/main.py
--- a/datalad/cmdline/main.py
+++ b/datalad/cmdline/main.py
@@ -274,7 +274,7 @@
args_ = args or sys.argv
# configure rendering of return values
- datalad.cfg.overrides['datalad.api.result-render-mode'] = \
+ datalad.cfg.overrides['datalad.... | diff --git a/datalad/interface/tests/test_save.py b/datalad/interface/tests/test_save.py
--- a/datalad/interface/tests/test_save.py
+++ b/datalad/interface/tests/test_save.py
@@ -111,7 +111,7 @@
# saves the status change of the subdataset due to the subsubdataset addition
assert_fields_equal(
'path',... | null | null | namanjain12/datalad_final:0937bb311a2c86f3f5b8d7bfbb9fcc63b6959020 | true | null | 3 | 50 | null | 733 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.288833 | 80.78525 | ||
8,571 | r2e_gym::train::4101 | r2e_gym | train | 4,101 | coveragepy__0d6a8784cdafd46409fe187ad87b7c38772d6d1b | coveragepy | nedbat/coveragepy | python | 0d6a8784cdafd46409fe187ad87b7c38772d6d1b | **Title:** Incorrect Error Message When Reading Coverage 4.x Data Files
**Description:**
When attempting to load a coverage data file generated by coverage.py version 4.x, the system fails to recognize the file format. Instead of providing a clear message about the version mismatch, it raises a generic error indicatin... | diff --git a/CHANGES.rst b/CHANGES.rst
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -24,6 +24,11 @@
Unreleased
----------
+- If a 4.x data file is the cause of a "file is not a database" error, then use
+ a more specific error message, "Looks like a coverage 4.x data file, are you
+ mixing versions of coverage?" Helps... | diff --git a/tests/test_api.py b/tests/test_api.py
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -295,6 +295,17 @@
with self.assertRaisesRegex(CoverageException, "No data to report."):
cov.report()
+ def test_cov4_data_file(self):
+ cov4_data = (
+ "!coverage.py: This i... | null | null | namanjain12/coveragepy_final:0d6a8784cdafd46409fe187ad87b7c38772d6d1b | true | null | 2 | 21 | null | 1,310 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.288333 | 80.78375 | ||
8,572 | swe_bench::test::1653 | swe_bench | test | 1,653 | scikit-learn__scikit-learn-14869 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 1018f9f98c80fb42e30ab5fd42b554322a057fbf | HGBC with categorical_crossentropy fails silently on binary classification
```python
import numpy as np
from sklearn.experimental import enable_hist_gradient_boosting
from sklearn.ensemble import HistGradientBoostingClassifier
X = [[1, 0],
[1, 0],
[1, 0],
[0, 1],
[1, 1]]
y = [1, 1, 1, 0, 1]
gb = Hi... | Thanks for the report, I think changing
```py
self.n_trees_per_iteration_ = 1 if n_classes <= 2 else n_classes
```
to
```
self.n_trees_per_iteration_ = n_classes
```
would make categorical-crossentropy behave like the log loss.
But I think we want to error in this case: categorical-crossentropy will be ... | diff --git a/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py b/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py
--- a/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py
+++ b/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py
@@ -1039,6 +1039,12 @@ def _encode_y(self, y)... | diff --git a/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py b/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
--- a/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
+++ b/sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
@... | ["sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py::test_crossentropy_binary_problem"] | ["sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py::test_init_parameters_validation[params0-Loss", "sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py::test_init_parameters_validation[params1-learning_rate=0", "sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_bo... | null | true | 2019-09-02T16:28:25Z | 1 | 6 | 1 | 697 | 0 | 0.8 | 1 | 0.55 | 1 | 0.136167 | 80.7835 | |
8,573 | r2e_gym::train::5041 | r2e_gym | train | 5,041 | datalad__8bc04c84bb897136057489a6c37a654d7fc21b93 | datalad | datalad/datalad | python | 8bc04c84bb897136057489a6c37a654d7fc21b93 | **Title:** `.assert_logged` Method Inaccessible After Exiting `swallow_logs` Context Manager
**Description:**
When using the `swallow_logs` context manager to capture log output, attempting to call the `assert_logged` method after exiting the context results in an `AttributeError`. This prevents verification of logged... | diff --git a/datalad/utils.py b/datalad/utils.py
--- a/datalad/utils.py
+++ b/datalad/utils.py
@@ -649,6 +649,7 @@
out_file = file_
# PY3 requires clearly one or another. race condition possible
self._out = open(out_file, 'a')
+ self._final_out = None
de... | diff --git a/datalad/tests/test_utils.py b/datalad/tests/test_utils.py
--- a/datalad/tests/test_utils.py
+++ b/datalad/tests/test_utils.py
@@ -118,6 +118,29 @@
lgr.info("next info")
from datalad.tests.utils import ok_file_has_content
ok_file_has_content(logfile, "next info", strip=True)
+
+
+def test... | null | null | namanjain12/datalad_final:8bc04c84bb897136057489a6c37a654d7fc21b93 | true | null | 1 | 41 | null | 908 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.288 | 80.78275 | ||
8,574 | r2e_gym::train::4937 | r2e_gym | train | 4,937 | datalad__7a3924b6db5e10ae9b4dd3d835b023951dd9b643 | datalad | datalad/datalad | python | 7a3924b6db5e10ae9b4dd3d835b023951dd9b643 | **Title:** `fail_with_short_help` Function Rejects `out` Parameter Causing Test Failures
**Description:**
When attempting to invoke the `fail_with_short_help` function with the `out` keyword argument, the function raises a `TypeError`. This occurs because the function does not accept the `out` parameter, leading to un... | diff --git a/datalad/cmdline/main.py b/datalad/cmdline/main.py
--- a/datalad/cmdline/main.py
+++ b/datalad/cmdline/main.py
@@ -194,7 +194,8 @@
# Before doing anything additional and possibly expensive see may be that
# we have got the command already
need_single_subparser = False if return_subparsers els... | diff --git a/datalad/cmdline/tests/test_main.py b/datalad/cmdline/tests/test_main.py
--- a/datalad/cmdline/tests/test_main.py
+++ b/datalad/cmdline/tests/test_main.py
@@ -18,7 +18,7 @@
from mock import patch
import datalad
-from ..main import main
+from ..main import main, fail_with_short_help
from datalad import ... | null | null | namanjain12/datalad_final:7a3924b6db5e10ae9b4dd3d835b023951dd9b643 | true | null | 1 | 44 | null | 848 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.288 | 80.78275 | ||
8,575 | r2e_gym::train::5262 | r2e_gym | train | 5,262 | aiohttp__f0d74880deec8fcd982bce639c93c5e130d41198 | aiohttp | aio-libs/aiohttp | python | f0d74880deec8fcd982bce639c93c5e130d41198 | **Title:** Unable to Register Route with Names Containing Both Dots and Colons
**Description:**
After merging branch '0.18', attempting to register a route with a name that includes both dots (`.`) and colons (`:`) results in a `ValueError`. The recent changes were intended to allow route names to be a sequence of Pyt... | diff --git a/HISTORY.rst b/HISTORY.rst
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,3 +1,9 @@
+0.18.1 (20-10-2015)
+-------------------
+
+- Relax rule for router names: they may contain dots and columns
+ starting from now
+
0.18.0 (19-10-2015)
-------------------
diff --git a/aiohttp/web_urldispatcher.py b/aiohttp/... | diff --git a/tests/test_urldispatch.py b/tests/test_urldispatch.py
--- a/tests/test_urldispatch.py
+++ b/tests/test_urldispatch.py
@@ -83,6 +83,10 @@
route = PlainRoute('GET', handler, 'return', '/handler/to/path')
self.assertRaises(ValueError, self.router.register_route, route)
+ route = Pla... | null | null | namanjain12/aiohttp_final:f0d74880deec8fcd982bce639c93c5e130d41198 | true | null | 2 | 22 | null | 1,288 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.288 | 80.78275 | ||
8,576 | r2e_gym::train::4621 | r2e_gym | train | 4,621 | numpy__f28957d2a9411958a6952687be9c4dcd1be2a23a | numpy | numpy/numpy | python | f28957d2a9411958a6952687be9c4dcd1be2a23a | **[ISSUE]**
**Title:** `pad_width=((1, 2),)` Raises ValueError When Padding Multi-Dimensional Arrays
**Description:**
When using `numpy.pad` with `pad_width` specified as a single tuple of tuples, padding multi-dimensional arrays results in a `ValueError`. Although the intention is to broadcast the padding values acr... | diff --git a/numpy/lib/arraypad.py b/numpy/lib/arraypad.py
--- a/numpy/lib/arraypad.py
+++ b/numpy/lib/arraypad.py
@@ -1030,43 +1030,20 @@
return ((None, None), ) * ndims
# Convert any input `info` to a NumPy array
- arr = np.asarray(shape)
-
- # Switch based on what input looks like
- if arr.n... | diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py
--- a/numpy/lib/tests/test_arraypad.py
+++ b/numpy/lib/tests/test_arraypad.py
@@ -914,6 +914,24 @@
)
assert_array_equal(a, b)
+ def test_check_width_shape_1_2(self):
+ # Check a pad_width of the form ((1, ... | null | null | namanjain12/numpy_final:f28957d2a9411958a6952687be9c4dcd1be2a23a | true | null | 1 | 37 | null | 987 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.287833 | 80.78225 | ||
8,577 | r2e_gym::train::6395 | r2e_gym | train | 6,395 | pillow__3a61c9e95e5c0a2da5736956e2dbafa57a9ede07 | pillow | python-pillow/pillow | python | 3a61c9e95e5c0a2da5736956e2dbafa57a9ede07 | **Title:** Remap Palette Fails with RGBA Palettes
**Description:**
When attempting to remap a palette of an image with an "RGBA" palette mode, the `remap_palette` function incorrectly handles the palette bytes. This results in a mismatch between the original and remapped palettes, leading to unexpected behavior.
**Bu... | diff --git a/src/PIL/Image.py b/src/PIL/Image.py
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -1867,10 +1867,15 @@
if self.mode not in ("L", "P"):
raise ValueError("illegal image mode")
+ bands = 3
+ palette_mode = "RGB"
if source_palette is None:
if self.... | diff --git a/Tests/test_image.py b/Tests/test_image.py
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -604,6 +604,15 @@
with Image.open("Tests/images/hopper.gif") as im:
assert_image_equal(im, im.remap_palette(list(range(256))))
+ # Test identity transform with an RGBA palette
+ ... | null | null | namanjain12/pillow_final:3a61c9e95e5c0a2da5736956e2dbafa57a9ede07 | true | null | 1 | 27 | null | 1,185 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2875 | 80.78125 | ||
8,578 | r2e_gym::train::5904 | r2e_gym | train | 5,904 | tornado__e7cb79779582bc4a27062795ab401adbf1faea57 | tornado | tornadoweb/tornado | python | e7cb79779582bc4a27062795ab401adbf1faea57 | **Title:** Missing 'Connection: close' Header in Server Response for HTTP/1.1 Requests
**Description:**
When an HTTP/1.1 client includes the `Connection: close` header in its request, the server is expected to include the same header in its response to indicate that the connection will be closed after the response is ... | diff --git a/tornado/http1connection.py b/tornado/http1connection.py
--- a/tornado/http1connection.py
+++ b/tornado/http1connection.py
@@ -357,6 +357,10 @@
# Applications are discouraged from touching Transfer-Encoding,
# but if they do, leave it alone.
'Transfer-Encod... | diff --git a/tornado/test/httpserver_test.py b/tornado/test/httpserver_test.py
--- a/tornado/test/httpserver_test.py
+++ b/tornado/test/httpserver_test.py
@@ -719,6 +719,7 @@
self.stream.read_until_close(callback=self.stop)
data = self.wait()
self.assertTrue(not data)
+ self.assertEqua... | null | null | namanjain12/tornado_final:e7cb79779582bc4a27062795ab401adbf1faea57 | true | null | 1 | 6 | null | 1,605 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2875 | 80.78125 | ||
8,579 | r2e_gym::train::4995 | r2e_gym | train | 4,995 | datalad__b3016f91a65b2051447b4911e59db657f22a2bba | datalad | datalad/datalad | python | b3016f91a65b2051447b4911e59db657f22a2bba | **Title:** `get_url_names` Missing `_url_hostname` Key Causes Filename Formatting Failures
**Description:**
The `get_url_names` function fails to include the `_url_hostname` key in its returned dictionary. This omission leads to incomplete filename formatting when processing URLs, resulting in failed tests that expec... | diff --git a/datalad/plugin/addurls.py b/datalad/plugin/addurls.py
--- a/datalad/plugin/addurls.py
+++ b/datalad/plugin/addurls.py
@@ -265,7 +265,7 @@
def get_url_names(url):
- """Assign a name to each part of a URL's path.
+ """Assign a name to various parts of the URL.
Parameters
----------
@@ ... | diff --git a/datalad/plugin/tests/test_addurls.py b/datalad/plugin/tests/test_addurls.py
--- a/datalad/plugin/tests/test_addurls.py
+++ b/datalad/plugin/tests/test_addurls.py
@@ -151,17 +151,20 @@
def test_get_url_names():
eq_(addurls.get_url_names(""), {})
- eq_(addurls.get_url_names("http://datalad.org"), ... | null | null | namanjain12/datalad_final:b3016f91a65b2051447b4911e59db657f22a2bba | true | null | 1 | 38 | null | 961 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.286833 | 80.77925 | ||
8,580 | r2e_gym::train::5902 | r2e_gym | train | 5,902 | tornado__2d4053daa56c609d642b214399e046671d4a593e | tornado | tornadoweb/tornado | python | 2d4053daa56c609d642b214399e046671d4a593e | **Title:** `PeriodicCallback` Missing `_update_next` Method Causing Test Failures
**Description:**
When running tests designed to verify the mathematical calculations of `PeriodicCallback`, an `AttributeError` is raised because the `_update_next` method does not exist in the `PeriodicCallback` class. This prevents the... | diff --git a/tornado/ioloop.py b/tornado/ioloop.py
--- a/tornado/ioloop.py
+++ b/tornado/ioloop.py
@@ -1213,11 +1213,11 @@
def _schedule_next(self):
if self._running:
- current_time = self.io_loop.time()
-
- if self._next_timeout <= current_time:
- callback_time_sec ... | 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
@@ -789,6 +789,44 @@
io_loop.close()
+class TestPeriodicCallbackMath(unittest.TestCase):
+ def simulate_calls(self, pc, durations):
+ """Simulate a series of ... | null | null | namanjain12/tornado_final:2d4053daa56c609d642b214399e046671d4a593e | true | null | 1 | 14 | null | 1,441 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.286833 | 80.77925 | ||
8,581 | swe_bench::test::1725 | swe_bench | test | 1,725 | sphinx-doc__sphinx-10137 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | 3d25662550aba00d6e2e43d3ff76dce958079368 | Allow to bail out extlink replacement suggestion
Feature added via https://github.com/sphinx-doc/sphinx/pull/9800. Consider the following ext link:
```
# conf.py
extlinks = {
"user": ("https://github.com/%s", "@"),
}
```
and the following text:
```
All pull requests and merges to the ``main`` branch are tested usin... | This affected me too on other project and what I find it quite problematic for two reasons:
* it seems that this feature does not work on macos, I get this warning only on linux --- weird
* i do not see any option to silence it and because I use strict mode, it broke the CI
* people may want to avoid using sphinx sp... | diff --git a/sphinx/ext/extlinks.py b/sphinx/ext/extlinks.py
--- a/sphinx/ext/extlinks.py
+++ b/sphinx/ext/extlinks.py
@@ -72,7 +72,11 @@ def check_uri(self, refnode: nodes.reference) -> None:
uri_pattern = re.compile(re.escape(base_uri).replace('%s', '(?P<value>.+)'))
match = uri_patter... | diff --git a/tests/roots/test-ext-extlinks-hardcoded-urls-multiple-replacements/index.rst b/tests/roots/test-ext-extlinks-hardcoded-urls-multiple-replacements/index.rst
--- a/tests/roots/test-ext-extlinks-hardcoded-urls-multiple-replacements/index.rst
+++ b/tests/roots/test-ext-extlinks-hardcoded-urls-multiple-replacem... | ["tests/test_ext_extlinks.py::test_all_replacements_suggested_if_multiple_replacements_possible"] | ["tests/test_ext_extlinks.py::test_extlinks_detect_candidates", "tests/test_ext_extlinks.py::test_replaceable_uris_emit_extlinks_warnings"] | null | true | 2022-01-26T20:55:51Z | 1 | 6 | 1 | 688 | 0 | 0.8 | 1 | 0.55 | 1 | 0.134667 | 80.779 | |
8,582 | r2e_gym::train::6025 | r2e_gym | train | 6,025 | tornado__c39e69f4a5a225b1340cd01f529d12b71001e012 | tornado | tornadoweb/tornado | python | c39e69f4a5a225b1340cd01f529d12b71001e012 | **Title:** `IOStream.read_bytes()` Raises `TypeError` When Using `partial` Flag
**Description:**
When attempting to use the `partial` flag with `IOStream.read_bytes`, a `TypeError` is raised because the method does not recognize the `partial` keyword argument. This prevents developers from performing coroutine-friendl... | diff --git a/tornado/iostream.py b/tornado/iostream.py
--- a/tornado/iostream.py
+++ b/tornado/iostream.py
@@ -93,6 +93,7 @@
self._read_delimiter = None
self._read_regex = None
self._read_bytes = None
+ self._read_partial = False
self._read_until_close = False
self._r... | diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py
--- a/tornado/test/iostream_test.py
+++ b/tornado/test/iostream_test.py
@@ -533,6 +533,31 @@
server.close()
client.close()
+ def test_read_bytes_partial(self):
+ server, client = self.make_iostream_pair()
+ ... | null | null | namanjain12/tornado_final:c39e69f4a5a225b1340cd01f529d12b71001e012 | true | null | 1 | 15 | null | 1,418 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.286333 | 80.77775 | ||
8,583 | r2e_gym::train::6018 | r2e_gym | train | 6,018 | tornado__24a8b2256c4da30823c4017f31356ce67d9ba389 | tornado | tornadoweb/tornado | python | 24a8b2256c4da30823c4017f31356ce67d9ba389 | **Title:** Runner objects are prematurely garbage collected, causing errors when setting Future results
**Description:**
When using coroutines that yield `Future` objects, `Runner` instances may be garbage collected before their associated `Future` is resolved. This premature garbage collection leads to errors when at... | diff --git a/tornado/gen.py b/tornado/gen.py
--- a/tornado/gen.py
+++ b/tornado/gen.py
@@ -83,6 +83,7 @@
import sys
import textwrap
import types
+import weakref
from tornado.concurrent import Future, TracebackFuture, is_future, chain_future
from tornado.ioloop import IOLoop
@@ -244,6 +245,24 @@
"""
ret... | diff --git a/tornado/test/gen_test.py b/tornado/test/gen_test.py
--- a/tornado/test/gen_test.py
+++ b/tornado/test/gen_test.py
@@ -1,5 +1,6 @@
from __future__ import absolute_import, division, print_function, with_statement
+import gc
import contextlib
import datetime
import functools
@@ -24,7 +25,6 @@
from ... | null | null | namanjain12/tornado_final:24a8b2256c4da30823c4017f31356ce67d9ba389 | true | null | 1 | 21 | null | 1,296 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.286 | 80.77675 | ||
8,584 | r2e_gym::train::4911 | r2e_gym | train | 4,911 | datalad__fbb042d65633dfaa3e0de8deb68e3c0fc3154d7d | datalad | datalad/datalad | python | fbb042d65633dfaa3e0de8deb68e3c0fc3154d7d | **Title:** Clone Operations Crash with TypeError After Enabling Per Source Type Destination Path Defaults
**Description:**
After enabling per clone-source type destination path defaults, attempting to clone repositories using specialized source types such as RIA stores results in unexpected `TypeError` exceptions. Thi... | 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
@@ -203,9 +203,8 @@
if path is None:
# we got nothing but a source. do something similar to git clone
# and derive the pat... | 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
@@ -509,7 +509,7 @@
# resolves datalad RIs:
eq_(decode_source_spec('///subds'),
dict(source='/... | null | null | namanjain12/datalad_final:fbb042d65633dfaa3e0de8deb68e3c0fc3154d7d | true | null | 1 | 16 | null | 1,395 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.285833 | 80.77625 | ||
8,585 | swe_bench::test::1402 | swe_bench | test | 1,402 | pytest-dev__pytest-5356 | pytest-dev/pytest | pytest-dev/pytest | python | a8f4e56d8ca63252706c6200dcfb036078be39a7 | Version 4.6.0 skips tests without apparent reason
Since version 4.6.0 pytest skips tests without apparent reason: https://travis-ci.org/Snawoot/postfix-mta-sts-resolver/jobs/540181138
- [x] output of `pip list` from the virtual environment you are using: **[HERE](https://travis-ci.org/Snawoot/postfix-mta-sts-resolver/... | Can you add `-rs` (it should add additional reporting information about skipped tests)
This appears to be the minimal case to reproduce this:
```python
import itertools
import pytest
AS = (1, 2, 3)
BS = (4, 5, 6)
@pytest.mark.parametrize(('a', 'b'), itertools.product(AS, BS))
def test(a, b):
pass
... | diff --git a/src/_pytest/mark/structures.py b/src/_pytest/mark/structures.py
--- a/src/_pytest/mark/structures.py
+++ b/src/_pytest/mark/structures.py
@@ -113,14 +113,18 @@ def _parse_parametrize_args(argnames, argvalues, **_):
force_tuple = len(argnames) == 1
else:
force_tuple = Fals... | diff --git a/testing/test_mark.py b/testing/test_mark.py
--- a/testing/test_mark.py
+++ b/testing/test_mark.py
@@ -413,6 +413,28 @@ def test_func(a, b):
assert result.ret == 0
+def test_parametrize_iterator(testdir):
+ """parametrize should work with generators (#5354)."""
+ py_file = testdir.makepyfile(... | ["testing/test_mark.py::test_parametrize_iterator"] | ["testing/test_mark.py::TestMark::test_pytest_exists_in_namespace_all[py.test-mark]", "testing/test_mark.py::TestMark::test_pytest_exists_in_namespace_all[py.test-param]", "testing/test_mark.py::TestMark::test_pytest_exists_in_namespace_all[pytest-mark]", "testing/test_mark.py::TestMark::test_pytest_exists_in_namespace... | null | true | 2019-06-01T20:51:42Z | 1 | 10 | 1 | 602 | 0 | 0.8 | 1 | 0.55 | 1 | 0.133667 | 80.776 | |
8,586 | swe_bench::test::1186 | swe_bench | test | 1,186 | psf__requests-2413 | psf/requests | psf/requests | python | d2d576b6b1101e2871c82f63adf2c2b534c2dabc | Requests 2.5.1 doesn't recognize unicode filenames for uploads
After merge of https://github.com/kennethreitz/requests/pull/2379, to allow filenames to be `int` types, unicode filenames are no longer recognized under Python 2.
This checks that the filename is a `builtin` `str`, which has different behaviour on Python ... | In fact, I have not tried this yet, but I think it will make writing code compatible with Python 2 and Python 3 much more difficult. In working around the Python 2 issue by encoding the unicode filename, it is likely that a Python 3 issue will be introduced. This is going to require version specific encoding handling t... | diff --git a/requests/compat.py b/requests/compat.py
--- a/requests/compat.py
+++ b/requests/compat.py
@@ -99,7 +99,6 @@
basestring = basestring
numeric_types = (int, long, float)
-
elif is_py3:
from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, un... | diff --git a/test_requests.py b/test_requests.py
--- a/test_requests.py
+++ b/test_requests.py
@@ -1265,6 +1265,32 @@ def test_get_environ_proxies(self):
'http://localhost.localdomain:5000/v1.0/') == {}
assert get_environ_proxies('http://www.requests.com/') != {}
+ def test_guess_filename_whe... | ["test_requests.py::RequestsTestCase::test_BASICAUTH_TUPLE_HTTP_200_OK_GET", "test_requests.py::RequestsTestCase::test_POSTBIN_GET_POST_FILES_WITH_DATA", "test_requests.py::RequestsTestCase::test_auth_is_stripped_on_redirect_off_host", "test_requests.py::UtilsTestCase::test_guess_filename_with_file_like_obj"] | ["test_requests.py::RequestsTestCase::test_DIGESTAUTH_QUOTES_QOP_VALUE", "test_requests.py::RequestsTestCase::test_DIGESTAUTH_WRONG_HTTP_401_GET", "test_requests.py::RequestsTestCase::test_DIGEST_AUTH_RETURNS_COOKIE", "test_requests.py::RequestsTestCase::test_DIGEST_AUTH_SETS_SESSION_COOKIES", "test_requests.py::Reques... | null | true | 2015-01-19T03:54:01Z | 2 | 7 | 4 | 661 | 0 | 0.8 | 1 | 0.55 | 1 | 0.1335 | 80.7755 | |
8,587 | r2e_gym::train::6355 | r2e_gym | train | 6,355 | pillow__c1fbe2d975e91060fddbed0e71bd0818602b10f7 | pillow | python-pillow/pillow | python | c1fbe2d975e91060fddbed0e71bd0818602b10f7 | **Title:** Error Handling EXIF X Resolution Raises TypeError Due to Invalid Exception Type
**Description:**
When accessing the EXIF X Resolution from a JPEG image, a `TypeError` is raised because the code attempts to handle an exception that is not derived from the `Warning` class. This issue occurs during the process... | diff --git a/src/PIL/JpegImagePlugin.py b/src/PIL/JpegImagePlugin.py
--- a/src/PIL/JpegImagePlugin.py
+++ b/src/PIL/JpegImagePlugin.py
@@ -492,12 +492,29 @@
if segment == "APP1":
marker, xmp_tags = content.rsplit(b"\x00", 1)
if marker == b"http://ns.adobe.com/xap/1.0/":
+
... | 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
@@ -828,7 +828,16 @@
xmp = im.getxmp()
assert isinstance(xmp, dict)
- assert xmp["Description"]["Version"] == "10.4"
+
+ description = xmp["xmpmeta... | null | null | namanjain12/pillow_final:c1fbe2d975e91060fddbed0e71bd0818602b10f7 | true | null | 1 | 27 | null | 1,172 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.285333 | 80.77475 | ||
8,588 | r2e_gym::train::5864 | r2e_gym | train | 5,864 | tornado__5d64b899ee923606ce7a7fe2ec399c57e70c6aa1 | tornado | tornadoweb/tornado | python | 5d64b899ee923606ce7a7fe2ec399c57e70c6aa1 | **Title:** TypeError Occurs When Using `datetime.timedelta` with `PeriodicCallback`
**Description:**
When initializing a `PeriodicCallback` with a `datetime.timedelta` object for the `callback_time`, a `TypeError` is raised. This prevents the use of `timedelta` for scheduling periodic callbacks, which limits the flexi... | diff --git a/tornado/ioloop.py b/tornado/ioloop.py
--- a/tornado/ioloop.py
+++ b/tornado/ioloop.py
@@ -839,9 +839,11 @@
class PeriodicCallback(object):
"""Schedules the given callback to be called periodically.
- The callback is called every ``callback_time`` milliseconds.
- Note that the timeout is given... | 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
@@ -688,6 +688,11 @@
with mock.patch("random.random", mock_random):
self.assertEqual(self.simulate_calls(pc, call_durations), expected)
+ def test_timedel... | null | null | namanjain12/tornado_final:5d64b899ee923606ce7a7fe2ec399c57e70c6aa1 | true | null | 1 | 22 | null | 1,272 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.285333 | 80.77475 | ||
8,589 | r2e_gym::train::6160 | r2e_gym | train | 6,160 | pillow__e96109b93c58822c93227fcc1044c7f75545f01c | pillow | python-pillow/pillow | python | e96109b93c58822c93227fcc1044c7f75545f01c | ### Title
TypeError When Setting XResolution in TIFF EXIF Data After Adding SubIFDs
### Description
After implementing the ability to write subIFDs in TIFF images, attempting to set the `XResolution` tag in the EXIF data results in a `TypeError`. The error message indicates that exceptions must derive from `Warning`, ... | diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py
--- a/src/PIL/TiffImagePlugin.py
+++ b/src/PIL/TiffImagePlugin.py
@@ -567,7 +567,9 @@
elif self.tagtype[tag] == TiffTags.RATIONAL:
values = [float(v) if isinstance(v, int) else v for v in values]
- values = tuple(info.cv... | 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
@@ -224,23 +224,30 @@
# Should not raise a TypeError
im._getexif()
- def test_exif_gps(self):
- # Arrange
+ def test_exif_gps(self, tmp_path):
+ expe... | null | null | namanjain12/pillow_final:e96109b93c58822c93227fcc1044c7f75545f01c | true | null | 1 | 27 | null | 1,171 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.285167 | 80.77425 | ||
8,590 | r2e_gym::train::6002 | r2e_gym | train | 6,002 | tornado__8fd1f9b2cde30e1aa64694b0cbc8d641e0ce698a | tornado | tornadoweb/tornado | python | 8fd1f9b2cde30e1aa64694b0cbc8d641e0ce698a | **Title:** PeriodicCallback Fails with AttributeError When System Clock Moves Backwards
**Description:**
When the system clock moves backwards, `PeriodicCallback` fails to handle the adjustment correctly, resulting in an `AttributeError`. This issue occurs during tests that simulate clock adjustments, preventing callb... | diff --git a/tornado/ioloop.py b/tornado/ioloop.py
--- a/tornado/ioloop.py
+++ b/tornado/ioloop.py
@@ -1213,11 +1213,31 @@
def _schedule_next(self):
if self._running:
- current_time = self.io_loop.time()
-
- if self._next_timeout <= current_time:
- callback_time_sec ... | 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
@@ -789,6 +789,62 @@
io_loop.close()
+class TestPeriodicCallbackMath(unittest.TestCase):
+ def simulate_calls(self, pc, durations):
+ """Simulate a series of ... | null | null | namanjain12/tornado_final:8fd1f9b2cde30e1aa64694b0cbc8d641e0ce698a | true | null | 1 | 34 | null | 1,030 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.285 | 80.77375 | ||
8,591 | r2e_gym::train::411 | r2e_gym | train | 411 | orange3__6791ae20d003b4d1c5adae8097dd53a08141d07a | orange3 | biolab/orange3 | python | 6791ae20d003b4d1c5adae8097dd53a08141d07a | **Title:** Calibration Overwrites Model Domain Incorrectly, Causing Prediction Errors with NumPy Data
**Description**
When using Calibration learners, the model's domain is being overwritten regardless of whether it was previously set. This leads to improper data transformations when passing NumPy arrays, resulting in... | diff --git a/Orange/base.py b/Orange/base.py
--- a/Orange/base.py
+++ b/Orange/base.py
@@ -136,7 +136,11 @@
progress_callback(0.1, "Fitting...")
model = self._fit_model(data)
model.used_vals = [np.unique(y).astype(int) for y in data.Y[:, None].T]
- model.domain = data.domain
+ i... | diff --git a/Orange/classification/tests/test_calibration.py b/Orange/classification/tests/test_calibration.py
--- a/Orange/classification/tests/test_calibration.py
+++ b/Orange/classification/tests/test_calibration.py
@@ -4,6 +4,7 @@
import numpy as np
from Orange.base import Model
+from Orange.classification impo... | null | null | namanjain12/orange3_final:6791ae20d003b4d1c5adae8097dd53a08141d07a | true | null | 1 | 6 | null | 1,589 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.284833 | 80.77325 | ||
8,592 | r2e_gym::train::4532 | r2e_gym | train | 4,532 | numpy__fe1c1fbac3dbd0d314b96ad95447e370dceae079 | numpy | numpy/numpy | python | fe1c1fbac3dbd0d314b96ad95447e370dceae079 | **Title:** `diff` function raises TypeError when using `prepend` or `append` arguments
**Description:**
Using the `prepend` or `append` keyword arguments with the `diff` function results in a `TypeError`. These arguments are intended to add padding to the array before or after computing differences, but the function d... | diff --git a/doc/release/1.16.0-notes.rst b/doc/release/1.16.0-notes.rst
--- a/doc/release/1.16.0-notes.rst
+++ b/doc/release/1.16.0-notes.rst
@@ -107,6 +107,12 @@
matrices (with zero rows and/or columns) is/are passed in. Now outputs of
appropriate shapes are returned.
+``np.diff`` Added kwargs prepend and append
... | 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
@@ -733,6 +733,58 @@
assert_array_equal(out3.data, [[], [], [], [], []])
assert_array_equal(out3.mask, [[], [], [], [], []]... | null | null | namanjain12/numpy_final:fe1c1fbac3dbd0d314b96ad95447e370dceae079 | true | null | 2 | 36 | null | 988 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.284667 | 80.77275 | ||
8,593 | r2e_gym::train::108 | r2e_gym | train | 108 | orange3__0d04d81360a5865a6aaa84f46c8fc689cf94cb5c | orange3 | biolab/orange3 | python | 0d04d81360a5865a6aaa84f46c8fc689cf94cb5c | **Title:** TypeError When Moving Rows Due to Unsupported `len()` on VariableFilterProxyModel
**Description:**
When trying to move selected rows up in the attribute selection widget, a `TypeError` is raised because the model does not support the `len()` function. This error prevents the rows from being reordered as int... | diff --git a/Orange/widgets/data/owselectcolumns.py b/Orange/widgets/data/owselectcolumns.py
--- a/Orange/widgets/data/owselectcolumns.py
+++ b/Orange/widgets/data/owselectcolumns.py
@@ -5,7 +5,7 @@
from AnyQt.QtWidgets import QListView
from AnyQt.QtCore import (
Qt, QTimer, QSortFilterProxyModel, QItemSelection... | diff --git a/Orange/widgets/data/tests/test_owselectcolumns.py b/Orange/widgets/data/tests/test_owselectcolumns.py
--- a/Orange/widgets/data/tests/test_owselectcolumns.py
+++ b/Orange/widgets/data/tests/test_owselectcolumns.py
@@ -363,3 +363,26 @@
mime.setProperty("_items", variables)
return QDragEnte... | null | null | namanjain12/orange3_final:0d04d81360a5865a6aaa84f46c8fc689cf94cb5c | true | null | 1 | 30 | null | 1,106 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.284333 | 80.77175 | ||
8,594 | r2e_gym::train::4326 | r2e_gym | train | 4,326 | numpy__a91309771b0025c4e291501d0c00bf4178a66c38 | numpy | numpy/numpy | python | a91309771b0025c4e291501d0c00bf4178a66c38 | **Title:** `np.average` Does Not Preserve Subclass Types, Leading to Unexpected Return Types
**Description:**
When using `np.average` on an instance of a subclass of `np.ndarray`, the returned object does not retain the subclass type. Instead, it returns a base `numpy` type such as `float64`. This behavior causes issu... | 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
@@ -33,6 +33,11 @@
FutureWarning to changed behavior
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* ``numpy.average`` now preserves subclasses, matching the behavior of most
+ other ... | 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
@@ -321,11 +321,8 @@
a = np.array([[1,2],[3,4]]).view(subclass)
w = np.array([[1,2],[3,4]]).view(subclass)
- with ... | null | null | namanjain12/numpy_final:a91309771b0025c4e291501d0c00bf4178a66c38 | true | null | 2 | 26 | null | 1,186 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.284333 | 80.77175 | ||
8,595 | r2e_gym::train::4169 | r2e_gym | train | 4,169 | numpy__7698f9dbce84aca177787cb88979226c799e5c6c | numpy | numpy/numpy | python | 7698f9dbce84aca177787cb88979226c799e5c6c | **Title:** AttributeError: 'numpy.lib.utils' has no attribute 'drop_metadata'
**Description:**
When attempting to remove metadata from a NumPy dtype using the `drop_metadata` function, an `AttributeError` is raised. This prevents the user from effectively stripping metadata from dtype objects, which is essential for c... | diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -1140,4 +1140,31 @@
enabled_features += f" {feature}?"
return enabled_features
+
+def drop_metadata(dt):
+ align = dt.isalignedstruct
+ if dt.names:
+ # structured dtype
+ l ... | diff --git a/numpy/lib/tests/test_utils.py b/numpy/lib/tests/test_utils.py
--- a/numpy/lib/tests/test_utils.py
+++ b/numpy/lib/tests/test_utils.py
@@ -2,6 +2,7 @@
import sys
import pytest
+import numpy as np
from numpy.core import arange
from numpy.testing import assert_, assert_equal, assert_raises_regex
from n... | null | null | namanjain12/numpy_final:7698f9dbce84aca177787cb88979226c799e5c6c | true | null | 1 | 27 | null | 1,163 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.283833 | 80.77025 | ||
8,596 | r2e_gym::train::4960 | r2e_gym | train | 4,960 | datalad__292ec180ce1a38aaf53ad27b87f9cf0fa8fe14cd | datalad | datalad/datalad | python | 292ec180ce1a38aaf53ad27b87f9cf0fa8fe14cd | **Title:** Missing `_url_basename_ext` Field Causes Incomplete URL Data Extraction
**Description:**
When using the `addurls` plugin to process URLs, the `_url_basename_ext` field, which should contain the file extension of the URL's basename, is missing from the returned data. This omission leads to incomplete informa... | diff --git a/datalad/plugin/addurls.py b/datalad/plugin/addurls.py
--- a/datalad/plugin/addurls.py
+++ b/datalad/plugin/addurls.py
@@ -270,6 +270,30 @@
return subpaths
+def get_file_parts(filename, prefix="name"):
+ """Assign a name to various parts of a file.
+
+ Parameters
+ ----------
+ filename... | diff --git a/datalad/plugin/tests/test_addurls.py b/datalad/plugin/tests/test_addurls.py
--- a/datalad/plugin/tests/test_addurls.py
+++ b/datalad/plugin/tests/test_addurls.py
@@ -151,6 +151,15 @@
assert_false(addurls.fmt_to_name("{}", {}))
+def test_get_file_parts():
+ assert_dict_equal(addurls.get_file_par... | null | null | namanjain12/datalad_final:292ec180ce1a38aaf53ad27b87f9cf0fa8fe14cd | true | null | 1 | 39 | null | 923 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.283833 | 80.77025 | ||
8,597 | r2e_gym::train::457 | r2e_gym | train | 457 | orange3__16d475ae51124ca7be013efcef41b494923eb68b | orange3 | biolab/orange3 | python | 16d475ae51124ca7be013efcef41b494923eb68b | **Title:** `reconstruct_domain` Method Receives Incorrect Parameter Causing TypeError and IndexError
**Description:**
When using the `Nomogram` widget with a `LogisticRegressionClassifier`, passing the classifier object directly to the `reconstruct_domain` method results in unexpected errors. Specifically, the method ... | diff --git a/Orange/widgets/visualize/ownomogram.py b/Orange/widgets/visualize/ownomogram.py
--- a/Orange/widgets/visualize/ownomogram.py
+++ b/Orange/widgets/visualize/ownomogram.py
@@ -910,8 +910,7 @@
if not isinstance(self.classifier, LogisticRegressionClassifier):
return
- self.domain... | diff --git a/Orange/widgets/visualize/tests/test_ownomogram.py b/Orange/widgets/visualize/tests/test_ownomogram.py
--- a/Orange/widgets/visualize/tests/test_ownomogram.py
+++ b/Orange/widgets/visualize/tests/test_ownomogram.py
@@ -14,6 +14,7 @@
from Orange.preprocess import Scale, Continuize
from Orange.tests import ... | null | null | namanjain12/orange3_final:16d475ae51124ca7be013efcef41b494923eb68b | true | null | 1 | 14 | null | 1,421 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2835 | 80.76925 | ||
8,598 | r2e_gym::train::4994 | r2e_gym | train | 4,994 | datalad__58e58287ab2f4e7d17b3c2b8d8551c544dc2bcab | datalad | datalad/datalad | python | 58e58287ab2f4e7d17b3c2b8d8551c544dc2bcab | **Title:** `call_from_parser` Raises AttributeError Due to Missing `_get_result_filter` Method
**Description:**
When invoking the `call_from_parser` method of the `Interface` class with specific arguments, an `AttributeError` is raised because the `_get_result_filter` method is not defined.
**Example Code:**
```pytho... | diff --git a/datalad/interface/base.py b/datalad/interface/base.py
--- a/datalad/interface/base.py
+++ b/datalad/interface/base.py
@@ -316,6 +316,11 @@
# if None, would just reraise the Exception, so if in --dbg
# mode would fall into the debugger
_interrupted_exit_code = 1
+
+ _OLDSTYLE_COMMANDS = (
... | 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
@@ -0,0 +1,112 @@
+# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
+# ex: set sts=4 ts=4 sw=4 noet:
+# ##... | null | null | namanjain12/datalad_final:58e58287ab2f4e7d17b3c2b8d8551c544dc2bcab | true | null | 1 | 46 | null | 781 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.2835 | 80.76925 | ||
8,599 | r2e_gym::train::4915 | r2e_gym | train | 4,915 | datalad__e02655bc1504ec8e1369fa4a367d808733110663 | datalad | datalad/datalad | python | e02655bc1504ec8e1369fa4a367d808733110663 | **Title:** TypeError When Accessing Row Information with String Keys
**Description:**
After extracting row information, attempting to access fields using string keys results in a `TypeError`. The current implementation uses `namedtuple` to store row data, which does not support key-based access, leading to errors when... | diff --git a/datalad/plugin/addurls.py b/datalad/plugin/addurls.py
--- a/datalad/plugin/addurls.py
+++ b/datalad/plugin/addurls.py
@@ -9,7 +9,7 @@
"""Create and update a dataset from a list of URLs.
"""
-from collections import Mapping, namedtuple
+from collections import Mapping
from functools import partial
imp... | diff --git a/datalad/plugin/tests/test_addurls.py b/datalad/plugin/tests/test_addurls.py
--- a/datalad/plugin/tests/test_addurls.py
+++ b/datalad/plugin/tests/test_addurls.py
@@ -171,22 +171,21 @@
eq_(subpaths,
{"kid", "kid/no", "adult", "adult/yes", "adult/no"})
- fnames, urls, meta, subdss = zip(*i... | null | null | namanjain12/datalad_final:e02655bc1504ec8e1369fa4a367d808733110663 | true | null | 1 | 36 | null | 976 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.282667 | 80.76675 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.