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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,800 | swe_smith::train::50023 | swe_smith | train | 50,023 | facebookresearch__fvcore.a491d5b9.func_pm_class_rm_funcs__9vmtfuxv | swesmith/facebookresearch__fvcore.a491d5b9 | facebookresearch/fvcore | python | null | # CfgNode's COMPUTED_ attributes functionality is broken
## Description
I'm trying to use the `CfgNode` class from fvcore, but I've noticed that the functionality for handling computed attributes (those starting with "COMPUTED_") is completely broken after updating to the latest version.
When I try to set a computed... | diff --git a/fvcore/common/config.py b/fvcore/common/config.py
index cef5ba9..62eb213 100644
--- a/fvcore/common/config.py
+++ b/fvcore/common/config.py
@@ -131,29 +131,4 @@ class CfgNode(_CfgNode):
assert (
BASE_KEY not in cfg_other
), "The reserved key '{}' can only be used in files!".f... | ["tests/test_common.py::TestCfgNode::test_setattr"] | ["io_tests/test_file_io.py::TestNativeIO::test_bad_args", "io_tests/test_file_io.py::TestNativeIO::test_copy", "io_tests/test_file_io.py::TestNativeIO::test_exists", "io_tests/test_file_io.py::TestNativeIO::test_get_local_path", "io_tests/test_file_io.py::TestNativeIO::test_isdir", "io_tests/test_file_io.py::TestNative... | jyangballin/swesmith.x86_64.facebookresearch_1776_fvcore.a491d5b9 | true | null | 1 | 27 | 1 | 1,574 | 0 | 0.6 | 1 | 0.75 | 1 | 0.352333 | 81.332 | |||
4,801 | swe_smith::train::44356 | swe_smith | train | 44,356 | pydata__patsy.a5d16484.func_pm_ctrl_shuffle__ytw576f0 | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | DesignMatrix test function broken due to variable reference order
#### Description
The `test_design_matrix()` function in `design_info.py` has variables being referenced before they are defined, causing an `UnboundLocalError`.
#### Steps/Code to Reproduce
```python
from patsy.design_info import test_design_matrix
t... | diff --git a/patsy/design_info.py b/patsy/design_info.py
index d94b97a..4ab4b2a 100644
--- a/patsy/design_info.py
+++ b/patsy/design_info.py
@@ -1269,50 +1269,50 @@ class DesignMatrix(np.ndarray):
def test_design_matrix():
- import pytest
-
- di = DesignInfo(["a1", "a2", "a3", "b"])
+ assert mm6.design_in... | ["patsy/design_info.py::test_design_matrix"] | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 60 | 1 | 912 | 0 | 0.6 | 1 | 0.75 | 1 | 0.352 | 81.331 | |||
4,802 | swe_smith::train::5198 | swe_smith | train | 5,198 | agronholm__exceptiongroup.0b4f4937.lm_rewrite__a4nqb1bt | swesmith/agronholm__exceptiongroup.0b4f4937 | agronholm/exceptiongroup | python | null | SyntaxError Formatting Issue in Exception Handling
I encountered an issue with the formatting of SyntaxError exceptions in the latest update. When a SyntaxError is raised, the traceback formatting does not display the expected output, particularly when it comes to indicating the error location with a caret.
Here's a ... | diff --git a/src/exceptiongroup/_formatting.py b/src/exceptiongroup/_formatting.py
index 4c52d77..61373b2 100644
--- a/src/exceptiongroup/_formatting.py
+++ b/src/exceptiongroup/_formatting.py
@@ -315,30 +315,47 @@ class PatchedTracebackException(traceback.TracebackException):
string in the output.
""... | ["tests/test_formatting.py::test_exceptionhook", "tests/test_formatting.py::test_exceptiongroup_as_cause", "tests/test_formatting.py::test_exceptiongroup_loop", "tests/test_formatting.py::test_exceptionhook_format_exception_only", "tests/test_formatting.py::test_formatting_syntax_error", "tests/test_formatting.py::test... | ["tests/test_catch.py::test_bad_arg", "tests/test_catch.py::test_bad_handler", "tests/test_catch.py::test_catch_exceptiongroup[naked_basegroup]", "tests/test_catch.py::test_catch_exceptiongroup[naked_group]", "tests/test_catch.py::test_catch_exceptiongroup[iterable_basegroup]", "tests/test_catch.py::test_catch_exceptio... | jyangballin/swesmith.x86_64.agronholm_1776_exceptiongroup.0b4f4937 | true | null | 1 | 59 | 19 | 932 | 0 | 0.6 | 1 | 0.75 | 1 | 0.352 | 81.331 | |||
4,803 | swe_bench::test::48 | swe_bench | test | 48 | astropy__astropy-14253 | astropy/astropy | astropy/astropy | python | dd2304672cdf4ea1b6f124f9f22ec5069a13c9f5 | When should `info` be linked to a new object?
Mostly for @taldcroft - I noticed that in `Quantity` the way we have set up `__array_finalize__`, `info` is passed on not just for views (where it should be), but also for copies (implicitly in arithmetic operations, etc.). Which ones are reasonable? Just thinking about wh... | @mhvk - I basically agree with your assessment as being logical. I guess the only question is about having an easily stated rule for what happens. I wonder if we could make a rule (with a corresponding implementation) which is basically: "Any unary operation on a Quantity will preserve the `info` attribute if defined... | diff --git a/astropy/units/quantity.py b/astropy/units/quantity.py
--- a/astropy/units/quantity.py
+++ b/astropy/units/quantity.py
@@ -731,7 +731,9 @@ def _result_as_quantity(self, result, unit, out):
if out is None:
# View the result array as a Quantity with the proper unit.
- return... | diff --git a/astropy/units/tests/test_quantity.py b/astropy/units/tests/test_quantity.py
--- a/astropy/units/tests/test_quantity.py
+++ b/astropy/units/tests/test_quantity.py
@@ -397,6 +397,16 @@ def test_multiplication(self):
assert new_quantity.value == 171.3
assert new_quantity.unit == u.meter
+ ... | ["astropy/units/tests/test_quantity_info.py::TestQuantityInfo::test_unary_op", "astropy/units/tests/test_quantity_info.py::TestQuantityInfo::test_binary_op", "astropy/units/tests/test_quantity_info.py::TestQuantityInfo::test_unit_change", "astropy/units/tests/test_quantity_info.py::TestStructuredQuantity::test_keying"] | ["astropy/units/tests/test_quantity.py::TestQuantityCreation::test_1", "astropy/units/tests/test_quantity.py::TestQuantityCreation::test_2", "astropy/units/tests/test_quantity.py::TestQuantityCreation::test_3", "astropy/units/tests/test_quantity.py::TestQuantityCreation::test_nan_inf", "astropy/units/tests/test_quantit... | null | true | 2023-01-04T19:59:52Z | 1 | 38 | 4 | 1,151 | 0 | 0.8 | 1 | 0.55 | 1 | 0.3185 | 81.3305 | |
4,804 | swe_smith::train::24526 | swe_smith | train | 24,526 | sunpy__sunpy.f8edfd5c.combine_module__pxe28dkw | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | # Two critical bugs in SunPy IO module
## Description
I've found two separate issues in the SunPy IO module that are causing errors:
1. In `sunpy/io/_fits.py`, the `extract_waveunit` function is trying to use a variable `metre_submultiples` that doesn't exist in the current scope. This causes a `NameError` when tryi... | diff --git a/sunpy/io/_fits.py b/sunpy/io/_fits.py
index 5513abe..fb9365f 100644
--- a/sunpy/io/_fits.py
+++ b/sunpy/io/_fits.py
@@ -331,22 +331,9 @@ def extract_waveunit(header):
wavelnth_comment = header['KEYCOMMENTS'].get('WAVELNTH')
waveunit = header.get('WAVEUNIT')
if waveunit is not None:
- ... | ["sunpy/io/tests/test_fits.py::test_extract_waveunit[/testbed/sunpy/data/test/aia_171_level1.fits-angstrom]", "sunpy/io/tests/test_fits.py::test_extract_waveunit[/testbed/sunpy/data/test/waveunit/medn_halph_fl_20050501_074655.header-nm]", "sunpy/io/tests/test_fits.py::test_extract_waveunit[/testbed/sunpy/data/test/wave... | ["sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-None-4]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits-1-1]", "sunpy/io/tests/test_fits.py::test_read_hdus[/testbed/sunpy/data/test/hsi_image_20101016_191218.fits... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 2 | 24 | 26 | 1,631 | 0 | 0.6 | 1 | 0.75 | 1 | 0.351833 | 81.3305 | |||
4,805 | swe_smith::train::6972 | swe_smith | train | 6,972 | cantools__cantools.0c6a7871.combine_file__c30dqduh | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | C source generation command broken after recent changes
#### Description
The `cantools generate_c_source` command is completely broken and fails with a `NameError`. When trying to generate C source files from database files, the command crashes immediately.
#### Steps/Code to Reproduce
```bash
cantools generate_c_s... | diff --git a/src/cantools/subparsers/generate_c_source.py b/src/cantools/subparsers/generate_c_source.py
index 1ee533c..85a006a 100644
--- a/src/cantools/subparsers/generate_c_source.py
+++ b/src/cantools/subparsers/generate_c_source.py
@@ -9,12 +9,12 @@ from ..database.can.c_source import camel_to_snake_case, generate... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode", "tests/test_command_line.py::CanToolsCommandLineTest::test_decode_can_fd", "tests/test_command_line.p... | ["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_conversion.py::TestConversi... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 62 | 91 | 870 | 0 | 0.6 | 1 | 0.75 | 1 | 0.351667 | 81.33 | |||
4,806 | swe_smith::train::22516 | swe_smith | train | 22,516 | tweepy__tweepy.91a41c6e.func_pm_remove_cond__nwy3de1d | swesmith/tweepy__tweepy.91a41c6e | tweepy/tweepy | python | null | ### Bug: AttributeError when updating or destroying status
#### Bug Summary
Encountering an `AttributeError` when attempting to update or destroy a status using the Tweepy API. This issue seems to occur when trying to update a status with or without keyword arguments.
#### Steps to Reproduce
Here's a minimal exampl... | diff --git a/tweepy/models.py b/tweepy/models.py
index f29361e..0504a59 100644
--- a/tweepy/models.py
+++ b/tweepy/models.py
@@ -319,39 +319,8 @@ class Status(Model, HashableID):
status = cls(api)
setattr(status, '_json', json)
for k, v in json.items():
- if k == 'user':
- ... | ["tests/test_api.py::TweepyAPITests::testupdateanddestroystatus", "tests/test_api.py::TweepyAPITests::testupdateanddestroystatuswithoutkwarg", "tests/test_api.py::TweepyAPITests::testupdatestatuswithmedia", "tests/test_api.py::TweepyAPITests::testverifycredentials", "tests/test_cursors.py::TweepyCursorTests::testcursor... | ["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre... | jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e | true | null | 1 | 33 | 6 | 1,450 | 0 | 0.6 | 1 | 0.75 | 1 | 0.351667 | 81.33 | |||
4,807 | swe_smith::train::7050 | swe_smith | train | 7,050 | cantools__cantools.0c6a7871.combine_file__o0yp15q2 | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | # SYM file parsing fails with "could not convert string to float" error
## Reproduction Steps
I'm trying to load a SYM file but getting an error about converting a string to float:
```python
import cantools
# Try to load a SYM file
db = cantools.database.load_file('my_file.sym')
```
This results in the following e... | diff --git a/src/cantools/database/can/formats/sym.py b/src/cantools/database/can/formats/sym.py
index 4bdc121..382ae6e 100644
--- a/src/cantools/database/can/formats/sym.py
+++ b/src/cantools/database/can/formats/sym.py
@@ -291,13 +291,13 @@ def _load_enums(tokens):
for _, _, name, _, values, _, _ in section:
... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_generate_c_source_sym", "tests/test_convert.py::CanToolsConvertFullTest::test_sym_to_dbc__compare_databases", "tests/test_convert.py::CanToolsConvertFullTest::test_sym_to_dbc__compare_files", "tests/test_database.py::CanToolsDatabaseTest::test_big_endian", "te... | ["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 | 38 | 17 | 1,350 | 0 | 0.6 | 1 | 0.75 | 1 | 0.351667 | 81.33 | |||
4,808 | swe_smith::train::24490 | swe_smith | train | 24,490 | sunpy__sunpy.f8edfd5c.combine_module__bsfm8waw | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | # BasicRegistrationFactory validation function detection is broken
I've found an issue with the `BasicRegistrationFactory` class in the `sunpy.util.datatype_factory_base` module. When registering a widget type with a validation function, the factory fails to properly detect the validation function.
## Steps to reprod... | diff --git a/sunpy/util/datatype_factory_base.py b/sunpy/util/datatype_factory_base.py
index 6c132c0..1bab0d0 100644
--- a/sunpy/util/datatype_factory_base.py
+++ b/sunpy/util/datatype_factory_base.py
@@ -128,14 +128,12 @@ class BasicRegistrationFactory:
_classmethod = inspect.ismethod(vfunc) and v... | ["sunpy/util/tests/test_datatype_factory_base.py::test_default_factory", "sunpy/util/tests/test_datatype_factory_base.py::test_no_default_factory", "sunpy/util/tests/test_datatype_factory_base.py::test_with_external_registry", "sunpy/util/tests/test_datatype_factory_base.py::test_multiple_match_factory", "sunpy/util/te... | ["sunpy/util/tests/test_datatype_factory_base.py::test_validation_fun_not_callable", "sunpy/util/tests/test_sysinfo.py::test_resolve_requirement_versions", "sunpy/util/tests/test_sysinfo.py::test_format_requirement_string"] | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 2 | 29 | 8 | 1,530 | 0 | 0.6 | 1 | 0.75 | 1 | 0.351667 | 81.33 | |||
4,809 | swe_smith::train::29267 | swe_smith | train | 29,267 | tox-dev__pipdeptree.c31b6418.pr_295 | swesmith/tox-dev__pipdeptree.c31b6418 | tox-dev/pipdeptree | python | null | ### Bug report
**Bug summary**
After the recent changes, there seems to be an issue with the `requires` method in the `DistPackage` class. It appears that the method is not returning the expected results, leading to unexpected behavior in various parts of the application.
**Code for reproduction**
Here's a minimal ... | diff --git a/src/pipdeptree/_models/package.py b/src/pipdeptree/_models/package.py
index 7e49250..80b3b23 100644
--- a/src/pipdeptree/_models/package.py
+++ b/src/pipdeptree/_models/package.py
@@ -99,27 +99,12 @@ class DistPackage(Package):
self._obj = obj
self.req = req
- def requires(self) -> I... | ["tests/_models/test_dag.py::test_package_dag_filter_packages_uses_pep503normalize", "tests/_models/test_dag.py::test_package_dag_from_pkgs", "tests/_models/test_dag.py::test_package_dag_from_pkgs_uses_pep503normalize", "tests/_models/test_dag.py::test_package_from_pkgs_given_invalid_requirements", "tests/_models/test_... | ["tests/_models/test_package.py::test_guess_version_setuptools", "tests/_models/test_package.py::test_package_as_frozen_repr", "tests/_models/test_package.py::test_dist_package_render_as_root", "tests/_models/test_package.py::test_dist_package_render_as_branch", "tests/_models/test_package.py::test_dist_package_render_... | jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418 | true | null | 1 | 23 | 38 | 1,649 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3515 | 81.3295 | |||
4,810 | swe_smith::train::117 | swe_smith | train | 117 | oauthlib__oauthlib.1fd52536.combine_file__p7fe43rn | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OAuth2 endpoint validation logic broken for POST requests and token type hints
#### Description
The OAuth2 endpoint validation is not working correctly. POST requests with query parameters are being accepted when they should be rejected, and token type hint validation is behaving incorrectly.
#### Steps/Code to Repr... | diff --git a/oauthlib/oauth2/rfc6749/endpoints/base.py b/oauthlib/oauth2/rfc6749/endpoints/base.py
index 987fac6..7240083 100644
--- a/oauthlib/oauth2/rfc6749/endpoints/base.py
+++ b/oauthlib/oauth2/rfc6749/endpoints/base.py
@@ -68,8 +68,8 @@ class BaseEndpoint:
def _raise_on_unsupported_token(self, request):
... | ["tests/oauth2/rfc6749/endpoints/test_error_responses.py::ErrorResponseTest::test_invalid_post_request", "tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py::IntrospectEndpointTest::test_introspect_bad_post_request", "tests/oauth2/rfc6749/endpoints/test_introspect_endpoint.py::IntrospectEndpointTest::test_intro... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 8 | 10 | 1,948 | 0 | 0.6 | 1 | 0.75 | 1 | 0.351333 | 81.329 | |||
4,811 | swe_smith::train::4581 | swe_smith | train | 4,581 | pygments__pygments.27649ebb.lm_rewrite__ktxnu4hz | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | ### Unexpected Behavior in `get_bool_opt` Function
#### What happened?
I encountered an issue with the `get_bool_opt` function in the `pygments.util` module. When providing certain inputs, the function raises an `OptionError` unexpectedly.
#### What did you expect to happen?
I expected the function to handle all va... | diff --git a/pygments/util.py b/pygments/util.py
index 83cf104..2f0b260 100644
--- a/pygments/util.py
+++ b/pygments/util.py
@@ -62,22 +62,18 @@ def get_bool_opt(options, optname, default=None):
``on``, the ones for ``False`` are ``0``, ``no``, ``false`` and ``off``
(matched case-insensitively).
"""
- ... | ["tests/test_util.py::test_getoptions"] | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 28 | 1 | 1,547 | 0 | 0.6 | 1 | 0.75 | 1 | 0.351167 | 81.3285 | |||
4,812 | r2e_gym::train::4081 | r2e_gym | train | 4,081 | coveragepy__0387bbaa5e9ab2ad834311249802695ebb0c34ca | coveragepy | nedbat/coveragepy | python | 0387bbaa5e9ab2ad834311249802695ebb0c34ca | **Analysis:**
- **Key Parts:**
- **Commit Message:** "fix: colons in decorators shouldn't stop an exclusion."
- **Test Result:** The test `test_decorator_pragmas_with_colons` failed in the old commit and passes in the new commit.
- **Failure Details:** The parser incorrectly included a statement (`{9}`) when it ... | diff --git a/CHANGES.rst b/CHANGES.rst
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -22,7 +22,8 @@
Unreleased
----------
-Nothing yet.
+- Fix: A colon in a decorator expression would cause an exclusion to end too
+ early, preventing the exclusion of the decorated function. This is now fixed.
.. _changes_612:
diff -... | diff --git a/tests/test_parser.py b/tests/test_parser.py
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -174,9 +174,29 @@
""")
raw_statements = {3, 4, 5, 6, 8, 9, 10, 13, 15, 16, 17, 20, 22, 23, 25, 26}
if env.PYBEHAVIOR.trace_decorated_def:
- raw_statements.update([1... | null | null | namanjain12/coveragepy_final:0387bbaa5e9ab2ad834311249802695ebb0c34ca | true | null | 2 | 12 | null | 2,579 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.469833 | 81.32825 | ||
4,813 | r2e_gym::train::4599 | r2e_gym | train | 4,599 | numpy__0210cca2e10199dabc81b64fca2085ab62645b7f | numpy | numpy/numpy | python | 0210cca2e10199dabc81b64fca2085ab62645b7f | **Analysis**
- **Key Parts of Commit Details and Test Results:**
- **Commit Message:** `BUG: fix genfromtxt check of converters when using usecols.`
- **Commit Patch:** Modifications in `genfromtxt` function to correctly handle `usecols` and `converters`.
- **Test Results Before Commit:**
- **Failed Test:** ... | diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -1575,22 +1575,25 @@
for (miss, fill) in zipit]
# Update the converters to use the user-defined ones
uc_update = []
- for (i, conv) in user_converters.items():
+ for (j, c... | diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py
--- a/numpy/lib/tests/test_io.py
+++ b/numpy/lib/tests/test_io.py
@@ -1085,6 +1085,21 @@
control = np.array([2009., 23., 46],)
assert_equal(test, control)
+ def test_dtype_with_converters_and_usecols(self):
+ dstr = "1,5,... | null | null | namanjain12/numpy_final:0210cca2e10199dabc81b64fca2085ab62645b7f | true | null | 1 | 15 | null | 2,519 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.469833 | 81.32825 | ||
4,814 | swe_smith::train::29751 | swe_smith | train | 29,751 | getnikola__nikola.0f4c230e.combine_file__ldff2z7y | swesmith/getnikola__nikola.0f4c230e | getnikola/nikola | python | null | # Multiple plugin loading issues in PluginManager
## Description
I've found several issues with the plugin manager that cause it to fail when loading plugins. The main issue appears to be related to variable scoping and path construction.
Steps to reproduce:
```python
from nikola.plugin_manager import PluginManager... | diff --git a/nikola/plugin_manager.py b/nikola/plugin_manager.py
index 29755cb..d36f671 100644
--- a/nikola/plugin_manager.py
+++ b/nikola/plugin_manager.py
@@ -109,7 +109,6 @@ class PluginManager:
plugin_folders: deque = deque([place for place in self.plugin_places if place.exists() and place.is_dir()])
... | ["tests/test_metadata_extractors.py::test_compiler_metadata[CompileRest-rst-rest-reST]", "tests/test_metadata_extractors.py::test_compiler_metadata[CompileMarkdown-md-markdown-Markdown]", "tests/test_metadata_extractors.py::test_compiler_metadata[CompileHtml-html-html-HTML]", "tests/test_plugin_manager.py::test_locate_... | ["tests/integration/test_dev_server_basepath_helper.py::test_basepath[http://localhost-]", "tests/integration/test_dev_server_basepath_helper.py::test_basepath[http://local.host-]", "tests/integration/test_dev_server_basepath_helper.py::test_basepath[http://localhost/-]", "tests/integration/test_dev_server_basepath_hel... | jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e | true | null | 1 | 18 | 16 | 1,746 | 0 | 0.6 | 1 | 0.75 | 1 | 0.351 | 81.328 | |||
4,815 | swe_smith::train::19724 | swe_smith | train | 19,724 | kurtmckee__feedparser.cad965a3.combine_module__eo7meldw | swesmith/kurtmckee__feedparser.cad965a3 | kurtmckee/feedparser | python | null | Date parsing functions broken after code reorganization
#### Description
The date parsing functions in feedparser are returning None or raising UnboundLocalError for valid date strings. This affects multiple date formats including RFC822, W3DTF, and Perforce formats.
#### Steps/Code to Reproduce
```python
import fe... | diff --git a/feedparser/datetimes/perforce.py b/feedparser/datetimes/perforce.py
index a613dec..44108fc 100644
--- a/feedparser/datetimes/perforce.py
+++ b/feedparser/datetimes/perforce.py
@@ -31,16 +31,17 @@ import time
def _parse_date_perforce(date_string):
- """parse a date in yyyy/mm/dd hh:mm:ss TTT format"... | ["tests/test_well_formed.py::test_http_conditions[info4]", "tests/test_well_formed.py::test_strict_parser[info85]", "tests/test_well_formed.py::test_strict_parser[info1578]", "tests/test_well_formed.py::test_loose_parser[info1445]", "tests/test_well_formed.py::test_loose_parser[info1633]", "tests/test_well_formed.py::t... | ["tests/test_temporary_behavior.py::test_issue_328_fallback_behavior", "tests/test_make_safe_absolute_uri.py::test_catch_value_error[http://bad]test/]", "tests/test_feedparser_dict.py::test_single_mapping_target_2", "tests/test_feedparser_dict.py::test_license", "tests/test_feedparser_dict.py::test_category", "tests/te... | jyangballin/swesmith.x86_64.kurtmckee_1776_feedparser.cad965a3 | true | null | 3 | 49 | 71 | 1,126 | 0 | 0.6 | 1 | 0.75 | 1 | 0.351 | 81.328 | |||
4,816 | swe_smith::train::1243 | swe_smith | train | 1,243 | Cog-Creators__Red-DiscordBot.33e0eac7.combine_file__mgef0764 | swesmith/Cog-Creators__Red-DiscordBot.33e0eac7 | cog-creators/red-discordbot | python | null | # Case creation fails with incorrect parameter assignment
I'm experiencing an issue with the modlog case creation. When trying to create a new case, the system is mixing up the parameters and assigning them to the wrong attributes.
## Steps to reproduce
1. Try to create a modlog case with the following code:
```pyt... | diff --git a/redbot/core/modlog.py b/redbot/core/modlog.py
index bd0a2fe..0301b6c 100644
--- a/redbot/core/modlog.py
+++ b/redbot/core/modlog.py
@@ -270,15 +270,15 @@ class Case:
self.bot = bot
self.guild = guild
self.created_at = created_at
- self.action_type = action_type
- se... | ["tests/cogs/test_mod.py::test_modlog_case_create"] | ["tests/cogs/test_alias.py::test_is_valid_alias_name", "tests/cogs/test_alias.py::test_empty_guild_aliases", "tests/cogs/test_alias.py::test_empty_global_aliases", "tests/cogs/test_alias.py::test_add_guild_alias", "tests/cogs/test_alias.py::test_translate_alias_message", "tests/cogs/test_alias.py::test_delete_guild_ali... | jyangballin/swesmith.x86_64.cog-creators_1776_red-discordbot.33e0eac7 | true | null | 1 | 34 | 1 | 1,426 | 0 | 0.6 | 1 | 0.75 | 1 | 0.351 | 81.328 | |||
4,817 | swe_smith::train::46771 | swe_smith | train | 46,771 | python-trio__trio.cfbbe2c1.combine_module__yercg5q5 | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | # Instrument registration order is incorrect
## Description
I've discovered an issue with the `add_instrument` method in Trio. The docstring and the actual implementation are in the wrong order, causing problems when using instruments.
## To Reproduce
Here's a simple example that demonstrates the issue:
```python
... | diff --git a/src/trio/_core/_instrumentation.py b/src/trio/_core/_instrumentation.py
index 40bddd1..5acc6d1 100644
--- a/src/trio/_core/_instrumentation.py
+++ b/src/trio/_core/_instrumentation.py
@@ -41,17 +41,6 @@ class Instruments(dict[str, dict[Instrument, None]]):
@_public
def add_instrument(self, inst... | ["src/trio/_core/_tests/test_instrumentation.py::test_instrument_that_raises_on_getattr", "src/trio/_core/_tests/test_io.py::test_io_manager_statistics"] | ["src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_basics", "src/trio/_core/_tests/test_asyncgen.py::test_asyncgen_throws_during_finalization", "src/trio/_core/_tests/test_asyncgen.py::test_firstiter_after_closing", "src/trio/_core/_tests/test_asyncgen.py::test_interdependent_asyncgen_cleanup_order", "src/trio/_co... | jyangballin/swesmith.x86_64.python-trio_1776_trio.cfbbe2c1 | true | null | 2 | 29 | 2 | 1,525 | 0 | 0.6 | 1 | 0.75 | 1 | 0.350833 | 81.3275 | |||
4,818 | swe_smith::train::930 | swe_smith | train | 930 | oauthlib__oauthlib.1fd52536.lm_rewrite__ydxue4oz | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | # list_to_scope function no longer validates input types properly
## Description
While using the library, I noticed that the `list_to_scope` function in `oauthlib/oauth2/rfc6749/utils.py` no longer validates input types properly. Previously, the function would raise a `ValueError` when an invalid scope type was provi... | diff --git a/oauthlib/oauth2/rfc6749/utils.py b/oauthlib/oauth2/rfc6749/utils.py
index 7dc27b3..73e6946 100644
--- a/oauthlib/oauth2/rfc6749/utils.py
+++ b/oauthlib/oauth2/rfc6749/utils.py
@@ -13,13 +13,12 @@ from oauthlib.common import urldecode
def list_to_scope(scope):
"""Convert a list of scopes to a space ... | ["tests/oauth2/rfc6749/test_utils.py::UtilsTests::test_list_to_scope"] | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 11 | 1 | 1,884 | 0 | 0.6 | 1 | 0.75 | 1 | 0.350667 | 81.327 | |||
4,819 | swe_smith::train::32753 | swe_smith | train | 32,753 | pydantic__pydantic.acb0f10f.lm_rewrite__29zq8ltv | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | `__modify_schema__` method not properly handled for generic types
#### Description
When using generic types with the deprecated `__modify_schema__` method, the schema generation fails to properly detect and handle the method, causing unexpected behavior instead of the expected deprecation warning or error.
#### Step... | diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py
index 9ec8a61..320b479 100644
--- a/pydantic/_internal/_generate_schema.py
+++ b/pydantic/_internal/_generate_schema.py
@@ -2433,36 +2433,25 @@ def wrap_default(field_info: FieldInfo, schema: core_schema.CoreSchema) -> core_
... | ["tests/test_deprecated.py::test_modify_schema_error", "tests/test_deprecated.py::test_modify_schema_on_nested_class_error", "tests/test_json_schema.py::test_schema_for_generic_field", "tests/test_json_schema.py::test_advanced_generic_schema"] | ["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_... | jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f | true | null | 1 | 47 | 4 | 1,164 | 0 | 0.6 | 1 | 0.75 | 1 | 0.350667 | 81.327 | |||
4,820 | swe_smith::train::35117 | swe_smith | train | 35,117 | django__daphne.32ac73e1.func_pm_class_rm_funcs__6x31bppa | swesmith/django__daphne.32ac73e1 | django/daphne | python | null | # WebSocket communication broken after recent changes
## Description
I've noticed that WebSocket communication is completely broken in the latest version. When trying to send and receive messages through WebSockets, the connection times out and no messages are being transmitted.
## Steps to Reproduce
Here's a simpl... | diff --git a/daphne/ws_protocol.py b/daphne/ws_protocol.py
index b1e29c3..f6a5f19 100755
--- a/daphne/ws_protocol.py
+++ b/daphne/ws_protocol.py
@@ -128,22 +128,6 @@ class WebSocketProtocol(WebSocketServerProtocol):
logger.error(failure)
return failure
- ### Twisted event handling
-
- def onOp... | ["tests/test_websocket.py::TestWebsocket::test_binary_frames", "tests/test_websocket.py::TestWebsocket::test_http_timeout", "tests/test_websocket.py::TestWebsocket::test_text_frames"] | ["tests/test_checks.py::test_check_daphne_installed", "tests/test_cli.py::TestEndpointDescriptions::testBasics", "tests/test_cli.py::TestEndpointDescriptions::testFileDescriptorBinding", "tests/test_cli.py::TestEndpointDescriptions::testMultipleEnpoints", "tests/test_cli.py::TestEndpointDescriptions::testTcpPortBinding... | jyangballin/swesmith.x86_64.django_1776_daphne.32ac73e1 | true | null | 1 | 29 | 3 | 1,523 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3505 | 81.3265 | |||
4,821 | swe_smith::train::24531 | swe_smith | train | 24,531 | sunpy__sunpy.f8edfd5c.combine_module__qmglve7d | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | # Code in `_check_registered_widget` method is incorrectly ordered
## Description
I found a bug in the `_check_registered_widget` method of the `BasicRegistrationFactory` class. The code appears to be incorrectly ordered, causing errors when trying to use the factory.
When trying to use the factory, I get the follow... | diff --git a/sunpy/util/datatype_factory_base.py b/sunpy/util/datatype_factory_base.py
index 6c132c0..519219c 100644
--- a/sunpy/util/datatype_factory_base.py
+++ b/sunpy/util/datatype_factory_base.py
@@ -67,16 +67,6 @@ class BasicRegistrationFactory:
return self._check_registered_widget(*args, **kwargs)
... | ["sunpy/util/tests/test_datatype_factory_base.py::test_default_factory", "sunpy/util/tests/test_datatype_factory_base.py::test_no_default_factory", "sunpy/util/tests/test_datatype_factory_base.py::test_with_external_registry", "sunpy/util/tests/test_datatype_factory_base.py::test_multiple_match_factory", "sunpy/util/te... | ["sunpy/util/tests/test_datatype_factory_base.py::test_validation_fun_not_callable", "sunpy/util/tests/test_sysinfo.py::test_find_dependencies", "sunpy/util/tests/test_sysinfo.py::test_missing_dependencies_by_extra", "sunpy/util/tests/test_sysinfo.py::test_resolve_requirement_versions", "sunpy/util/tests/test_sysinfo.p... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 2 | 25 | 6 | 1,603 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3505 | 81.3265 | |||
4,822 | swe_smith::train::6574 | swe_smith | train | 6,574 | joke2k__faker.8b401a7d.combine_module__73ycrnyf | swesmith/joke2k__faker.8b401a7d | joke2k/faker | python | null | Missing methods in SSN providers for de_DE and es_ES
Several important methods are missing from the SSN providers for German and Spanish locales:
1. In the German (de_DE) SSN provider:
- The `__letter_to_digit_string` method has a logic issue where it always returns "0" + digit without checking the length, causing... | diff --git a/faker/providers/ssn/de_DE/__init__.py b/faker/providers/ssn/de_DE/__init__.py
index 14af05f..9a8e02c 100644
--- a/faker/providers/ssn/de_DE/__init__.py
+++ b/faker/providers/ssn/de_DE/__init__.py
@@ -21,10 +21,9 @@ class Provider(BaseProvider):
def __letter_to_digit_string(self, letter: str) -> str:... | ["tests/providers/test_ssn.py::TestDeDe::test_rvnr", "tests/providers/test_ssn.py::TestDeDe::test_rvnr_birthdate", "tests/providers/test_ssn.py::TestEsES::test_doi", "tests/providers/test_ssn.py::TestEsES::test_nie", "tests/providers/test_ssn.py::TestEsES::test_nif", "tests/providers/test_ssn.py::TestEsES::test_nuss", ... | ["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi... | jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d | true | null | 2 | 39 | 10 | 1,322 | 0 | 0.6 | 1 | 0.75 | 1 | 0.350333 | 81.326 | |||
4,823 | swe_smith::train::30465 | swe_smith | train | 30,465 | pyca__pyopenssl.04766a49.lm_rewrite__mlz6j2bi | swesmith/pyca__pyopenssl.04766a49 | pyca/pyopenssl | python | null | # Passphrase validation missing for non-PEM file types in _PassphraseHelper
## Description
The `_PassphraseHelper` class in `crypto.py` is not properly validating passphrase inputs for non-PEM file types. The validation check that prevents using a passphrase with non-PEM file types has been removed in a recent change... | diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py
index 448a19a..b76c9a4 100644
--- a/src/OpenSSL/crypto.py
+++ b/src/OpenSSL/crypto.py
@@ -2235,22 +2235,22 @@ def dump_privatekey(
class _PassphraseHelper:
- def __init__(
- self,
- type: int,
- passphrase: PassphraseCallableT | Non... | ["tests/test_crypto.py::TestFunction::test_load_privatekey_passphraseWrongType", "tests/test_crypto.py::TestFunction::test_dump_privatekey_passphrase_wrong_type"] | ["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 | 26 | 2 | 1,582 | 0 | 0.6 | 1 | 0.75 | 1 | 0.350333 | 81.326 | |||
4,824 | swe_smith::train::24546 | swe_smith | train | 24,546 | sunpy__sunpy.f8edfd5c.combine_module__uy6oi1rl | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | TimeSeries _text_summary method broken due to variable ordering issues
#### Description
The `_text_summary` method in `GenericTimeSeries` is failing with `UnboundLocalError` when trying to access variables that haven't been defined yet. The method appears to have variables being used before they are assigned.
#### S... | diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py
index 08e2a6a..1a64b4f 100644
--- a/sunpy/timeseries/sources/goes.py
+++ b/sunpy/timeseries/sources/goes.py
@@ -113,7 +113,6 @@ class XRSTimeSeries(GenericTimeSeries):
pattern_inst = ("GOES 1-{SatelliteNumber:02d} {}")
pa... | ["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/go1520120601.fits.gz-GOES-15]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc-GOES-13]", "sunpy/timeseries/sources/tests/test_go... | ["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/go1520120601.fits.gz]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/t... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 2 | 51 | 15 | 1,081 | 0 | 0.6 | 1 | 0.75 | 1 | 0.350167 | 81.3255 | |||
4,825 | swe_smith::train::38601 | swe_smith | train | 38,601 | erikrose__parsimonious.0d3f5f93.combine_file__ozsj8n4u | swesmith/erikrose__parsimonious.0d3f5f93 | erikrose/parsimonious | python | null | # Error messages in ParseError and IncompleteParseError are incorrect
After updating to the latest version, I noticed that error messages from the parser are incorrect and misleading.
## Description
The error messages from ParseError and IncompleteParseError are showing incorrect information:
1. Rule names and text... | diff --git a/parsimonious/exceptions.py b/parsimonious/exceptions.py
index b9e05bc..7165d33 100644
--- a/parsimonious/exceptions.py
+++ b/parsimonious/exceptions.py
@@ -20,13 +20,13 @@ class ParseError(StrAndRepr, ParsimoniousError):
self.expr = expr
def __str__(self):
- rule_name = (("'%s'" % se... | ["parsimonious/tests/test_expressions.py::ErrorReportingTests::test_favoring_named_rules", "parsimonious/tests/test_expressions.py::ErrorReportingTests::test_inner_rule_succeeding", "parsimonious/tests/test_expressions.py::ErrorReportingTests::test_line_and_column", "parsimonious/tests/test_expressions.py::ErrorReporti... | ["parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_call_vs_inline", "parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_lists_vs_dicts", "parsimonious/tests/test_benchmarks.py::TestBenchmarks::test_startswith_vs_regex", "parsimonious/tests/test_expressions.py::LengthTests::test_not", "parsimonious/t... | jyangballin/swesmith.x86_64.erikrose_1776_parsimonious.0d3f5f93 | true | null | 1 | 29 | 5 | 1,519 | 0 | 0.6 | 1 | 0.75 | 1 | 0.349833 | 81.3245 | |||
4,826 | swe_smith::train::35931 | swe_smith | train | 35,931 | stanfordnlp__dspy.651a4c71.lm_rewrite__pocotluj | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # OpenAI fine-tuning fails with incorrect data format validation
I've encountered an issue with the OpenAI provider's data format validation for fine-tuning. The validation function is not correctly checking against the proper TrainDataFormat enum values.
## Reproduction
Here's a minimal example to reproduce the iss... | diff --git a/dspy/clients/openai.py b/dspy/clients/openai.py
index 1f5952c..f7e6dae 100644
--- a/dspy/clients/openai.py
+++ b/dspy/clients/openai.py
@@ -211,16 +211,30 @@ class OpenAIProvider(Provider):
return status
+ @staticmethod
@staticmethod
def validate_data_format(data_format: TrainData... | ["tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response_headers", "tests/signatures/test_adapter_image.py::test_pdf_from_file"] | ["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 1 | 30 | 4 | 1,499 | 0 | 0.6 | 1 | 0.75 | 1 | 0.349833 | 81.3245 | |||
4,827 | swe_bench::test::1191 | swe_bench | test | 1,191 | psf__requests-2754 | psf/requests | psf/requests | python | 0acbf2b91d9a196a58535e926531f810d44c4d3f | .htaccesss redirect to non ASCII folder does not work
Hello,
I have the following setup on a shared hoster:
- Apache 2.2.15
- A Japanese language .みんな (.minna; xn--q9jyb4c) IDN domain.
- A blog which is in the subfolder ブログ (blog)
- A redirect in the .htaccess file like this: `Redirect /index.html /ブログ/`
So I usually... | Is that error output from response.content or response.text? If it's text, can you show me response.content please?
Could you also show us
``` py
print(response.request.url)
print(response.history)
for resp in response.history:
print('---')
print('Request URI: {}'.format(resp.request.url))
print('Status: ... | diff --git a/requests/sessions.py b/requests/sessions.py
--- a/requests/sessions.py
+++ b/requests/sessions.py
@@ -13,7 +13,7 @@
from datetime import datetime
from .auth import _basic_auth_str
-from .compat import cookielib, OrderedDict, urljoin, urlparse
+from .compat import cookielib, OrderedDict, urljoin, urlpar... | diff --git a/test_requests.py b/test_requests.py
--- a/test_requests.py
+++ b/test_requests.py
@@ -17,7 +17,7 @@
from requests.auth import HTTPDigestAuth, _basic_auth_str
from requests.compat import (
Morsel, cookielib, getproxies, str, urljoin, urlparse, is_py3,
- builtin_str, OrderedDict)
+ builtin_str, ... | ["test_requests.py::TestUtils::test_unquote_unreserved_handles_bytes"] | ["test_requests.py::TestRequests::test_entry_points", "test_requests.py::TestRequests::test_invalid_url[MissingScheme-hiwpefhipowhefopw]", "test_requests.py::TestRequests::test_invalid_url[InvalidScheme-localhost:3128]", "test_requests.py::TestRequests::test_invalid_url[InvalidScheme-localhost.localdomain:3128/]", "tes... | null | true | 2015-09-01T08:35:36Z | 2 | 40 | 1 | 1,098 | 0 | 0.8 | 1 | 0.55 | 1 | 0.316333 | 81.324 | |
4,828 | swe_smith::train::1003 | swe_smith | train | 1,003 | pytest-dev__iniconfig.16793ead.combine_module__u21zij0p | swesmith/pytest-dev__iniconfig.16793ead | pytest-dev/iniconfig | python | null | # Empty lines and comments in INI files cause IndexError
### What happened?
When parsing INI files with empty lines or comment lines, the parser throws an IndexError. This happens because the code tries to access characters in empty lines.
```python
import iniconfig
# This fails with IndexError
config = iniconfig.I... | diff --git a/src/iniconfig/__init__.py b/src/iniconfig/__init__.py
index 3c40bc9..aa67f7c 100644
--- a/src/iniconfig/__init__.py
+++ b/src/iniconfig/__init__.py
@@ -106,39 +106,19 @@ class IniConfig:
path: Final[str]
sections: Final[Mapping[str, Mapping[str, str]]]
- def __init__(
- self,
- ... | ["testing/test_iniconfig.py::test_tokenize[comment]", "testing/test_iniconfig.py::test_tokenize[comment2]", "testing/test_iniconfig.py::test_parse_empty", "testing/test_iniconfig.py::test_iniconfig_from_file", "testing/test_iniconfig.py::test_iniconfig_section_first", "testing/test_iniconfig.py::test_iniconig_section_d... | ["testing/test_iniconfig.py::test_tokenize[section]", "testing/test_iniconfig.py::test_tokenize[value]", "testing/test_iniconfig.py::test_ParseError", "testing/test_iniconfig.py::test_continuation_needs_perceeding_token", "testing/test_iniconfig.py::test_continuation_cant_be_after_section", "testing/test_iniconfig.py::... | jyangballin/swesmith.x86_64.pytest-dev_1776_iniconfig.16793ead | true | null | 2 | 45 | 18 | 1,198 | 0 | 0.6 | 1 | 0.75 | 1 | 0.349667 | 81.324 | |||
4,829 | swe_smith::train::28424 | swe_smith | train | 28,424 | encode__starlette.db5063c2.combine_module__dkhbbzwz | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | Debug mode not working correctly in error middleware
#### Description
When using Starlette's debug mode, the error middleware is not displaying HTML error pages correctly. Instead of showing the detailed traceback in HTML format when requesting with `text/html` accept header, it's returning plain text responses with ... | diff --git a/starlette/middleware/errors.py b/starlette/middleware/errors.py
index 76ad776..25c037e 100644
--- a/starlette/middleware/errors.py
+++ b/starlette/middleware/errors.py
@@ -187,16 +187,15 @@ class ServerErrorMiddleware:
raise exc
def format_line(self, index: int, line: str, frame_lineno:... | ["tests/middleware/test_base.py::test_fully_evaluated_response[asyncio]", "tests/middleware/test_base.py::test_fully_evaluated_response[trio]", "tests/middleware/test_errors.py::test_debug_text[asyncio]", "tests/middleware/test_errors.py::test_debug_html[asyncio]", "tests/middleware/test_errors.py::test_debug_after_res... | ["tests/middleware/test_base.py::test_custom_middleware[asyncio]", "tests/middleware/test_base.py::test_state_data_across_multiple_middlewares[asyncio]", "tests/middleware/test_base.py::test_app_middleware_argument[asyncio]", "tests/middleware/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTTPMiddle... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 2 | 42 | 66 | 1,257 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3495 | 81.3235 | |||
4,830 | swe_smith::train::907 | swe_smith | train | 907 | oauthlib__oauthlib.1fd52536.lm_rewrite__s4kfykir | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | # OAuth2 token response parsing breaks with URL-encoded responses
## Description
I'm experiencing an issue with the OAuth2 token response parsing. After a recent change, the library no longer accepts URL-encoded token responses, which breaks compatibility with several OAuth providers.
## Steps to reproduce
Here's a... | diff --git a/oauthlib/oauth2/rfc6749/parameters.py b/oauthlib/oauth2/rfc6749/parameters.py
index 6c55000..fe315c1 100644
--- a/oauthlib/oauth2/rfc6749/parameters.py
+++ b/oauthlib/oauth2/rfc6749/parameters.py
@@ -414,36 +414,19 @@ def parse_token_response(body, scope=None):
.. _`Section 3.3`: https://tools.ietf.or... | ["tests/oauth2/rfc6749/clients/test_base.py::ClientTest::test_parse_token_response_expires_at_is_int", "tests/oauth2/rfc6749/test_parameters.py::ParameterTests::test_json_token_response", "tests/oauth2/rfc6749/test_parameters.py::ParameterTests::test_url_encoded_token_response"] | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 31 | 3 | 1,477 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3495 | 81.3235 | |||
4,831 | swe_smith::train::21836 | swe_smith | train | 21,836 | life4__textdistance.c3aca916.combine_module__kyq6fz1x | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | Normalized distance calculation returns incorrect values
#### Description
The normalized distance calculation is producing unexpected results. When comparing identical strings, the normalized distance should be 0, but it's returning 1 instead. Additionally, there are division by zero errors occurring in various dista... | diff --git a/textdistance/algorithms/base.py b/textdistance/algorithms/base.py
index 5ce8cc7..478f569 100644
--- a/textdistance/algorithms/base.py
+++ b/textdistance/algorithms/base.py
@@ -45,9 +45,9 @@ class Base:
"""Get distance from 0 to 1
"""
maximum = self.maximum(*sequences)
- if... | ["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati... | ["tests/test_common.py::test_normalization_range[alg21]", "tests/test_common.py::test_normalization_by_one[alg21]", "tests/test_common.py::test_normalization_same[alg21]", "tests/test_common.py::test_normalization_monotonic[alg21]", "tests/test_common.py::test_no_common_chars[alg1]", "tests/test_common.py::test_no_comm... | jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916 | true | null | 2 | 52 | 137 | 1,055 | 0 | 0.6 | 1 | 0.75 | 1 | 0.349167 | 81.3225 | |||
4,832 | swe_smith::train::45228 | swe_smith | train | 45,228 | dask__dask.5f61e423.combine_module__ehizdohr | swesmith/dask__dask.5f61e423 | dask/dask | python | null | # Divisions validation removed from from_delayed function
### Describe the bug
I noticed that when using `from_delayed` with the `divisions` parameter, the function no longer validates the divisions properly. This can lead to unexpected behavior when working with delayed dataframes.
### Steps to Reproduce
```python... | diff --git a/dask/dataframe/dask_expr/io/_delayed.py b/dask/dataframe/dask_expr/io/_delayed.py
index 879191b..509d9f7 100644
--- a/dask/dataframe/dask_expr/io/_delayed.py
+++ b/dask/dataframe/dask_expr/io/_delayed.py
@@ -126,16 +126,6 @@ def from_delayed(
if meta is None:
meta = delayed(make_meta)(dfs[0])... | ["dask/dataframe/dask_expr/io/tests/test_io.py::test_io_fusion_zero", "dask/dataframe/io/tests/test_io.py::test_from_delayed"] | ["dask/dataframe/dask_expr/io/tests/test_delayed.py::test_from_delayed_optimizing", "dask/dataframe/dask_expr/io/tests/test_delayed.py::test_from_delayed[None]", "dask/dataframe/dask_expr/io/tests/test_delayed.py::test_from_delayed[foo]", "dask/dataframe/dask_expr/io/tests/test_delayed.py::test_from_delayed_dask", "das... | jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423 | true | null | 2 | 27 | 2 | 1,555 | 0 | 0.6 | 1 | 0.75 | 1 | 0.349167 | 81.3225 | |||
4,833 | swe_smith::train::7137 | swe_smith | train | 7,137 | cantools__cantools.0c6a7871.combine_module__7oq38vpo | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | # Incorrect offset and choices handling in diagnostics data module
## Current problem
When loading CDD (Calibration Data Definition) files for diagnostics, the library fails with errors like:
```
bitstruct.Error: bad format 'f2p3f-1f-1f-1f-1'
```
or
```
cantools.database.UnsupportedDatabaseFormatError: CDD: "bad f... | diff --git a/src/cantools/database/diagnostics/data.py b/src/cantools/database/diagnostics/data.py
index 3c97eec..d3fc465 100644
--- a/src/cantools/database/diagnostics/data.py
+++ b/src/cantools/database/diagnostics/data.py
@@ -99,7 +99,7 @@ class Data:
@property
def offset(self) -> Union[int, float]:
... | ["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_cdd_add", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanTo... | ["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 | 2 | 38 | 6 | 1,335 | 0 | 0.6 | 1 | 0.75 | 1 | 0.349167 | 81.3225 | |||
4,834 | swe_smith::train::38401 | swe_smith | train | 38,401 | dbader__schedule.82a43db1.func_basic__h1zzwlhs | swesmith/dbader__schedule.82a43db1 | dbader/schedule | python | null | Job initialization with default values breaks scheduling functionality
#### Description
When creating a new Job instance, the constructor now sets default values for several fields that should remain None until properly configured. This causes scheduling to fail with various errors.
#### Steps/Code to Reproduce
```... | diff --git a/schedule/__init__.py b/schedule/__init__.py
index 8e12eeb..3ac234c 100644
--- a/schedule/__init__.py
+++ b/schedule/__init__.py
@@ -225,34 +225,19 @@ class Job:
"""
def __init__(self, interval: int, scheduler: Optional[Scheduler] = None):
- self.interval: int = interval # pause interval... | ["test_schedule.py::SchedulerTests::test_align_utc_offset_after_fold_fixate", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_change", "test_schedule.py::SchedulerTests::test_align_utc_offset_no_timezone", "test_schedule.py::SchedulerTests::test_align_utc_offset_with_dst_fold", "test_schedule.py::SchedulerT... | ["test_schedule.py::SchedulerTests::test_misconfigured_job_wont_break_scheduler", "test_schedule.py::SchedulerTests::test_move_to_next_weekday_nextweek", "test_schedule.py::SchedulerTests::test_move_to_next_weekday_today", "test_schedule.py::SchedulerTests::test_move_to_next_weekday_tommorrow", "test_schedule.py::Sched... | jyangballin/swesmith.x86_64.dbader_1776_schedule.82a43db1 | true | null | 1 | 35 | 75 | 1,394 | 0 | 0.6 | 1 | 0.75 | 1 | 0.349 | 81.322 | |||
4,835 | swe_smith::train::45229 | swe_smith | train | 45,229 | dask__dask.5f61e423.combine_module__f0z6fgvm | swesmith/dask__dask.5f61e423 | dask/dask | python | null | `from_array` fails with UnboundLocalError when creating DataFrames from arrays
#### Description
When using `dd.from_array()` or `dd.from_dask_array()` to create DataFrames from numpy arrays or dask arrays, the function fails with `UnboundLocalError: local variable 'dtypes' referenced before assignment`. This affects ... | diff --git a/dask/dataframe/dask_expr/io/io.py b/dask/dataframe/dask_expr/io/io.py
index ab41615..cdaf760 100644
--- a/dask/dataframe/dask_expr/io/io.py
+++ b/dask/dataframe/dask_expr/io/io.py
@@ -631,15 +631,6 @@ class FromArray(PartitionsFiltered, BlockwiseIO):
_pd_length_stats = None
_absorb_projections = ... | ["dask/dataframe/io/tests/test_io.py::test_meta_from_array", "dask/dataframe/io/tests/test_io.py::test_meta_from_1darray", "dask/dataframe/io/tests/test_io.py::test_meta_from_recarray", "dask/dataframe/io/tests/test_io.py::test_from_array", "dask/dataframe/io/tests/test_io.py::test_from_array_with_record_dtype", "dask/... | ["dask/dataframe/io/tests/test_io.py::test_from_pandas_dataframe", "dask/dataframe/io/tests/test_io.py::test_from_pandas_small", "dask/dataframe/io/tests/test_io.py::test_from_pandas_npartitions_is_accurate[1]", "dask/dataframe/io/tests/test_io.py::test_from_pandas_npartitions_is_accurate[2]", "dask/dataframe/io/tests/... | jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423 | true | null | 2 | 49 | 25 | 1,114 | 0 | 0.6 | 1 | 0.75 | 1 | 0.349 | 81.322 | |||
4,836 | swe_smith::train::705 | swe_smith | train | 705 | oauthlib__oauthlib.1fd52536.func_pm_class_rm_funcs__6hxkzodo | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | RefreshTokenGrant missing create_token_response method
#### Description
The `RefreshTokenGrant` class is missing the `create_token_response` method, causing OAuth2 refresh token flows to fail completely.
#### Steps/Code to Reproduce
```python
from oauthlib.oauth2 import RefreshTokenGrant
from oauthlib.oauth2 import... | diff --git a/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py b/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py
index 43bf55a..b0ae6ef 100644
--- a/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py
+++ b/oauthlib/oauth2/rfc6749/grant_types/refresh_token.py
@@ -26,52 +26,6 @@ class RefreshTokenGrant(GrantTyp... | ["tests/oauth2/rfc6749/grant_types/test_refresh_token.py::RefreshTokenGrantTest::test_create_cors_headers", "tests/oauth2/rfc6749/grant_types/test_refresh_token.py::RefreshTokenGrantTest::test_create_cors_headers_insecure_origin", "tests/oauth2/rfc6749/grant_types/test_refresh_token.py::RefreshTokenGrantTest::test_crea... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 48 | 38 | 1,133 | 0 | 0.6 | 1 | 0.75 | 1 | 0.348833 | 81.3215 | |||
4,837 | swe_smith::train::28064 | swe_smith | train | 28,064 | jsvine__pdfplumber.02ff4313.lm_rewrite__qc0gwaar | swesmith/jsvine__pdfplumber.02ff4313 | jsvine/pdfplumber | python | null | ### Bug: `filter_edges` does not raise ValueError for invalid orientation
#### Description
The `filter_edges` function is expected to raise a `ValueError` when an invalid orientation is provided. However, it seems that the function does not handle this case correctly, allowing invalid orientations to pass through wit... | diff --git a/pdfplumber/utils/geometry.py b/pdfplumber/utils/geometry.py
index 93f5f3b..3cb640c 100644
--- a/pdfplumber/utils/geometry.py
+++ b/pdfplumber/utils/geometry.py
@@ -261,19 +261,37 @@ def obj_to_edges(obj: T_obj) -> T_obj_list:
return {"rect": rect_to_edges, "curve": curve_to_edges}[t](obj)
-def... | ["tests/test_utils.py::Test::test_filter_edges"] | ["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 | 50 | 1 | 1,093 | 0 | 0.6 | 1 | 0.75 | 1 | 0.348833 | 81.3215 | |||
4,838 | swe_smith::train::26714 | swe_smith | train | 26,714 | pylint-dev__astroid.b114f6b5.pr_2599 | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | # [Bug]: collections.abc objects are no longer subscriptable
## Description
After a recent update, I noticed that collections.abc objects that should be subscriptable (like MutableSet, Iterator, ByteString) are no longer working with subscript notation. This is breaking my code that relies on this functionality.
## ... | diff --git a/astroid/brain/brain_collections.py b/astroid/brain/brain_collections.py
index 94944e6..7111b90 100644
--- a/astroid/brain/brain_collections.py
+++ b/astroid/brain/brain_collections.py
@@ -4,19 +4,13 @@
from __future__ import annotations
-from typing import TYPE_CHECKING
-
from astroid.brain.helpers i... | ["tests/brain/test_brain.py::CollectionsBrain::test_collections_object_subscriptable", "tests/brain/test_brain.py::CollectionsBrain::test_collections_object_subscriptable_2", "tests/brain/test_brain.py::CollectionsBrain::test_collections_object_subscriptable_3", "tests/brain/test_brain.py::CollectionsBrain::test_collec... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 28 | 4 | 1,533 | 0 | 0.6 | 1 | 0.75 | 1 | 0.348833 | 81.3215 | |||
4,839 | swe_smith::train::31421 | swe_smith | train | 31,421 | benoitc__gunicorn.bacbf8aa.combine_module__9gd5iprl | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | HTTP body parsing fails with TypeError after recent changes
#### Description
After some recent changes to the HTTP body parsing code, I'm getting TypeErrors when trying to process HTTP requests. The errors seem to be related to mixing string and bytes operations in the body parsing logic.
#### Steps/Code to Reproduc... | diff --git a/gunicorn/http/body.py b/gunicorn/http/body.py
index d7ee29e..a82027f 100644
--- a/gunicorn/http/body.py
+++ b/gunicorn/http/body.py
@@ -11,9 +11,9 @@ from gunicorn.http.errors import (NoMoreData, ChunkMissingTerminator,
class ChunkedReader:
def __init__(self, req, unreader):
- self.req = req... | ["tests/test_http.py::test_readline_empty_body", "tests/test_http.py::test_readline_zero_size", "tests/test_http.py::test_readline_new_line_before_size", "tests/test_http.py::test_readline_new_line_after_size", "tests/test_http.py::test_readline_no_new_line", "tests/test_http.py::test_readline_buffer_loaded", "tests/te... | ["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 | 2 | 31 | 57 | 1,473 | 0 | 0.6 | 1 | 0.75 | 1 | 0.348833 | 81.3215 | |||
4,840 | swe_smith::train::5846 | swe_smith | train | 5,846 | mahmoud__boltons.3bfcfdd0.combine_file__eml7ze28 | swesmith/mahmoud__boltons.3bfcfdd0 | mahmoud/boltons | python | null | # Sentinel objects can't be pickled and copy behavior is broken
## Description
I'm using the `make_sentinel` function from `boltons.typeutils` and discovered two issues with the sentinel objects it creates:
1. Trying to pickle a sentinel object fails with a pickling error
2. The copy behavior is inconsistent with wh... | diff --git a/boltons/typeutils.py b/boltons/typeutils.py
index 875e2e2..35dc9be 100644
--- a/boltons/typeutils.py
+++ b/boltons/typeutils.py
@@ -83,13 +83,17 @@ def make_sentinel(name='_MISSING', var_name=None):
if var_name:
def __reduce__(self):
- return self.var_name
+ ... | ["tests/test_typeutils.py::test_sentinel_pickle", "tests/test_typeutils.py::test_sentinel_copy"] | ["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac... | jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0 | true | null | 1 | 8 | 2 | 1,932 | 0 | 0.6 | 1 | 0.75 | 1 | 0.348667 | 81.321 | |||
4,841 | swe_smith::train::38243 | swe_smith | train | 38,243 | john-kurkowski__tldextract.3d1bf184.lm_rewrite__j3pnle0p | swesmith/john-kurkowski__tldextract.3d1bf184 | john-kurkowski/tldextract | python | null | ### Issue: FileNotFoundError when extracting TLDs with fallback to snapshot
#### Description
When attempting to extract top-level domains (TLDs) using the `tldextract` library, a `FileNotFoundError` is raised if the fallback to the snapshot is enabled. This issue occurs when the suffix list cannot be fetched from the... | diff --git a/tldextract/suffix_list.py b/tldextract/suffix_list.py
index 154f79f..f13a299 100644
--- a/tldextract/suffix_list.py
+++ b/tldextract/suffix_list.py
@@ -94,27 +94,25 @@ def get_suffix_lists(
)
-def _get_suffix_lists(
- cache: DiskCache,
- urls: Sequence[str],
- cache_fetch_timeout: float |... | ["tests/custom_suffix_test.py::test_private_extraction", "tests/main_test.py::test_american", "tests/main_test.py::test_british", "tests/main_test.py::test_no_subdomain", "tests/main_test.py::test_nested_subdomain", "tests/main_test.py::test_odd_but_possible", "tests/main_test.py::test_suffix", "tests/main_test.py::tes... | ["tests/cli_test.py::test_cli_no_input", "tests/cli_test.py::test_cli_parses_args", "tests/cli_test.py::test_cli_posargs", "tests/cli_test.py::test_cli_namedargs", "tests/cli_test.py::test_cli_json_output", "tests/custom_suffix_test.py::test_suffix_which_is_not_in_custom_list", "tests/custom_suffix_test.py::test_custom... | jyangballin/swesmith.x86_64.john-kurkowski_1776_tldextract.3d1bf184 | true | null | 1 | 38 | 25 | 1,331 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3485 | 81.3205 | |||
4,842 | swe_smith::train::43799 | swe_smith | train | 43,799 | pydata__patsy.a5d16484.combine_file__jh58c4ln | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | demo_data function raises ValueError when no kwargs provided
#### Description
The `demo_data` function in `patsy.user_util` incorrectly raises a `ValueError` when called without any keyword arguments, even though this should be valid usage.
#### Steps/Code to Reproduce
```python
from patsy import demo_data
# This ... | diff --git a/patsy/user_util.py b/patsy/user_util.py
index 080af84..c50bc31 100644
--- a/patsy/user_util.py
+++ b/patsy/user_util.py
@@ -126,24 +126,24 @@ def demo_data(*names, **kwargs):
"""
nlevels = kwargs.pop("nlevels", 2)
min_rows = kwargs.pop("min_rows", 5)
- if kwargs:
- raise TypeError(... | ["patsy/test_build.py::test_simple", "patsy/test_build.py::test_R_bugs", "patsy/test_build.py::test_redundancy_thoroughly", "patsy/test_build.py::test_data_types", "patsy/test_build.py::test_NA_action", "patsy/test_build.py::test_NA_drop_preserves_levels", "patsy/test_build.py::test_data_mismatch", "patsy/test_build.py... | ["patsy/build.py::test__max_allowed_dim", "patsy/build.py::test__eval_factor_numerical", "patsy/build.py::test__eval_factor_categorical", "patsy/build.py::test__column_combinations", "patsy/build.py::test__subterm_column_names_iter_and__build_subterm", "patsy/build.py::test__factors_memorize", "patsy/build.py::test__ex... | jyangballin/swesmith.x86_64.pydata_1776_patsy.a5d16484 | true | null | 1 | 56 | 13 | 971 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3485 | 81.3205 | |||
4,843 | swe_smith::train::32953 | swe_smith | train | 32,953 | pydantic__pydantic.acb0f10f.pr_6797 | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | # Field validation error messages are inconsistent after recent changes
## Description
I noticed that the error messages for invalid field names in Pydantic models have changed and are now inconsistent. This affects how private attributes and fields with leading underscores are handled.
When trying to define a model... | diff --git a/pydantic/_internal/_model_construction.py b/pydantic/_internal/_model_construction.py
index 88f67ef..46c1b97 100644
--- a/pydantic/_internal/_model_construction.py
+++ b/pydantic/_internal/_model_construction.py
@@ -419,23 +419,16 @@ def inspect_namespace( # noqa C901
elif isinstance(value, Model... | ["tests/test_main.py::test_cannot_use_leading_underscore_field_names", "tests/test_private_attributes.py::test_private_attribute_invalid_name", "tests/test_private_attributes.py::test_private_attributes_not_dunder"] | ["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_fastapi_startup_... | jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f | true | null | 1 | 17 | 3 | 1,750 | 0 | 0.6 | 1 | 0.75 | 1 | 0.348333 | 81.32 | |||
4,844 | swe_smith::train::51520 | swe_smith | train | 51,520 | pydicom__pydicom.7d361b3d.combine_file__krd0m7mr | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | dicomfile context manager returns None instead of self
#### Description
When using the `dicomfile` context manager, the `__enter__` method returns `None` instead of the expected `dicomfile` instance, causing `AttributeError` when trying to access attributes or iterate over the file.
#### Steps/Code to Reproduce
```... | diff --git a/src/pydicom/util/leanread.py b/src/pydicom/util/leanread.py
index 605e507..ef32467 100644
--- a/src/pydicom/util/leanread.py
+++ b/src/pydicom/util/leanread.py
@@ -38,7 +38,7 @@ class dicomfile:
fobj.seek(0)
def __enter__(self) -> "dicomfile":
- return self
+ return None
... | ["tests/test_util.py::TestLeanRead::test_explicit_little", "tests/test_util.py::TestLeanRead::test_implicit_little", "tests/test_util.py::TestLeanRead::test_explicit_big", "tests/test_util.py::TestLeanRead::test_no_tsyntax", "tests/test_util.py::TestLeanRead::test_no_meta", "tests/test_util.py::TestLeanRead::test_UN_se... | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 61 | 6 | 870 | 0 | 0.6 | 1 | 0.75 | 1 | 0.348333 | 81.32 | |||
4,845 | swe_smith::train::10411 | swe_smith | train | 10,411 | paramiko__paramiko.23f92003.func_basic__cfr5gh8e | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | OpenSSH private key loading returns None instead of raising exceptions
#### Description
When loading OpenSSH format private keys, the key loading process silently returns `None` in several error conditions instead of raising appropriate exceptions. This makes it difficult to distinguish between different types of fai... | diff --git a/paramiko/pkey.py b/paramiko/pkey.py
index f0b2d6d..e5873c6 100644
--- a/paramiko/pkey.py
+++ b/paramiko/pkey.py
@@ -600,7 +600,7 @@ class PKey:
def _read_private_key_openssh(self, lines, password):
"""
Read the new OpenSSH SSH2 private key format available
- since OpenSSH vers... | ["tests/test_pkey.py::KeyTest::test_load_openssh_format_DSS_key", "tests/test_pkey.py::KeyTest::test_load_openssh_format_EC_key", "tests/test_pkey.py::KeyTest::test_load_openssh_format_RSA_key", "tests/test_pkey.py::KeyTest::test_loading_openssh_RSA_keys_uses_correct_p_q"] | ["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag... | jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003 | true | null | 1 | 42 | 4 | 1,249 | 0 | 0.6 | 1 | 0.75 | 1 | 0.348167 | 81.3195 | |||
4,846 | swe_smith::train::2668 | swe_smith | train | 2,668 | cknd__stackprinter.219fcc52.combine_file__md7w9ci8 | swesmith/cknd__stackprinter.219fcc52 | cknd/stackprinter | python | null | # Stackprinter fails to correctly handle frame references and exception info tuples
## Description
I've encountered an issue with stackprinter where it fails to correctly format stack frames and exception information. The problem appears to be related to how stackprinter determines the current frame and validates exc... | diff --git a/stackprinter/__init__.py b/stackprinter/__init__.py
index 94ae70c..544804b 100644
--- a/stackprinter/__init__.py
+++ b/stackprinter/__init__.py
@@ -11,15 +11,12 @@ from stackprinter.tracing import TracePrinter, trace
def _guess_thing(f):
""" default to the current exception or current stack frame"""
... | ["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting", "tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting"] | ["tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"] | jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52 | true | null | 1 | 11 | 4 | 1,869 | 0 | 0.6 | 1 | 0.75 | 1 | 0.348167 | 81.3195 | |||
4,847 | swe_smith::train::35873 | swe_smith | train | 35,873 | stanfordnlp__dspy.651a4c71.lm_rewrite__45mb4gbn | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # `inspect.getfile` fails to find source for classes in Jupyter notebooks
## Bug report
**Bug summary**
When using the `inspect.getfile` function on classes defined in Jupyter notebooks, it fails to correctly identify the source file. This issue occurs specifically when trying to inspect classes defined in the `__mai... | diff --git a/dspy/teleprompt/utils.py b/dspy/teleprompt/utils.py
index 954ce56..4c9ceac 100644
--- a/dspy/teleprompt/utils.py
+++ b/dspy/teleprompt/utils.py
@@ -428,19 +428,21 @@ def old_getfile(object):
type(object).__name__))
def new_getfile(object):
- if not inspect.isclass(object):
+ "... | ["tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response_headers", "tests/signatures/test_adapter_image.py::test_pdf_from_file"] | ["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 1 | 30 | 4 | 1,489 | 0 | 0.6 | 1 | 0.75 | 1 | 0.348167 | 81.3195 | |||
4,848 | r2e_gym::train::4190 | r2e_gym | train | 4,190 | numpy__1be88ff070cce6ac720804e861583682564f7e0d | numpy | numpy/numpy | python | 1be88ff070cce6ac720804e861583682564f7e0d | **Analysis:**
- **Key Parts:**
- The commit aims to make `issubdtype` consistent for types and dtypes by removing deprecated behavior.
- Previously, passing strings or types representing specific dtypes to `issubdtype` could behave inconsistently, such as mapping `float` to `floating` instead of `float64`.
- A n... | diff --git a/doc/release/upcoming_changes/15773.compatibility.rst b/doc/release/upcoming_changes/15773.compatibility.rst
--- a/doc/release/upcoming_changes/15773.compatibility.rst
+++ b/doc/release/upcoming_changes/15773.compatibility.rst
@@ -0,0 +1,10 @@
+``issubdtype`` no longer interprets ``float`` as ``np.floating`... | diff --git a/numpy/core/tests/test_numerictypes.py b/numpy/core/tests/test_numerictypes.py
--- a/numpy/core/tests/test_numerictypes.py
+++ b/numpy/core/tests/test_numerictypes.py
@@ -401,6 +401,35 @@
assert_(not np.issubdtype(w1(np.float32), w2(np.float64)))
assert_(not np.issubdtype(w1(np.flo... | null | null | namanjain12/numpy_final:1be88ff070cce6ac720804e861583682564f7e0d | true | null | 2 | 38 | null | 2,040 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.466667 | 81.31875 | ||
4,849 | swe_smith::train::33071 | swe_smith | train | 33,071 | django-money__django-money.835c1ab8.combine_file__vthyqfkt | swesmith/django-money__django-money.835c1ab8 | django-money/django-money | python | null | # MoneyWidget in forms is broken after recent changes
## Description
There appears to be several issues with the MoneyWidget implementation in the forms module. The widget is not rendering correctly and form validation is failing.
## How to Reproduce
I'm using the MoneyWidget in my forms and noticed several issues:... | diff --git a/djmoney/forms/widgets.py b/djmoney/forms/widgets.py
index 3217654..3846896 100644
--- a/djmoney/forms/widgets.py
+++ b/djmoney/forms/widgets.py
@@ -16,15 +16,15 @@ class MoneyWidget(MultiWidget):
*args,
**kwargs
):
- self.default_currency = default_currency
- if not cur... | ["tests/test_form.py::test_default_currency", "tests/test_form.py::TestDisabledField::test_validation", "tests/test_form.py::test_decimal_places_model_form[PreciseForm]", "tests/test_form.py::test_decimal_places_model_form[DefaultPrecisionModelForm]", "tests/test_form.py::test_precedence_decimal_places_model_form"] | ["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/... | jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8 | true | null | 1 | 16 | 5 | 1,767 | 0 | 0.6 | 1 | 0.75 | 1 | 0.347833 | 81.3185 | |||
4,850 | swe_smith::train::32427 | swe_smith | train | 32,427 | pydantic__pydantic.acb0f10f.combine_module__k13exbnj | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | Discriminated union validation broken after recent changes
#### Description
Discriminated union validation is failing for models with validators. When trying to validate data with discriminated unions that have model validators, the validation process appears to be broken and doesn't properly handle the discriminator... | diff --git a/pydantic/_internal/_discriminated_union.py b/pydantic/_internal/_discriminated_union.py
index 5dd6fda..8fe6ed4 100644
--- a/pydantic/_internal/_discriminated_union.py
+++ b/pydantic/_internal/_discriminated_union.py
@@ -240,44 +240,6 @@ class _ApplyInferredDiscriminator:
if choice['type'] == 'no... | ["tests/benchmarks/test_discriminated_unions.py::test_efficiency_with_highly_nested_examples", "tests/benchmarks/test_north_star.py::test_north_star_validate_json", "tests/benchmarks/test_north_star.py::test_north_star_validate_python", "tests/test_dataclasses.py::test_discriminated_union_basemodel_instance_value", "te... | ["tests/benchmarks/test_attribute_access.py::test_setattr", "tests/benchmarks/test_attribute_access.py::test_getattr", "tests/benchmarks/test_discriminated_unions.py::test_schema_build", "tests/benchmarks/test_fastapi_startup_generics.py::test_fastapi_startup_perf", "tests/benchmarks/test_fastapi_startup_simple.py::tes... | jyangballin/swesmith.x86_64.pydantic_1776_pydantic.acb0f10f | true | null | 2 | 43 | 102 | 1,227 | 0 | 0.6 | 1 | 0.75 | 1 | 0.347833 | 81.3185 | |||
4,851 | swe_smith::train::839 | swe_smith | train | 839 | oauthlib__oauthlib.1fd52536.func_pm_remove_loop__qkdd9lzb | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | Authorization request validation broken for duplicate parameters and custom validators
#### Description
Authorization requests with duplicate parameters are no longer being properly validated, and custom post-auth validators are not being executed during authorization request validation.
#### Steps/Code to Reproduce... | diff --git a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
index 09dc619..4aef8d8 100644
--- a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
+++ b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
@@ -332,23 +332,6 @@ class Auth... | ["tests/oauth2/rfc6749/endpoints/test_error_responses.py::ErrorResponseTest::test_empty_parameter", "tests/oauth2/rfc6749/endpoints/test_error_responses.py::ErrorResponseTest::test_invalid_request_duplicate_params", "tests/oauth2/rfc6749/grant_types/test_authorization_code.py::AuthorizationCodeGrantTest::test_custom_au... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 21 | 23 | 1,667 | 0 | 0.6 | 1 | 0.75 | 1 | 0.347833 | 81.3185 | |||
4,852 | swe_smith::train::21763 | swe_smith | train | 21,763 | pexpect__ptyprocess.1067dbda.func_pm_op_swap__s2gwmv8x | swesmith/pexpect__ptyprocess.1067dbda | pexpect/ptyprocess | python | null | String formatting issues in PtyProcess causing multiple failures
### Description
I've discovered several issues with string formatting in the PtyProcess class that cause various failures when spawning processes. The problems appear to be related to incorrect string formatting patterns in error messages and process ha... | diff --git a/ptyprocess/ptyprocess.py b/ptyprocess/ptyprocess.py
index 0f05803..fc22a3d 100644
--- a/ptyprocess/ptyprocess.py
+++ b/ptyprocess/ptyprocess.py
@@ -213,7 +213,7 @@ class PtyProcess(object):
command_with_path = which(command)
if command_with_path is None:
raise FileNotFoundErr... | ["tests/test_invalid_binary.py::InvalidBinaryChars::test_invalid_binary", "tests/test_preexec_fn.py::PreexecFns::test_preexec", "tests/test_preexec_fn.py::PreexecFns::test_preexec_error", "tests/test_spawn.py::PtyTestCase::test_pass_fds"] | ["tests/test_echo.py::PtyEchoTestCase::test_waitnoecho_forever", "tests/test_echo.py::PtyEchoTestCase::test_waitnoecho_timeout", "tests/test_spawn.py::PtyTestCase::test_quick_spawn", "tests/test_spawn.py::PtyTestCase::test_spawn_sh", "tests/test_spawn.py::PtyTestCase::test_spawn_sh_unicode", "tests/test_wait.py::TestWa... | jyangballin/swesmith.x86_64.pexpect_1776_ptyprocess.1067dbda | true | null | 1 | 13 | 4 | 1,826 | 0 | 0.6 | 1 | 0.75 | 1 | 0.347667 | 81.318 | |||
4,853 | swe_smith::train::79 | swe_smith | train | 79 | oauthlib__oauthlib.1fd52536.combine_file__g0ehixvk | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | Resource Owner Password Credentials Grant returns wrong status codes and error types
#### Description
The Resource Owner Password Credentials Grant is returning incorrect HTTP status codes and OAuth2 error types in several scenarios. When client authentication fails or tokens are successfully created, the responses d... | diff --git a/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py b/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py
index 55d9287..412be78 100644
--- a/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py
+++ b/oauthlib/oauth2/rfc6749/grant_types/re... | ["tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_legacy", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_custom_authentication", "tests/oauth2/rfc6749/endpoints/test_error_responses.py::ErrorResponseTest::test_invalid... | ["tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_request_token", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_check_verifier", "tests/oauth1/rfc5849/endpoints/test_access_token.py::AccessTokenEndpointTest::test_valid_request", "tests/oauth... | jyangballin/swesmith.x86_64.oauthlib_1776_oauthlib.1fd52536 | true | null | 1 | 25 | 20 | 1,586 | 0 | 0.6 | 1 | 0.75 | 1 | 0.347667 | 81.318 | |||
4,854 | swe_smith::train::10203 | swe_smith | train | 10,203 | paramiko__paramiko.23f92003.combine_file__vogrvz8o | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | SFTP operations failing with FileNotFoundError after recent changes
#### Description
SFTP file operations are consistently failing with `FileNotFoundError` when trying to create, read, or manipulate files through the SFTP server. This appears to affect all basic file operations including creating files, reading direc... | diff --git a/paramiko/sftp_server.py b/paramiko/sftp_server.py
index cd3910d..ec5fb4a 100644
--- a/paramiko/sftp_server.py
+++ b/paramiko/sftp_server.py
@@ -276,17 +276,17 @@ class SFTPServer(BaseSFTP, SubsystemHandler):
def _read_folder(self, request_number, folder):
flist = folder._get_next_files()
- ... | ["tests/test_sftp.py::TestSFTP::test_file", "tests/test_sftp.py::TestSFTP::test_write", "tests/test_sftp.py::TestSFTP::test_sftp_file_can_be_used_as_context_manager", "tests/test_sftp.py::TestSFTP::test_append", "tests/test_sftp.py::TestSFTP::test_rename", "tests/test_sftp.py::TestSFTP::testa_posix_rename", "tests/test... | ["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag... | jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003 | true | null | 1 | 20 | 39 | 1,686 | 0 | 0.6 | 1 | 0.75 | 1 | 0.347667 | 81.318 | |||
4,855 | swe_smith::train::49399 | swe_smith | train | 49,399 | mozilla__bleach.73871d76.func_pm_class_rm_funcs__csgky3oo | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | HTML parser methods missing after recent changes
#### Description
After some recent changes to the HTML parser, several methods that were previously available are now missing, causing `NameError` exceptions when trying to process HTML content.
#### Steps/Code to Reproduce
```python
import bleach
# This should work... | diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py
index 5427b7d..37dfc4a 100644
--- a/bleach/_vendor/html5lib/html5parser.py
+++ b/bleach/_vendor/html5lib/html5parser.py
@@ -1010,9 +1010,6 @@ def getPhases(debug):
self.tree.reconstructActiveFormattingElements()
... | ["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm... | ["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 | 48 | 185 | 1,125 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3475 | 81.3175 | |||
4,856 | swe_smith::train::48273 | swe_smith | train | 48,273 | sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_shuffle__wzlopg8z | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | UnboundLocalError when processing exact file paths with ignore patterns
#### Description
When processing exact file paths that match ignore patterns, the linter crashes with an `UnboundLocalError` because a variable is referenced before assignment.
#### Steps/Code to Reproduce
```python
import tempfile
import os
fr... | diff --git a/src/sqlfluff/core/linter/discovery.py b/src/sqlfluff/core/linter/discovery.py
index eb68e44..44bd64c 100644
--- a/src/sqlfluff/core/linter/discovery.py
+++ b/src/sqlfluff/core/linter/discovery.py
@@ -144,13 +144,7 @@ def _process_exact_path(
lower_file_exts: Tuple[str, ...],
outer_ignore_specs: I... | ["test/core/linter/discovery_test.py::test__linter__path_from_paths__file", "test/core/linter/discovery_test.py::test__linter__path_from_paths__explicit_ignore", "test/core/linter/discovery_test.py::test__linter__path_from_paths__specific_bad_ext", "test/core/linter/linter_test.py::test__linter__skip_large_bytes[0-Fals... | ["test/core/linter/discovery_test.py::test__linter__path_from_paths__dir", "test/core/linter/discovery_test.py::test__linter__path_from_paths__default", "test/core/linter/discovery_test.py::test__linter__path_from_paths__exts", "test/core/linter/discovery_test.py::test__linter__path_from_paths__not_exist", "test/core/l... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 29 | 26 | 1,504 | 0 | 0.6 | 1 | 0.75 | 1 | 0.347333 | 81.317 | |||
4,857 | swe_smith::train::24550 | swe_smith | train | 24,550 | sunpy__sunpy.f8edfd5c.combine_module__wkrjshbf | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | TimeSeries _text_summary method broken due to variable ordering issues
#### Description
The `_text_summary` method in `GenericTimeSeries` is failing with `UnboundLocalError` when trying to access variables that haven't been defined yet. This affects HTML representation and quicklook functionality.
#### Steps/Code to... | diff --git a/sunpy/timeseries/sources/goes.py b/sunpy/timeseries/sources/goes.py
index 08e2a6a..563fce0 100644
--- a/sunpy/timeseries/sources/goes.py
+++ b/sunpy/timeseries/sources/goes.py
@@ -125,19 +125,13 @@ class XRSTimeSeries(GenericTimeSeries):
or self.meta.metas[0].get("TELESCOP", "").strip()
... | ["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/go1520120601.fits.gz-GOES-15]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes_satno[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc-GOES-13]", "sunpy/timeseries/sources/tests/test_go... | ["sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/go1520120601.fits.gz]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/testbed/sunpy/data/test/sci_gxrs-l2-irrad_g13_d20170901_truncated.nc]", "sunpy/timeseries/sources/tests/test_goes.py::test_implicit_goes[/t... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 2 | 53 | 9 | 1,023 | 0 | 0.6 | 1 | 0.75 | 1 | 0.347167 | 81.3165 | |||
4,858 | swe_smith::train::30222 | swe_smith | train | 30,222 | pyca__pyopenssl.04766a49.combine_module__xxlnshi7 | swesmith/pyca__pyopenssl.04766a49 | pyca/pyopenssl | python | null | # Issues with export_keying_material in Connection class
## Description
The `export_keying_material` method in the `Connection` class is not working correctly. When trying to establish a connection between two memory BIO connections and export keying material, the results are inconsistent or incorrect.
## Steps to Re... | diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py
index eed27a0..effe293 100644
--- a/src/OpenSSL/SSL.py
+++ b/src/OpenSSL/SSL.py
@@ -2670,9 +2670,9 @@ class Connection:
context_len = 0
use_context = 0
if context is not None:
- context_buf = context
+ context_buf = co... | ["tests/test_crypto.py::TestX509::test_set_notBefore", "tests/test_crypto.py::TestX509::test_set_notAfter", "tests/test_ssl.py::TestMemoryBIO::test_memory_connect"] | ["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 | 2 | 16 | 3 | 1,763 | 0 | 0.6 | 1 | 0.75 | 1 | 0.347167 | 81.3165 | |||
4,859 | swe_smith::train::4266 | swe_smith | train | 4,266 | pygments__pygments.27649ebb.func_pm_class_rm_funcs__jh7btigu | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | MatlabSessionLexer missing get_tokens_unprocessed method
#### Description
The MatlabSessionLexer class is missing its `get_tokens_unprocessed` method, causing it to fail when trying to tokenize MATLAB session code. This breaks basic functionality for highlighting MATLAB interactive sessions.
#### Steps/Code to Repro... | diff --git a/pygments/lexers/matlab.py b/pygments/lexers/matlab.py
index 48fa580..9b963f5 100644
--- a/pygments/lexers/matlab.py
+++ b/pygments/lexers/matlab.py
@@ -2749,66 +2749,6 @@ class MatlabSessionLexer(Lexer):
version_added = '0.10'
_example = "matlabsession/matlabsession_sample.txt"
- def get_tok... | ["tests/test_basic_api.py::test_random_input[MatlabSessionLexer]", "tests/test_basic_api.py::test_lexer_options[MatlabSessionLexer]", "tests/examplefiles/matlabsession/matlabsession_sample.txt::", "tests/snippets/matlabsession/test_wrong_continuation.txt::"] | ["tests/test_rtf_formatter.py::test_hl_linenostart_lines_highlighted", "tests/test_rtf_formatter.py::test_rtf_footer", "tests/test_rtf_formatter.py::test_rtf_header", "tests/test_rtf_formatter.py::test_lineno_color_style_specify_hex", "tests/test_rtf_formatter.py::test_linenos_newline_characters", "tests/test_rtf_forma... | jyangballin/swesmith.x86_64.pygments_1776_pygments.27649ebb | true | null | 1 | 60 | 4 | 882 | 0 | 0.6 | 1 | 0.75 | 1 | 0.347 | 81.316 | |||
4,860 | swe_smith::train::24410 | swe_smith | train | 24,410 | sunpy__sunpy.f8edfd5c.lm_rewrite__pdoo214i | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | ### Unexpected RecursionError in Coordinate Transformations
#### Description
It seems there's an issue with the coordinate transformation logic that leads to a `RecursionError`. This occurs when attempting to transform between certain heliocentric and heliographic frames. The transformation process appears to enter a... | diff --git a/sunpy/coordinates/_transformations.py b/sunpy/coordinates/_transformations.py
index 5b18d02..0a05799 100644
--- a/sunpy/coordinates/_transformations.py
+++ b/sunpy/coordinates/_transformations.py
@@ -518,23 +518,18 @@ def hcc_to_hgs(helioccoord, heliogframe):
"""
_check_observer_defined(helioccoo... | ["sunpy/coordinates/tests/test_transformations.py::test_hcc_hcc", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hgs_implicit_hcc", "sunpy/coordinates/tests/test_transformations.py::test_no_obstime_on_target_end_hgs_subgraph[HeliographicStonyhurst-Heliocentric]", "sunpy/coordinates/tests/test_transformation... | ["sunpy/coordinates/tests/test_transformations.py::test_hcc_to_hgs", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc_sc", "sunpy/coordinates/tests/test_transformations.py::test_hpc_hpc_null", "sunpy/coordinates/tests/test_transformations.py... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 19 | 7 | 1,700 | 0 | 0.6 | 1 | 0.75 | 1 | 0.346667 | 81.315 | |||
4,861 | swe_smith::train::35492 | swe_smith | train | 35,492 | stanfordnlp__dspy.651a4c71.func_pm_ctrl_invert_if__ul4pkv6y | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # Parallel module in dspy.predict.parallel has swapped logic for handling examples
## Description
I've found an issue with the `Parallel` class in `dspy.predict.parallel`. The logic for handling examples seems to be swapped, causing errors when using the module. Additionally, the return values in the `forward` method ... | diff --git a/dspy/predict/parallel.py b/dspy/predict/parallel.py
index 03a4235..a6a003c 100644
--- a/dspy/predict/parallel.py
+++ b/dspy/predict/parallel.py
@@ -46,9 +46,9 @@ class Parallel:
if isinstance(example, Example):
if self.access_examples:
- result = module(**... | ["tests/predict/test_parallel.py::test_parallel_module", "tests/predict/test_parallel.py::test_batch_module", "tests/predict/test_parallel.py::test_nested_parallel_module", "tests/predict/test_parallel.py::test_nested_batch_method"] | ["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 1 | 9 | 4 | 1,899 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3465 | 81.3145 | |||
4,862 | swe_smith::train::39705 | swe_smith | train | 39,705 | tornadoweb__tornado.d5ac65c1.func_pm_class_rm_funcs__utopt1aw | swesmith/tornadoweb__tornado.d5ac65c1 | tornadoweb/tornado | python | null | GettextLocale constructor broken after refactoring
#### Description
The `GettextLocale` class is missing its `__init__` method, causing a TypeError when trying to create instances. This breaks internationalization functionality that relies on gettext translations.
#### Steps/Code to Reproduce
```python
import torna... | diff --git a/tornado/locale.py b/tornado/locale.py
index abd8668..d12ff66 100644
--- a/tornado/locale.py
+++ b/tornado/locale.py
@@ -521,13 +521,6 @@ class CSVLocale(Locale):
class GettextLocale(Locale):
"""Locale implementation using the `gettext` module."""
- def __init__(self, code: str, translations: get... | ["test_gettext (tornado.test.locale_test.TranslationLoaderTest)", "test_accept_language (tornado.test.web_test.AcceptLanguageTest)"] | ["Doctest: tornado.httputil.HTTPHeaders", "Doctest: tornado.httputil.HTTPHeaders.parse", "Doctest: tornado.httputil.HTTPHeaders.parse_line", "Doctest: tornado.httputil._encode_header", "Doctest: tornado.httputil._get_content_range", "Doctest: tornado.httputil._normalize_header", "Doctest: tornado.httputil._parse_header... | jyangballin/swesmith.x86_64.tornadoweb_1776_tornado.d5ac65c1 | true | null | 1 | 55 | 2 | 978 | 0 | 0.6 | 1 | 0.75 | 1 | 0.346333 | 81.314 | |||
4,863 | r2e_gym::train::4633 | r2e_gym | train | 4,633 | numpy__917700c8576231004fe541d5956da8ca9188ca7e | numpy | numpy/numpy | python | 917700c8576231004fe541d5956da8ca9188ca7e | **Analysis:**
- **Key Parts:**
- **Commit Message:** "BUG: Don't allow an array to be passed as the dtype argument."
- **Commit Patch:** Changes in `type_check.py` replace `issubclass` with `_nx.issubdtype` to ensure `dtype` is not a subclass of `_nx.inexact`.
- **Test Results:** The test `test_asfarray` previou... | diff --git a/doc/release/1.14.0-notes.rst b/doc/release/1.14.0-notes.rst
--- a/doc/release/1.14.0-notes.rst
+++ b/doc/release/1.14.0-notes.rst
@@ -56,6 +56,12 @@
This is not expected to cause problems, but possibly something has been left
out. If you experience an unexpected import problem using ``numpy.testing``
le... | 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
@@ -3,7 +3,7 @@
import numpy as np
from numpy.compat import long
from numpy.testing import (
- assert_, assert_equal, assert_array_equal, run_modul... | null | null | namanjain12/numpy_final:917700c8576231004fe541d5956da8ca9188ca7e | true | null | 2 | 9 | null | 2,609 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.464833 | 81.31325 | ||
4,864 | swe_smith::train::9864 | swe_smith | train | 9,864 | keleshev__schema.24a30457.lm_rewrite__ls9sqktq | swesmith/keleshev__schema.24a30457 | keleshev/schema | python | null | # Dictionary key priority issue with Optional and Hook keys
## Description
I found a bug in the Schema library related to how dictionary keys are prioritized during validation. The issue affects the behavior of `Optional` and `Hook` keys.
## Steps to reproduce
Here's a simple example that demonstrates the issue:
`... | diff --git a/schema/__init__.py b/schema/__init__.py
index 31bd71b..14919f2 100644
--- a/schema/__init__.py
+++ b/schema/__init__.py
@@ -392,14 +392,17 @@ class Schema(object):
return self._ignore_extra_keys
@staticmethod
- def _dict_key_priority(s) -> float:
+ def _dict_key_priority(s) ->float:
... | ["test_schema.py::test_dict_hook", "test_schema.py::test_dict_optional_keys"] | ["test_schema.py::test_schema", "test_schema.py::test_validate_file", "test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_or_only_one", "test_schema.py::test_test", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_list_tuple_set_frozenset", "test_schema.... | jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457 | true | null | 1 | 13 | 2 | 1,816 | 0 | 0.6 | 1 | 0.75 | 1 | 0.346 | 81.313 | |||
4,865 | swe_smith::train::26133 | swe_smith | train | 26,133 | pylint-dev__astroid.b114f6b5.func_basic__z19bjpnc | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | Cache clearing order causes import resolution failures
#### Description
After calling `clear_cache()` on the AstroidManager, modules that were previously importable become unresolvable, causing `AstroidBuildingError` to be raised when trying to import them again.
#### Steps/Code to Reproduce
```python
import sys
im... | diff --git a/astroid/manager.py b/astroid/manager.py
index 8742058..54e5b87 100644
--- a/astroid/manager.py
+++ b/astroid/manager.py
@@ -461,12 +461,13 @@ class AstroidManager:
from astroid.nodes._base_nodes import LookupMixIn
from astroid.nodes.scoped_nodes import ClassDef
+ # Incorrect cach... | ["tests/test_manager.py::AstroidManagerTest::test_ast_from_module_name_pyz", "tests/test_manager.py::AstroidManagerTest::test_ast_from_module_name_zip", "tests/test_manager.py::ClearCacheTest::test_file_cache_after_clear_cache"] | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 17 | 3 | 1,736 | 0 | 0.6 | 1 | 0.75 | 1 | 0.346 | 81.313 | |||
4,866 | swe_smith::train::9970 | swe_smith | train | 9,970 | google__textfsm.c31b6007.combine_file__wfv4qh8m | swesmith/google__textfsm.c31b6007 | google/textfsm | python | null | # ANSI text formatting broken in terminal.py
## Description
Several issues with ANSI text formatting and terminal functionality have been introduced:
1. Case sensitivity in SGR commands
2. Incorrect separator in ANSI escape sequences
3. Reversed ANSI start/end markers
4. Broken Pager functionality
## Steps to repro... | diff --git a/textfsm/terminal.py b/textfsm/terminal.py
index 32252a4..8590972 100755
--- a/textfsm/terminal.py
+++ b/textfsm/terminal.py
@@ -125,15 +125,11 @@ def _AnsiCmd(command_list):
"""
if not isinstance(command_list, list):
raise ValueError('Invalid list: %s' % command_list)
- # Checks that entries ar... | ["tests/terminal_test.py::TerminalTest::testAnsiCmd", "tests/terminal_test.py::TerminalTest::testAnsiText", "tests/terminal_test.py::TerminalTest::testEncloseAnsi", "tests/terminal_test.py::PagerTest::testPage", "tests/terminal_test.py::PagerTest::testPager"] | ["tests/clitable_test.py::UnitTestIndexTable::testCopy", "tests/clitable_test.py::UnitTestIndexTable::testGetRowMatch", "tests/clitable_test.py::UnitTestIndexTable::testParseIndex", "tests/clitable_test.py::UnitTestCliTable::testAddKey", "tests/clitable_test.py::UnitTestCliTable::testCliCompile", "tests/clitable_test.p... | jyangballin/swesmith.x86_64.google_1776_textfsm.c31b6007 | true | null | 1 | 26 | 5 | 1,555 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345833 | 81.3125 | |||
4,867 | swe_smith::train::36095 | swe_smith | train | 36,095 | stanfordnlp__dspy.651a4c71.pr_8132 | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # Cache parameter mismatch in request_cache decorator
## Description
I'm trying to use the `request_cache` decorator with custom cache settings, but I'm running into an issue with the parameters.
When I try to use the `enable_memory_cache` parameter in the `request_cache` decorator, I get a TypeError. It seems like ... | diff --git a/dspy/adapters/utils.py b/dspy/adapters/utils.py
index 21540bd..37f0f1d 100644
--- a/dspy/adapters/utils.py
+++ b/dspy/adapters/utils.py
@@ -167,12 +167,7 @@ def parse_value(value, annotation):
except (ValueError, SyntaxError):
candidate = value
- try:
- return TypeAdapter(... | ["tests/clients/test_lm.py::test_litellm_cache[True-False]", "tests/clients/test_lm.py::test_async_lm_call_with_cache"] | ["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 2 | 38 | 2 | 1,315 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345833 | 81.3125 | |||
4,868 | swe_smith::train::51706 | swe_smith | train | 51,706 | pydicom__pydicom.7d361b3d.func_basic__1xlelhra | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | DICOM file reading fails with EOFError when parsing undefined length values
#### Description
When reading certain DICOM files with undefined length values, the parser incorrectly handles the delimiter search and throws an EOFError even when the delimiter exists in the file.
#### Steps/Code to Reproduce
```python
im... | diff --git a/src/pydicom/fileutil.py b/src/pydicom/fileutil.py
index 46a4611..43104b3 100644
--- a/src/pydicom/fileutil.py
+++ b/src/pydicom/fileutil.py
@@ -148,77 +148,60 @@ def read_undefined_length_value(
data_start = fp.tell()
defer_size = size_in_bytes(defer_size)
- # It's common for an undefined le... | ["tests/pixels/test_common.py::TestRunnerBase::test_set_options_ds", "tests/pixels/test_decoder_base.py::TestDecodeRunner::test_set_source_dataset", "tests/pixels/test_decoder_base.py::TestDecoder::test_buffer", "tests/pixels/test_encoder_base.py::TestEncodeRunner::test_set_source_dataset", "tests/pixels/test_encoder_p... | ["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_s... | jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d | true | null | 1 | 45 | 90 | 1,174 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345667 | 81.312 | |||
4,869 | swe_smith::train::38036 | swe_smith | train | 38,036 | weaveworks__grafanalib.5c3b17ed.combine_file__r4moges3 | swesmith/weaveworks__grafanalib.5c3b17ed | weaveworks/grafanalib | python | null | Color code validation and list validation broken in validators.py
### What happened?
I'm trying to use color codes and list validation in my Grafana dashboards, but I'm encountering issues with the validators.
```python
import grafanalib.validators as validators
# This should fail but doesn't
validators.is_color_co... | diff --git a/grafanalib/validators.py b/grafanalib/validators.py
index e7c69a2..79b0db6 100644
--- a/grafanalib/validators.py
+++ b/grafanalib/validators.py
@@ -50,12 +50,12 @@ def is_color_code(instance, attribute, value):
err = "{attr} should be a valid color code (e.g. #37872D)".format(attr=attribute.name)
... | ["grafanalib/tests/test_validators.py::test_is_color_code_raises[#gggggg]", "grafanalib/tests/test_validators.py::test_is_color_code_raises[#1111111]", "grafanalib/tests/test_validators.py::test_list_of_raises"] | ["grafanalib/tests/test_azuredataexplorer.py::test_serialization_azuredataexplorer_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_metrics_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_azure_logs_target", "grafanalib/tests/test_azuremonitor.py::test_serialization_... | jyangballin/swesmith.x86_64.weaveworks_1776_grafanalib.5c3b17ed | true | null | 1 | 10 | 3 | 1,874 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345667 | 81.312 | |||
4,870 | swe_smith::train::47663 | swe_smith | train | 47,663 | sqlfluff__sqlfluff.50a1c4b6.combine_module__vc4vk5p6 | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | Rule loading fails with IndexError when extracting rule IDs from file paths
#### Description
When loading rules from file paths, the rule loader is incorrectly extracting the file extension instead of the filename when determining rule IDs. This causes an IndexError when trying to access list elements that don't exis... | diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py
index 1f00fb3..50b9fd6 100644
--- a/src/sqlfluff/core/rules/base.py
+++ b/src/sqlfluff/core/rules/base.py
@@ -138,9 +138,9 @@ class LintResult:
def to_linting_error(self, rule: "BaseRule") -> Optional[SQLLintError]:
"""Conver... | ["test/core/rules/docstring_test.py::test_backtick_replace", "test/core/rules/noqa_test.py::test__linter__raises_malformed_noqa", "test/core/rules/noqa_test.py::test_linter_noqa", "test/core/rules/noqa_test.py::test_linter_noqa_tmp", "test/core/rules/noqa_test.py::test_linter_noqa_disable", "test/core/rules/noqa_test.p... | ["test/core/rules/docstring_test.py::test_content_count[\\\\*\\\\*Anti-pattern\\\\*\\\\*-1]", "test/core/rules/docstring_test.py::test_keyword_anti_before_best", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input0-True]", "test/core/rules/functional/raw_file_slices_test.py::test_slices_all[input... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 2 | 50 | 9 | 1,074 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345667 | 81.312 | |||
4,871 | swe_smith::train::7011 | swe_smith | train | 7,011 | cantools__cantools.0c6a7871.combine_file__hg5r5sxp | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | # CDD file parsing issues with partial file reading
I've encountered several issues when working with CDD files in the cantools library. The problems appear to be related to how the library reads and processes CDD files.
## Issue Description
When trying to load a CDD file with an invalid byte order, I'm getting an u... | diff --git a/src/cantools/database/diagnostics/database.py b/src/cantools/database/diagnostics/database.py
index de312e8..dcfeb1d 100644
--- a/src/cantools/database/diagnostics/database.py
+++ b/src/cantools/database/diagnostics/database.py
@@ -36,7 +36,8 @@ class Database:
"""
- self.add_cdd_string... | ["tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_cdd_add", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd", "tests/test_diagnostics_database.py::CanToolsDiagnosticsDatabaseTest::test_be_example_cdd_repr", "tests/test_diagnostics_database.py::CanTo... | ["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 | 22 | 7 | 1,634 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345667 | 81.312 | |||
4,872 | swe_smith::train::10175 | swe_smith | train | 10,175 | paramiko__paramiko.23f92003.combine_file__rdv6962a | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | SSH key exchange fails with AttributeError in client mode
#### Description
When attempting to establish an SSH connection in client mode, the key exchange process fails with an AttributeError. The issue appears to be related to the Diffie-Hellman Group Exchange (GEX) key exchange implementation.
#### Steps/Code to R... | diff --git a/paramiko/kex_gex.py b/paramiko/kex_gex.py
index baa0803..a5fdc6c 100644
--- a/paramiko/kex_gex.py
+++ b/paramiko/kex_gex.py
@@ -67,25 +67,21 @@ class KexGex:
self.old_style = False
def start_kex(self, _test_old_style=False):
- if self.transport.server_mode:
+ if not self.trans... | ["tests/test_kex.py::KexTest::test_gex_client", "tests/test_kex.py::KexTest::test_gex_old_client", "tests/test_kex.py::KexTest::test_gex_server", "tests/test_kex.py::KexTest::test_gex_server_with_old_client", "tests/test_kex.py::KexTest::test_gex_sha256_client", "tests/test_kex.py::KexTest::test_gex_sha256_old_client",... | ["tests/agent.py::AgentKey_::str_is_repr", "tests/agent.py::AgentKey_::init::needs_at_least_two_arguments", "tests/agent.py::AgentKey_::init::sets_attributes_and_parses_blob", "tests/agent.py::AgentKey_::init::comment_optional", "tests/agent.py::AgentKey_::init::sets_inner_key_when_known_type[rsa]", "tests/agent.py::Ag... | jyangballin/swesmith.x86_64.paramiko_1776_paramiko.23f92003 | true | null | 1 | 38 | 8 | 1,314 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345667 | 81.312 | |||
4,873 | swe_smith::train::1996 | swe_smith | train | 1,996 | pdfminer__pdfminer.six.1a8bd2f7.combine_file__cyuuf905 | swesmith/pdfminer__pdfminer.six.1a8bd2f7 | pdfminer/pdfminer.six | python | null | CCITT G4 decoder produces incorrect output after recent changes
#### Description
The CCITT G4 decoder is producing incorrect results when processing compressed image data. The decoder appears to be generating wrong bit patterns and cursor positions during decompression.
#### Steps/Code to Reproduce
```python
from p... | diff --git a/pdfminer/ccitt.py b/pdfminer/ccitt.py
index d55cd7e..04362ca 100644
--- a/pdfminer/ccitt.py
+++ b/pdfminer/ccitt.py
@@ -456,9 +456,9 @@ class CCITTG4Parser(BitParser):
def _reset_line(self) -> None:
self._refline = self._curline
- self._curline = array.array("b", [1] * self.width)
- ... | ["tests/test_pdfminer_ccitt.py::TestCCITTG4Parser::test_b1", "tests/test_pdfminer_ccitt.py::TestCCITTG4Parser::test_b2", "tests/test_pdfminer_ccitt.py::TestCCITTG4Parser::test_b3", "tests/test_pdfminer_ccitt.py::TestCCITTG4Parser::test_b4", "tests/test_pdfminer_ccitt.py::TestCCITTG4Parser::test_b5", "tests/test_pdfmine... | ["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p... | jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7 | true | null | 1 | 30 | 14 | 1,473 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3455 | 81.3115 | |||
4,874 | swe_smith::train::26555 | swe_smith | train | 26,555 | pylint-dev__astroid.b114f6b5.lm_rewrite__bb6su3p7 | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | ### Custom Attribute Handling Regression
Hello team,
I've encountered a peculiar issue related to attribute handling in our codebase. It seems that recent changes have introduced a regression when dealing with custom `__getattr__` and `__getattribute__` methods. The problem manifests when attempting to infer attribut... | diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py
index 99ed796..b97870c 100644
--- a/astroid/nodes/scoped_nodes/scoped_nodes.py
+++ b/astroid/nodes/scoped_nodes/scoped_nodes.py
@@ -2523,21 +2523,28 @@ class ClassDef(
:returns: Whether the class has a custom... | ["tests/test_inference.py::GetattrTest::test_attribute_missing", "tests/test_inference.py::GetattrTest::test_default", "tests/test_object_model.py::ExceptionModelTest::test_valueerror_py3"] | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 31 | 3 | 1,453 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3455 | 81.3115 | |||
4,875 | swe_smith::train::44625 | swe_smith | train | 44,625 | mahmoud__glom.fb3c4e76.func_basic__2npzx06l | swesmith/mahmoud__glom.fb3c4e76 | mahmoud/glom | python | null | Match function broken after recent changes
#### Description
The `Match` function is not working correctly. Basic matching operations are failing with unexpected errors.
#### Steps/Code to Reproduce
```python
from glom import glom, Match
# Simple integer matching fails
try:
result = glom(1, Match(1))
print(... | diff --git a/glom/matching.py b/glom/matching.py
index 798ac40..c469db3 100644
--- a/glom/matching.py
+++ b/glom/matching.py
@@ -712,13 +712,13 @@ def _handle_dict(target, spec, scope):
def _glom_match(target, spec, scope):
- if isinstance(spec, type):
+ if isinstance(spec, dict):
+ return _handle_dic... | ["glom/test/test_error.py::test_branching_stack", "glom/test/test_error.py::test_midway_branch", "glom/test/test_match.py::test_basic", "glom/test/test_match.py::test_defaults", "glom/test/test_match.py::test_sets", "glom/test/test_match.py::test_precedence", "glom/test/test_match.py::test_cruddy_json", "glom/test/test... | ["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_val", "... | jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76 | true | null | 1 | 55 | 14 | 973 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3455 | 81.3115 | |||
4,876 | swe_smith::train::31414 | swe_smith | train | 31,414 | benoitc__gunicorn.bacbf8aa.combine_module__3yh8ehrt | swesmith/benoitc__gunicorn.bacbf8aa | benoitc/gunicorn | python | null | HTTP body readers broken after recent changes
#### Description
The HTTP body reading functionality appears to be completely broken. When trying to read request bodies, various errors are thrown including type mismatches and attribute errors.
#### Steps/Code to Reproduce
```python
import io
from gunicorn.http.body i... | diff --git a/gunicorn/http/body.py b/gunicorn/http/body.py
index d7ee29e..debe3e9 100644
--- a/gunicorn/http/body.py
+++ b/gunicorn/http/body.py
@@ -11,9 +11,9 @@ from gunicorn.http.errors import (NoMoreData, ChunkMissingTerminator,
class ChunkedReader:
def __init__(self, req, unreader):
- self.req = req... | ["tests/test_http.py::test_readline_empty_body", "tests/test_http.py::test_readline_zero_size", "tests/test_http.py::test_readline_new_line_before_size", "tests/test_http.py::test_readline_new_line_after_size", "tests/test_http.py::test_readline_no_new_line", "tests/test_http.py::test_readline_buffer_loaded", "tests/te... | ["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 | 2 | 39 | 60 | 1,293 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3455 | 81.3115 | |||
4,877 | r2e_gym::train::5661 | r2e_gym | train | 5,661 | scrapy__461682fc3dca72d9a34ddc22ad1896787c9dc518 | scrapy | scrapy/scrapy | python | 461682fc3dca72d9a34ddc22ad1896787c9dc518 | **Analysis:**
- **Key Parts:**
- **Commit Message:** "Whitelist form methods in FormRequest.from_response method."
- **Commit Patch:** Introduces a `valid_form_methods` list and adds validation to ensure the form method is within this whitelist.
- **Test Results:** Previously, the test `test_from_response_valid_... | diff --git a/scrapy/http/request/form.py b/scrapy/http/request/form.py
--- a/scrapy/http/request/form.py
+++ b/scrapy/http/request/form.py
@@ -18,6 +18,7 @@
class FormRequest(Request):
+ valid_form_methods = ['GET', 'POST', 'DIALOG']
def __init__(self, *args, **kwargs):
formdata = kwargs.pop('fo... | diff --git a/tests/test_http_request.py b/tests/test_http_request.py
--- a/tests/test_http_request.py
+++ b/tests/test_http_request.py
@@ -1100,6 +1100,19 @@
self.assertRaises(ValueError, self.request_class.from_response,
response, formcss="input[name='abc']")
+ def test_from_re... | null | null | namanjain12/scrapy_final:461682fc3dca72d9a34ddc22ad1896787c9dc518 | true | null | 1 | 7 | null | 2,645 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.464167 | 81.31125 | ||
4,878 | swe_smith::train::35488 | swe_smith | train | 35,488 | stanfordnlp__dspy.651a4c71.func_pm_ctrl_invert_if__t55a91am | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # Streaming with ChatAdapter fails due to incorrect boundary detection logic
## Description
I've encountered an issue with the streaming functionality when using a ChatAdapter. The streaming listener is not correctly detecting the boundary for the tokens, which causes the streaming to fail.
## To Reproduce
Here's a... | diff --git a/dspy/streaming/streaming_listener.py b/dspy/streaming/streaming_listener.py
index 67370dd..6183d2e 100644
--- a/dspy/streaming/streaming_listener.py
+++ b/dspy/streaming/streaming_listener.py
@@ -133,14 +133,13 @@ class StreamListener:
boundary_index = last_tokens.find('",') # noqa: Q000
... | ["tests/signatures/test_adapter_image.py::test_pdf_url_support", "tests/signatures/test_adapter_image.py::test_different_mime_types", "tests/signatures/test_adapter_image.py::test_mime_type_from_response_headers", "tests/signatures/test_adapter_image.py::test_pdf_from_file"] | ["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 1 | 7 | 4 | 1,932 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345333 | 81.311 | |||
4,879 | swe_smith::train::17373 | swe_smith | train | 17,373 | pyasn1__pyasn1.0f07d724.combine_file__ufhv8ukg | swesmith/pyasn1__pyasn1.0f07d724 | pyasn1/pyasn1 | python | null | # Error context not properly accessible in PyAsn1Error
I've encountered an issue with the error handling in pyasn1. When working with the StreamingDecoder, the context information in error objects is not accessible as expected.
## Description
When using the StreamingDecoder to parse ASN.1 data from a non-blocking st... | diff --git a/pyasn1/error.py b/pyasn1/error.py
index 75c9a3f..27d8ffa 100644
--- a/pyasn1/error.py
+++ b/pyasn1/error.py
@@ -25,8 +25,8 @@ class PyAsn1Error(Exception):
"""
def __init__(self, *args, **kwargs):
- self._args = args
- self._kwargs = kwargs
+ self._args = kwargs
+ se... | ["tests/codec/ber/test_decoder.py::RestartableDecoderTestCase::testPartialReadingFromNonBlockingStream"] | ["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d... | jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724 | true | null | 1 | 6 | 1 | 1,951 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345167 | 81.3105 | |||
4,880 | swe_smith::train::22041 | swe_smith | train | 22,041 | life4__textdistance.c3aca916.pr_95 | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | ### Issue with Hamming and Levenshtein Algorithms
#### Description
After the recent changes, it seems that the Hamming and Levenshtein algorithms are encountering issues when attempting to import certain external libraries. This is causing runtime errors during execution, specifically when trying to compare sequences... | diff --git a/setup.py b/setup.py
index 66438b7..f6c27bb 100755
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,7 @@ extras = {
'pyxDamerauLevenshtein',
'rapidfuzz>=2.6.0',
# slow
+ 'distance',
'pylev',
'py_stringmatching',
# other
@@ -64,6 +65,7 @@ extras = {
... | ["tests/test_external.py::test_compare[Hamming]", "tests/test_external.py::test_compare[Levenshtein]", "tests/test_external.py::test_qval[None-Hamming]", "tests/test_external.py::test_qval[None-Levenshtein]", "tests/test_external.py::test_qval[1-Hamming]", "tests/test_external.py::test_qval[1-Levenshtein]", "tests/test... | ["tests/test_common.py::test_normalization_range[alg0]", "tests/test_common.py::test_normalization_range[alg1]", "tests/test_common.py::test_normalization_range[alg2]", "tests/test_common.py::test_normalization_range[alg3]", "tests/test_common.py::test_normalization_range[alg4]", "tests/test_common.py::test_normalizati... | jyangballin/swesmith.x86_64.life4_1776_textdistance.c3aca916 | true | null | 2 | 9 | 12 | 1,891 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345167 | 81.3105 | |||
4,881 | swe_smith::train::36116 | swe_smith | train | 36,116 | borntyping__python-colorlog.dfa10f59.combine_file__jv64mtl0 | swesmith/borntyping__python-colorlog.dfa10f59 | borntyping/python-colorlog | python | null | # ColoredFormatter not working correctly with custom colors and reset
### Describe the bug
I've found issues with the `ColoredFormatter` class when using custom colors and reset functionality:
1. When using empty log_colors dictionary, it throws a KeyError for 'default'
2. The reset functionality seems to be adding ... | diff --git a/colorlog/formatter.py b/colorlog/formatter.py
index f011ca2..6e92cb6 100644
--- a/colorlog/formatter.py
+++ b/colorlog/formatter.py
@@ -164,14 +164,14 @@ class ColoredFormatter(logging.Formatter):
@staticmethod
def _get_escape_code(log_colors: LogColors, item: str) -> str:
"""Extract a c... | ["colorlog/tests/test_colorlog.py::test_custom_colors", "colorlog/tests/test_colorlog.py::test_reset", "colorlog/tests/test_colorlog.py::test_some_secondary_colors"] | ["colorlog/tests/test_colorlog.py::test_colored_formatter", "colorlog/tests/test_colorlog.py::test_no_reset", "colorlog/tests/test_colorlog.py::test_secondary_colors", "colorlog/tests/test_colorlog.py::test_percent_style", "colorlog/tests/test_colorlog.py::test_braces_style", "colorlog/tests/test_colorlog.py::test_temp... | jyangballin/swesmith.x86_64.borntyping_1776_python-colorlog.dfa10f59 | true | null | 1 | 8 | 3 | 1,910 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345 | 81.31 | |||
4,882 | swe_smith::train::29631 | swe_smith | train | 29,631 | django__channels.a144b4b8.func_pm_remove_cond__y7y0uv9s | swesmith/django__channels.a144b4b8 | django/channels | python | null | # Login function in auth.py doesn't validate session and user presence
## Description
I noticed an issue with the `login` function in `channels/auth.py` when working on a project. The function no longer validates if the session is present in the scope or if a user is provided.
When trying to use the login function w... | diff --git a/channels/auth.py b/channels/auth.py
index 9da53b0..a8419b9 100644
--- a/channels/auth.py
+++ b/channels/auth.py
@@ -63,32 +63,14 @@ def login(scope, user, backend=None):
Note that data set during the anonymous session is retained when the user
logs in.
"""
- if "session" not in scope:
- ... | ["tests/security/test_auth.py::test_login_no_session_in_scope", "tests/security/test_auth.py::test_login_no_user_in_scope"] | ["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_generic_websocket.py::test_websocket... | jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8 | true | null | 1 | 21 | 2 | 1,650 | 0 | 0.6 | 1 | 0.75 | 1 | 0.345 | 81.31 | |||
4,883 | swe_smith::train::46146 | swe_smith | train | 46,146 | conan-io__conan.86f29e13.pr_13732 | swesmith/conan-io__conan.86f29e13 | conan-io/conan | python | null | ### Error when creating package with build_policy set to "never"
#### Description
Encountered an issue while trying to create a package with `build_policy` set to "never". The process fails with an error message indicating that the package cannot be created and can only be exported using `export-pkg`.
#### Steps/Code... | diff --git a/conan/cli/commands/create.py b/conan/cli/commands/create.py
index 13fa6d3..6bf02a4 100644
--- a/conan/cli/commands/create.py
+++ b/conan/cli/commands/create.py
@@ -23,7 +23,7 @@ def create(conan_api, parser, *args):
add_common_install_arguments(parser)
parser.add_argument("--build-require", actio... | ["test/integration/package_id/compatible_test.py::TestNewCompatibility::test_compatibility_remove_package_id"] | ["test/integration/package_id/compatible_test.py::CompatibleIDsTest::test_build_missing", "test/integration/package_id/compatible_test.py::CompatibleIDsTest::test_compatible_diamond", "test/integration/package_id/compatible_test.py::CompatibleIDsTest::test_compatible_lockfile", "test/integration/package_id/compatible_t... | jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13 | true | null | 1 | 8 | 1 | 1,909 | 0 | 0.6 | 1 | 0.75 | 1 | 0.344833 | 81.3095 | |||
4,884 | swe_smith::train::18370 | swe_smith | train | 18,370 | msiemens__tinydb.10644a0e.func_pm_remove_cond__d9wivoia | swesmith/msiemens__tinydb.10644a0e | msiemens/tinydb | python | null | Table.get() method raises RuntimeError instead of returning documents
#### Description
The `get()` method in the Table class is broken and always raises a RuntimeError regardless of the parameters passed to it.
#### Steps/Code to Reproduce
```python
from tinydb import TinyDB
from tinydb.queries import where
# Crea... | diff --git a/tinydb/table.py b/tinydb/table.py
index c562d02..0877ede 100644
--- a/tinydb/table.py
+++ b/tinydb/table.py
@@ -290,7 +290,7 @@ class Table:
Get exactly one document specified by a query or a document ID.
However, if multiple document IDs are given then returns all
documents in a... | ["tests/test_operations.py::test_delete[memory]", "tests/test_operations.py::test_delete[json]", "tests/test_operations.py::test_add_int[memory]", "tests/test_operations.py::test_add_int[json]", "tests/test_operations.py::test_add_str[memory]", "tests/test_operations.py::test_add_str[json]", "tests/test_operations.py::... | ["tests/test_middlewares.py::test_caching", "tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_caching_write_many", "tests/test_middlewares.py::test_caching_flush", "tests/test_middlewares.py::test_caching_flush_manually", "tests/test_middlewares.py::test_caching_write", "tests/test_middle... | jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e | true | null | 1 | 43 | 39 | 1,209 | 0 | 0.6 | 1 | 0.75 | 1 | 0.344833 | 81.3095 | |||
4,885 | swe_smith::train::3242 | swe_smith | train | 3,242 | Suor__funcy.207a7810.lm_rewrite__6lor0d06 | swesmith/Suor__funcy.207a7810 | suor/funcy | python | null | # has_arg_types function breaks nested lookupers
## Describe the bug
The `has_arg_types` function in `funcy/calc.py` is not correctly detecting positional and keyword arguments. This causes nested lookupers (both `make_lookuper` and `silent_lookuper`) to fail when they should work properly.
## To Reproduce
Here's a s... | diff --git a/funcy/calc.py b/funcy/calc.py
index 2966bdd..f9f3e66 100644
--- a/funcy/calc.py
+++ b/funcy/calc.py
@@ -146,7 +146,22 @@ silent_lookuper.__name__ = 'silent_lookuper'
def has_arg_types(func):
- params = inspect.signature(func).parameters.values()
- return any(p.kind in (p.POSITIONAL_ONLY, p.POSIT... | ["tests/test_calc.py::test_make_lookuper_nested", "tests/test_calc.py::test_silnent_lookuper_nested"] | ["tests/test_calc.py::test_memoize", "tests/test_calc.py::test_memoize_args_kwargs", "tests/test_calc.py::test_memoize_skip", "tests/test_calc.py::test_memoize_memory", "tests/test_calc.py::test_memoize_key_func", "tests/test_calc.py::test_make_lookuper", "tests/test_calc.py::test_silent_lookuper", "tests/test_calc.py:... | jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810 | true | null | 1 | 23 | 2 | 1,609 | 0 | 0.6 | 1 | 0.75 | 1 | 0.344833 | 81.3095 | |||
4,886 | swe_smith::train::19340 | swe_smith | train | 19,340 | seperman__deepdiff.ed252022.func_pm_remove_cond__fs2hg5vv | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | load_path_content function returns undefined variable after file type detection
#### Description
The `load_path_content` function in `deepdiff/serialization.py` appears to have an issue where it returns an undefined `content` variable. When trying to load files of various formats (json, yaml, toml, csv, pickle), the ... | diff --git a/deepdiff/serialization.py b/deepdiff/serialization.py
index aa56399..47c2b7a 100644
--- a/deepdiff/serialization.py
+++ b/deepdiff/serialization.py
@@ -459,59 +459,8 @@ def load_path_content(path, file_type=None):
if file_type is None:
file_type = path.split('.')[-1]
- if file_type == 'j... | ["tests/test_command.py::TestCommands::test_diff_command[t1.toml-t2.toml-10.0.0.2-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2.json-args0-0]", "tests/test_command.py::TestCommands::test_deeppatch_command[t1.json-t2_json.csv-args2-0]", "tests/test_command.py::TestCommands::test_deeppatch_... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cach... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 51 | 19 | 1,048 | 0 | 0.6 | 1 | 0.75 | 1 | 0.344667 | 81.309 | |||
4,887 | swe_smith::train::45169 | swe_smith | train | 45,169 | modin-project__modin.8c7799fd.func_pm_remove_cond__or3jwid0 | swesmith/modin-project__modin.8c7799fd | modin-project/modin | python | null | Binary operations on arrays fail with TypeError after recent changes
#### Description
Binary arithmetic operations on modin numpy arrays are now failing with `TypeError: cannot unpack non-iterable NoneType value`. This affects all basic arithmetic operators like `+`, `-`, `*`, `/`, as well as comparison operators.
#... | diff --git a/modin/numpy/arr.py b/modin/numpy/arr.py
index ab40eca..8e5f12c 100644
--- a/modin/numpy/arr.py
+++ b/modin/numpy/arr.py
@@ -813,55 +813,6 @@ class array(object):
f"Unsupported operand type(s): '{type(self)}' and '{type(other)}'"
)
broadcast = self._ndim != other._ndim... | ["modin/tests/numpy/test_array.py::test_dtype", "modin/tests/numpy/test_array.py::test_update_inplace", "modin/tests/numpy/test_array.py::test_out_broadcast[data_out0]", "modin/tests/numpy/test_array.py::test_out_broadcast_error", "modin/tests/numpy/test_array.py::test_array_ufunc[100]", "modin/tests/numpy/test_array.p... | ["modin/tests/numpy/test_array.py::test_shape[100]", "modin/tests/numpy/test_array.py::test_shape[size1]", "modin/tests/numpy/test_array.py::test_shape[size2]", "modin/tests/numpy/test_array.py::test_shape[size3]", "modin/tests/numpy/test_array.py::test_shape[size4]", "modin/tests/numpy/test_array.py::test_conversion",... | jyangballin/swesmith.x86_64.modin-project_1776_modin.8c7799fd | true | null | 1 | 49 | 104 | 1,088 | 0 | 0.6 | 1 | 0.75 | 1 | 0.344667 | 81.309 | |||
4,888 | r2e_gym::train::5183 | r2e_gym | train | 5,183 | pyramid__551e8c69a90883072b905c5b2eb19fd50fa53535 | pyramid | pylons/pyramid | python | 551e8c69a90883072b905c5b2eb19fd50fa53535 | **Title:** TypeError Occurs When Session's `_reissue_time` Is `None` or Invalid
**Description:**
When managing session access, if the session's `_reissue_time` attribute is set to `None` or contains an invalid type (e.g., a string), the session handling logic attempts arithmetic operations that result in a `TypeError`... | diff --git a/pyramid/session.py b/pyramid/session.py
--- a/pyramid/session.py
+++ b/pyramid/session.py
@@ -27,8 +27,9 @@
method is called."""
def accessed(session, *arg, **kw):
session.accessed = now = int(time.time())
- if now - session.renewed > session._reissue_time:
- session.ch... | diff --git a/pyramid/tests/test_session.py b/pyramid/tests/test_session.py
--- a/pyramid/tests/test_session.py
+++ b/pyramid/tests/test_session.py
@@ -51,6 +51,15 @@
request.cookies['session'] = cookieval
session = self._makeOne(request, timeout=1)
self.assertEqual(dict(session), {})
+
+ d... | null | null | namanjain12/pyramid_final:551e8c69a90883072b905c5b2eb19fd50fa53535 | true | null | 1 | 48 | null | 1,820 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.463333 | 81.30875 | ||
4,889 | swe_smith::train::36010 | swe_smith | train | 36,010 | stanfordnlp__dspy.651a4c71.pr_1874 | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # Missing `retry_kwargs` variable in litellm_completion function
## Description
When trying to use the LM client with litellm, I'm getting an error because there seems to be a missing variable in the code. The `litellm_completion` function is trying to use a variable called `retry_kwargs` that doesn't exist anywhere ... | diff --git a/dspy/__init__.py b/dspy/__init__.py
index 775018d..23dccd6 100644
--- a/dspy/__init__.py
+++ b/dspy/__init__.py
@@ -30,4 +30,4 @@ BootstrapRS = BootstrapFewShotWithRandomSearch
from .__metadata__ import __name__, __version__, __description__, __url__, __author__, __author_email__
-cache = DSPY_CACHE
+... | ["tests/adapters/test_json_adapter.py::test_json_adapter_with_structured_outputs_does_not_mutate_original_signature", "tests/adapters/test_json_adapter.py::test_json_adapter_on_pydantic_model", "tests/adapters/test_two_step_adapter.py::test_two_step_adapter_call", "tests/adapters/test_two_step_adapter.py::test_two_step... | ["tests/adapters/test_chat_adapter.py::test_chat_adapter_sync_call", "tests/adapters/test_chat_adapter.py::test_chat_adapter_async_call", "tests/adapters/test_json_adapter.py::test_json_adapter_sync_call", "tests/adapters/test_json_adapter.py::test_json_adapter_async_call", "tests/adapters/test_json_adapter.py::test_js... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 3 | 45 | 90 | 1,167 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3445 | 81.3085 | |||
4,890 | swe_smith::train::43123 | swe_smith | train | 43,123 | gawel__pyquery.811cd048.func_basic__xeio1est | swesmith/gawel__pyquery.811cd048 | gawel/pyquery | python | null | html() method returns unexpected results and breaks with certain inputs
#### Description
The `html()` method is behaving unexpectedly in several ways:
1. When called on an empty PyQuery object, it returns an empty string instead of `None`
2. The method appears to be processing elements in reverse order
3. Setting HT... | diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py
index 5b05681..db00831 100644
--- a/pyquery/pyquery.py
+++ b/pyquery/pyquery.py
@@ -1094,38 +1094,38 @@ class PyQuery(list):
"""
if value is no_default:
if not self:
- return None
- tag = self[0]
+ ... | ["README.rst::README.rst", "docs/manipulating.rst::manipulating.rst", "pyquery/pyquery.py::pyquery.pyquery.PyQuery.html", "tests/test_pyquery.py::TestUnicode::test_unicode", "tests/test_pyquery.py::TestManipulating::test_html_escape", "tests/test_pyquery.py::TestManipulating::test_html_replacement", "tests/test_pyquery... | ["docs/attributes.rst::attributes.rst", "docs/css.rst::css.rst", "docs/pseudo_classes.rst::pseudo_classes.rst", "docs/scrap.rst::scrap.rst", "docs/tips.rst::tips.rst", "docs/traversing.rst::traversing.rst", "pyquery/cssselectpatch.py::pyquery.cssselectpatch.JQueryTranslator.xpath_button_pseudo", "pyquery/cssselectpatch... | jyangballin/swesmith.x86_64.gawel_1776_pyquery.811cd048 | true | null | 1 | 32 | 7 | 1,422 | 0 | 0.6 | 1 | 0.75 | 1 | 0.343667 | 81.306 | |||
4,891 | swe_smith::train::26501 | swe_smith | train | 26,501 | pylint-dev__astroid.b114f6b5.func_pm_remove_wrapper__gmlgdalh | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | Super object attribute lookup fails with NameError
#### Description
When trying to access attributes on super() objects, a NameError is raised instead of properly looking up the attribute in the method resolution order.
#### Steps/Code to Reproduce
```python
import astroid
code = '''
class A(object):
def spam(... | diff --git a/astroid/objects.py b/astroid/objects.py
index 9f638d4..2608c9e 100644
--- a/astroid/objects.py
+++ b/astroid/objects.py
@@ -148,34 +148,6 @@ class Super(node_classes.NodeNG):
if name == "__class__":
yield self.special_attributes.lookup(name)
return
-
- try:
- ... | ["tests/brain/test_multiprocessing.py::MultiprocessingBrainTest::test_module_name", "tests/brain/test_multiprocessing.py::MultiprocessingBrainTest::test_multiprocessing_manager", "tests/test_inference.py::InferenceTest::test_no_runtime_error_in_repeat_inference", "tests/test_inference.py::test_super_inference_of_abstra... | ["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_einsumfunc.py::test_function_parameters", "tests/brain/numpy/test_core_fromnumeric.py::BrainNumpyCoreFromNumericTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_fun... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 29 | 12 | 1,482 | 0 | 0.6 | 1 | 0.75 | 1 | 0.343667 | 81.306 | |||
4,892 | swe_smith::train::18520 | swe_smith | train | 18,520 | HIPS__autograd.ac044f0d.lm_rewrite__8f7sx55o | swesmith/HIPS__autograd.ac044f0d | hips/autograd | python | null | ### Issue: Unexpected Behavior in `np.partition` Gradient Calculation
#### Describe the Bug
After the recent changes, the gradient calculation for `np.partition` seems to be malfunctioning. When attempting to compute the gradient of a partitioned array, a `ValueError` is raised, indicating an issue with the sort kind... | diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py
index 08d4e1b..9e52023 100644
--- a/autograd/numpy/numpy_vjps.py
+++ b/autograd/numpy/numpy_vjps.py
@@ -780,13 +780,37 @@ if onp.lib.NumpyVersion(onp.__version__) < "2.0.0":
defvjp(anp.msort, grad_sort) # Until multi-D is allowed, these are ... | ["tests/test_systematic.py::test_partition"] | ["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_... | jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d | true | null | 1 | 38 | 1 | 1,302 | 0 | 0.6 | 1 | 0.75 | 1 | 0.343667 | 81.306 | |||
4,893 | swe_smith::train::45249 | swe_smith | train | 45,249 | dask__dask.5f61e423.combine_module__tytvvbn6 | swesmith/dask__dask.5f61e423 | dask/dask | python | null | FromArray class missing PartitionsFiltered inheritance breaks array-based dataframe operations
#### Description
When creating dataframes from arrays using `dd.from_array()`, operations that rely on partition filtering are failing with `TypeError: 'NoneType' object is not callable`. This appears to be related to the `... | diff --git a/dask/dataframe/dask_expr/_repartition.py b/dask/dataframe/dask_expr/_repartition.py
index d5a9dd5..3bc030a 100644
--- a/dask/dataframe/dask_expr/_repartition.py
+++ b/dask/dataframe/dask_expr/_repartition.py
@@ -484,14 +484,39 @@ class RepartitionSize(Repartition):
def _clean_new_division_boundaries(n... | ["dask/dataframe/dask_expr/tests/test_repartition.py::test_repartition_npartitions_numeric_edge_case", "dask/dataframe/io/tests/test_io.py::test_from_array", "dask/dataframe/io/tests/test_io.py::test_from_array_with_record_dtype", "dask/dataframe/io/tests/test_io.py::test_from_dask_array_compat_numpy_array", "dask/data... | ["dask/dataframe/dask_expr/tests/test_repartition.py::test_repartition_combine_similar[kwargs0]", "dask/dataframe/dask_expr/tests/test_repartition.py::test_repartition_combine_similar[kwargs1]", "dask/dataframe/dask_expr/tests/test_repartition.py::test_repartition_combine_similar[kwargs2]", "dask/dataframe/dask_expr/te... | jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423 | true | null | 2 | 41 | 9 | 1,241 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3435 | 81.3055 | |||
4,894 | swe_smith::train::18180 | swe_smith | train | 18,180 | msiemens__tinydb.10644a0e.combine_file__60h9750h | swesmith/msiemens__tinydb.10644a0e | msiemens/tinydb | python | null | # Middleware initialization is broken in TinyDB
## Description
When using TinyDB with middleware, especially the CachingMiddleware, it fails to initialize properly and causes errors.
## Problem
The middleware initialization is broken, causing errors when trying to use TinyDB with middleware classes.
Versions:
- Ti... | diff --git a/tinydb/middlewares.py b/tinydb/middlewares.py
index 7973012..dbe9a2c 100644
--- a/tinydb/middlewares.py
+++ b/tinydb/middlewares.py
@@ -19,8 +19,8 @@ class Middleware:
"""
def __init__(self, storage_cls) -> None:
- self._storage_cls = storage_cls
- self.storage: Storage = None # ... | ["tests/test_middlewares.py::test_caching_read", "tests/test_middlewares.py::test_nested", "tests/test_middlewares.py::test_caching_json_write", "tests/test_tinydb.py::test_empty_write", "tests/test_tinydb.py::test_access_storage"] | ["tests/test_operations.py::test_delete[memory]", "tests/test_operations.py::test_delete[json]", "tests/test_operations.py::test_add_int[memory]", "tests/test_operations.py::test_add_int[json]", "tests/test_operations.py::test_add_str[memory]", "tests/test_operations.py::test_add_str[json]", "tests/test_operations.py::... | jyangballin/swesmith.x86_64.msiemens_1776_tinydb.10644a0e | true | null | 1 | 9 | 5 | 1,881 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3435 | 81.3055 | |||
4,895 | swe_smith::train::29540 | swe_smith | train | 29,540 | django__channels.a144b4b8.combine_file__dna6756m | swesmith/django__channels.a144b4b8 | django/channels | python | null | Cookie middleware breaks with reversed inner middleware and incorrect encoding
#### Description
The cookie middleware is not working correctly after recent changes. When using the session middleware stack, cookies are not being set properly and there are encoding issues with the Set-Cookie headers.
#### Steps/Code t... | diff --git a/channels/sessions.py b/channels/sessions.py
index f1d51d4..bfea128 100644
--- a/channels/sessions.py
+++ b/channels/sessions.py
@@ -23,7 +23,7 @@ class CookieMiddleware:
"""
def __init__(self, inner):
- self.inner = inner
+ self.inner = inner[::-1]
async def __call__(self, ... | ["tests/test_generic_websocket.py::test_multiple_websocket_consumers_with_sessions", "tests/test_http.py::test_sessions", "tests/test_http.py::test_session_samesite[Strict]", "tests/test_http.py::test_session_samesite[None]", "tests/test_http.py::test_session_samesite_invalid", "tests/test_http.py::test_multiple_sessio... | ["tests/test_database.py::ConnectionClosingTests::test_http", "tests/test_database.py::ConnectionClosingTests::test_websocket", "tests/test_generic_websocket.py::test_websocket_consumer", "tests/test_generic_websocket.py::test_websocket_consumer_subprotocol", "tests/test_generic_websocket.py::test_websocket_consumer_gr... | jyangballin/swesmith.x86_64.django_1776_channels.a144b4b8 | true | null | 1 | 43 | 9 | 1,201 | 0 | 0.6 | 1 | 0.75 | 1 | 0.3435 | 81.3055 | |||
4,896 | r2e_gym::train::4145 | r2e_gym | train | 4,145 | numpy__c875b1391286a982c958d349d58eb720eb081069 | numpy | numpy/numpy | python | c875b1391286a982c958d349d58eb720eb081069 | **Analysis:**
- **Key Issues from Commit Details and Test Results:**
- The commit modifies the `numpy.piecewise` function to raise a `ValueError` when the number of functions provided does not match the number of conditions plus one.
- Previously, providing too many functions led to an `IndexError` ("list index ou... | 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
@@ -1254,7 +1254,7 @@
The length of `condlist` must correspond to that of `funclist`.
If one extra function is given, i.e. if
- ``len(funclist) - len(condlist... | 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
@@ -2514,6 +2514,11 @@
x = piecewise([0, 0], [[False, True]], [lambda x:-1])
assert_array_equal(x, [0, -1])
+ asse... | null | null | namanjain12/numpy_final:c875b1391286a982c958d349d58eb720eb081069 | true | null | 1 | 7 | null | 2,633 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.462167 | 81.30525 | ||
4,897 | swe_smith::train::35347 | swe_smith | train | 35,347 | alecthomas__voluptuous.a7a55f83.func_pm_class_rm_funcs__kk3bwbyu | swesmith/alecthomas__voluptuous.a7a55f83 | alecthomas/voluptuous | python | null | Unordered validator implementation is missing
Description
The Unordered validator class in voluptuous is missing its implementation. While the class is defined, the `__call__` method has been removed, making the validator completely non-functional.
When trying to use the Unordered validator, it fails with an error i... | diff --git a/voluptuous/validators.py b/voluptuous/validators.py
index 3f026b1..9d6b4aa 100644
--- a/voluptuous/validators.py
+++ b/voluptuous/validators.py
@@ -1037,62 +1037,9 @@ class Unordered(object):
self.msg = msg
self._schemas = [Schema(val, **kwargs) for val in validators]
- def __call__(... | ["voluptuous/tests/tests.py::test_unordered"] | ["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_new_required_test", "voluptuous/tests/tests.py::test_exact_sequence", "voluptuous/tests/tests.py::test_required", "voluptuous/tests/tests.py::test_extra_with_required", "voluptuous/tests/tests.py::test_iterate_candidates", "voluptuous/tests/tests.... | jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83 | true | null | 1 | 53 | 1 | 1,000 | 0 | 0.6 | 1 | 0.75 | 1 | 0.343333 | 81.305 | |||
4,898 | swe_smith::train::24554 | swe_smith | train | 24,554 | sunpy__sunpy.f8edfd5c.combine_module__y61piztb | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | # Early return in `unpack_list` and `parse_location` functions breaks functionality
## Description
There are two issues in the codebase that are causing functionality to break:
1. In `sunpy/io/special/genx.py`, the `unpack_list` method in the `Unpacker` class has an early return statement that prevents the list from... | diff --git a/sunpy/io/special/genx.py b/sunpy/io/special/genx.py
index d5887f9..e9ba4e0 100644
--- a/sunpy/io/special/genx.py
+++ b/sunpy/io/special/genx.py
@@ -126,13 +126,12 @@ class Unpacker:
def unpack_list(self, unpack_item):
alist = []
+ return alist
while (x := self.unpack_uint())... | ["sunpy/io/tests/test_genx.py::test_unpacker", "sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150906SRS.txt-5]", "sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/SRS/20150306SRS.txt-4]", "sunpy/io/tests/test_srs.py::test_number_of_rows[/testbed/sunpy/data/test/S... | ["sunpy/io/tests/test_genx.py::test_skeleton", "sunpy/io/tests/test_genx.py::test_array_elements_values", "sunpy/io/tests/test_genx.py::test_value_slice[slice0-0]", "sunpy/io/tests/test_genx.py::test_value_slice[slice1-96]", "sunpy/io/tests/test_genx.py::test_value_slice[slice2-16]", "sunpy/io/tests/test_genx.py::test_... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 2 | 8 | 14 | 1,899 | 0 | 0.6 | 1 | 0.75 | 1 | 0.343167 | 81.3045 | |||
4,899 | swe_smith::train::19593 | swe_smith | train | 19,593 | seperman__deepdiff.ed252022.pr_385 | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | ### Bug: Incorrect Handling of Object Attributes in DeepHash
Hello,
I've encountered an issue with the `DeepHash` class when dealing with objects that have `__slots__` defined. It seems that the hashing process does not correctly handle these objects, leading to unexpected results.
### Steps to Reproduce
Here's a m... | diff --git a/deepdiff/deephash.py b/deepdiff/deephash.py
index 1f293bd..da65785 100644
--- a/deepdiff/deephash.py
+++ b/deepdiff/deephash.py
@@ -1,7 +1,5 @@
#!/usr/bin/env python
-import inspect
import logging
-import datetime
from collections.abc import Iterable, MutableMapping
from collections import defaultdict
... | ["tests/test_anyset.py::TestAnySet::test_anyset_init2", "tests/test_anyset.py::TestAnySet::test_anyset_init3_add", "tests/test_anyset.py::TestAnySet::test_anyset_pop1", "tests/test_anyset.py::TestAnySet::test_iter_anyset", "tests/test_cache.py::TestCache::test_cache_deeply_nested_b", "tests/test_cache.py::TestCache::te... | ["tests/test_anyset.py::TestAnySet::test_anyset_init1", "tests/test_cache.py::TestCache::test_cache_does_not_affect_final_results", "tests/test_command.py::TestCommands::test_diff_command[t1.toml-t2.toml-10.0.0.2-0]", "tests/test_command.py::TestCommands::test_cli_cant_find_file", "tests/test_command.py::TestCommands::... | jyangballin/swesmith.x86_64.seperman_1776_deepdiff.ed252022 | true | null | 1 | 38 | 169 | 1,299 | 0 | 0.6 | 1 | 0.75 | 1 | 0.343167 | 81.3045 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.