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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,800 | swe_smith::train::24411 | swe_smith | train | 24,411 | sunpy__sunpy.f8edfd5c.lm_rewrite__q7kdt3c3 | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | [Bug]: Observer 'earth' not working in coordinate frames
### Bug summary
When using 'earth' as an observer in coordinate frames, it fails with a ValueError saying "Invalid observer 'earth': BaseCoordinateFrame.realize_frame() missing 1 required positional argument".
### Code for reproduction
```python
from sunpy.co... | diff --git a/sunpy/coordinates/frameattributes.py b/sunpy/coordinates/frameattributes.py
index 06871fc..e421cf8 100644
--- a/sunpy/coordinates/frameattributes.py
+++ b/sunpy/coordinates/frameattributes.py
@@ -125,19 +125,19 @@ class ObserverCoordinateAttribute(CoordinateAttribute):
Given a value and and frame ... | ["sunpy/coordinates/tests/test_frameattributes.py::test_string_coord", "sunpy/coordinates/tests/test_frameattributes.py::test_coord_get", "sunpy/coordinates/tests/test_frameattributes.py::test_obstime_hack"] | ["sunpy/coordinates/tests/test_frameattributes.py::test_now", "sunpy/coordinates/tests/test_frameattributes.py::test_none", "sunpy/coordinates/tests/test_frameattributes.py::test_convert[input0]", "sunpy/coordinates/tests/test_frameattributes.py::test_convert[2012/01/01T00:00:00]", "sunpy/coordinates/tests/test_frameat... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 26 | 3 | 1,180 | 0 | 0.6 | 1 | 0.75 | 1 | 0.283333 | 81.125 | |||
5,801 | swe_smith::train::43971 | swe_smith | train | 43,971 | pydata__patsy.a5d16484.func_basic__bj9mbolq | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | # NAAction methods for handling missing values are swapped
I've discovered an issue with the `NAAction` class in patsy. The methods for handling missing values (`"raise"` and `"drop"`) appear to be swapped in the `handle_NA` method.
## Description
When using `NAAction` with `on_NA="drop"`, I'm getting errors about m... | diff --git a/patsy/missing.py b/patsy/missing.py
index b4d8a01..807dc86 100644
--- a/patsy/missing.py
+++ b/patsy/missing.py
@@ -163,13 +163,13 @@ class NAAction(object):
"""
assert len(values) == len(is_NAs) == len(origins)
if len(values) == 0:
- return values
- if self.on_... | ["patsy/missing.py::test_NAAction_drop", "patsy/missing.py::test_NAAction_raise", "patsy/test_build.py::test_NA_action", "patsy/test_build.py::test_NA_drop_preserves_levels", "patsy/test_highlevel.py::test_dmatrix_NA_action"] | ["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 | 8 | 5 | 1,539 | 0 | 0.6 | 1 | 0.75 | 1 | 0.283167 | 81.1245 | |||
5,802 | swe_smith::train::5119 | swe_smith | train | 5,119 | agronholm__exceptiongroup.0b4f4937.combine_module__ytjqxjno | swesmith/agronholm__exceptiongroup.0b4f4937 | agronholm/exceptiongroup | python | null | # BaseExceptionGroup.derive() method changes message and order of exceptions
## Description
Currently, the `derive()` method in `BaseExceptionGroup` is modifying both the message and the order of exceptions when creating a new exception group. This breaks several functionalities that rely on the derived exception gro... | diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py
index a4a7ace..138c0ed 100644
--- a/src/exceptiongroup/_exceptions.py
+++ b/src/exceptiongroup/_exceptions.py
@@ -253,7 +253,7 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]):
def derive(
self, __exc... | ["tests/test_catch.py::test_catch_group", "tests/test_catch.py::test_catch_nested_group", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predicate__match", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_type__match", "tests/test_exceptions.py::ExceptionG... | ["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 | 2 | 7 | 28 | 1,559 | 0 | 0.6 | 1 | 0.75 | 1 | 0.283167 | 81.1245 | |||
5,803 | swe_smith::train::35826 | swe_smith | train | 35,826 | stanfordnlp__dspy.651a4c71.func_pm_remove_loop__p4jd1614 | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # Field validation removed from make_signature function
## Description
The validation logic for fields in the `make_signature` function has been removed. This is causing numerous failures across the codebase because the function no longer validates field names, types, or values.
The validation code that was removed ... | diff --git a/dspy/signatures/signature.py b/dspy/signatures/signature.py
index c5f8a79..bb9bcfe 100644
--- a/dspy/signatures/signature.py
+++ b/dspy/signatures/signature.py
@@ -314,25 +314,6 @@ def make_signature(
# Validate the fields, this is important because we sometimes forget the
# slightly unintuitive ... | ["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... | ["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/caching/test_litellm_cache.py::test_lm_calls_are_cached_across_lm_instances", "tests/caching/test_litellm_cache.py::tes... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 1 | 20 | 78 | 1,299 | 0 | 0.6 | 1 | 0.75 | 1 | 0.283167 | 81.1245 | |||
5,804 | swe_smith::train::3008 | swe_smith | train | 3,008 | Suor__funcy.207a7810.combine_file__ry45x01y | swesmith/Suor__funcy.207a7810 | suor/funcy | python | null | # tree_leaves() and ltree_leaves() functions broken after recent changes
## Description
After recent changes to the tree traversal functions, both `tree_leaves()` and `ltree_leaves()` are completely broken and no longer work as expected.
## Steps to reproduce
The following code used to work fine but now fails:
```... | diff --git a/funcy/tree.py b/funcy/tree.py
index 0ceb708..3145e33 100644
--- a/funcy/tree.py
+++ b/funcy/tree.py
@@ -12,15 +12,15 @@ def tree_leaves(root, follow=is_seqcont, children=iter):
node_iter = iter(q.pop())
for sub in node_iter:
if follow(sub):
- q.append(node_iter... | ["tests/test_tree.py::test_tree_leaves", "tests/test_tree.py::test_tree_nodes"] | ["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_make_lookuper_nested", "tests/test_cal... | jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810 | true | null | 1 | 15 | 2 | 1,399 | 0 | 0.6 | 1 | 0.75 | 1 | 0.283167 | 81.1245 | |||
5,805 | swe_smith::train::46993 | swe_smith | train | 46,993 | python-trio__trio.cfbbe2c1.func_basic__s8fya6f0 | swesmith/python-trio__trio.cfbbe2c1 | python-trio/trio | python | null | Thread naming function returns wrong function on non-Darwin platforms
#### Description
When trying to use thread naming functionality on Linux systems, the OS thread naming function returns the wrong implementation, causing a `TypeError` when attempting to name threads.
#### Steps/Code to Reproduce
```python
import... | diff --git a/src/trio/_core/_thread_cache.py b/src/trio/_core/_thread_cache.py
index 189d5a5..f2155a1 100644
--- a/src/trio/_core/_thread_cache.py
+++ b/src/trio/_core/_thread_cache.py
@@ -30,61 +30,38 @@ def get_os_thread_name_func() -> Callable[[int | None, str], None] | None:
ident: int | None,
nam... | ["src/trio/_core/_tests/test_guest_mode.py::test_host_can_directly_wake_trio_task", "src/trio/_core/_tests/test_guest_mode.py::test_host_altering_deadlines_wakes_trio_up", "src/trio/_core/_tests/test_guest_mode.py::test_guest_mode_sniffio_integration", "src/trio/_core/_tests/test_guest_mode.py::test_host_wakeup_doesnt_... | ["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 | 1 | 37 | 122 | 958 | 0 | 0.6 | 1 | 0.75 | 1 | 0.283 | 81.124 | |||
5,806 | swe_smith::train::17296 | swe_smith | train | 17,296 | kennethreitz__records.5941ab27.pr_219 | swesmith/kennethreitz__records.5941ab27 | kennethreitz/records | python | null | # [Bug]: SQL query with single quotes in parameters fails
## Bug summary
When using the `query` method with parameters containing single quotes, the query fails with an AttributeError.
## Reproduction Steps
```python
import records
db = records.Database('sqlite:///:memory:')
db.query('CREATE table users (id text)'... | diff --git a/records.py b/records.py
index b5b6766..04a9873 100644
--- a/records.py
+++ b/records.py
@@ -51,14 +51,9 @@ class Record(object):
return self.values()[key]
# Support for string-based lookup.
- usekeys = self.keys()
- if hasattr(
- usekeys, "_keys"
- ):... | ["tests/test_69.py::test_issue69[sqlite_memory]"] | ["tests/test_records.py::TestRecordCollection::test_iter", "tests/test_records.py::TestRecordCollection::test_next", "tests/test_records.py::TestRecordCollection::test_iter_and_next", "tests/test_records.py::TestRecordCollection::test_multiple_iter", "tests/test_records.py::TestRecordCollection::test_slice_iter", "test... | jyangballin/swesmith.x86_64.kennethreitz_1776_records.5941ab27 | true | null | 1 | 39 | 1 | 918 | 0 | 0.6 | 1 | 0.75 | 1 | 0.283 | 81.124 | |||
5,807 | swe_smith::train::49583 | swe_smith | train | 49,583 | cool-RR__PySnooper.57472b46.combine_file__w5y22mlp | swesmith/cool-RR__PySnooper.57472b46 | cool-rr/pysnooper | python | null | `get_shortish_repr` function breaks when exception occurs during repr generation
#### Description
The `get_shortish_repr` function in `utils.py` no longer handles exceptions properly when generating string representations of objects. When an exception occurs during `repr_function(item)`, the function crashes instead ... | diff --git a/pysnooper/utils.py b/pysnooper/utils.py
index ff9b9e8..8529a43 100644
--- a/pysnooper/utils.py
+++ b/pysnooper/utils.py
@@ -13,11 +13,11 @@ def _check_methods(C, *methods):
for B in mro:
if method in B.__dict__:
if B.__dict__[method] is None:
- retu... | ["tests/test_pysnooper.py::test_string_io", "tests/test_pysnooper.py::test_repr_exception[True]", "tests/test_pysnooper.py::test_repr_exception[False]", "tests/test_pysnooper.py::test_depth[True]", "tests/test_pysnooper.py::test_depth[False]", "tests/test_pysnooper.py::test_confusing_decorator_lines[True]", "tests/test... | ["tests/test_chinese.py::test_chinese", "tests/test_mini_toolbox.py::test_output_capturer_doesnt_swallow_exceptions", "tests/test_multiple_files/test_multiple_files.py::test_multiple_files", "tests/test_not_implemented.py::test_rejecting_coroutine_functions", "tests/test_not_implemented.py::test_rejecting_async_generat... | jyangballin/swesmith.x86_64.cool-rr_1776_pysnooper.57472b46 | true | null | 1 | 35 | 36 | 998 | 0 | 0.6 | 1 | 0.75 | 1 | 0.283 | 81.124 | |||
5,808 | swe_smith::train::24081 | swe_smith | train | 24,081 | sunpy__sunpy.f8edfd5c.func_pm_ctrl_shuffle__tafrhvpx | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | solar_angle_equivalency function returns undefined variable
#### Description
The `solar_angle_equivalency` function in `sunpy.coordinates.utils` is returning an undefined variable `equiv` before it's properly initialized, causing an `UnboundLocalError`.
#### Steps/Code to Reproduce
```python
import astropy.units as... | diff --git a/sunpy/coordinates/utils.py b/sunpy/coordinates/utils.py
index 6f868af..9c27339 100644
--- a/sunpy/coordinates/utils.py
+++ b/sunpy/coordinates/utils.py
@@ -388,6 +388,20 @@ def get_rectangle_coordinates(bottom_left, *, top_right=None,
def solar_angle_equivalency(observer):
+
+ return equiv
+
+ e... | ["sunpy/coordinates/tests/test_utils.py::test_solar_angle_equivalency_inputs", "sunpy/coordinates/tests/test_utils.py::test_solar_angle_equivalency_outputs"] | ["sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start0-end0]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start1-end1]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start2-end2]", "sunpy/coordinates/tests/test_utils.py::test_great_arc_calculable[start3-end... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 31 | 2 | 1,077 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282833 | 81.1235 | |||
5,809 | swe_smith::train::42456 | swe_smith | train | 42,456 | vi3k6i5__flashtext.b316c7e9.func_pm_remove_assign__62p1q7xi | swesmith/vi3k6i5__flashtext.b316c7e9 | vi3k6i5/flashtext | python | null | UnboundLocalError in replace_keywords method when using fuzzy matching
#### Description
When using the `replace_keywords` method with fuzzy matching (max_cost parameter), an `UnboundLocalError` is raised for several variables that are referenced before assignment.
#### Steps/Code to Reproduce
```python
from flashte... | diff --git a/flashtext/keyword.py b/flashtext/keyword.py
index b5cb1d1..8fae423 100644
--- a/flashtext/keyword.py
+++ b/flashtext/keyword.py
@@ -612,25 +612,20 @@ class KeywordProcessor(object):
current_dict = self.keyword_trie_dict
current_white_space = ''
sequence_end_pos = 0
- idx =... | ["test/test_dictionary_loading.py::TestDictionaryLoad::test_dictionary_loading", "test/test_file_load.py::TestFileLoad::test_file_format_one", "test/test_file_load.py::TestFileLoad::test_file_format_two", "test/test_loading_keyword_list.py::TestListLoad::test_list_loading", "test/test_replace_fuzzy.py::TestReplaceFuzzy... | ["test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_addition", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_deletion", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_correct_keyword_on_substitution", "test/test_extract_fuzzy.py::TestExtractFuzzy::test_extract_addition"... | jyangballin/swesmith.x86_64.vi3k6i5_1776_flashtext.b316c7e9 | true | null | 1 | 23 | 11 | 1,237 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282833 | 81.1235 | |||
5,810 | swe_smith::train::26181 | swe_smith | train | 26,181 | pylint-dev__astroid.b114f6b5.func_pm_class_rm_funcs__0if0bmrq | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | UnboundMethod getattr method missing causes AttributeError on special attributes
#### Description
After recent changes, accessing special attributes on unbound methods raises AttributeError instead of returning the expected attribute values.
#### Steps/Code to Reproduce
```python
import astroid
# Create a simple c... | diff --git a/astroid/bases.py b/astroid/bases.py
index d91a4c9..d49fd6b 100644
--- a/astroid/bases.py
+++ b/astroid/bases.py
@@ -450,11 +450,6 @@ class UnboundMethod(Proxy):
def is_bound(self) -> bool:
return False
- def getattr(self, name: str, context: InferenceContext | None = None):
- if n... | ["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_mul... | ["tests/brain/numpy/test_core_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest::test_numpy_function_calls_inferred_as_bool", "tests/brain/numpy/test_core_multiarray.py::BrainNumpyCoreMultiarrayTest:... | jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5 | true | null | 1 | 38 | 39 | 937 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282833 | 81.1235 | |||
5,811 | swe_smith::train::6998 | swe_smith | train | 6,998 | cantools__cantools.0c6a7871.combine_file__g6oim1v3 | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | # CDD file parsing is broken
**Describe the bug**
When trying to load CDD files, the parser fails with various errors. The issue appears to be in the `add_cdd_string` method which is only reading the first line of the file instead of the entire content.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a Da... | diff --git a/src/cantools/database/diagnostics/database.py b/src/cantools/database/diagnostics/database.py
index de312e8..b388d74 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_le_cdd_add", "tests/test_diagnostics_database.py::CanToolsDiagno... | ["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 | 12 | 5 | 1,456 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282667 | 81.123 | |||
5,812 | swe_smith::train::19123 | swe_smith | train | 19,123 | seperman__deepdiff.ed252022.func_pm_ctrl_shuffle__ms074yx9 | swesmith/seperman__deepdiff.ed252022 | seperman/deepdiff | python | null | DeepSearch initialization fails with AttributeError
#### Description
DeepSearch constructor is broken and raises AttributeError when trying to access attributes that haven't been initialized yet.
#### Steps/Code to Reproduce
```python
from deepdiff import DeepSearch
obj = ['We like python', 'but not (?:p|t)ython']... | diff --git a/deepdiff/search.py b/deepdiff/search.py
index ae86ce0..b5a3d00 100644
--- a/deepdiff/search.py
+++ b/deepdiff/search.py
@@ -94,46 +94,45 @@ class DeepSearch(dict):
use_regexp=False,
strict_checking=True,
**kwargs):
- if kwargs:
- raise... | ["tests/test_command.py::TestCommands::test_command_grep", "tests/test_search.py::TestDeepSearch::test_number_in_list", "tests/test_search.py::TestDeepSearch::test_number_in_list2", "tests/test_search.py::TestDeepSearch::test_number_in_list3", "tests/test_search.py::TestDeepSearch::test_number_in_list_strict_false", "t... | ["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 | 45 | 62 | 796 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282667 | 81.123 | |||
5,813 | swe_smith::train::31255 | swe_smith | train | 31,255 | scrapy__scrapy.35212ec5.func_pm_ctrl_shuffle__emx74xng | swesmith/scrapy__scrapy.35212ec5 | scrapy/scrapy | python | null | # Dupefilter not working correctly - requests not being filtered properly
## Bug report
**Bug summary**
The dupefilter in Scrapy is not correctly identifying duplicate requests. After a recent change, the dupefilter is adding fingerprints to the set before calculating them, which causes an UnboundLocalError and break... | diff --git a/scrapy/dupefilters.py b/scrapy/dupefilters.py
index a3e2c5e..f1efad0 100644
--- a/scrapy/dupefilters.py
+++ b/scrapy/dupefilters.py
@@ -121,14 +121,13 @@ class RFPDupeFilter(BaseDupeFilter):
return cls(job_dir(settings), debug, fingerprinter=fingerprinter)
def request_seen(self, request: Re... | ["tests/test_dupefilters.py::RFPDupeFilterTest::test_dupefilter_path", "tests/test_dupefilters.py::RFPDupeFilterTest::test_filter", "tests/test_dupefilters.py::RFPDupeFilterTest::test_request_fingerprint", "tests/test_dupefilters.py::RFPDupeFilterTest::test_seenreq_newlines"] | ["tests/test_dupefilters.py::RFPDupeFilterTest::test_df_direct_scheduler", "tests/test_dupefilters.py::RFPDupeFilterTest::test_df_from_crawler_scheduler", "tests/test_dupefilters.py::RFPDupeFilterTest::test_log", "tests/test_dupefilters.py::RFPDupeFilterTest::test_log_debug", "tests/test_dupefilters.py::RFPDupeFilterTe... | jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5 | true | null | 1 | 7 | 4 | 1,555 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2825 | 81.1225 | |||
5,814 | swe_smith::train::35314 | swe_smith | train | 35,314 | alecthomas__voluptuous.a7a55f83.func_basic__s03cvwpk | swesmith/alecthomas__voluptuous.a7a55f83 | alecthomas/voluptuous | python | null | # Schema.extend method broken in latest version
## Description
When trying to extend a schema with another schema using the `extend` method, I'm getting an assertion error. The method seems to be expecting a list instead of a dictionary for the schema parameter.
Here's a simple reproduction:
```python
from voluptuo... | diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py
index cdeb514..b86194a 100644
--- a/voluptuous/schema_builder.py
+++ b/voluptuous/schema_builder.py
@@ -697,48 +697,35 @@ class Schema(object):
"""
assert isinstance(self.schema, dict) and isinstance(
- schema, dict
... | ["voluptuous/tests/tests.py::test_schema_extend", "voluptuous/tests/tests.py::test_schema_extend_overrides", "voluptuous/tests/tests.py::test_schema_extend_key_swap", "voluptuous/tests/tests.py::test_subschema_extension", "voluptuous/tests/tests.py::test_schema_extend_handles_schema_subclass"] | ["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 | 27 | 5 | 1,154 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282333 | 81.122 | |||
5,815 | swe_smith::train::55597 | swe_smith | train | 55,597 | RoaringBitmap__roaring.09c46a0a.func_pm_op_change__9vnl722a | swesmith/RoaringBitmap__roaring.09c46a0a | roaringbitmap/roaring | go | null | Iterator advance function causes index out of bounds panic
#### Description
The `advanceUntil` function in `setutil.go` is causing runtime panics with "index out of range" errors when iterating through bitmap containers. This affects both short iterators and int iterators when calling `AdvanceIfNeeded`.
#### Steps/C... | diff --git a/setutil.go b/setutil.go
index 8def774..3c03dd0 100644
--- a/setutil.go
+++ b/setutil.go
@@ -364,25 +364,25 @@ func advanceUntil(
length int,
min uint16,
) int {
- lower := pos + 1
+ lower := pos / 1
- if lower >= length || array[lower] >= min {
+ if lower < length && array[lower] >= min {
return ... | ["TestArrayIteratorAdvance", "TestArrayIteratorAdvance/advance_by_using_a_new_short_iterator", "TestIteratorAdvance", "TestIteratorAdvance/advance_by_using_a_new_int_iterator", "TestNewBSIRetainSet"] | ["TestParAggregations", "TestParAggregations/par1", "TestParAggregations/par1/simple_case", "TestParAggregations/par1/aggregate_nothing", "TestParAggregations/par1/single_bitmap", "TestParAggregations/par1/empty_and_single_elem_bitmaps", "TestParAggregations/par1/two_single_elem_disjoint_sets", "TestParAggregations/par... | jyangballin/swesmith.x86_64.roaringbitmap_1776_roaring.09c46a0a | true | null | 1 | 16 | 5 | 1,374 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282333 | 81.122 | |||
5,816 | swe_smith::train::31249 | swe_smith | train | 31,249 | scrapy__scrapy.35212ec5.func_pm_ctrl_shuffle__7ndtkgdb | swesmith/scrapy__scrapy.35212ec5 | scrapy/scrapy | python | null | Crawler initialization order causes AttributeError when accessing settings
#### Description
When creating a Crawler instance, accessing certain attributes like `settings` or `spidercls` raises an AttributeError because the initialization order has been changed and some attributes are now accessed before they are defi... | diff --git a/scrapy/crawler.py b/scrapy/crawler.py
index 1ec1e31..e1c6d5c 100644
--- a/scrapy/crawler.py
+++ b/scrapy/crawler.py
@@ -59,31 +59,30 @@ class Crawler:
settings: dict[str, Any] | Settings | None = None,
init_reactor: bool = False,
):
+ self.spider: Spider | None = None
+ ... | ["tests/test_crawler.py::CrawlerLoggingTestCase::test_spider_custom_settings_log_append", "tests/test_crawler.py::CrawlerLoggingTestCase::test_spider_custom_settings_log_level", "tests/test_crawler.py::CrawlerRunnerHasSpider::test_crawler_runner_asyncio_enabled_true", "tests/test_crawler.py::CrawlerRunnerHasSpider::tes... | ["tests/test_crawler.py::CrawlerTestCase::test_crawler_accepts_None", "tests/test_crawler.py::CrawlerTestCase::test_crawler_accepts_dict", "tests/test_crawler.py::CrawlerTestCase::test_crawler_crawl_twice_unsupported", "tests/test_crawler.py::CrawlerTestCase::test_crawler_rejects_spider_objects", "tests/test_crawler.py... | jyangballin/swesmith.x86_64.scrapy_1776_scrapy.35212ec5 | true | null | 1 | 29 | 30 | 1,114 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282333 | 81.122 | |||
5,817 | swe_smith::train::24661 | swe_smith | train | 24,661 | marshmallow-code__marshmallow.9716fc62.func_basic__9a308y1y | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | Schema.load() method not working correctly with many=True parameter
#### Description
When using `Schema.load()` with `many=True`, the method is not processing collections properly and is raising validation errors about invalid input types. Additionally, post-processing hooks are not being executed when they should be... | diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py
index e21768e..d71977c 100644
--- a/src/marshmallow/schema.py
+++ b/src/marshmallow/schema.py
@@ -837,7 +837,7 @@ class Schema(base.SchemaABC, metaclass=SchemaMeta):
"""
error_store = ErrorStore()
errors = {} # type: dict[str... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate... | ["tests/test_decorators.py::test_decorated_processor_inheritance", "tests/test_decorators.py::test_pre_dump_is_invoked_before_implicit_field_generation", "tests/test_decorators.py::TestValidatesDecorator::test_validates", "tests/test_decorators.py::TestValidatesDecorator::test_validates_with_attribute", "tests/test_dec... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 1 | 16 | 31 | 1,374 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282333 | 81.122 | |||
5,818 | swe_smith::train::18309 | swe_smith | train | 18,309 | msiemens__tinydb.10644a0e.func_basic__v191tycv | swesmith/msiemens__tinydb.10644a0e | msiemens/tinydb | python | null | Document ID handling broken when inserting documents with existing doc_id
#### Description
When inserting documents that already have a `doc_id` attribute, the insertion logic incorrectly handles ID assignment. Documents with existing `doc_id` values get assigned new auto-generated IDs instead of preserving their ori... | diff --git a/tinydb/table.py b/tinydb/table.py
index c562d02..d4801a8 100644
--- a/tinydb/table.py
+++ b/tinydb/table.py
@@ -190,34 +190,25 @@ class Table:
def updater(table: dict):
for document in documents:
- # Make sure the document implements the ``Mapping`` interface
... | ["tests/test_tinydb.py::test_custom_mapping_type_with_json", "tests/test_tinydb.py::test_unique_ids", "tests/test_tinydb.py::test_lastid_after_open", "tests/test_tinydb.py::test_doc_ids_json", "tests/test_tinydb.py::test_insert_string", "tests/test_tinydb.py::test_insert_invalid_dict", "tests/test_tinydb.py::test_query... | ["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 | 13 | 7 | 1,433 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282167 | 81.1215 | |||
5,819 | swe_smith::train::7843 | swe_smith | train | 7,843 | cantools__cantools.0c6a7871.func_basic__z1qrb3bx | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | #### Description
The `generate-c-source` subcommand is broken after recent changes. When trying to use any cantools functionality, it fails with a `NameError` because the function reference was changed incorrectly.
#### Steps/Code to Reproduce
```python
import cantools
# Try to use any cantools functionality
db = c... | diff --git a/src/cantools/subparsers/generate_c_source.py b/src/cantools/subparsers/generate_c_source.py
index 1ee533c..a674e24 100644
--- a/src/cantools/subparsers/generate_c_source.py
+++ b/src/cantools/subparsers/generate_c_source.py
@@ -74,45 +74,45 @@ def add_subparser(subparsers):
formatter_class=argpars... | ["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 | 42 | 91 | 852 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282 | 81.121 | |||
5,820 | swe_smith::train::28371 | swe_smith | train | 28,371 | encode__starlette.db5063c2.combine_file__tbxi1svy | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | StaticFiles html parameter inverted and directory validation broken
When creating a StaticFiles instance, the `html` parameter behavior is inverted - passing `html=True` disables HTML mode instead of enabling it. Additionally, the directory validation logic is broken and only checks if the directory is a file instead ... | diff --git a/starlette/staticfiles.py b/starlette/staticfiles.py
index 746e740..6ccb092 100644
--- a/starlette/staticfiles.py
+++ b/starlette/staticfiles.py
@@ -49,10 +49,10 @@ class StaticFiles:
self.directory = directory
self.packages = packages
self.all_directories = self.get_directories(d... | ["tests/test_applications.py::test_app_mount[asyncio]", "tests/test_applications.py::test_app_mount[trio]", "tests/test_staticfiles.py::test_staticfiles[asyncio]", "tests/test_staticfiles.py::test_staticfiles_with_pathlib[asyncio]", "tests/test_staticfiles.py::test_staticfiles_head_with_middleware[asyncio]", "tests/tes... | ["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_fully_evaluated_response[asyncio]", "tests/middleware/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 17 | 39 | 1,352 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282 | 81.121 | |||
5,821 | swe_smith::train::22394 | swe_smith | train | 22,394 | tweepy__tweepy.91a41c6e.func_basic__rb2yi0nt | swesmith/tweepy__tweepy.91a41c6e | tweepy/tweepy | python | null | AttributeError when accessing certain API methods
I've encountered an issue with the Tweepy library where certain API methods are returning an `AttributeError`. This seems to occur when trying to access attributes that should be available after making API calls.
For instance, when attempting to retrieve a list of mem... | diff --git a/tweepy/models.py b/tweepy/models.py
index f29361e..b43f078 100644
--- a/tweepy/models.py
+++ b/tweepy/models.py
@@ -324,16 +324,13 @@ class Status(Model, HashableID):
user = api.parser.model_factory.user.parse(api, v)
except AttributeError:
user = ... | ["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedresult", "tests/test_api.py::TweepyAPITests::testcreatedestroyblock", "tests/test_api.py::TweepyAPITests::testcreatedestroyfavo... | ["tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcreateupdatedestroylist", "tests/test_api.py::TweepyAPITests::testgeoapis", "tests/test_api.py::TweepyAPITests::testgetblockedids", "tests/test_api.py::Tw... | jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e | true | null | 1 | 15 | 32 | 1,392 | 0 | 0.6 | 1 | 0.75 | 1 | 0.282 | 81.121 | |||
5,822 | swe_smith::train::51899 | swe_smith | train | 51,899 | pydicom__pydicom.7d361b3d.func_basic__bh75bxio | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | ISfloat validation mode behavior incorrect for IGNORE and RAISE modes
#### Description
When creating ISfloat instances with validation modes, the validation logic is not working correctly. The IGNORE mode is triggering warnings when it should silently ignore validation errors, and the RAISE mode is not raising except... | diff --git a/src/pydicom/valuerep.py b/src/pydicom/valuerep.py
index c81f96d..114bcb1 100644
--- a/src/pydicom/valuerep.py
+++ b/src/pydicom/valuerep.py
@@ -1322,18 +1322,17 @@ class ISfloat(float):
def __init__(
self, val: str | float | Decimal, validation_mode: int | None = None
) -> None:
- ... | ["tests/test_valuerep.py::TestIS::test_float_value", "tests/test_valuerep.py::TestIS::test_float_init"] | ["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 | 15 | 2 | 1,391 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281833 | 81.1205 | |||
5,823 | swe_smith::train::24922 | swe_smith | train | 24,922 | marshmallow-code__marshmallow.9716fc62.lm_rewrite__d9yevs4f | swesmith/marshmallow-code__marshmallow.9716fc62 | marshmallow-code/marshmallow | python | null | TypeError when using Integer field with UUID values
### Description
It seems there's an issue with the `Integer` field when attempting to validate UUID values. The recent changes to the `_validated` method in the `Integer` class are causing a `ValidationError` with the error key `invalid_uuid`, which does not exist i... | diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py
index e83ba19..f501224 100644
--- a/src/marshmallow/fields.py
+++ b/src/marshmallow/fields.py
@@ -1001,11 +1001,18 @@ class Integer(Number):
super().__init__(**kwargs)
# override Number
- def _validated(self, value):
- if self.... | ["tests/test_decorators.py::test_decorated_processors[True]", "tests/test_decorators.py::test_decorated_processors[False]", "tests/test_decorators.py::test_decorated_processor_returning_none[exclude]", "tests/test_decorators.py::test_decorated_processor_returning_none[include]", "tests/test_decorators.py::test_decorate... | ["tests/test_decorators.py::TestPassOriginal::test_pass_original_single", "tests/test_decorators.py::TestPassOriginal::test_pass_original_many", "tests/test_decorators.py::test_decorated_processor_inheritance", "tests/test_decorators.py::test_pre_dump_is_invoked_before_implicit_field_generation", "tests/test_decorators... | jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62 | true | null | 1 | 17 | 57 | 1,351 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281833 | 81.1205 | |||
5,824 | swe_smith::train::28285 | swe_smith | train | 28,285 | encode__starlette.db5063c2.combine_file__1wwliazb | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | Decorator methods return wrong values after recent changes
#### Description
The decorator methods in Starlette are returning incorrect values, breaking the expected decorator pattern. When using decorators like `@app.exception_handler()`, `@app.websocket_route()`, etc., they should return the original function but in... | diff --git a/starlette/applications.py b/starlette/applications.py
index 0a717bb..4604891 100644
--- a/starlette/applications.py
+++ b/starlette/applications.py
@@ -170,10 +170,10 @@ class Starlette:
)
def decorator(func: typing.Callable) -> typing.Callable: # type: ignore[type-arg]
- se... | ["tests/test_applications.py::test_decorator_deprecations"] | ["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_fully_evaluated_response[asyncio]", "tests/middleware/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 12 | 1 | 1,451 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281833 | 81.1205 | |||
5,825 | swe_smith::train::51924 | swe_smith | train | 51,924 | pydicom__pydicom.7d361b3d.func_basic__cvke9c71 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | FileSet.descriptor_file_id validation broken for empty strings and non-string types
#### Description
The `descriptor_file_id` property in `FileSet` has broken validation logic that incorrectly handles empty strings and non-string types. Setting an empty string should be valid (as it's between 0 and 16 characters), bu... | diff --git a/src/pydicom/fileset.py b/src/pydicom/fileset.py
index 75976eb..31525e8 100644
--- a/src/pydicom/fileset.py
+++ b/src/pydicom/fileset.py
@@ -1388,12 +1388,12 @@ class FileSet:
return
if val is None:
- pass
+ val = []
elif isinstance(val, list):
... | ["tests/test_fileset.py::TestFileSet::test_descriptor", "tests/test_fileset.py::TestFileSet::test_descriptor_dicomdir", "tests/test_fileset.py::TestFileSet_Modify::test_write_dicomdir_fs_changes"] | ["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 | 13 | 3 | 1,431 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281833 | 81.1205 | |||
5,826 | swe_smith::train::35869 | swe_smith | train | 35,869 | stanfordnlp__dspy.651a4c71.lm_rewrite__2wt3rjpm | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # F1 score calculation breaks when prediction or ground truth is empty
I found an issue with the `f1_score` function in `dspy/dsp/utils/metrics.py`. When either the prediction or ground truth is empty (but not both), the function can raise a ZeroDivisionError.
## Steps to reproduce
Here's a simple example that demon... | diff --git a/dspy/dsp/utils/metrics.py b/dspy/dsp/utils/metrics.py
index e3e41e9..78eabd2 100644
--- a/dspy/dsp/utils/metrics.py
+++ b/dspy/dsp/utils/metrics.py
@@ -52,27 +52,28 @@ def em_score(prediction, ground_truth):
# See: QReCC's
def f1_score(prediction, ground_truth):
- prediction_tokens = normalize_text(... | ["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 | 25 | 4 | 1,189 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2815 | 81.1195 | |||
5,827 | r2e_gym::train::172 | r2e_gym | train | 172 | orange3__82c88276579a410d230dc9d8257b2aff2cec188d | orange3 | biolab/orange3 | python | 82c88276579a410d230dc9d8257b2aff2cec188d | **Title:** AttributeError: 'Warning' object has no attribute 'missing_targets' when scoring with missing targets
**Description:**
When scoring predictions on datasets that include instances with missing target values, the widget is expected to display a warning indicating that these instances are being ignored. Howeve... | diff --git a/Orange/widgets/evaluate/owpredictions.py b/Orange/widgets/evaluate/owpredictions.py
--- a/Orange/widgets/evaluate/owpredictions.py
+++ b/Orange/widgets/evaluate/owpredictions.py
@@ -65,6 +65,8 @@
empty_data = Msg("Empty dataset")
wrong_targets = Msg(
"Some model(s) predict a ... | diff --git a/Orange/widgets/evaluate/tests/test_owpredictions.py b/Orange/widgets/evaluate/tests/test_owpredictions.py
--- a/Orange/widgets/evaluate/tests/test_owpredictions.py
+++ b/Orange/widgets/evaluate/tests/test_owpredictions.py
@@ -11,6 +11,7 @@
from Orange.base import Model
from Orange.classification import L... | null | null | namanjain12/orange3_final:82c88276579a410d230dc9d8257b2aff2cec188d | true | null | 1 | 50 | null | 1,401 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.400167 | 81.11925 | ||
5,828 | swe_smith::train::1249 | swe_smith | train | 1,249 | Cog-Creators__Red-DiscordBot.33e0eac7.combine_file__onskze9t | swesmith/Cog-Creators__Red-DiscordBot.33e0eac7 | cog-creators/red-discordbot | python | null | # deduplicate_iterables reverses order of items and breaks when empty
## Description
I found a bug in the `deduplicate_iterables` function in `redbot/core/utils/__init__.py`. The function is supposed to return a list of all unique items from multiple iterables in the order they were first encountered, but it's curren... | diff --git a/redbot/core/utils/__init__.py b/redbot/core/utils/__init__.py
index dc3687f..2ee95a8 100644
--- a/redbot/core/utils/__init__.py
+++ b/redbot/core/utils/__init__.py
@@ -69,8 +69,11 @@ def deduplicate_iterables(*iterables):
Returns a list of all unique items in ``iterables``, in the order they
were... | ["tests/core/test_cog_manager.py::test_add_path", "tests/core/test_cog_manager.py::test_remove_path", "tests/core/test_utils.py::test_deduplicate_iterables", "tests/core/test_utils.py::test_bounded_gather", "tests/core/test_utils.py::test_bounded_gather_iter"] | ["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 | 14 | 5 | 1,408 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281333 | 81.119 | |||
5,829 | swe_smith::train::38282 | swe_smith | train | 38,282 | burnash__gspread.a8be3b96.func_pm_class_rm_funcs__ltykv367 | swesmith/burnash__gspread.a8be3b96 | burnash/gspread | python | null | HTTPClient missing set_timeout and values_get methods after recent changes
#### Description
After a recent update, the HTTPClient class is missing the `set_timeout` and `values_get` methods that were previously available. This is causing AttributeError exceptions when trying to use these methods.
#### Steps/Code to ... | diff --git a/gspread/http_client.py b/gspread/http_client.py
index cf392ca..b7b00e9 100644
--- a/gspread/http_client.py
+++ b/gspread/http_client.py
@@ -90,17 +90,6 @@ class HTTPClient:
self.session.headers.update({"Authorization": "Bearer %s" % self.auth.token})
- def set_timeout(self, timeout: Optiona... | ["tests/cell_test.py::CellTest::test_a1_value", "tests/cell_test.py::CellTest::test_equality", "tests/cell_test.py::CellTest::test_numeric_value", "tests/cell_test.py::CellTest::test_properties", "tests/client_test.py::ClientTest::test_add_timeout", "tests/client_test.py::ClientTest::test_import_csv", "tests/spreadshee... | ["tests/cell_test.py::CellTest::test_define_named_range", "tests/cell_test.py::CellTest::test_delete_named_range", "tests/cell_test.py::CellTest::test_merge_cells", "tests/client_test.py::ClientTest::test_access_non_existing_spreadsheet", "tests/client_test.py::ClientTest::test_access_private_spreadsheet", "tests/clien... | jyangballin/swesmith.x86_64.burnash_1776_gspread.a8be3b96 | true | null | 1 | 28 | 63 | 1,128 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281333 | 81.119 | |||
5,830 | swe_smith::train::35840 | swe_smith | train | 35,840 | stanfordnlp__dspy.651a4c71.func_pm_remove_wrapper__1izokw04 | swesmith/stanfordnlp__dspy.651a4c71 | stanfordnlp/dspy | python | null | # [Bug]: ChatAdapter not parsing field values
### Bug summary
The ChatAdapter is not properly parsing field values from the model's response, causing many operations to fail with a `ValueError` about expected fields.
### Code for reproduction
```python
import dspy
from dspy.signatures import Signature
from typing i... | diff --git a/dspy/adapters/chat_adapter.py b/dspy/adapters/chat_adapter.py
index b11e5c1..092e8a2 100644
--- a/dspy/adapters/chat_adapter.py
+++ b/dspy/adapters/chat_adapter.py
@@ -165,17 +165,11 @@ class ChatAdapter(Adapter):
fields = {}
for k, v in sections:
if (k not in fields) and (k ... | ["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_two_step_adapter.py::tes... | ["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_json_adapter.py::test_json_adapter_parse_raise_error_on_mismatch_fields", "tests/adapters/test_two_step_a... | jyangballin/swesmith.x86_64.stanfordnlp_1776_dspy.651a4c71 | true | null | 1 | 8 | 74 | 1,528 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281333 | 81.119 | |||
5,831 | swe_smith::train::49187 | swe_smith | train | 49,187 | mozilla__bleach.73871d76.combine_module__gjwbxdbc | swesmith/mozilla__bleach.73871d76 | mozilla/bleach | python | null | getTreeWalker returns None for all tree types
#### Description
The `getTreeWalker` function in `bleach._vendor.html5lib.treewalkers` is returning `None` for all tree types instead of the appropriate TreeWalker class.
#### Steps/Code to Reproduce
```python
from bleach._vendor.html5lib.treewalkers import getTreeWalke... | diff --git a/bleach/_vendor/html5lib/treewalkers/__init__.py b/bleach/_vendor/html5lib/treewalkers/__init__.py
index b2d3aac..6819951 100644
--- a/bleach/_vendor/html5lib/treewalkers/__init__.py
+++ b/bleach/_vendor/html5lib/treewalkers/__init__.py
@@ -43,25 +43,8 @@ def getTreeWalker(treeType, implementation=None, **k... | ["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_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comments[<!--comment-->text-True-text]"... | ["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 | 2 | 22 | 183 | 1,248 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281333 | 81.119 | |||
5,832 | swe_smith::train::7963 | swe_smith | train | 7,963 | cantools__cantools.0c6a7871.func_pm_ctrl_shuffle__enfncpdz | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | Command line tool crashes with UnboundLocalError when running any subcommand
#### Description
The cantools command line interface is broken and crashes with `UnboundLocalError: local variable 'args' referenced before assignment` when trying to run any subcommand.
#### Steps/Code to Reproduce
```bash
cantools --help... | diff --git a/src/cantools/__init__.py b/src/cantools/__init__.py
index 39f71d0..7f0fc17 100644
--- a/src/cantools/__init__.py
+++ b/src/cantools/__init__.py
@@ -55,22 +55,17 @@ def _load_subparser(subparser_name, subparsers):
result.add_subparser(subparsers)
def _main():
- parser = argparse.ArgumentParse... | ["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 | 46 | 91 | 768 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281333 | 81.119 | |||
5,833 | swe_smith::train::37891 | swe_smith | train | 37,891 | kayak__pypika.1c9646f0.func_pm_class_rm_funcs__1i6cg85h | swesmith/kayak__pypika.1c9646f0 | kayak/pypika | python | null | # CreateIndexBuilder missing __init__ method
## Description
I discovered an issue with the `CreateIndexBuilder` class in pypika. When trying to create an index using the builder pattern, I get an error because the class is missing its `__init__` method.
Here's a simple example that reproduces the issue:
```python
f... | diff --git a/pypika/queries.py b/pypika/queries.py
index 42c7c45..41d0ae9 100644
--- a/pypika/queries.py
+++ b/pypika/queries.py
@@ -2115,13 +2115,6 @@ class CreateQueryBuilder:
class CreateIndexBuilder:
- def __init__(self) -> None:
- self._index = None
- self._columns = []
- self._table =... | ["pypika/tests/test_create.py::CreateIndexTests::test_create_index_if_not_exists", "pypika/tests/test_create.py::CreateIndexTests::test_create_index_simple", "pypika/tests/test_create.py::CreateIndexTests::test_create_index_unique", "pypika/tests/test_create.py::CreateIndexTests::test_create_index_where"] | ["pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_0__ridley_scott_jimi_hendrix_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_1__1_2_3_4_", "pypika/tests/clickhouse/test_array.py::TestArray::test_get_sql_2__toInt64_1_toInt64_2_toInt64_3_toInt64_4_", "pypika/tests/clickhouse/test_array... | jyangballin/swesmith.x86_64.kayak_1776_pypika.1c9646f0 | true | null | 1 | 8 | 4 | 1,527 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281167 | 81.1185 | |||
5,834 | swe_smith::train::2929 | swe_smith | train | 2,929 | madzak__python-json-logger.5f85723f.combine_file__zjtbw7ex | swesmith/madzak__python-json-logger.5f85723f | madzak/python-json-logger | python | null | JsonFormatter produces invalid JSON output after recent changes
#### Description
The JsonFormatter is now producing malformed JSON that cannot be parsed. When trying to log messages, the output appears to have incorrect serialization parameters being passed to the JSON encoder.
#### Steps/Code to Reproduce
```pytho... | diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py
index 519a64d..49703a0 100644
--- a/src/pythonjsonlogger/jsonlogger.py
+++ b/src/pythonjsonlogger/jsonlogger.py
@@ -62,9 +62,8 @@ def merge_record_extra(
if rename_fields is None:
rename_fields = {}
for key, value in... | ["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg... | ["tests/test_jsonlogger.py::TestJsonLogger::test_merge_record_extra", "tests/test_jsonlogger.py::TestJsonLogger::test_unknown_format_key"] | jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f | true | null | 1 | 19 | 18 | 1,307 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281167 | 81.1185 | |||
5,835 | swe_smith::train::5193 | swe_smith | train | 5,193 | agronholm__exceptiongroup.0b4f4937.func_pm_remove_loop__vqj0wnq5 | swesmith/agronholm__exceptiongroup.0b4f4937 | agronholm/exceptiongroup | python | null | NameError and AttributeError suggestions not working in exceptiongroup
When using exceptiongroup, the helpful suggestions for similar names that normally appear with NameError and AttributeError are not showing up.
How to reproduce:
```python
from exceptiongroup import print_exc
# Try to use a variable that doesn't... | diff --git a/src/exceptiongroup/_formatting.py b/src/exceptiongroup/_formatting.py
index 4c52d77..fde2735 100644
--- a/src/exceptiongroup/_formatting.py
+++ b/src/exceptiongroup/_formatting.py
@@ -554,8 +554,6 @@ def _levenshtein_distance(a, b, max_cost):
a = a[pre:]
b = b[pre:]
post = 0
- while a[: p... | ["tests/test_formatting.py::test_nameerror_suggestions[patched]", "tests/test_formatting.py::test_nameerror_suggestions[unpatched]", "tests/test_formatting.py::test_nameerror_suggestions_in_group[patched]", "tests/test_formatting.py::test_nameerror_suggestions_in_group[unpatched]"] | ["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 | 25 | 4 | 1,186 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281 | 81.118 | |||
5,836 | swe_smith::train::825 | swe_smith | train | 825 | oauthlib__oauthlib.1fd52536.func_pm_remove_cond__gb41l3hk | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | base_string_uri function returns incorrect results after recent changes
#### Description
The `base_string_uri` function in `oauthlib.oauth1.rfc5849.signature` is not working correctly. When calling it with URIs that should have default paths added or host overrides applied, it's returning unexpected results.
#### St... | diff --git a/oauthlib/oauth1/rfc5849/signature.py b/oauthlib/oauth1/rfc5849/signature.py
index 8916782..e94760b 100644
--- a/oauthlib/oauth1/rfc5849/signature.py
+++ b/oauthlib/oauth1/rfc5849/signature.py
@@ -148,34 +148,12 @@ def base_string_uri(uri: str, host: str = None) -> str:
if not scheme:
raise Va... | ["tests/oauth1/rfc5849/test_client.py::SignatureMethodTest::test_hmac_sha1_method", "tests/oauth1/rfc5849/test_client.py::SignatureMethodTest::test_hmac_sha256_method", "tests/oauth1/rfc5849/test_client.py::SignatureMethodTest::test_rsa_method", "tests/oauth1/rfc5849/test_signatures.py::SignatureTests::test_base_string... | ["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 | 28 | 4 | 1,126 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281 | 81.118 | |||
5,837 | swe_smith::train::29206 | swe_smith | train | 29,206 | tox-dev__pipdeptree.c31b6418.func_pm_remove_assign__dpqr17e5 | swesmith/tox-dev__pipdeptree.c31b6418 | tox-dev/pipdeptree | python | null | Text rendering broken with unicode characters - UnboundLocalError on offset variable
#### Description
When rendering dependency trees with unicode characters enabled, the text renderer crashes with an `UnboundLocalError` for the variable `offset`. This affects the tree visualization when using unicode box-drawing cha... | diff --git a/src/pipdeptree/_render/text.py b/src/pipdeptree/_render/text.py
index efa5a02..6f95f7e 100644
--- a/src/pipdeptree/_render/text.py
+++ b/src/pipdeptree/_render/text.py
@@ -69,8 +69,6 @@ def _render_text_with_unicode(
bullet = "├── "
if is_last_child:
bullet = "└──... | ["tests/render/test_text.py::test_render_text[True-False-True-expected_output0]", "tests/render/test_text.py::test_render_text[True-True-True-expected_output1]", "tests/render/test_text.py::test_render_text[False-False-True-expected_output2]", "tests/render/test_text.py::test_render_text[False-True-True-expected_output... | ["tests/_models/test_dag.py::test_package_dag_get_node_as_parent", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_a", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_include_b", "tests/_models/test_dag.py::test_package_dag_filter_fnmatch_exclude_c", "tests/_models/test_dag.py::test_pack... | jyangballin/swesmith.x86_64.tox-dev_1776_pipdeptree.c31b6418 | true | null | 1 | 8 | 19 | 1,526 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281 | 81.118 | |||
5,838 | swe_smith::train::21145 | swe_smith | train | 21,145 | tobymao__sqlglot.036601ba.lm_rewrite__mr2bycj7 | swesmith/tobymao__sqlglot.036601ba | tobymao/sqlglot | python | null | ### Iteration Over Expressions Yields Unexpected Results
#### Description
I've encountered an issue with the iteration behavior of `Expression` objects after a recent change. The iteration now seems to yield unexpected results, which is causing problems in scenarios where expressions are unpacked or iterated over.
#... | diff --git a/sqlglot/expressions.py b/sqlglot/expressions.py
index 4a2531b..d6963bb 100644
--- a/sqlglot/expressions.py
+++ b/sqlglot/expressions.py
@@ -872,13 +872,20 @@ class Expression(metaclass=_Expression):
)
def __iter__(self) -> t.Iterator:
- if "expressions" in self.arg_types:
- ... | ["tests/test_expressions.py::TestExpressions::test_iter"] | ["tests/test_expressions.py::TestExpressions::test_alias", "tests/test_expressions.py::TestExpressions::test_alias_column_names", "tests/test_expressions.py::TestExpressions::test_alias_or_name", "tests/test_expressions.py::TestExpressions::test_arg_deletion", "tests/test_expressions.py::TestExpressions::test_arg_key",... | jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba | true | null | 1 | 21 | 1 | 1,266 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281 | 81.118 | |||
5,839 | swe_smith::train::50799 | swe_smith | train | 50,799 | python-hyper__h11.bed0dd4a.combine_file__u0eac69s | swesmith/python-hyper__h11.bed0dd4a | python-hyper/h11 | python | null | HTTP parsing broken after recent changes
I'm getting weird behavior when trying to parse HTTP requests/responses. The parser seems to be returning empty dictionaries instead of the expected parsed data, and it's not raising validation errors when it should.
Here's a simple reproduction:
```python
import h11
from h11... | diff --git a/h11/_util.py b/h11/_util.py
index 6718445..9ae09f9 100644
--- a/h11/_util.py
+++ b/h11/_util.py
@@ -84,12 +84,13 @@ class RemoteProtocolError(ProtocolError):
def validate(
regex: Pattern[bytes], data: bytes, msg: str = "malformed data", *format_args: Any
) -> Dict[str, bytes]:
- match = regex.ful... | ["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_conne... | ["h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_close_simple", "h11/tests/test_connection.py::test_idle_receive_nothing", "h11/tests/test_connection.py::test_connection_drop", "h11/tests/test_connection.py::test_empty_request", "... | jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a | true | null | 1 | 18 | 35 | 1,326 | 0 | 0.6 | 1 | 0.75 | 1 | 0.281 | 81.118 | |||
5,840 | swe_smith::train::7134 | swe_smith | train | 7,134 | cantools__cantools.0c6a7871.combine_module__6esxfhv2 | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | # Bug in End-to-End Profile2 CRC check function
## Description
There are two issues in the `check_profile2_crc` function in `src/cantools/autosar/end_to_end.py`:
1. The function returns `None` instead of `False` when the CRC computation fails
2. The function is checking the CRC against the first byte of the payload (... | diff --git a/src/cantools/autosar/end_to_end.py b/src/cantools/autosar/end_to_end.py
index 2ce4ae7..e348e57 100644
--- a/src/cantools/autosar/end_to_end.py
+++ b/src/cantools/autosar/end_to_end.py
@@ -86,11 +86,11 @@ def check_profile2_crc(payload: bytes,
crc = compute_profile2_crc(payload, msg_or_data_id)
... | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar3_e2e_profile2", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_secoc"] | ["tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e", "tests/test_autosar.py::CanToolsAutosarTest::test_autosar4_e2e_profile5", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_command_line.py::CanToolsCommandLineTest::test_convert_bad_outfile", "tests/test_command_line.py::C... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 2 | 12 | 2 | 1,445 | 0 | 0.6 | 1 | 0.75 | 1 | 0.280833 | 81.1175 | |||
5,841 | swe_smith::train::49634 | swe_smith | train | 49,634 | cool-RR__PySnooper.57472b46.lm_rewrite__5rvf0awz | swesmith/cool-RR__PySnooper.57472b46 | cool-rr/pysnooper | python | null | ### Issue: AttributeError in Tracer's Context Manager
#### Description
When using the `Tracer` class as a context manager, an `AttributeError` is raised. This seems to occur when the `__enter__` method is invoked, and it appears to be related to the handling of thread-local storage.
#### Steps to Reproduce
Here's a... | diff --git a/pysnooper/tracer.py b/pysnooper/tracer.py
index 1b35154..ba26def 100644
--- a/pysnooper/tracer.py
+++ b/pysnooper/tracer.py
@@ -348,20 +348,21 @@ class Tracer:
def __enter__(self):
if DISABLED:
- return
- thread_global.__dict__.setdefault('depth', -1)
+ return s... | ["tests/test_chinese.py::test_chinese", "tests/test_multiple_files/test_multiple_files.py::test_multiple_files", "tests/test_pysnooper.py::test_string_io", "tests/test_pysnooper.py::test_relative_time", "tests/test_pysnooper.py::test_with_block[True]", "tests/test_pysnooper.py::test_with_block[False]", "tests/test_pysn... | ["tests/test_mini_toolbox.py::test_output_capturer_doesnt_swallow_exceptions", "tests/test_not_implemented.py::test_rejecting_coroutine_functions", "tests/test_not_implemented.py::test_rejecting_async_generator_functions", "tests/test_pysnooper.py::test_thread_info", "tests/test_pysnooper.py::test_multi_thread_info", "... | jyangballin/swesmith.x86_64.cool-rr_1776_pysnooper.57472b46 | true | null | 1 | 25 | 12 | 1,184 | 0 | 0.6 | 1 | 0.75 | 1 | 0.280667 | 81.117 | |||
5,842 | swe_smith::train::1154 | swe_smith | train | 1,154 | jd__tenacity.0d40e76f.func_pm_ctrl_invert_if__wwden9d5 | swesmith/jd__tenacity.0d40e76f | jd/tenacity | python | null | # TornadoRetrying incorrectly handles DoSleep and DoReturn actions
I found a bug in the TornadoRetrying class where it's incorrectly handling the DoSleep and DoReturn actions. The code in `tornadoweb.py` has the logic for these actions swapped.
## Description
When using the Tornado integration with tenacity, retries... | diff --git a/tenacity/tornadoweb.py b/tenacity/tornadoweb.py
index 44323e4..0c2f90b 100644
--- a/tenacity/tornadoweb.py
+++ b/tenacity/tornadoweb.py
@@ -57,7 +57,7 @@ class TornadoRetrying(BaseRetrying):
else:
retry_state.set_result(result)
elif isinstance(do, DoSleep)... | ["tests/test_tornado.py::TestTornado::test_retry"] | ["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::Test... | jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f | true | null | 1 | 6 | 1 | 1,564 | 0 | 0.6 | 1 | 0.75 | 1 | 0.280667 | 81.117 | |||
5,843 | swe_smith::train::981 | swe_smith | train | 981 | pytest-dev__iniconfig.16793ead.combine_module__38m0i0wv | swesmith/pytest-dev__iniconfig.16793ead | pytest-dev/iniconfig | python | null | SectionWrapper constructor arguments swapped causing TypeError
#### Description
When creating a SectionWrapper instance, the constructor arguments are being passed in the wrong order, causing a TypeError when trying to access configuration sections.
#### Steps/Code to Reproduce
```python
from iniconfig import IniCo... | diff --git a/src/iniconfig/__init__.py b/src/iniconfig/__init__.py
index 3c40bc9..24974dd 100644
--- a/src/iniconfig/__init__.py
+++ b/src/iniconfig/__init__.py
@@ -84,7 +84,7 @@ class SectionWrapper:
default: _D | None = None,
convert: Callable[[str], _T] | None = None,
) -> _D | _T | str | None... | ["testing/test_iniconfig.py::test_tokenize[comment]", "testing/test_iniconfig.py::test_tokenize[comment2]", "testing/test_iniconfig.py::test_tokenize[section]", "testing/test_iniconfig.py::test_tokenize[value]", "testing/test_iniconfig.py::test_continuation_cant_be_after_section", "testing/test_iniconfig.py::test_secti... | ["testing/test_iniconfig.py::test_parse_empty", "testing/test_iniconfig.py::test_ParseError", "testing/test_iniconfig.py::test_continuation_needs_perceeding_token", "testing/test_iniconfig.py::test_api_import", "testing/test_iniconfig.py::test_iscommentline_true[#qwe]", "testing/test_iniconfig.py::test_iscommentline_tr... | jyangballin/swesmith.x86_64.pytest-dev_1776_iniconfig.16793ead | true | null | 2 | 41 | 22 | 864 | 0 | 0.6 | 1 | 0.75 | 1 | 0.280667 | 81.117 | |||
5,844 | swe_smith::train::30678 | swe_smith | train | 30,678 | mido__mido.a0158ff9.combine_file__pbtf0xbc | swesmith/mido__mido.a0158ff9 | mido/mido | python | null | # Callback check in BaseInput._check_callback is inverted
### What happened?
I'm trying to use a port with a callback, but I'm getting a strange error message saying "a callback is set for this port" even when I haven't set one.
### What did you expect to happen?
I expected to be able to use a port without a callba... | diff --git a/mido/ports.py b/mido/ports.py
index 5b7b2b8..03f6c57 100644
--- a/mido/ports.py
+++ b/mido/ports.py
@@ -94,7 +94,9 @@ class BasePort:
pass
def _close(self):
- pass
+ if getattr(self, "is_open", True):
+ self.cleanup()
+ self.is_open = False
def clo... | ["../dev/tests/test_ports.py::TestIOPort::test_recv_non_blocking", "../dev/tests/test_ports.py::TestIOPort::test_mido_port_non_blocking_recv", "../dev/tests/test_ports.py::test_close_inside_iteration"] | ["../dev/tests/test_frozen.py::test_hashability", "../dev/tests/test_frozen.py::test_freeze_and_thaw", "../dev/tests/test_frozen.py::test_thawed_message_is_copy", "../dev/tests/test_frozen.py::test_is_frozen", "../dev/tests/test_frozen.py::test_frozen_repr", "../dev/tests/test_frozen.py::test_frozen_meta_repr", "../dev... | jyangballin/swesmith.x86_64.mido_1776_mido.a0158ff9 | true | null | 1 | 6 | 3 | 1,563 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2805 | 81.1165 | |||
5,845 | swe_smith::train::9803 | swe_smith | train | 9,803 | keleshev__schema.24a30457.func_basic__ayg2e1wd | swesmith/keleshev__schema.24a30457 | keleshev/schema | python | null | And validation silently passes when it should fail
#### Description
The `And` validator is not properly validating all sub-schemas and is silently passing validation when it should fail. When using `And` with multiple validation conditions, some validation failures are being ignored.
#### Steps/Code to Reproduce
``... | diff --git a/schema/__init__.py b/schema/__init__.py
index 31bd71b..6539e7b 100644
--- a/schema/__init__.py
+++ b/schema/__init__.py
@@ -156,9 +156,13 @@ class And(Generic[TSchema]):
:param data: Data to be validated with sub defined schemas.
:return: Returns validated data.
"""
- # An... | ["test_schema.py::test_and", "test_schema.py::test_test", "test_schema.py::test_validate_list"] | ["test_schema.py::test_schema", "test_schema.py::test_validate_file", "test_schema.py::test_or", "test_schema.py::test_or_only_one", "test_schema.py::test_regex", "test_schema.py::test_list_tuple_set_frozenset", "test_schema.py::test_strictly", "test_schema.py::test_dict", "test_schema.py::test_dict_keys", "test_schema... | jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457 | true | null | 1 | 10 | 3 | 1,483 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2805 | 81.1165 | |||
5,846 | swe_smith::train::49818 | swe_smith | train | 49,818 | facebookresearch__fvcore.a491d5b9.combine_module__puiyya3n | swesmith/facebookresearch__fvcore.a491d5b9 | facebookresearch/fvcore | python | null | # Registry.register() uses module name instead of class name
## Description
At this line: https://github.com/facebookresearch/fvcore/blob/main/fvcore/common/registry.py#L58-L59
The `register()` method in the `Registry` class is using `__module__` instead of `__name__` when registering objects. This is causing object... | diff --git a/fvcore/common/checkpoint.py b/fvcore/common/checkpoint.py
index 0936802..681e568 100644
--- a/fvcore/common/checkpoint.py
+++ b/fvcore/common/checkpoint.py
@@ -306,9 +306,8 @@ class Checkpointer:
) -> torch.nn.Module:
# foo.bar.param_or_buffer_name -> [... | ["tests/test_checkpoint.py::TestCheckpointer::test_loading_objects_with_expected_shape_mismatches", "tests/test_common.py::TestRegistry::test_registry"] | ["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 | 2 | 11 | 2 | 1,463 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2805 | 81.1165 | |||
5,847 | swe_smith::train::38508 | swe_smith | train | 38,508 | amueller__word_cloud.ec24191c.func_pm_ctrl_shuffle__v52dkyu0 | swesmith/amueller__word_cloud.ec24191c | amueller/word_cloud | python | null | # Single color function in WordCloud not working correctly
I found an issue with the `get_single_color_func` function in WordCloud. When trying to use a single color for my word cloud, the colors are not being generated correctly.
Here's a simple example to reproduce the issue:
```python
from wordcloud import get_si... | diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py
index 1622c03..ac8a0d7 100644
--- a/wordcloud/wordcloud.py
+++ b/wordcloud/wordcloud.py
@@ -129,6 +129,11 @@ def get_single_color_func(color):
def single_color_func(word=None, font_size=None, position=None,
orientation=None, ... | ["test/test_wordcloud.py::test_single_color_func", "test/test_wordcloud.py::test_single_color_func_grey"] | ["test/test_wordcloud.py::test_collocations", "test/test_wordcloud.py::test_collocation_stopwords", "test/test_wordcloud.py::test_collocation_stopwords_uppercase", "test/test_wordcloud.py::test_plurals_numbers", "test/test_wordcloud.py::test_multiple_s", "test/test_wordcloud.py::test_empty_text", "test/test_wordcloud.p... | jyangballin/swesmith.x86_64.amueller_1776_word_cloud.ec24191c | true | null | 1 | 11 | 2 | 1,463 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2805 | 81.1165 | |||
5,848 | swe_smith::train::32515 | swe_smith | train | 32,515 | pydantic__pydantic.acb0f10f.func_pm_ctrl_invert_if__id9ccffe | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | Pipeline constraint validation broken for numeric types with Gt constraint
#### Description
When using `validate_as(int).gt(0)` in pipeline constraints, the validation logic is incorrectly applied. The constraint check function is being used instead of the native schema constraint for numeric types, causing validatio... | diff --git a/pydantic/experimental/pipeline.py b/pydantic/experimental/pipeline.py
index 9a3dbc4..0bdf07e 100644
--- a/pydantic/experimental/pipeline.py
+++ b/pydantic/experimental/pipeline.py
@@ -448,6 +448,12 @@ def _apply_constraint( # noqa: C901
if isinstance(constraint, annotated_types.Gt):
gt = con... | ["tests/test_pipeline.py::test_json_schema[Annotated-expected_val_schema4-expected_ser_schema4]", "tests/test_pipeline.py::test_json_schema[Annotated-expected_val_schema5-expected_ser_schema5]", "tests/test_pipeline.py::test_composition"] | ["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 | 13 | 3 | 1,422 | 0 | 0.6 | 1 | 0.75 | 1 | 0.280333 | 81.116 | |||
5,849 | swe_smith::train::45836 | swe_smith | train | 45,836 | conan-io__conan.86f29e13.func_pm_remove_loop__slngzr8j | swesmith/conan-io__conan.86f29e13 | conan-io/conan | python | null | CPSDeps Configuration Generation Issue
It seems there's an issue with the CPSDeps configuration generation after the recent changes. The expected behavior is that the configuration name should be generated based on the build variables like `settings.compiler`, `settings.compiler.version`, `settings.arch`, etc. However... | diff --git a/conan/tools/cps/cps_deps.py b/conan/tools/cps/cps_deps.py
index d416d4a..c244e11 100644
--- a/conan/tools/cps/cps_deps.py
+++ b/conan/tools/cps/cps_deps.py
@@ -13,22 +13,7 @@ class CPSDeps:
build_vars = ["settings.compiler", "settings.compiler.version", "settings.arch",
"set... | ["test/integration/cps/test_cps.py::test_cps", "test/integration/cps/test_cps.py::test_cps_static_lib", "test/integration/cps/test_cps.py::test_cps_header", "test/integration/cps/test_cps.py::test_cps_in_pkg", "test/integration/cps/test_cps.py::test_extended_cpp_info"] | ["test/integration/cps/test_cps.py::test_cps_merge"] | jyangballin/swesmith.x86_64.conan-io_1776_conan.86f29e13 | true | null | 1 | 15 | 5 | 1,382 | 0 | 0.6 | 1 | 0.75 | 1 | 0.280333 | 81.116 | |||
5,850 | swe_smith::train::4911 | swe_smith | train | 4,911 | bottlepy__bottle.a8dfef30.func_pm_class_rm_funcs__yfijrgnd | swesmith/bottlepy__bottle.a8dfef30 | bottlepy/bottle | python | null | FormsDict methods cause infinite recursion after recent changes
#### Description
After some recent changes to the FormsDict class, several methods are causing infinite recursion errors. The issue appears to be related to the removal of key methods that other parts of the class depend on.
#### Steps/Code to Reproduce... | diff --git a/bottle.py b/bottle.py
index 286b5bc..94a0ea2 100755
--- a/bottle.py
+++ b/bottle.py
@@ -2208,14 +2208,6 @@ class FormsDict(MultiDict):
#: and then decoded to match :attr:`input_encoding`.
recode_unicode = True
- def _fix(self, s, encoding=None):
- if isinstance(s, unicode) and self.re... | ["test/test_environ.py::TestRequest::test_get", "test/test_environ.py::TestRequest::test_multipart", "test/test_environ.py::TestRequest::test_post", "test/test_formsdict.py::TestFormsDict::test_attr_access", "test/test_formsdict.py::TestFormsDict::test_attr_missing", "test/test_formsdict.py::TestFormsDict::test_attr_un... | ["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"... | jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30 | true | null | 1 | 16 | 7 | 1,361 | 0 | 0.6 | 1 | 0.75 | 1 | 0.280167 | 81.1155 | |||
5,851 | swe_smith::train::3259 | swe_smith | train | 3,259 | Suor__funcy.207a7810.lm_rewrite__qrn2iqnb | swesmith/Suor__funcy.207a7810 | suor/funcy | python | null | # Decorator with keyword-only arguments fails with TypeError
## Description
When using the `decorator` function with a decorator that has keyword-only arguments, it fails with a TypeError.
## Steps to reproduce:
1. Create a decorator function that has keyword-only arguments:
```python
@decorator
def add(call, *, n... | diff --git a/funcy/decorators.py b/funcy/decorators.py
index e001629..3ef8ada 100644
--- a/funcy/decorators.py
+++ b/funcy/decorators.py
@@ -22,22 +22,15 @@ def decorator(deco):
# Finally make a call:
return call()
"""
- if has_single_arg(deco):
+ if has_single_arg(deco) or has_1pos... | ["tests/test_decorators.py::test_decorator_kw_only_args"] | ["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_make_lookuper_nested", "tests/test_cal... | jyangballin/swesmith.x86_64.suor_1776_funcy.207a7810 | true | null | 1 | 21 | 1 | 1,261 | 0 | 0.6 | 1 | 0.75 | 1 | 0.280167 | 81.1155 | |||
5,852 | swe_smith::train::23009 | swe_smith | train | 23,009 | graphql-python__graphene.82903263.pr_1581 | swesmith/graphql-python__graphene.82903263 | graphql-python/graphene | python | null | DateTime scalar fails to parse ISO 8601 format with Z timezone indicator
While working with the DateTime scalar, I found that it fails to parse ISO 8601 formatted dates that use the 'Z' timezone indicator.
A simple reproduction case:
```python
from graphene import Schema, ObjectType, String, DateTime
class Query(Ob... | diff --git a/graphene/types/datetime.py b/graphene/types/datetime.py
index d8388f8..d5d34fd 100644
--- a/graphene/types/datetime.py
+++ b/graphene/types/datetime.py
@@ -1,7 +1,5 @@
import datetime
-from dateutil.parser import isoparse
-
from graphql.error import GraphQLError
from graphql.language import StringValu... | ["graphene/types/tests/test_datetime.py::test_support_isoformat"] | ["examples/starwars/tests/test_query.py::test_hero_name_query", "examples/starwars/tests/test_query.py::test_hero_name_and_friends_query", "examples/starwars/tests/test_query.py::test_nested_query", "examples/starwars/tests/test_query.py::test_fetch_luke_query", "examples/starwars/tests/test_query.py::test_fetch_some_i... | jyangballin/swesmith.x86_64.graphql-python_1776_graphene.82903263 | true | null | 2 | 15 | 1 | 1,381 | 0 | 0.6 | 1 | 0.75 | 1 | 0.280167 | 81.1155 | |||
5,853 | swe_bench::test::1756 | swe_bench | test | 1,756 | sphinx-doc__sphinx-11489 | sphinx-doc/sphinx | sphinx-doc/sphinx | python | d15a837c6108ee219d80e956fd6b8f16a833aed2 | Allow disabling linkcheck anchor checks for specific URLs
**Is your feature request related to a problem? Please describe.**
It appears GitHub has made the Markdown renderer/file viewer require JavaScript which breaks linkcheck anchor checks.
**Describe the solution you'd like**
A config which disables the linkcheck ... | @yukiisbored Just to be clear, if the url is
- `https://github.com/org/repo#anchor`, or
- `https://github.com/org/repo/blob/main/file.ext#anchor`,
you want `linkcheck` to only check that `https://github.com/org/repo` and `https://github.com/org/repo/blob/main/file.ext` exist **without** checking the anchors in t... | diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py
--- a/sphinx/builders/linkcheck.py
+++ b/sphinx/builders/linkcheck.py
@@ -262,6 +262,8 @@ def __init__(self, config: Config,
self.anchors_ignore: list[re.Pattern[str]] = list(
map(re.compile, config.linkcheck_anchors_ignore... | diff --git a/tests/roots/test-linkcheck-anchors-ignore-for-url/conf.py b/tests/roots/test-linkcheck-anchors-ignore-for-url/conf.py
new file mode 100644
--- /dev/null
+++ b/tests/roots/test-linkcheck-anchors-ignore-for-url/conf.py
@@ -0,0 +1,3 @@
+exclude_patterns = ['_build']
+linkcheck_anchors = True
+linkcheck_timeou... | ["tests/test_build_linkcheck.py::test_too_many_requests_retry_after_without_header"] | ["tests/test_build_linkcheck.py::test_defaults", "tests/test_build_linkcheck.py::test_too_many_retries", "tests/test_build_linkcheck.py::test_raw_node", "tests/test_build_linkcheck.py::test_anchors_ignored", "tests/test_build_linkcheck.py::test_anchors_ignored_for_url", "tests/test_build_linkcheck.py::test_raises_for_i... | null | true | 2023-07-16T12:13:26Z | 1 | 17 | 1 | 1,141 | 0 | 0.8 | 1 | 0.55 | 1 | 0.246833 | 81.1155 | |
5,854 | swe_smith::train::30208 | swe_smith | train | 30,208 | pyca__pyopenssl.04766a49.combine_module__g343hrmp | swesmith/pyca__pyopenssl.04766a49 | pyca/pyopenssl | python | null | # Bug: DTLSv1_handle_timeout returns incorrect value and text decoding issues
## Description
I've found two issues in the latest version:
1. The `DTLSv1_handle_timeout` method in the Connection class returns the opposite boolean value than it should. When a timeout is handled, it returns `False` instead of `True`.
... | diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py
index eed27a0..b347c03 100644
--- a/src/OpenSSL/SSL.py
+++ b/src/OpenSSL/SSL.py
@@ -2470,11 +2470,11 @@ class Connection:
:return: `True` if there was a pending timeout, `False` otherwise.
"""
result = _lib.DTLSv1_handle_timeout(self._ssl)
... | ["tests/test_ssl.py::TestContext::test_set_cipher_list_no_cipher_match", "tests/test_ssl.py::TestContext::test_set_session_id_fail", "tests/test_ssl.py::TestDTLS::test_timeout", "tests/test_util.py::TestErrors::test_exception_from_error_queue_nonexistent_reason"] | ["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 | 8 | 4 | 1,521 | 0 | 0.6 | 1 | 0.75 | 1 | 0.280167 | 81.1155 | |||
5,855 | swe_smith::train::38143 | swe_smith | train | 38,143 | weaveworks__grafanalib.5c3b17ed.pr_661 | swesmith/weaveworks__grafanalib.5c3b17ed | weaveworks/grafanalib | python | null | ### Issue: CloudwatchMetricsTarget Initialization Fails
#### Description
After the recent changes, initializing a `CloudwatchMetricsTarget` object results in an error due to a missing import. The `Target` class, which `CloudwatchMetricsTarget` inherits from, is not imported, causing a `NameError` when trying to creat... | diff --git a/grafanalib/cloudwatch.py b/grafanalib/cloudwatch.py
index 9aadae4..6b49f61 100644
--- a/grafanalib/cloudwatch.py
+++ b/grafanalib/cloudwatch.py
@@ -3,8 +3,6 @@
import attr
from attr.validators import instance_of
-from grafanalib.core import Target
-
@attr.s
class CloudwatchMetricsTarget(Target):
@@... | ["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 | 12 | 95 | 1,441 | 0 | 0.6 | 1 | 0.75 | 1 | 0.280167 | 81.1155 | |||
5,856 | swe_smith::train::24365 | swe_smith | train | 24,365 | sunpy__sunpy.f8edfd5c.func_pm_remove_loop__hybn0ks1 | swesmith/sunpy__sunpy.f8edfd5c | sunpy/sunpy | python | null | Time string parsing broken for many formats
#### Description
The `parse_time` function is failing to parse many common time string formats that were previously working. When trying to parse various time strings, I'm getting `ValueError: Input values did not match any of the formats where the format keyword is optiona... | diff --git a/sunpy/time/time.py b/sunpy/time/time.py
index 0d760c5..e40e12e 100644
--- a/sunpy/time/time.py
+++ b/sunpy/time/time.py
@@ -229,29 +229,9 @@ def convert_time_str(time_string, **kwargs):
if 'TAI' in first_item:
kwargs['scale'] = 'tai'
- for time_format in TIME_FORMAT_LIST:
- ... | ["sunpy/time/tests/test_time.py::test_parse_time_24", "sunpy/time/tests/test_time.py::test_parse_time_24_2", "sunpy/time/tests/test_time.py::test_parse_time_microseconds_excess_trailing_zeros", "sunpy/time/tests/test_time.py::test_parse_time_utc[2007-05-04T21:08:12.999999-2007/05/04T21:08:12.999999]", "sunpy/time/tests... | ["sunpy/time/tests/test_time.py::test_parse_time_tuple", "sunpy/time/tests/test_time.py::test_parse_time_int", "sunpy/time/tests/test_time.py::test_parse_time_pandas_timestamp", "sunpy/time/tests/test_time.py::test_parse_time_nanoseconds", "sunpy/time/tests/test_time.py::test_parse_time_pandas_series", "sunpy/time/test... | jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c | true | null | 1 | 20 | 25 | 1,280 | 0 | 0.6 | 1 | 0.75 | 1 | 0.28 | 81.115 | |||
5,857 | swe_smith::train::32580 | swe_smith | train | 32,580 | pydantic__pydantic.acb0f10f.func_pm_op_swap__ety8dpst | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | # Generic dataclass validation fails with type parameters
## Description
When using a generic dataclass with Pydantic's `dataclass` decorator, validation fails when the dataclass is parametrized with a type. The issue appears to be related to how the generic base class is handled during class creation.
## Steps/Code ... | diff --git a/pydantic/dataclasses.py b/pydantic/dataclasses.py
index 5111bc3..7ab33f4 100644
--- a/pydantic/dataclasses.py
+++ b/pydantic/dataclasses.py
@@ -103,8 +103,8 @@ def dataclass(
eq: bool = True,
order: bool = False,
unsafe_hash: bool = False,
- frozen: bool | None = None,
- config: Config... | ["tests/test_dataclasses.py::test_unparametrized_generic_dataclass[combined]", "tests/test_dataclasses.py::test_parametrized_generic_dataclass[int-1-False-1-combined]", "tests/test_dataclasses.py::test_parametrized_generic_dataclass[str-a-False-a-combined]", "tests/test_dataclasses.py::test_parametrized_generic_datacla... | ["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 | 7 | 4 | 1,539 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279833 | 81.1145 | |||
5,858 | swe_smith::train::33301 | swe_smith | train | 33,301 | pallets__click.fde47b4b.combine_file__0u0l8w0d | swesmith/pallets__click.fde47b4b | pallets/click | python | null | Error messages are being incorrectly formatted with uppercase and stripped whitespace
#### Description
Click exception error messages are being unexpectedly transformed to uppercase and having whitespace stripped, which breaks the expected formatting and readability of error messages.
#### Steps/Code to Reproduce
`... | diff --git a/src/click/exceptions.py b/src/click/exceptions.py
index c41c206..6685eff 100644
--- a/src/click/exceptions.py
+++ b/src/click/exceptions.py
@@ -37,7 +37,7 @@ class ClickException(Exception):
self.message = message
def format_message(self) -> str:
- return self.message
+ return... | ["tests/test_arguments.py::test_nargs_err", "tests/test_arguments.py::test_missing_argument_string_cast", "tests/test_arguments.py::test_defaults_for_nargs", "tests/test_basic.py::test_file_lazy_mode", "tests/test_basic.py::test_path_option", "tests/test_basic.py::test_choice_option", "tests/test_basic.py::test_choice_... | ["tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_nargs... | jyangballin/swesmith.x86_64.pallets_1776_click.fde47b4b | true | null | 1 | 14 | 14 | 1,399 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279833 | 81.1145 | |||
5,859 | swe_smith::train::28419 | swe_smith | train | 28,419 | encode__starlette.db5063c2.combine_module__bt8h39jt | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | ServerErrorMiddleware returns wrong status code and message for errors
#### Description
When an exception occurs in the application, the ServerErrorMiddleware is returning a 404 "Not Found" response instead of the expected 500 "Internal Server Error" response.
#### Steps/Code to Reproduce
```python
from starlette.a... | diff --git a/starlette/middleware/base.py b/starlette/middleware/base.py
index f51b13f..2f4f12a 100644
--- a/starlette/middleware/base.py
+++ b/starlette/middleware/base.py
@@ -25,9 +25,10 @@ class _CachedRequest(Request):
def __init__(self, scope: Scope, receive: Receive):
super().__init__(scope, recei... | ["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_fully_evaluated_response[asyncio]", "tests/middleware/tes... | ["tests/middleware/test_base.py::test_contextvars[asyncio-CustomMiddlewareWithoutBaseHTTPMiddleware]", "tests/middleware/test_base.py::test_contextvars[trio-CustomMiddlewareWithoutBaseHTTPMiddleware]", "tests/middleware/test_cors.py::test_cors_allow_all[asyncio]", "tests/middleware/test_cors.py::test_cors_allow_all_exc... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 2 | 25 | 57 | 1,179 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279833 | 81.1145 | |||
5,860 | swe_smith::train::9747 | swe_smith | train | 9,747 | marshmallow-code__webargs.dbde72fe.func_pm_ctrl_shuffle__rrb8bbor | swesmith/marshmallow-code__webargs.dbde72fe | marshmallow-code/webargs | python | null | # TornadoParser._handle_error_raised method broken
#### MCVE Code Sample
```python
from webargs import fields
from webargs.tornadoparser import parser
import tornado.web
# Create a simple request with empty JSON data
def make_json_request():
request = tornado.httputil.HTTPServerRequest(method="POST", uri="/")
... | diff --git a/src/webargs/tornadoparser.py b/src/webargs/tornadoparser.py
index 1b0c73d..c3ee33e 100644
--- a/src/webargs/tornadoparser.py
+++ b/src/webargs/tornadoparser.py
@@ -140,14 +140,6 @@ class TornadoParser(core.Parser[HTTPServerRequest]):
error_status_code: int | None,
error_headers: typing.Ma... | ["tests/test_tornadoparser.py::TestErrorHandler::test_it_should_raise_httperror_on_failed_validation", "tests/test_tornadoparser.py::TestParse::test_it_should_parse_required_arguments", "tests/test_tornadoparser.py::TestParse::test_it_should_parse_multiple_arg_required", "tests/test_tornadoparser.py::TestUseArgs::test_... | ["tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_querystring_args", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_form", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json", "tests/test_aiohttpparser.py::TestAIOHTTPParser::test_parse_json_missing", "tests/test_aiohttpparser.py::T... | jyangballin/swesmith.x86_64.marshmallow-code_1776_webargs.dbde72fe | true | null | 1 | 17 | 4 | 1,339 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279833 | 81.1145 | |||
5,861 | swe_smith::train::27633 | swe_smith | train | 27,633 | arrow-py__arrow.1d70d009.func_basic__uvm2yboh | swesmith/arrow-py__arrow.1d70d009 | arrow-py/arrow | python | null | Arrow.span() method returns incorrect floor and ceil values
#### Description
The `span()` method in Arrow is returning swapped floor and ceil values, and also producing incorrect time ranges. When calling `arrow.span()` with various time frames, the returned tuple has the floor and ceil values reversed, and the calcu... | diff --git a/arrow/arrow.py b/arrow/arrow.py
index 9d1f5e3..9f21408 100644
--- a/arrow/arrow.py
+++ b/arrow/arrow.py
@@ -561,7 +561,7 @@ class Arrow:
elif frame_absolute == "quarter":
attr = "month"
else:
- attr = frame_absolute
+ attr = frame_relative # Bug introdu... | ["tests/test_arrow.py::TestArrowSpanRange::test_year", "tests/test_arrow.py::TestArrowSpanRange::test_quarter", "tests/test_arrow.py::TestArrowSpanRange::test_month", "tests/test_arrow.py::TestArrowSpanRange::test_week", "tests/test_arrow.py::TestArrowSpanRange::test_day", "tests/test_arrow.py::TestArrowSpanRange::test... | ["tests/test_api.py::TestModule::test_get", "tests/test_api.py::TestModule::test_utcnow", "tests/test_api.py::TestModule::test_now", "tests/test_api.py::TestModule::test_factory", "tests/test_arrow.py::TestTestArrowInit::test_init_bad_input", "tests/test_arrow.py::TestTestArrowInit::test_init", "tests/test_arrow.py::Te... | jyangballin/swesmith.x86_64.arrow-py_1776_arrow.1d70d009 | true | null | 1 | 18 | 41 | 1,319 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279833 | 81.1145 | |||
5,862 | swe_smith::train::5068 | swe_smith | train | 5,068 | bottlepy__bottle.a8dfef30.lm_rewrite__xf5c01q7 | swesmith/bottlepy__bottle.a8dfef30 | bottlepy/bottle | python | null | # HTTP status code validation not working correctly
## Description
The HTTP status code validation in the `_set_status` method of `BaseResponse` class is not working correctly. The method is supposed to validate that status codes are within the valid range (100-999), but it's not performing this validation anymore.
... | diff --git a/bottle.py b/bottle.py
index 286b5bc..506297a 100755
--- a/bottle.py
+++ b/bottle.py
@@ -1692,20 +1692,19 @@ class BaseResponse(object):
return self._status_code
def _set_status(self, status):
+ """ Parse an HTTP status code or line (e.g. '200 OK') and set
+ :attr:`status_c... | ["test/test_environ.py::TestResponse::test_set_status"] | ["test/test_app.py::TestApplicationObject::test_setattr", "test/test_auth.py::TestBasicAuth::test__header", "test/test_config.py::TestConfDict::test_gc_overlays", "test/test_config.py::TestConfDict::test_isadict", "test/test_config.py::TestConfDict::test_load_dict", "test/test_config.py::TestConfDict::test_load_module"... | jyangballin/swesmith.x86_64.bottlepy_1776_bottle.a8dfef30 | true | null | 1 | 17 | 1 | 1,339 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279833 | 81.1145 | |||
5,863 | swe_smith::train::936 | swe_smith | train | 936 | oauthlib__oauthlib.1fd52536.pr_879 | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | # ui_locales parameter in OpenID Connect breaks when it's not a string
### Description
I found a bug in the OpenID Connect implementation where the `ui_locales` parameter handling is broken. When the `ui_locales` parameter is not a string (for example, if it's already a list), the code tries to call `.split()` on it ... | diff --git a/oauthlib/openid/connect/core/grant_types/base.py b/oauthlib/openid/connect/core/grant_types/base.py
index 29d583e..33411da 100644
--- a/oauthlib/openid/connect/core/grant_types/base.py
+++ b/oauthlib/openid/connect/core/grant_types/base.py
@@ -310,15 +310,11 @@ class GrantTypeBase:
msg = "Sess... | ["tests/openid/connect/core/endpoints/test_openid_connect_params_handling.py::OpenIDConnectEndpointTest::test_authorization_endpoint_handles_prompt"] | ["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 | 6 | 1 | 1,559 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279833 | 81.1145 | |||
5,864 | swe_smith::train::47653 | swe_smith | train | 47,653 | sqlfluff__sqlfluff.50a1c4b6.combine_module__sgnwv4bx | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | Linter initialization parameters swapped causing AttributeError
#### Description
When using the linter with parallel processing, the linter and config parameters are being swapped during initialization, causing AttributeError when trying to access linter methods.
#### Steps/Code to Reproduce
```python
from sqlfluff... | diff --git a/src/sqlfluff/core/linter/linting_result.py b/src/sqlfluff/core/linter/linting_result.py
index f2dc345..49b4ff3 100644
--- a/src/sqlfluff/core/linter/linting_result.py
+++ b/src/sqlfluff/core/linter/linting_result.py
@@ -86,8 +86,8 @@ class LintingResult:
A dict, with lists of tuples grouped by... | ["test/core/linter/linter_test.py::test__linter__linting_result_check_tuples_by_path", "test/core/linter/linter_test.py::test__linter__get_runner_processes[512-1-1]", "test/core/linter/linter_test.py::test__linter__get_runner_processes[512--12-500]", "test/core/linter/linter_test.py::test__linter__get_runner_processes[... | ["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__file", "test/core/linter... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 2 | 21 | 5 | 1,258 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279667 | 81.114 | |||
5,865 | swe_smith::train::51612 | swe_smith | train | 51,612 | pydicom__pydicom.7d361b3d.combine_module__hjfv0jl2 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | Decoder validation logic inverted causing buffer iteration to fail
#### Description
The decoder validation and buffer iteration logic appears to be inverted, causing issues when processing pixel data. When trying to decode pixel data buffers, the validation step is skipped when it should be performed, and the iterati... | diff --git a/src/pydicom/pixels/decoders/base.py b/src/pydicom/pixels/decoders/base.py
index 268f0d4..aa10766 100644
--- a/src/pydicom/pixels/decoders/base.py
+++ b/src/pydicom/pixels/decoders/base.py
@@ -1822,23 +1822,23 @@ class Decoder(CoderBase):
),
)
- if validate:
+ if not va... | ["tests/pixels/test_decoder_base.py::TestDecoder::test_buffer", "tests/pixels/test_encoder_base.py::TestEncodeRunner::test_init", "tests/pixels/test_encoder_base.py::TestEncodeRunner::test_set_source_dataset", "tests/pixels/test_encoder_base.py::TestEncodeRunner::test_str", "tests/pixels/test_encoder_base.py::TestDatas... | ["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 | 2 | 24 | 10 | 1,198 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279667 | 81.114 | |||
5,866 | swe_smith::train::49699 | swe_smith | train | 49,699 | facebookresearch__fvcore.a491d5b9.combine_file__81mo2ntc | swesmith/facebookresearch__fvcore.a491d5b9 | facebookresearch/fvcore | python | null | # CfgNode class broken after recent changes
I've encountered an issue with the `CfgNode` class in `fvcore/common/config.py`. After a recent update, the configuration functionality is completely broken.
## Problem Description
When trying to load and merge configuration files, I'm getting various errors. The configura... | diff --git a/fvcore/common/config.py b/fvcore/common/config.py
index cef5ba9..9ee8b4d 100644
--- a/fvcore/common/config.py
+++ b/fvcore/common/config.py
@@ -14,7 +14,7 @@ from yacs.config import CfgNode as _CfgNode
BASE_KEY = "_BASE_"
-class CfgNode(_CfgNode):
+class CfgNode():
"""
Our own extended versi... | ["tests/test_common.py::TestCfgNode::test_merge_from_file", "tests/test_common.py::TestCfgNode::test_merge_from_list", "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 | 25 | 3 | 1,178 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279667 | 81.114 | |||
5,867 | swe_smith::train::28987 | swe_smith | train | 28,987 | encode__starlette.db5063c2.pr_2672 | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | # url_for method fails when used outside of a Starlette application context
## Description
I've encountered an issue with the `url_for` method in Starlette. When trying to use this method outside of a Starlette application context, it fails with a KeyError instead of providing a helpful error message.
Given the foll... | diff --git a/starlette/requests.py b/starlette/requests.py
index a29164d..3a7d27e 100644
--- a/starlette/requests.py
+++ b/starlette/requests.py
@@ -13,9 +13,6 @@ from starlette.formparsers import FormParser, MultiPartException, MultiPartParse
from starlette.types import Message, Receive, Scope, Send
if typing.TYPE... | ["tests/test_requests.py::test_request_url_outside_starlette_context[asyncio]", "tests/test_requests.py::test_request_url_starlette_context[asyncio]", "tests/test_requests.py::test_request_url_outside_starlette_context[trio]", "tests/test_requests.py::test_request_url_starlette_context[trio]"] | ["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_fully_evaluated_response[asyncio]", "tests/middleware/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 11 | 4 | 1,458 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279667 | 81.114 | |||
5,868 | swe_smith::train::3490 | swe_smith | train | 3,490 | pygments__pygments.27649ebb.combine_file__rpzjata0 | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | GroffFormatter broken after recent changes
#### Description
The GroffFormatter is completely broken and throws TypeError when trying to format code. It looks like there are some issues with the initialization and style handling.
#### Steps/Code to Reproduce
```python
from pygments import highlight
from pygments.lex... | diff --git a/pygments/formatters/groff.py b/pygments/formatters/groff.py
index a9e0711..157f1c5 100644
--- a/pygments/formatters/groff.py
+++ b/pygments/formatters/groff.py
@@ -45,34 +45,34 @@ class GroffFormatter(Formatter):
def __init__(self, **options):
Formatter.__init__(self, **options)
- se... | ["tests/test_groff_formatter.py::test_inheritance_custom_tokens", "tests/test_groff_formatter.py::test_basic", "tests/test_basic_api.py::test_formatter_unicode_handling[GroffFormatter]", "tests/test_basic_api.py::test_formatter_public_api[GroffFormatter]"] | ["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 | 34 | 4 | 998 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279667 | 81.114 | |||
5,869 | swe_smith::train::2288 | swe_smith | train | 2,288 | pdfminer__pdfminer.six.1a8bd2f7.func_basic__tlxngujv | swesmith/pdfminer__pdfminer.six.1a8bd2f7 | pdfminer/pdfminer.six | python | null | PDF parsing fails with RecursionError on certain documents
#### Description
When processing certain PDF documents, pdfminer encounters a RecursionError during XRef parsing. This appears to happen when the PDF document structure contains specific XRef configurations that cause infinite recursion in the `read_xref_from... | diff --git a/pdfminer/pdfdocument.py b/pdfminer/pdfdocument.py
index 1c06335..4a5a20e 100644
--- a/pdfminer/pdfdocument.py
+++ b/pdfminer/pdfdocument.py
@@ -987,7 +987,6 @@ class PDFDocument:
raise PDFNoValidXRef("Unexpected EOF")
log.debug("read_xref_from: start=%d, token=%r", start, token)
... | ["tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_font_size.py::test_font_size", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_495_pdfobjref_iterable", "tests/test_highlevel_extracttext.py::TestExtractText::t... | ["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_beziers", "tests/test_converter.py::TestPaintPath::test_paint_pa... | jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7 | true | null | 1 | 13 | 50 | 1,418 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279667 | 81.114 | |||
5,870 | swe_smith::train::8058 | swe_smith | train | 8,058 | cantools__cantools.0c6a7871.func_pm_remove_assign__g0gfctu7 | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | ARXML loader fails with "name 'pdu' is not defined" error
#### Description
When loading ARXML files, the system loader crashes with a NameError indicating that the variable 'pdu' is not defined. This affects multiple ARXML parsing operations including E2E profile handling, SecOC processing, and general message loadin... | diff --git a/src/cantools/database/can/formats/arxml/system_loader.py b/src/cantools/database/can/formats/arxml/system_loader.py
index f7aa786..cf7470b 100644
--- a/src/cantools/database/can/formats/arxml/system_loader.py
+++ b/src/cantools/database/can/formats/arxml/system_loader.py
@@ -718,11 +718,7 @@ class SystemLo... | ["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_database.py::CanToolsDataba... | ["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... | jyangballin/swesmith.x86_64.cantools_1776_cantools.0c6a7871 | true | null | 1 | 29 | 17 | 1,097 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2795 | 81.1135 | |||
5,871 | swe_smith::train::48360 | swe_smith | train | 48,360 | sqlfluff__sqlfluff.50a1c4b6.func_pm_remove_assign__boe3jdvo | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | NameError in patch generation due to undefined variables
#### Description
When generating patches for SQL fixes, the linter crashes with `NameError` due to undefined variables in the patch generation logic. This affects the core functionality of applying fixes to SQL files.
#### Steps/Code to Reproduce
```python
fr... | diff --git a/src/sqlfluff/core/linter/patch.py b/src/sqlfluff/core/linter/patch.py
index 0262713..39a1c9c 100644
--- a/src/sqlfluff/core/linter/patch.py
+++ b/src/sqlfluff/core/linter/patch.py
@@ -72,7 +72,6 @@ def _iter_templated_patches(
# Does it match? If so we can ignore it.
assert segment.pos_marker
... | ["test/core/linter/fix_test.py::test__fix__generate_source_patches[tree0-templated_file0-expected_result0]", "test/core/linter/fix_test.py::test__fix__generate_source_patches[tree1-templated_file1-expected_result1]", "test/core/linter/fix_test.py::test__fix__generate_source_patches[tree2-templated_file2-expected_result... | ["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__file", "test/core/linter... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 27 | 6 | 1,137 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2795 | 81.1135 | |||
5,872 | swe_smith::train::10048 | swe_smith | train | 10,048 | paramiko__paramiko.23f92003.combine_file__2xpxytq5 | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | ECDH NIST P-256 key exchange fails with AttributeError
#### Description
When attempting to use ECDH NIST P-256 key exchange, the connection fails with an AttributeError. This affects both client and server modes.
#### Steps/Code to Reproduce
```python
import paramiko
from paramiko.kex_ecdh_nist import KexNistp256
... | diff --git a/paramiko/kex_ecdh_nist.py b/paramiko/kex_ecdh_nist.py
index 41fab46..c3ad630 100644
--- a/paramiko/kex_ecdh_nist.py
+++ b/paramiko/kex_ecdh_nist.py
@@ -23,28 +23,28 @@ class KexNistp256:
curve = ec.SECP256R1()
def __init__(self, transport):
- self.transport = transport
+ self.tran... | ["tests/test_kex.py::KexTest::test_kex_nistp256_client", "tests/test_kex.py::KexTest::test_kex_nistp256_server"] | ["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 | 2 | 917 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2795 | 81.1135 | |||
5,873 | swe_smith::train::28513 | swe_smith | train | 28,513 | encode__starlette.db5063c2.func_basic__6iphjns1 | swesmith/encode__starlette.db5063c2 | encode/starlette | python | null | WSGIMiddleware broken after recent changes
#### Description
The WSGI middleware appears to be completely broken. When trying to use any WSGI application through WSGIMiddleware, it fails to work properly.
#### Steps/Code to Reproduce
```python
from starlette.middleware.wsgi import WSGIMiddleware
from starlette.testc... | diff --git a/starlette/middleware/wsgi.py b/starlette/middleware/wsgi.py
index 71f4ab5..ec3c70f 100644
--- a/starlette/middleware/wsgi.py
+++ b/starlette/middleware/wsgi.py
@@ -85,12 +85,12 @@ class WSGIResponder:
stream_receive: ObjectReceiveStream[typing.MutableMapping[str, typing.Any]]
def __init__(self,... | ["tests/middleware/test_wsgi.py::test_wsgi_get[asyncio]", "tests/middleware/test_wsgi.py::test_wsgi_post[asyncio]", "tests/middleware/test_wsgi.py::test_wsgi_exception[asyncio]", "tests/middleware/test_wsgi.py::test_wsgi_exc_info[asyncio]", "tests/middleware/test_wsgi.py::test_wsgi_get[trio]", "tests/middleware/test_ws... | ["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_fully_evaluated_response[asyncio]", "tests/middleware/tes... | jyangballin/swesmith.x86_64.encode_1776_starlette.db5063c2 | true | null | 1 | 10 | 8 | 1,476 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279333 | 81.113 | |||
5,874 | swe_smith::train::208 | swe_smith | train | 208 | oauthlib__oauthlib.1fd52536.combine_module__4331dt3a | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OAuth2 client authentication logic inverted causing authentication failures
#### Description
Client authentication is failing unexpectedly in OAuth2 endpoints. The authentication logic appears to be inverted, causing clients that should authenticate successfully to fail, and potentially allowing clients that should f... | diff --git a/oauthlib/oauth2/rfc6749/endpoints/base.py b/oauthlib/oauth2/rfc6749/endpoints/base.py
index 987fac6..d4aeda0 100644
--- a/oauthlib/oauth2/rfc6749/endpoints/base.py
+++ b/oauthlib/oauth2/rfc6749/endpoints/base.py
@@ -57,11 +57,11 @@ class BaseEndpoint:
description='Mis... | ["tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_introspect", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_basicauth_legacy", "tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::... | ["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 | 2 | 18 | 34 | 1,316 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279333 | 81.113 | |||
5,875 | swe_smith::train::21776 | swe_smith | train | 21,776 | life4__textdistance.c3aca916.combine_file__2ow6yk33 | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | External library integration broken - cannot import modules
#### Description
When trying to use external libraries for text distance calculations, all external library integrations fail with "cannot import" errors. This affects algorithms like DamerauLevenshtein, Hamming, Jaro, JaroWinkler, and Levenshtein when using... | diff --git a/textdistance/libraries.py b/textdistance/libraries.py
index fa24ea6..2a4db37 100644
--- a/textdistance/libraries.py
+++ b/textdistance/libraries.py
@@ -71,11 +71,11 @@ class LibraryBase:
attr: str | None = None,
conditions: dict[str, bool] | None = None,
) -> None:
- self.modu... | ["tests/test_external.py::test_compare[DamerauLevenshtein]", "tests/test_external.py::test_compare[Hamming]", "tests/test_external.py::test_compare[Jaro]", "tests/test_external.py::test_compare[JaroWinkler]", "tests/test_external.py::test_compare[Levenshtein]", "tests/test_external.py::test_qval[None-DamerauLevenshtein... | ["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 | 1 | 24 | 30 | 1,195 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279167 | 81.1125 | |||
5,876 | swe_smith::train::10923 | swe_smith | train | 10,923 | paramiko__paramiko.23f92003.lm_rewrite__jgg9soic | swesmith/paramiko__paramiko.23f92003 | paramiko/paramiko | python | null | # AutoAddPolicy not properly adding host keys
## Bug report
When using the `AutoAddPolicy` for handling missing host keys, the keys are not being properly added to the host keys database. This causes issues when trying to access the host keys later.
## Steps to reproduce
```python
import paramiko
# Create SSH clie... | diff --git a/paramiko/client.py b/paramiko/client.py
index d8be910..7dd9756 100644
--- a/paramiko/client.py
+++ b/paramiko/client.py
@@ -850,16 +850,18 @@ class AutoAddPolicy(MissingHostKeyPolicy):
"""
def missing_host_key(self, client, hostname, key):
- client._host_keys.add(hostname, key.get_name()... | ["tests/test_client.py::SSHClientTest::test_auto_add_policy"] | ["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 | 10 | 1 | 1,475 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279167 | 81.1125 | |||
5,877 | swe_smith::train::7056 | swe_smith | train | 7,056 | cantools__cantools.0c6a7871.combine_file__osjanssm | swesmith/cantools__cantools.0c6a7871 | cantools/cantools | python | null | DBC specifics properties return wrong data types after initialization
#### Description
When creating a `DbcSpecifics` object, the properties return unexpected data types. The `value_tables` property returns a list instead of a dictionary, and accessing attributes/attribute_definitions causes AttributeError exceptions... | diff --git a/src/cantools/database/can/formats/dbc_specifics.py b/src/cantools/database/can/formats/dbc_specifics.py
index 3617921..ce5c127 100644
--- a/src/cantools/database/can/formats/dbc_specifics.py
+++ b/src/cantools/database/can/formats/dbc_specifics.py
@@ -25,17 +25,17 @@ class DbcSpecifics:
value_... | ["tests/test_command_line.py::CanToolsCommandLineTest::test_convert", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_default_sort_signals", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_default_sort_signals2", "tests/test_convert.py::CanToolsConvertFullTest::test_dbc_dump_sort_signals_b... | ["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 | 26 | 42 | 1,155 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279167 | 81.1125 | |||
5,878 | swe_smith::train::2925 | swe_smith | train | 2,925 | madzak__python-json-logger.5f85723f.combine_file__fjdw5yv1 | swesmith/madzak__python-json-logger.5f85723f | madzak/python-json-logger | python | null | JSON serialization broken after recent changes
#### Description
The JSON logger is producing invalid JSON output that cannot be parsed. When trying to log messages, the output is malformed and causes JSON decode errors.
#### Steps/Code to Reproduce
```python
import logging
import json
from pythonjsonlogger import j... | diff --git a/src/pythonjsonlogger/jsonlogger.py b/src/pythonjsonlogger/jsonlogger.py
index 519a64d..4d8ba36 100644
--- a/src/pythonjsonlogger/jsonlogger.py
+++ b/src/pythonjsonlogger/jsonlogger.py
@@ -62,9 +62,8 @@ def merge_record_extra(
if rename_fields is None:
rename_fields = {}
for key, value in... | ["tests/test_jsonlogger.py::TestJsonLogger::test_add_static_fields", "tests/test_jsonlogger.py::TestJsonLogger::test_custom_object_serialization", "tests/test_jsonlogger.py::TestJsonLogger::test_default_format", "tests/test_jsonlogger.py::TestJsonLogger::test_ensure_ascii_false", "tests/test_jsonlogger.py::TestJsonLogg... | ["tests/test_jsonlogger.py::TestJsonLogger::test_merge_record_extra", "tests/test_jsonlogger.py::TestJsonLogger::test_rename_nonexistent_field", "tests/test_jsonlogger.py::TestJsonLogger::test_unknown_format_key"] | jyangballin/swesmith.x86_64.madzak_1776_python-json-logger.5f85723f | true | null | 1 | 25 | 17 | 1,174 | 0 | 0.6 | 1 | 0.75 | 1 | 0.279 | 81.112 | |||
5,879 | r2e_gym::train::5798 | r2e_gym | train | 5,798 | tornado__d0ee6db9fdbaa91503bbfdfd17cda2905cc65403 | tornado | tornadoweb/tornado | python | d0ee6db9fdbaa91503bbfdfd17cda2905cc65403 | **Title:** Timeout Exceptions with @gen_test Provide Unclear Stack Traces, Leading to Test Failures
**Description:**
When using the `@gen_test` decorator with a specified timeout, if the test exceeds the timeout duration, the resulting stack trace does not clearly indicate where the timeout originated. This makes it c... | diff --git a/tornado/testing.py b/tornado/testing.py
--- a/tornado/testing.py
+++ b/tornado/testing.py
@@ -17,7 +17,7 @@
from tornado.httpclient import AsyncHTTPClient
from tornado.httpserver import HTTPServer
from tornado.simple_httpclient import SimpleAsyncHTTPClient
- from tornado.ioloop import IOL... | diff --git a/tornado/test/testing_test.py b/tornado/test/testing_test.py
--- a/tornado/test/testing_test.py
+++ b/tornado/test/testing_test.py
@@ -8,6 +8,7 @@
import contextlib
import os
+import traceback
@contextlib.contextmanager
@@ -148,8 +149,17 @@
def test(self):
yield gen.Task(self.... | null | null | namanjain12/tornado_final:d0ee6db9fdbaa91503bbfdfd17cda2905cc65403 | true | null | 1 | 41 | null | 1,566 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.397667 | 81.11175 | ||
5,880 | swe_smith::train::43844 | swe_smith | train | 43,844 | pydata__patsy.a5d16484.combine_file__xrgcjmq7 | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | Cubic spline knot calculation produces incorrect bounds
When using cubic splines with automatic knot placement, the lower and upper bounds are being calculated incorrectly. The function appears to be swapping the min and max values, causing the spline fitting to fail.
#### Steps/Code to Reproduce
```python
import nu... | diff --git a/patsy/mgcv_cubic_splines.py b/patsy/mgcv_cubic_splines.py
index 5f93680..c39bf13 100644
--- a/patsy/mgcv_cubic_splines.py
+++ b/patsy/mgcv_cubic_splines.py
@@ -420,7 +420,7 @@ def _get_all_sorted_knots(
"input data and lower_bound not specified."
)
elif lower_bound is None and x.... | ["patsy/mgcv_cubic_splines.py::test__get_all_sorted_knots", "patsy/mgcv_cubic_splines.py::test_crs_compat", "patsy/mgcv_cubic_splines.py::test_crs_with_specific_constraint", "patsy/mgcv_cubic_splines.py::test_te_errors", "patsy/mgcv_cubic_splines.py::test_te_1smooth", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "p... | ["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 | 38 | 7 | 913 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278833 | 81.1115 | |||
5,881 | swe_smith::train::42511 | swe_smith | train | 42,511 | python-jsonschema__jsonschema.93e0caa5.func_basic__0h6x4x7z | swesmith/python-jsonschema__jsonschema.93e0caa5 | python-jsonschema/jsonschema | python | null | Best match error selection broken for type validation
#### Description
The best match error selection logic is not working correctly when validating against schemas with type constraints. Instead of selecting the most relevant error message for the actual data type, it's selecting errors from mismatched types.
#### ... | diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py
index 3dcd296..3268f06 100644
--- a/jsonschema/exceptions.py
+++ b/jsonschema/exceptions.py
@@ -177,15 +177,14 @@ class _Error(Exception):
def _matches_type(self) -> bool:
try:
- # We ignore this as we want to simply crash if th... | ["jsonschema/tests/test_exceptions.py::TestBestMatch::test_it_prioritizes_matching_types", "jsonschema/tests/test_exceptions.py::TestBestMatch::test_it_prioritizes_matching_union_types", "jsonschema/tests/test_validators.py::TestValidate::test_it_uses_best_match"] | ["jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format", "jsonschema/tests/test_cli.py::TestCLI::test_custom_error_format_applies_to_schema_errors", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist", "jsonschema/tests/test_cli.py::TestCLI::test_instance_does_not_exist_pretty_output", "jso... | jyangballin/swesmith.x86_64.python-jsonschema_1776_jsonschema.93e0caa5 | true | null | 1 | 9 | 3 | 1,493 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278833 | 81.1115 | |||
5,882 | swe_smith::train::4574 | swe_smith | train | 4,574 | pygments__pygments.27649ebb.lm_rewrite__iobzuqj4 | swesmith/pygments__pygments.27649ebb | pygments/pygments | python | null | ### Bug: IndexError in RobotFrameworkLexer with specific input
#### Describe the bug
When using the `RobotFrameworkLexer`, an `IndexError` is raised unexpectedly during tokenization. This seems to occur when processing certain input strings, which disrupts the expected behavior of the lexer.
#### How to Reproduce
T... | diff --git a/pygments/lexers/robotframework.py b/pygments/lexers/robotframework.py
index 5449441..b7b2f9d 100644
--- a/pygments/lexers/robotframework.py
+++ b/pygments/lexers/robotframework.py
@@ -487,16 +487,20 @@ class VariableSplitter:
self._list_variable_index_state]
def _find... | ["tests/test_basic_api.py::test_lexer_options[RobotFrameworkLexer]", "tests/test_basic_api.py::test_random_input[RobotFrameworkLexer]", "tests/snippets/robotframework/test_basic.txt::", "tests/examplefiles/robotframework/robotframework_test.robot::"] | ["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 | 24 | 4 | 1,193 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278833 | 81.1115 | |||
5,883 | swe_bench::test::1526 | swe_bench | test | 1,526 | scikit-learn__scikit-learn-11043 | scikit-learn/scikit-learn | scikit-learn/scikit-learn | python | 19bc7e8af6ec3468b6c7f4718a31cd5f508528cd | FunctionTransformer should not convert DataFrames to arrays by default
I would expect a common use of FunctionTransformer is to apply some function to a Pandas DataFrame, ideally using its own methods or accessors. As noted in #10648, it can be easy for users to miss that they need to set validate=False to pass through... | Sounds reasonable, particularly since at present,
> From: https://github.com/scikit-learn/scikit-learn/issues/10453
> Some meta-estimators (notably model selection and pipeline tools) will pass a dataframe along as-is to nested estimators.
So this would be just one more step in https://github.com/scikit-learn/sc... | diff --git a/sklearn/preprocessing/_function_transformer.py b/sklearn/preprocessing/_function_transformer.py
--- a/sklearn/preprocessing/_function_transformer.py
+++ b/sklearn/preprocessing/_function_transformer.py
@@ -42,10 +42,16 @@ class FunctionTransformer(BaseEstimator, TransformerMixin):
validate : bool, o... | diff --git a/sklearn/preprocessing/tests/test_function_transformer.py b/sklearn/preprocessing/tests/test_function_transformer.py
--- a/sklearn/preprocessing/tests/test_function_transformer.py
+++ b/sklearn/preprocessing/tests/test_function_transformer.py
@@ -1,3 +1,4 @@
+import pytest
import numpy as np
from scipy im... | ["sklearn/preprocessing/tests/test_function_transformer.py::test_function_transformer_future_warning[None-FutureWarning]"] | ["sklearn/preprocessing/tests/test_function_transformer.py::test_delegate_to_func", "sklearn/preprocessing/tests/test_function_transformer.py::test_np_log", "sklearn/preprocessing/tests/test_function_transformer.py::test_kw_arg", "sklearn/preprocessing/tests/test_function_transformer.py::test_kw_arg_update", "sklearn/p... | null | true | 2018-04-29T22:39:45Z | 1 | 35 | 1 | 772 | 0 | 0.8 | 1 | 0.55 | 1 | 0.245333 | 81.111 | |
5,884 | swe_smith::train::39878 | swe_smith | train | 39,878 | tornadoweb__tornado.d5ac65c1.func_pm_remove_cond__04ef1oov | swesmith/tornadoweb__tornado.d5ac65c1 | tornadoweb/tornado | python | null | HTTP1Connection.finish() no longer validates Content-Length
#### Description
When using HTTP/1.1 connections with a specified Content-Length header, the connection no longer validates that the actual content written matches the declared Content-Length. This allows responses to be sent with incorrect Content-Length he... | diff --git a/tornado/http1connection.py b/tornado/http1connection.py
index 8dd0c9b..4bc10ff 100644
--- a/tornado/http1connection.py
+++ b/tornado/http1connection.py
@@ -501,16 +501,6 @@ class HTTP1Connection(httputil.HTTPConnection):
def finish(self) -> None:
"""Implements `.HTTPConnection.finish`."""
-... | ["test_content_length_too_high (tornado.test.web_test.IncorrectContentLengthTest)"] | ["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 | 11 | 1 | 1,452 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278667 | 81.111 | |||
5,885 | swe_smith::train::45460 | swe_smith | train | 45,460 | dask__dask.5f61e423.pr_10253 | swesmith/dask__dask.5f61e423 | dask/dask | python | null | ### Issue: Unexpected Keyword Argument in `idxmaxmin_chunk`
Hello,
I've encountered an issue with the `idxmaxmin_chunk` function in the Dask DataFrame module. After updating to the latest version, I noticed that the function no longer accepts the `numeric_only` keyword argument, which was previously supported.
Here'... | diff --git a/dask/dataframe/core.py b/dask/dataframe/core.py
index 32d8bbc..2101540 100644
--- a/dask/dataframe/core.py
+++ b/dask/dataframe/core.py
@@ -313,12 +313,11 @@ def total_mem_usage(df, index=True, deep=False):
return mem_usage
-def idxmaxmin_chunk(x, fn=None, skipna=True, numeric_only=False):
- nu... | ["dask/dataframe/tests/test_dataframe.py::test_idxmaxmin[idx0-True]", "dask/dataframe/tests/test_dataframe.py::test_idxmaxmin[idx0-False]", "dask/dataframe/tests/test_dataframe.py::test_idxmaxmin[idx1-True]", "dask/dataframe/tests/test_dataframe.py::test_idxmaxmin[idx1-False]", "dask/dataframe/tests/test_dataframe.py::... | ["dask/dataframe/tests/test_dataframe.py::test_Dataframe", "dask/dataframe/tests/test_dataframe.py::test_head_tail", "dask/dataframe/tests/test_dataframe.py::test_head_npartitions", "dask/dataframe/tests/test_dataframe.py::test_head_npartitions_warn", "dask/dataframe/tests/test_dataframe.py::test_index_head", "dask/dat... | jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423 | true | null | 2 | 30 | 11 | 1,071 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2785 | 81.1105 | |||
5,886 | swe_smith::train::1102 | swe_smith | train | 1,102 | jd__tenacity.0d40e76f.func_basic__fyidz2ap | swesmith/jd__tenacity.0d40e76f | jd/tenacity | python | null | RetryCallState.prepare_for_next_attempt() breaks retry logic with incorrect state reset
#### Description
The retry mechanism is completely broken due to incorrect state management in `RetryCallState.prepare_for_next_attempt()`. When preparing for the next retry attempt, the method is setting string values instead of ... | diff --git a/tenacity/__init__.py b/tenacity/__init__.py
index 72eba04..fc1c7e9 100644
--- a/tenacity/__init__.py
+++ b/tenacity/__init__.py
@@ -559,10 +559,10 @@ class RetryCallState:
return self.outcome_timestamp - self.start_time
def prepare_for_next_attempt(self) -> None:
- self.outcome = Non... | ["tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_retry", "tests/test_asyncio.py::TestAsyncio::test_retry_using_async_retying", "tests/test_asyncio.py::TestAsyncio::test_stop_after_attempt", "tests/test_asyncio.py::TestContextMana... | ["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::TestAsyncio::test_repr", "tests/test_asyncio.py::TestAsyncio::test_retry_attributes", "tests/test_asy... | jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f | true | null | 1 | 8 | 57 | 1,511 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2785 | 81.1105 | |||
5,887 | swe_smith::train::21795 | swe_smith | train | 21,795 | life4__textdistance.c3aca916.combine_file__hg0s0i3r | swesmith/life4__textdistance.c3aca916 | life4/textdistance | python | null | Normalized distance calculation returns incorrect values
#### Description
The normalized distance calculation is producing incorrect results, including division by zero errors and values outside the expected 0-1 range. When comparing strings, the normalized distance should always return a value between 0 and 1, but c... | 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 | 1 | 22 | 135 | 1,231 | 0 | 0.6 | 1 | 0.75 | 1 | 0.2785 | 81.1105 | |||
5,888 | r2e_gym::train::4918 | r2e_gym | train | 4,918 | datalad__d8e40072bd204ab662b501fbea960315bd130857 | datalad | datalad/datalad | python | d8e40072bd204ab662b501fbea960315bd130857 | **Title:** Interface Class Missing `_get_result_filter` Method Causing Test Failures
**Description:**
The `Interface` class is expected to have a `_get_result_filter` method that processes result filtering based on command-line arguments or configuration settings. However, this method is currently missing, leading to ... | diff --git a/datalad/cmdline/main.py b/datalad/cmdline/main.py
--- a/datalad/cmdline/main.py
+++ b/datalad/cmdline/main.py
@@ -113,7 +113,7 @@
'-f', '--output-format', dest='common_output_format',
default='default',
type=assure_unicode,
- metavar="{default,json,json_pp,tailored,'<templ... | diff --git a/datalad/interface/tests/test_base.py b/datalad/interface/tests/test_base.py
--- a/datalad/interface/tests/test_base.py
+++ b/datalad/interface/tests/test_base.py
@@ -0,0 +1,112 @@
+# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
+# ex: set sts=4 ts=4 sw=4 noet:
+# ##... | null | null | namanjain12/datalad_final:d8e40072bd204ab662b501fbea960315bd130857 | true | null | 3 | 52 | null | 1,343 | 0 | 0.75 | 1 | 0.6375 | 1 | 0.397167 | 81.11025 | ||
5,889 | swe_smith::train::43777 | swe_smith | train | 43,777 | pydata__patsy.a5d16484.combine_file__bmcvsecp | swesmith/pydata__patsy.a5d16484 | pydata/patsy | python | null | # I() function doesn't handle lists correctly and Q() function returns None for missing variables
### Describe the bug
There are two issues with the built-in functions in patsy:
1. The `I()` function doesn't handle lists correctly. When a list is passed to `I()`, it only returns the first element instead of preservi... | diff --git a/patsy/builtins.py b/patsy/builtins.py
index fb4b319..94b2193 100644
--- a/patsy/builtins.py
+++ b/patsy/builtins.py
@@ -46,12 +46,14 @@ def I(x):
we instead have a single predictor, defined to be the sum of ``x1`` and
``x2``."""
+ if isinstance(x, list):
+ return x[0]
return x
... | ["patsy/builtins.py::test_I", "patsy/builtins.py::test_Q", "patsy/test_highlevel.py::test_builtins"] | ["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 | 18 | 3 | 1,310 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278333 | 81.11 | |||
5,890 | swe_smith::train::25099 | swe_smith | train | 25,099 | pylint-dev__astroid.b114f6b5.combine_file__s7m79zng | swesmith/pylint-dev__astroid.b114f6b5 | pylint-dev/astroid | python | null | # Six.moves module imports broken
## Description
I'm experiencing issues with the six.moves module imports. After a recent change, imports from six.moves are not working correctly.
## Steps to Reproduce
```python
import six
# These imports fail
six.moves.http_client
six.moves.urllib_parse
six.moves.urllib_error
six... | diff --git a/astroid/brain/brain_six.py b/astroid/brain/brain_six.py
index c222a42..0dc7d19 100644
--- a/astroid/brain/brain_six.py
+++ b/astroid/brain/brain_six.py
@@ -34,8 +34,8 @@ def _indent(text, prefix, predicate=default_predicate) -> str:
"""
def prefixed_lines():
- for line in text.splitlines... | ["tests/brain/test_brain.py::ModuleExtenderTest::test_extension_modules", "tests/brain/test_six.py::SixBrainTest::test_attribute_access", "tests/brain/test_six.py::SixBrainTest::test_attribute_access_with_six_moves_imported", "tests/brain/test_six.py::SixBrainTest::test_from_imports", "tests/brain/test_six.py::SixBrain... | ["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 | 19 | 5 | 1,289 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278167 | 81.1095 | |||
5,891 | swe_smith::train::52746 | swe_smith | train | 52,746 | pydicom__pydicom.7d361b3d.lm_rewrite__x3hktmn9 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | `DicomIO.read_exact()` does not handle short reads correctly
Description
When attempting to read a specific number of bytes using the `DicomIO.read_exact()` method, an `EOFError` is expected if the available bytes are fewer than requested. However, the current implementation does not raise the error as expected when ... | diff --git a/src/pydicom/filebase.py b/src/pydicom/filebase.py
index 817bc09..fdf110b 100644
--- a/src/pydicom/filebase.py
+++ b/src/pydicom/filebase.py
@@ -179,7 +179,7 @@ class DicomIO:
f"'{type(self._buffer).__name__}': object has no read() method"
)
- def read_exact(self, length: int, nr_... | ["tests/test_filebase.py::TestDicomIO::test_read_exact_length_raises"] | ["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 | 33 | 1 | 1,009 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278167 | 81.1095 | |||
5,892 | swe_smith::train::48163 | swe_smith | train | 48,163 | sqlfluff__sqlfluff.50a1c4b6.func_pm_ctrl_invert_if__qb1vfii2 | swesmith/sqlfluff__sqlfluff.50a1c4b6 | sqlfluff/sqlfluff | python | null | Lexer fails with TypeError when processing SQL strings
#### Description
The lexer is throwing a TypeError when trying to process SQL strings. This appears to be related to variable assignment logic in the `_iter_segments` method.
#### Steps/Code to Reproduce
```python
from sqlfluff.core.parser.lexer import Lexer
fr... | diff --git a/src/sqlfluff/core/parser/lexer.py b/src/sqlfluff/core/parser/lexer.py
index 1fbf312..fba0129 100644
--- a/src/sqlfluff/core/parser/lexer.py
+++ b/src/sqlfluff/core/parser/lexer.py
@@ -548,13 +548,13 @@ def _iter_segments(
)
# If we have a stashed start use that. Ot... | ["test/core/parser/lexer_test.py::test__parser__lexer_obj[b.c-res1]", "test/core/parser/lexer_test.py::test__parser__lexer_obj[*-+bd/-res8]", "test/core/parser/lexer_test.py::test__parser__lexer_fail", "test/core/parser/lexer_test.py::test__parser__lexer_fail_via_parse"] | ["test/core/parser/lexer_test.py::test__parser__lexer_string[.fsaljk-.]", "test/core/parser/lexer_test.py::test__parser__lexer_string[fsaljk-None]", "test/core/parser/lexer_test.py::test__parser__lexer_regex[fsaljk-f-f0]", "test/core/parser/lexer_test.py::test__parser__lexer_regex[fsaljk-f-f1]", "test/core/parser/lexer... | jyangballin/swesmith.x86_64.sqlfluff_1776_sqlfluff.50a1c4b6 | true | null | 1 | 39 | 4 | 888 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278 | 81.109 | |||
5,893 | swe_smith::train::46 | swe_smith | train | 46 | oauthlib__oauthlib.1fd52536.combine_file__99t7rutv | swesmith/oauthlib__oauthlib.1fd52536 | oauthlib/oauthlib | python | null | OAuth2 redirect URI validation logic inverted
#### Description
The redirect URI validation logic appears to be inverted, causing authorization requests to fail when they should succeed and vice versa. When providing a valid redirect URI, the authorization server incorrectly raises `InvalidRedirectURIError` or `Mismat... | diff --git a/oauthlib/oauth2/rfc6749/grant_types/base.py b/oauthlib/oauth2/rfc6749/grant_types/base.py
index d96a2db..77a7e54 100644
--- a/oauthlib/oauth2/rfc6749/grant_types/base.py
+++ b/oauthlib/oauth2/rfc6749/grant_types/base.py
@@ -58,10 +58,10 @@ class ValidatorsContainer:
def __init__(self, post_auth, pos... | ["tests/oauth2/rfc6749/endpoints/test_client_authentication.py::ClientAuthenticationTest::test_client_id_authentication", "tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py::PreservationTest::test_default_uri", "tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py::PreservationTest::test_defaul... | ["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 | 132 | 1,168 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278 | 81.109 | |||
5,894 | swe_smith::train::20161 | swe_smith | train | 20,161 | kurtmckee__feedparser.cad965a3.lm_rewrite__hl6hl60w | swesmith/kurtmckee__feedparser.cad965a3 | kurtmckee/feedparser | python | null | Generator tag attributes not properly processed in RSS feeds
### Bug description
I've discovered an issue with how feedparser processes the `<generator>` tag in RSS feeds. When a feed includes a generator tag with attributes like `version` and `uri`, these attributes are not being properly processed.
### Steps to re... | diff --git a/feedparser/namespaces/_base.py b/feedparser/namespaces/_base.py
index 6299b02..5a4189d 100644
--- a/feedparser/namespaces/_base.py
+++ b/feedparser/namespaces/_base.py
@@ -452,13 +452,13 @@ class Namespace:
_end_feedburner_browserfriendly = _end_info
def _start_generator(self, attrs_d):
- ... | ["tests/test_well_formed.py::test_http_conditions[info83]", "tests/test_well_formed.py::test_loose_parser[info1332]", "tests/test_well_formed.py::test_strict_parser[info1332]", "tests/test_well_formed.py::test_http_conditions[info52]"] | ["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 | 1 | 12 | 4 | 1,428 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278 | 81.109 | |||
5,895 | swe_smith::train::32650 | swe_smith | train | 32,650 | pydantic__pydantic.acb0f10f.func_pm_remove_assign__zhnzegnz | swesmith/pydantic__pydantic.acb0f10f | pydantic/pydantic | python | null | #### Description
When calling `.dict()` on BaseModel instances with nested sequences or dictionaries, the method fails with `NameError: name 'v_dict' is not defined` and `NameError: name 'seq_args' is not defined`.
#### Steps/Code to Reproduce
```python
from pydantic.v1 import BaseModel
from typing import List
clas... | diff --git a/pydantic/v1/main.py b/pydantic/v1/main.py
index 68af6f5..44b201d 100644
--- a/pydantic/v1/main.py
+++ b/pydantic/v1/main.py
@@ -739,23 +739,12 @@ class BaseModel(Representation, metaclass=ModelMetaclass):
) -> Any:
if isinstance(v, BaseModel):
if to_dict:
- v_dict ... | ["tests/test_docs.py::test_docs_examples[docs/migration.md:191-216]", "tests/test_docs.py::test_docs_examples[docs/migration.md:221-254]"] | ["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 | 27 | 2 | 1,128 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278 | 81.109 | |||
5,896 | swe_smith::train::1149 | swe_smith | train | 1,149 | jd__tenacity.0d40e76f.func_pm_class_rm_funcs__ayw9xqf7 | swesmith/jd__tenacity.0d40e76f | jd/tenacity | python | null | Retrying iterator missing after removing begin() and __iter__ methods
#### Description
When using tenacity's Retrying class as an iterator, it no longer works after recent changes. The iterator functionality appears to be broken.
#### Steps/Code to Reproduce
```python
import tenacity
# Create a retrying instance
r... | diff --git a/tenacity/__init__.py b/tenacity/__init__.py
index 72eba04..7eec340 100644
--- a/tenacity/__init__.py
+++ b/tenacity/__init__.py
@@ -345,12 +345,6 @@ class BaseRetrying(ABC):
return wrapped_f # type: ignore[return-value]
- def begin(self) -> None:
- self.statistics.clear()
- s... | ["tests/test_asyncio.py::TestAsyncio::test_attempt_number_is_correct_for_interleaved_coroutines", "tests/test_asyncio.py::TestAsyncio::test_retry", "tests/test_asyncio.py::TestAsyncio::test_retry_using_async_retying", "tests/test_asyncio.py::TestAsyncio::test_stop_after_attempt", "tests/test_asyncio.py::TestContextMana... | ["tests/test_after.py::TestAfterLogFormat::test_01_default", "tests/test_after.py::TestAfterLogFormat::test_02_custom_sec_format", "tests/test_asyncio.py::TestAsyncio::test_iscoroutinefunction", "tests/test_asyncio.py::TestAsyncio::test_repr", "tests/test_asyncio.py::TestAsyncio::test_retry_attributes", "tests/test_asy... | jyangballin/swesmith.x86_64.jd_1776_tenacity.0d40e76f | true | null | 1 | 21 | 70 | 1,248 | 0 | 0.6 | 1 | 0.75 | 1 | 0.278 | 81.109 | |||
5,897 | swe_smith::train::52905 | swe_smith | train | 52,905 | stanfordnlp__string2string.c4a72f59.func_pm_remove_loop__yphp11w5 | swesmith/stanfordnlp__string2string.c4a72f59 | stanfordnlp/string2string | python | null | ROUGE score computation raises KeyError for 'rouge1'
Description
I've encountered an issue with the ROUGE score computation in the `string2string` library. When trying to compute ROUGE scores using the `ROUGE` class, a `KeyError` is raised for 'rouge1'. This happens when I attempt to calculate the scores for a set of... | diff --git a/string2string/metrics/rouge.py b/string2string/metrics/rouge.py
index 4307158..fa5e185 100644
--- a/string2string/metrics/rouge.py
+++ b/string2string/metrics/rouge.py
@@ -52,7 +52,7 @@ class ROUGE:
use_stemmer (bool): Whether to use a stemmer. Default is False.
interval_name (str... | ["tests/test_rogue.py::ROUGE_TestCase::test_rogue"] | ["tests/test_alignment.py::AlignmentTestCase::test_dtw", "tests/test_alignment.py::AlignmentTestCase::test_hiirschberg", "tests/test_alignment.py::AlignmentTestCase::test_longest_common_subsequence", "tests/test_alignment.py::AlignmentTestCase::test_longest_common_subsubtring", "tests/test_alignment.py::AlignmentTestCa... | jyangballin/swesmith.x86_64.stanfordnlp_1776_string2string.c4a72f59 | true | null | 1 | 23 | 1 | 1,207 | 0 | 0.6 | 1 | 0.75 | 1 | 0.277833 | 81.1085 | |||
5,898 | swe_smith::train::39735 | swe_smith | train | 39,735 | tornadoweb__tornado.d5ac65c1.func_pm_ctrl_invert_if__9hg76psn | swesmith/tornadoweb__tornado.d5ac65c1 | tornadoweb/tornado | python | null | SSL connection error handling broken - wrong exception set on future
#### Description
When an SSL connection fails during the handshake process, the wrong exception is being set on the SSL connect future. This causes `StreamClosedError` to be raised instead of the actual SSL-related error that occurred.
#### Steps/C... | diff --git a/tornado/iostream.py b/tornado/iostream.py
index dd2111e..fbef480 100644
--- a/tornado/iostream.py
+++ b/tornado/iostream.py
@@ -630,9 +630,9 @@ class BaseIOStream:
# an ssl.SSLError), not just StreamClosedError.
if not self._ssl_connect_future.done():
if self.erro... | ["test_no_match (tornado.test.iostream_test.TestIOStreamCheckHostname)", "test_check_hostname (tornado.test.iostream_test.TestIOStreamStartTLS)", "test_handshake_fail (tornado.test.iostream_test.TestIOStreamStartTLS)", "test_error_logging (tornado.test.simple_httpclient_test.SimpleHTTPSClientTestCase)", "test_ssl_conte... | ["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 | 7 | 6 | 1,527 | 0 | 0.6 | 1 | 0.75 | 1 | 0.277833 | 81.1085 | |||
5,899 | swe_smith::train::52764 | swe_smith | train | 52,764 | pydicom__pydicom.7d361b3d.pr_1920 | swesmith/pydicom__pydicom.7d361b3d | pydicom/pydicom | python | null | # Absolute paths not working with get_testdata_file
When trying to use absolute paths with `get_testdata_file` or `get_testdata_files`, the function is raising a `NotImplementedError` instead of a `ValueError`. This breaks functionality in the CLI tools and other parts of the code that expect a `ValueError` to be rais... | diff --git a/src/pydicom/cli/main.py b/src/pydicom/cli/main.py
index 2f616ba..c50dfaf 100644
--- a/src/pydicom/cli/main.py
+++ b/src/pydicom/cli/main.py
@@ -127,7 +127,7 @@ def filespec_parser(filespec: str) -> list[tuple[Dataset, Any]]:
# Get the pydicom test filename even without prefix, in case user forgot it
... | ["tests/test_data_manager.py::TestGetData::test_no_absolute_path_in_get_testdata_files", "tests/test_util.py::TestCodify::test_code_file", "tests/test_util.py::TestCodify::test_code_file_save_as", "tests/test_util.py::TestCodify::test_code_file_deflated"] | ["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 | 2 | 31 | 4 | 1,047 | 0 | 0.6 | 1 | 0.75 | 1 | 0.277833 | 81.1085 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.