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
3,900
swe_bench::test::1
swe_bench
test
1
astropy__astropy-12057
astropy/astropy
astropy/astropy
python
b6769c18c0881b6d290e543e9334c25043018b3f
Add helpers to convert between different types of uncertainties Currently there no easy way to convert from an arbitrary uncertainty class to a different uncertainty class. This would be useful to be able to pass NDData objects to external libraries/tools which assume, for example, that uncertainties will always stored...
See also #10128 which is maybe not exactly the same need but related in the sense that there is currently no easy way to get uncertainties in a specific format (variance, std). Very much from the left field, but in coordinate representations, we deal with this by insisting every representation can be transformed to/fro...
diff --git a/astropy/nddata/nduncertainty.py b/astropy/nddata/nduncertainty.py --- a/astropy/nddata/nduncertainty.py +++ b/astropy/nddata/nduncertainty.py @@ -395,6 +395,40 @@ def _propagate_multiply(self, other_uncert, result_data, correlation): def _propagate_divide(self, other_uncert, result_data, correlation):...
diff --git a/astropy/nddata/tests/test_nduncertainty.py b/astropy/nddata/tests/test_nduncertainty.py --- a/astropy/nddata/tests/test_nduncertainty.py +++ b/astropy/nddata/tests/test_nduncertainty.py @@ -4,7 +4,7 @@ import pytest import numpy as np -from numpy.testing import assert_array_equal +from numpy.testing im...
["astropy/nddata/tests/test_nduncertainty.py::test_self_conversion_via_variance_supported[StdDevUncertainty]", "astropy/nddata/tests/test_nduncertainty.py::test_self_conversion_via_variance_supported[VarianceUncertainty]", "astropy/nddata/tests/test_nduncertainty.py::test_self_conversion_via_variance_supported[InverseV...
["astropy/nddata/tests/test_nduncertainty.py::test_init_fake_with_list[FakeUncertainty]", "astropy/nddata/tests/test_nduncertainty.py::test_init_fake_with_list[StdDevUncertainty]", "astropy/nddata/tests/test_nduncertainty.py::test_init_fake_with_list[VarianceUncertainty]", "astropy/nddata/tests/test_nduncertainty.py::t...
null
true
2021-08-14T10:06:53Z
1
63
8
1,722
0
0.8
1
0.55
1
0.497
81.866
3,901
swe_smith::train::52652
swe_smith
train
52,652
pydicom__pydicom.7d361b3d.lm_rewrite__50b4vtzv
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### Issue with Decoding Encapsulated Pixel Data #### What happened? While working with encapsulated pixel data, an unexpected `ValueError` is raised when attempting to decode certain multi-frame images. The error seems to occur when processing the fragments of the pixel data, particularly when the Basic Offset Table ...
diff --git a/src/pydicom/encaps.py b/src/pydicom/encaps.py index 3493808..d6cbc77 100644 --- a/src/pydicom/encaps.py +++ b/src/pydicom/encaps.py @@ -1618,7 +1618,7 @@ def _generate_pixel_data( yield from generate_fragmented_frames(bytestream, number_of_frames=nr_frames) -def _decode_data_sequence(data: bytes) ...
["tests/test_encaps.py::TestDecodeDataSequence::test_empty_bot_single_fragment", "tests/test_encaps.py::TestDecodeDataSequence::test_empty_bot_triple_fragment_single_frame", "tests/test_encaps.py::TestDecodeDataSequence::test_bot_single_fragment", "tests/test_encaps.py::TestDecodeDataSequence::test_bot_triple_fragment_...
["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
67
8
1,841
0
0.6
1
0.75
1
0.530167
81.8655
3,902
swe_smith::train::22784
swe_smith
train
22,784
graphql-python__graphene.82903263.combine_module__yld0o48g
swesmith/graphql-python__graphene.82903263
graphql-python/graphene
python
null
# DataLoader and OrderedType issues in graphene ## Description I've found multiple issues with the `DataLoader` and `OrderedType` classes in graphene: ### DataLoader issues: - The `cache_map` parameter is being used incorrectly - The `_cache` initialization is wrong (using a list instead of a dictionary) - The `_que...
diff --git a/graphene/utils/dataloader.py b/graphene/utils/dataloader.py index c75b9ee..f25a857 100644 --- a/graphene/utils/dataloader.py +++ b/graphene/utils/dataloader.py @@ -43,7 +43,7 @@ class DataLoader(object): ), "batch_load_fn must be coroutine. Received: {}".format(self.batch_load_fn) if no...
["graphene/types/tests/test_definition.py::test_does_not_mutate_passed_field_definitions", "graphene/utils/tests/test_dataloader.py::test_basic_dataloader", "graphene/utils/tests/test_dataloader.py::test_build_a_simple_data_loader", "graphene/utils/tests/test_dataloader.py::test_can_build_a_data_loader_from_a_partial",...
["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
42
21
2,340
0
0.6
1
0.75
1
0.53
81.865
3,903
swe_smith::train::42850
swe_smith
train
42,850
python-jsonschema__jsonschema.93e0caa5.lm_rewrite__spu9cnbf
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
### Description After the recent changes, attempting to access certain attributes directly from the `jsonschema` package results in an `AttributeError`. This affects attributes that were previously accessible but are now expected to be imported from specific submodules. ### Steps/Code to Reproduce 1. Attempt to impo...
diff --git a/jsonschema/__init__.py b/jsonschema/__init__.py index d8dec8c..91b290d 100644 --- a/jsonschema/__init__.py +++ b/jsonschema/__init__.py @@ -25,85 +25,16 @@ from jsonschema.validators import ( def __getattr__(name): - if name == "__version__": - warnings.warn( - "Accessing jsonsche...
["jsonschema/tests/test_deprecations.py::TestDeprecations::test_RefResolutionError", "jsonschema/tests/test_deprecations.py::TestDeprecations::test_RefResolver", "jsonschema/tests/test_deprecations.py::TestDeprecations::test_WrappedReferencingError_hashability", "jsonschema/tests/test_deprecations.py::TestDeprecations:...
["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
89
9
1,396
0
0.6
1
0.75
1
0.529333
81.863
3,904
swe_smith::train::39621
swe_smith
train
39,621
pallets__jinja.ada0a9a6.lm_rewrite__unk516xe
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
### Issue: TypeError in Block Handling with Async Templates #### Description It seems there's a problem with how blocks are being handled in async templates. When trying to render templates with nested blocks, a `TypeError` is raised, indicating an issue with unpacking values. This error occurs in various scenarios, ...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..864443d 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -948,55 +948,57 @@ class CodeGenerator(NodeVisitor): debug_kv_str = "&".join(f"{k}={v}" for k, v in self.debug_info) self.writeline(f"debug_info = {de...
["tests/test_async.py::test_async_blocks[asyncio]", "tests/test_async.py::test_async_blocks[trio]", "tests/test_async.py::test_blocks_generate_async[asyncio]", "tests/test_async.py::test_blocks_generate_async[trio]", "tests/test_ext.py::TestInternationalization::test_trans", "tests/test_ext.py::TestNewstyleInternationa...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize",...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
90
34
1,374
0
0.6
1
0.75
1
0.529
81.862
3,905
swe_smith::train::38173
swe_smith
train
38,173
john-kurkowski__tldextract.3d1bf184.combine_file__effh85g1
swesmith/john-kurkowski__tldextract.3d1bf184
john-kurkowski/tldextract
python
null
# [Bug]: Multiple issues with DiskCache implementation in tldextract ## Description I've been working with tldextract in a project and noticed several issues with the caching mechanism that cause the library to fail in various ways. After investigating the code, I found multiple problems in the `cache.py` file that a...
diff --git a/tldextract/cache.py b/tldextract/cache.py index 83a87f0..3f48945 100644 --- a/tldextract/cache.py +++ b/tldextract/cache.py @@ -143,22 +143,20 @@ class DiskCache: try: os.unlink(str(Path(root, filename))) except FileNotFoundError: - ...
["tests/cli_test.py::test_cli_posargs", "tests/cli_test.py::test_cli_namedargs", "tests/cli_test.py::test_cli_json_output", "tests/custom_suffix_test.py::test_private_extraction", "tests/custom_suffix_test.py::test_suffix_which_is_not_in_custom_list", "tests/custom_suffix_test.py::test_custom_suffixes", "tests/main_tes...
["tests/cli_test.py::test_cli_no_input", "tests/cli_test.py::test_cli_parses_args", "tests/custom_suffix_test.py::test_suffix_which_is_not_in_extra_list", "tests/custom_suffix_test.py::test_extra_suffixes", "tests/main_test.py::test_lenient_netloc", "tests/main_test.py::test_looks_like_ip", "tests/main_test.py::test_lo...
jyangballin/swesmith.x86_64.john-kurkowski_1776_tldextract.3d1bf184
true
null
1
26
46
2,654
0
0.6
1
0.75
1
0.529
81.862
3,906
swe_smith::train::5095
swe_smith
train
5,095
agronholm__exceptiongroup.0b4f4937.combine_module__akqsiy9t
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
ExceptionGroup.subgroup() returns wrong results when filtering #### Description The `subgroup()` method on ExceptionGroup instances is returning incorrect results. When filtering exceptions, it appears to be applying inverted logic and returning the wrong subset of exceptions. #### Steps/Code to Reproduce ```python...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..ec5929e 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -110,13 +110,15 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]): @property def message(s...
["tests/test_catch.py::test_catch_handler_raises", "tests/test_exceptions.py::ExceptionGroupFields::test_basics_ExceptionGroup_fields", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predicate__match", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predi...
["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
91
48
1,351
0
0.6
1
0.75
1
0.5285
81.8605
3,907
swe_smith::train::27098
swe_smith
train
27,098
tkrajina__gpxpy.09fc46b3.func_pm_class_rm_funcs__xhgxmjjj
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
GPX methods missing after recent changes #### Description Several GPX methods are no longer available, causing AttributeError when trying to use them. Methods like `adjust_time`, `add_elevation`, `has_elevations`, `clone`, `add_missing_times`, and `add_missing_speeds` seem to have been removed. #### Steps/Code to Re...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..3316778 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -2057,32 +2057,6 @@ class GPX: # TODO log.debug('Track reduced to %s points', self.get_track_points_no()) - def adjust_time(self, delta: mod_datetime.timedelta, all: bool=False) -> None...
["test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_speeds", "test.py::GPXTests::test_add_missing_times", "test.py::GPXTests::test_add_missing_times_2", "test.py::GPXTests::test_adjust_time_all", "test.py::GPXTests::test_adjust_time_tracks_only", "test.py::GPXTests::test_clone_and_smooth", "t...
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_add_missing_elevations", "test.py::GPXTest...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
105
10
1,069
0
0.6
1
0.75
1
0.528167
81.8595
3,908
swe_smith::train::29226
swe_smith
train
29,226
tox-dev__pipdeptree.c31b6418.lm_rewrite__7ddb2yvp
swesmith/tox-dev__pipdeptree.c31b6418
tox-dev/pipdeptree
python
null
Warning messages not displayed correctly when duplicate or invalid metadata found ``` In [1]: from pipdeptree._discovery import get_installed_distributions In [2]: # Create an environment with duplicate packages In [3]: # For example, install foo package in two different locations In [4]: get_installed_distributions()...
diff --git a/src/pipdeptree/_discovery.py b/src/pipdeptree/_discovery.py index ba23498..1c7ffd1 100644 --- a/src/pipdeptree/_discovery.py +++ b/src/pipdeptree/_discovery.py @@ -49,50 +49,52 @@ def get_installed_distributions( return filter_valid_distributions(distributions(path=computed_paths)) -def filter_val...
["tests/test_discovery.py::test_duplicate_metadata", "tests/test_discovery.py::test_invalid_metadata"]
["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
86
2
1,447
0
0.6
1
0.75
1
0.527833
81.8585
3,909
swe_smith::train::45074
swe_smith
train
45,074
mahmoud__glom.fb3c4e76.lm_rewrite__mppq3h2j
swesmith/mahmoud__glom.fb3c4e76
mahmoud/glom
python
null
### Unexpected KeyError with Sentinel in glom After applying the recent changes, it seems that the `glom` function is throwing unexpected `KeyError` exceptions related to `Sentinel` values. This issue appears to affect various parts of the codebase, particularly when dealing with scoped variables and certain path oper...
diff --git a/glom/core.py b/glom/core.py index cee71a3..3e521a7 100644 --- a/glom/core.py +++ b/glom/core.py @@ -2250,51 +2250,28 @@ def glom(target, spec, **kwargs): only surpassed by its intuitiveness. Give it a whirl! """ - # TODO: check spec up front - default = kwargs.pop('default', None if 'skip...
["glom/test/test_basic.py::test_top_level_default", "glom/test/test_basic.py::test_call_and_target", "glom/test/test_basic.py::test_scope", "glom/test/test_basic.py::test_seq_getitem", "glom/test/test_basic.py::test_python_native", "glom/test/test_basic.py::test_glom_extra_kwargs", "glom/test/test_basic.py::test_inspec...
["glom/test/test_basic.py::test_initial_integration", "glom/test/test_basic.py::test_list_item_lift_and_access", "glom/test/test_basic.py::test_coalesce", "glom/test/test_basic.py::test_skip", "glom/test/test_basic.py::test_stop", "glom/test/test_basic.py::test_val", "glom/test/test_basic.py::test_abstract_iterable", "...
jyangballin/swesmith.x86_64.mahmoud_1776_glom.fb3c4e76
true
null
1
61
70
1,947
0
0.6
1
0.75
1
0.527833
81.8585
3,910
swe_smith::train::28026
swe_smith
train
28,026
jsvine__pdfplumber.02ff4313.lm_rewrite__3422x070
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
### Bug Report: PDF Repair Functionality Fails with FileNotFoundError **Description** It seems that the recent changes to the `open` method in the `PDF` class have introduced an issue when attempting to repair PDF files. Specifically, the repair functionality is not working as expected, resulting in `FileNotFoundErro...
diff --git a/pdfplumber/pdf.py b/pdfplumber/pdf.py index 9c42bc2..bf9826f 100644 --- a/pdfplumber/pdf.py +++ b/pdfplumber/pdf.py @@ -70,57 +70,68 @@ class PDF(Container): ) @classmethod - def open( - cls, - path_or_fp: Union[str, pathlib.Path, BufferedReader, BytesIO], - ...
["tests/test_repair.py::Test::test_from_issue_932", "tests/test_repair.py::Test::test_other_repair_inputs", "tests/test_repair.py::Test::test_repair_custom_path", "tests/test_repair.py::Test::test_repair_password"]
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
83
4
1,503
0
0.6
1
0.75
1
0.527167
81.8565
3,911
swe_smith::train::50942
swe_smith
train
50,942
python-hyper__h11.bed0dd4a.lm_rewrite__hgga6hz7
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
### Connection Handling Issue with Protocol Switching #### What happened? After updating the connection handling logic, I encountered unexpected behavior when dealing with protocol switching and connection closure. It seems that the connection does not handle certain states correctly, leading to unexpected protocol e...
diff --git a/h11/_connection.py b/h11/_connection.py index e37d82a..2fd970a 100644 --- a/h11/_connection.py +++ b/h11/_connection.py @@ -407,34 +407,33 @@ class Connection: else: self._receive_buffer_closed = True - def _extract_next_receive_event( - self, - ) -> Union[Event, Type[N...
["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_reuse_simple", "h11/tests/test_connection.py::test_empty_request", "h11/tests/test_connection.py::test_empty_response", "h11/tests/test_connection.py::test_early_detection_of_invali...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
51
22
2,142
0
0.6
1
0.75
1
0.527
81.856
3,912
swe_smith::train::28075
swe_smith
train
28,075
jsvine__pdfplumber.02ff4313.lm_rewrite__w4qc4b72
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
### Issue: Annotation Parsing Errors in PDF with Rotated and Cropped Pages #### Description When attempting to parse annotations from PDFs that have been rotated or cropped, the process fails with a `KeyError`. This issue seems to arise when handling the bounding box coordinates of annotations, particularly when the ...
diff --git a/pdfplumber/page.py b/pdfplumber/page.py index 71330d8..1aa52ac 100644 --- a/pdfplumber/page.py +++ b/pdfplumber/page.py @@ -300,54 +300,40 @@ class Page(Container): return pt def parse(annot: T_obj) -> T_obj: - _a, _b, _c, _d = annot["Rect"] - pt0 = rotate_poin...
["tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_convert.py::Test::test_cli_csv", "tests/test_convert.py::Test::test_cli_csv_exclude", "tests/test_convert.py::Test::test_csv", "tests/test_issues.py::Test::test_issue_463", "tests/test_issues.py::Test::tes...
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::test_invalid_crops", "tests/test_basics.py::Test::test_load_with_custom_laparams", "tests/test_basics.py...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
78
8
1,601
0
0.6
1
0.75
1
0.526833
81.8555
3,913
swe_smith::train::9851
swe_smith
train
9,851
keleshev__schema.24a30457.func_pm_remove_cond__6ibpz0dc
swesmith/keleshev__schema.24a30457
keleshev/schema
python
null
Schema validation fails for dict types after recent changes #### Description Dictionary validation is completely broken. When trying to validate any dictionary schema, the validation fails with errors indicating that the schema doesn't match the data, even for simple cases that should work. #### Steps/Code to Reprod...
diff --git a/schema/__init__.py b/schema/__init__.py index 31bd71b..f59d8a5 100644 --- a/schema/__init__.py +++ b/schema/__init__.py @@ -439,105 +439,6 @@ class Schema(object): data = Schema(type(s), error=e).validate(data, **kwargs) o: Or = Or(*s, error=e, schema=Schema, ignore_extra_keys=i) ...
["test_schema.py::test_schema", "test_schema.py::test_and", "test_schema.py::test_or", "test_schema.py::test_or_only_one", "test_schema.py::test_regex", "test_schema.py::test_validate_list", "test_schema.py::test_list_tuple_set_frozenset", "test_schema.py::test_strictly", "test_schema.py::test_dict", "test_schema.py::t...
["test_schema.py::test_validate_file", "test_schema.py::test_test", "test_schema.py::test_dict_subtypes", "test_schema.py::test_use_error_handling", "test_schema.py::test_or_error_handling", "test_schema.py::test_schema_error_handling", "test_schema.py::test_schema_repr", "test_schema.py::test_missing_keys_exception_wi...
jyangballin/swesmith.x86_64.keleshev_1776_schema.24a30457
true
null
1
100
36
1,155
0
0.6
1
0.75
1
0.525833
81.8525
3,914
swe_smith::train::39568
swe_smith
train
39,568
pallets__jinja.ada0a9a6.lm_rewrite__347mctl3
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
Filter and Test Functionality Not Handling Undefined Elements Properly It seems like there's an issue with how filters and tests are handling undefined elements in templates. When using filters or tests with undefined variables, the expected behavior is not being met, leading to unexpected errors. Here's a script to ...
diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 91720c5..1d0b620 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1770,47 +1770,63 @@ class CodeGenerator(NodeVisitor): self.visit(node.step, frame) @contextmanager - def _filter_test_common( - self, nod...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestUndefined::test_logging_undefined", "tests/test_api.py::TestUndefined::test_default_undefined", "tests/test_api.py::TestUndefined::test_chainable_undefined", "tests/test_api.py::TestUndefined::test_debug_undefined", "tests/test_asyn...
["tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize", "tests/test_api.py::TestExtendedAPI::test_eval_finalize", "tes...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
82
109
1,509
0
0.6
1
0.75
1
0.524833
81.8495
3,915
swe_smith::train::50153
swe_smith
train
50,153
facebookresearch__fvcore.a491d5b9.lm_rewrite__o8e26lfs
swesmith/facebookresearch__fvcore.a491d5b9
facebookresearch/fvcore
python
null
GIoU loss fails with empty tensors I'm encountering an issue with the `giou_loss` function when passing empty tensors. This is causing problems in my training pipeline when I have batches with no valid boxes. ## Reproduction Here's a minimal example that reproduces the issue: ```python import torch from fvcore.nn.g...
diff --git a/fvcore/nn/giou_loss.py b/fvcore/nn/giou_loss.py index 6ba14e8..eaa1d85 100644 --- a/fvcore/nn/giou_loss.py +++ b/fvcore/nn/giou_loss.py @@ -5,12 +5,8 @@ import torch -def giou_loss( - boxes1: torch.Tensor, - boxes2: torch.Tensor, - reduction: str = "none", - eps: float = 1e-7, -) -> torch....
["tests/test_giou_loss.py::TestGIoULoss::test_empty_inputs"]
["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
93
1
1,288
0
0.6
1
0.75
1
0.524667
81.849
3,916
swe_smith::train::24388
swe_smith
train
24,388
sunpy__sunpy.f8edfd5c.lm_rewrite__42h70vlf
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
# Light travel time correction broken in get_body_heliographic_stonyhurst when observer is provided ## Description When trying to get the heliographic stonyhurst coordinates of a solar system body with an observer parameter, the function fails with an AttributeError. The issue occurs when trying to calculate the ligh...
diff --git a/sunpy/coordinates/ephemeris.py b/sunpy/coordinates/ephemeris.py index b5a70da..bbc7a07 100644 --- a/sunpy/coordinates/ephemeris.py +++ b/sunpy/coordinates/ephemeris.py @@ -37,8 +37,8 @@ __all__ = ['get_body_heliographic_stonyhurst', 'get_earth', @add_common_docstring(**_variables_for_parse_time_docstr...
["sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst_light_travel_time", "sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst_light_travel_time_array"]
["sunpy/coordinates/tests/test_ephemeris.py::test_get_body_heliographic_stonyhurst", "sunpy/coordinates/tests/test_ephemeris.py::test_get_earth", "sunpy/coordinates/tests/test_ephemeris.py::test_get_horizons_coord_array_time_too_large", "sunpy/coordinates/tests/test_ephemeris.py::test_get_horizons_coord_bad_id_type"]
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
84
2
1,465
0
0.6
1
0.75
1
0.524167
81.8475
3,917
swe_smith::train::5090
swe_smith
train
5,090
agronholm__exceptiongroup.0b4f4937.combine_module__6vp5bpr2
swesmith/agronholm__exceptiongroup.0b4f4937
agronholm/exceptiongroup
python
null
ExceptionGroup.exceptions property returns reversed order #### Description The `exceptions` property of `BaseExceptionGroup` is returning exceptions in reversed order. When creating an exception group with multiple exceptions, accessing the `exceptions` property returns them in the opposite order from how they were p...
diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a4a7ace..386e103 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -110,13 +110,15 @@ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]): @property def message(s...
["tests/test_catch.py::test_catch_handler_raises", "tests/test_exceptions.py::ExceptionGroupFields::test_basics_ExceptionGroup_fields", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predicate__match", "tests/test_exceptions.py::ExceptionGroupSubgroupTests::test_basics_subgroup_by_predi...
["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
97
48
1,204
0
0.6
1
0.75
1
0.524
81.847
3,918
swe_smith::train::34463
swe_smith
train
34,463
iterative__dvc.1d6ea681.pr_9011
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
# Exception handling in DVC repo code causes unexpected behavior with subrepos ## Description When working with DVC repositories that contain subrepos, I'm encountering issues with the exception handling in the repo code. The problem appears to be related to how exceptions are caught and processed in the `collect_fil...
diff --git a/dvc/repo/data.py b/dvc/repo/data.py index bc727c8..3473090 100644 --- a/dvc/repo/data.py +++ b/dvc/repo/data.py @@ -92,7 +92,7 @@ def _diff( not_in_cache and change.old and change.old.hash_info - and not old.storage_map.cache_exists(change.old) + ...
["tests/unit/repo/experiments/test_executor_status.py::test_celery_queue_success_status", "tests/unit/repo/experiments/test_executor_status.py::test_workspace_executor_success_status[workspace_queue]", "tests/unit/repo/experiments/test_executor_status.py::test_workspace_executor_success_status[tempdir_queue]", "tests/u...
["tests/func/test_repo.py::test_open_bare", "tests/func/test_repo.py::test_destroy", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown_no_tasks", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown", "tests/unit/repo/experiments/queue/test_celery.py::test_shutdown_with_kill", "tests/unit/rep...
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
3
66
8
1,822
0
0.6
1
0.75
1
0.523667
81.846
3,919
swe_smith::train::18534
swe_smith
train
18,534
HIPS__autograd.ac044f0d.lm_rewrite__i58lwjdv
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Issue: Unexpected Behavior in Broadcasting Operations **Description** After the recent changes, there seems to be an issue with broadcasting operations, particularly when dealing with reshaping arrays. The problem manifests as a `ValueError` when attempting to reshape arrays during certain operations. This issue ...
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..58d6514 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -877,16 +877,68 @@ def match_complex(target, x): def unbroadcast(x, target_meta, broadcast_idx=0): - target_shape, target_ndim, dtype, t...
["tests/test_binary_ops.py::test_mul", "tests/test_linalg.py::test_eigvalh_lower_complex", "tests/test_linalg.py::test_eigvalh_upper_complex", "tests/test_graphs.py::test_complex_mutating_outgrad_from_indexing", "tests/test_linalg.py::test_eig_real", "tests/test_linalg.py::test_eig_complex", "tests/test_binary_ops.py::...
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
72
59
1,701
0
0.6
1
0.75
1
0.5235
81.8455
3,920
swe_smith::train::32886
swe_smith
train
32,886
pydantic__pydantic.acb0f10f.pr_11384
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
### Bug: Unexpected Behavior with Field Aliases in Pydantic Models #### Description After updating the configuration handling in Pydantic, there seems to be an issue with field alias validation and serialization. Specifically, when using `validate_by_name` and `serialize_by_alias` configurations, the expected behavio...
diff --git a/pydantic/_internal/_config.py b/pydantic/_internal/_config.py index 928a86c..5aa4805 100644 --- a/pydantic/_internal/_config.py +++ b/pydantic/_internal/_config.py @@ -188,39 +188,33 @@ class ConfigWrapper: code='validate-by-alias-and-name-false', ) - return core_sche...
["tests/test_aliases.py::test_pop_by_field_name", "tests/test_aliases.py::test_validate_by_name_config[False-True-bar_-expectation1]", "tests/test_aliases.py::test_alias_generator_with_computed_field[basic_callable]", "tests/test_aliases.py::test_alias_generator_with_computed_field[alias_generator]", "tests/test_aliase...
["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
62
25
1,898
0
0.6
1
0.75
1
0.523
81.844
3,921
swe_smith::train::52724
swe_smith
train
52,724
pydicom__pydicom.7d361b3d.lm_rewrite__raul5186
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### Issue: DicomIO Initialization and Filename Handling #### Description Hello team, I've encountered an issue with the `DicomIO` class initialization and handling of filenames in the latest patch. When initializing `DicomIO` with a valid buffer, the expected behavior is that all methods (`write`, `seek`, `read`, `t...
diff --git a/src/pydicom/filebase.py b/src/pydicom/filebase.py index 817bc09..be67d08 100644 --- a/src/pydicom/filebase.py +++ b/src/pydicom/filebase.py @@ -40,7 +40,7 @@ class DicomIO: DICOM datasets. """ - def __init__(self, buffer: ReadableBuffer | WriteableBuffer) -> None: + def __init__(self, buf...
["tests/test_filebase.py::TestDicomIO::test_init_good_buffer", "tests/test_filewriter.py::TestDCMWrite::test_bad_filename"]
["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
44
2
2,257
0
0.6
1
0.75
1
0.522833
81.8435
3,922
swe_smith::train::52757
swe_smith
train
52,757
pydicom__pydicom.7d361b3d.lm_rewrite__yszlwpbv
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Error in CLI `filespec_parser` with Invalid Syntax and UTF-8 Encoding I encountered an issue with the `filespec_parser` function in the CLI when dealing with certain file specifications and UTF-8 encoding. The function seems to fail when provided with invalid syntax for file:element specifications, and it also struggl...
diff --git a/src/pydicom/cli/main.py b/src/pydicom/cli/main.py index 2f616ba..44d732b 100644 --- a/src/pydicom/cli/main.py +++ b/src/pydicom/cli/main.py @@ -79,7 +79,7 @@ def filespec_parts(filespec: str) -> tuple[str, str, str]: return prefix, "".join(prefix_file), last -def filespec_parser(filespec: str) -> ...
["tests/test_cli.py::TestFilespec::test_syntax[extra:colon]", "tests/test_cli.py::TestFilespec::test_syntax[no_callable()]", "tests/test_cli.py::TestFilespec::test_syntax[BeamSequence[0]extra]", "tests/test_cli.py::TestFilespec::test_syntax[BeamSequence[x]]", "tests/test_cli.py::TestFilespec::test_offers_pydicom_testfi...
["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
88
6
1,377
0
0.6
1
0.75
1
0.522833
81.8435
3,923
swe_smith::train::7068
swe_smith
train
7,068
cantools__cantools.0c6a7871.combine_file__qnspxk8e
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
# [Bug]: Regular expression pattern issues in plot.py ## Bug summary The recent changes to the `plot.py` file have introduced several issues with regular expressions and time format parsing, causing all plotting functionality to fail. ## Code for reproduction When trying to use the plot functionality with any comma...
diff --git a/src/cantools/subparsers/plot.py b/src/cantools/subparsers/plot.py index c3d5890..9d3f7ce 100644 --- a/src/cantools/subparsers/plot.py +++ b/src/cantools/subparsers/plot.py @@ -201,28 +201,28 @@ class TimestampParser: return ((d.pop('day',0)*24 + d.pop('hour',0))*60 + d.pop('min',0))*60 + seconds ...
["tests/test_plot.py::CanToolsPlotTest::test_autocolor", "tests/test_plot.py::CanToolsPlotTest::test_break_time", "tests/test_plot.py::CanToolsPlotTest::test_break_time_none", "tests/test_plot.py::CanToolsPlotTest::test_case_sensitive", "tests/test_plot.py::CanToolsPlotTest::test_choices_stem", "tests/test_plot.py::Can...
["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
61
50
1,916
0
0.6
1
0.75
1
0.522667
81.843
3,924
swe_smith::train::35130
swe_smith
train
35,130
django__daphne.32ac73e1.lm_rewrite__gjk1btuw
swesmith/django__daphne.32ac73e1
django/daphne
python
null
# HTTP response.start without status code doesn't raise ValueError ## Description I've discovered an issue with the HTTP protocol handling in Daphne. When sending an HTTP response message with type `http.response.start` but without a `status` code, the server doesn't raise a ValueError as expected. According to the ...
diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py index e9eba96..2350a76 100755 --- a/daphne/http_protocol.py +++ b/daphne/http_protocol.py @@ -236,72 +236,35 @@ class WebRequest(http.Request): """ Handles a reply from the client """ - # Handle connections that are already...
["tests/test_http_response.py::TestHTTPResponse::test_status_code_required"]
["tests/test_checks.py::test_check_daphne_installed", "tests/test_cli.py::TestEndpointDescriptions::testBasics", "tests/test_cli.py::TestEndpointDescriptions::testFileDescriptorBinding", "tests/test_cli.py::TestEndpointDescriptions::testMultipleEnpoints", "tests/test_cli.py::TestEndpointDescriptions::testTcpPortBinding...
jyangballin/swesmith.x86_64.django_1776_daphne.32ac73e1
true
null
1
79
1
1,554
0
0.6
1
0.75
1
0.522333
81.842
3,925
swe_smith::train::38256
swe_smith
train
38,256
john-kurkowski__tldextract.3d1bf184.pr_311
swesmith/john-kurkowski__tldextract.3d1bf184
john-kurkowski/tldextract
python
null
# Unable to use custom session with tldextract ## Description When trying to use a custom requests.Session with tldextract, it fails to accept the session parameter. This is problematic when you need to configure specific session parameters like proxies, custom headers, or authentication. ## Reproduction ```python ...
diff --git a/tldextract/suffix_list.py b/tldextract/suffix_list.py index 154f79f..f3fe7a1 100644 --- a/tldextract/suffix_list.py +++ b/tldextract/suffix_list.py @@ -31,16 +31,10 @@ def find_first_response( cache: DiskCache, urls: Sequence[str], cache_fetch_timeout: float | int | None = None, - session...
["tests/main_test.py::test_find_first_response_with_session"]
["tests/cli_test.py::test_cli_no_input", "tests/cli_test.py::test_cli_parses_args", "tests/cli_test.py::test_cli_posargs", "tests/cli_test.py::test_cli_namedargs", "tests/cli_test.py::test_cli_json_output", "tests/custom_suffix_test.py::test_private_extraction", "tests/custom_suffix_test.py::test_suffix_which_is_not_in...
jyangballin/swesmith.x86_64.john-kurkowski_1776_tldextract.3d1bf184
true
null
2
97
1
1,190
0
0.6
1
0.75
1
0.521667
81.84
3,926
swe_smith::train::33279
swe_smith
train
33,279
django-money__django-money.835c1ab8.lm_rewrite__hp5ijia6
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
# Deserialization fails with NameError in django-money ## Description I'm experiencing an issue with the `Deserializer` function in django-money. After updating the code, I'm getting NameError exceptions when trying to deserialize JSON data. ## MCVE Code Sample ```python from djmoney.serializers import Deserializer...
diff --git a/djmoney/serializers.py b/djmoney/serializers.py index ed077ed..d792d12 100644 --- a/djmoney/serializers.py +++ b/djmoney/serializers.py @@ -13,50 +13,51 @@ from .utils import get_currency_field_name Serializer = JSONSerializer -def Deserializer(stream_or_string, **options): # noqa +def Deserializer(s...
["tests/test_serialization.py::test_m2m_fields_are_not_lost", "tests/test_serialization.py::test_deserialization_error"]
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
1
83
2
1,470
0
0.6
1
0.75
1
0.521667
81.84
3,927
swe_smith::train::26530
swe_smith
train
26,530
pylint-dev__astroid.b114f6b5.lm_rewrite__3igcrx98
swesmith/pylint-dev__astroid.b114f6b5
pylint-dev/astroid
python
null
### AttributeError when inferring ctypes redefined types #### Description After the recent changes, there seems to be an issue with inferring the types of certain `ctypes` redefined types. Specifically, when attempting to access the `value` and `_type_` attributes of these types, an `AttributeError` is raised. This b...
diff --git a/astroid/helpers.py b/astroid/helpers.py index ea7523b..ad05c46 100644 --- a/astroid/helpers.py +++ b/astroid/helpers.py @@ -57,36 +57,70 @@ def _function_type( return _build_proxy_class(cls_name, builtins) -def _object_type( - node: InferenceResult, context: InferenceContext | None = None -) ->...
["tests/brain/numpy/test_core_einsumfunc.py::test_numpy_function_calls_inferred_as_ndarray", "tests/brain/test_attr.py::AttrsTest::test_attr_transform", "tests/brain/test_brain.py::CollectionsBrain::test_collections_object_not_subscriptable", "tests/brain/test_brain.py::CollectionsBrain::test_collections_object_subscri...
["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_function_base.py::BrainNumpyCoreFunctionBaseTest::test_numpy_function_calls_inferred_as_ndarray...
jyangballin/swesmith.x86_64.pylint-dev_1776_astroid.b114f6b5
true
null
1
94
82
1,248
0
0.6
1
0.75
1
0.521333
81.839
3,928
swe_smith::train::18557
swe_smith
train
18,557
HIPS__autograd.ac044f0d.lm_rewrite__sdkm7hu2
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
Unexpected Behavior with `np.repeat` and Eigenvalue Computations Description I've encountered an issue with the recent changes in the `autograd` library, specifically related to the `np.repeat` function and eigenvalue computations using `np.linalg.eigh`. The behavior seems inconsistent and is causing unexpected resul...
diff --git a/autograd/numpy/numpy_vjps.py b/autograd/numpy/numpy_vjps.py index 08d4e1b..9219eb4 100644 --- a/autograd/numpy/numpy_vjps.py +++ b/autograd/numpy/numpy_vjps.py @@ -340,20 +340,60 @@ defvjp(anp.gradient, grad_gradient) def grad_repeat(ans, x, repeats, axis=None): shape = anp.shape(x) - - def vjp(...
["tests/test_linalg.py::test_eigvalh_lower", "tests/test_linalg.py::test_eigvalh_upper", "tests/test_linalg.py::test_eigvalh_lower_broadcasting", "tests/test_linalg.py::test_eigvalh_upper_broadcasting", "tests/test_linalg.py::test_eigvalh_lower_complex", "tests/test_linalg.py::test_eigvalh_upper_complex", "tests/test_s...
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
66
7
1,808
0
0.6
1
0.75
1
0.521333
81.839
3,929
swe_smith::train::47315
swe_smith
train
47,315
python-trio__trio.cfbbe2c1.pr_3002
swesmith/python-trio__trio.cfbbe2c1
python-trio/trio
python
null
REPL AttributeError when running code I've encountered an issue with the Trio REPL where it throws an AttributeError when trying to execute certain code snippets. This seems to happen when running the REPL and attempting to execute code that should normally work without issues. Steps to reproduce: 1. Start the Trio R...
diff --git a/src/trio/_repl.py b/src/trio/_repl.py index f9efcc0..022fd02 100644 --- a/src/trio/_repl.py +++ b/src/trio/_repl.py @@ -12,10 +12,8 @@ import outcome import trio import trio.lowlevel -from trio._util import final -@final class TrioInteractiveConsole(InteractiveConsole): # code.InteractiveInte...
["src/trio/_tests/test_repl.py::test_basic_interaction", "src/trio/_tests/test_repl.py::test_system_exits_quit_interpreter", "src/trio/_tests/test_repl.py::test_KI_interrupts", "src/trio/_tests/test_repl.py::test_system_exits_in_exc_group", "src/trio/_tests/test_repl.py::test_system_exits_in_nested_exc_group", "src/tri...
["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
107
9
988
0
0.6
1
0.75
1
0.521333
81.839
3,930
swe_bench::test::1158
swe_bench
test
1,158
pallets__flask-4935
pallets/flask
pallets/flask
python
fa1ee7066807c21256e90089731c548b313394d2
Nested blueprints are not respected when mounted on subdomains Hello, and thanks for all your work 🙏🏻 Nested blueprints [as described in the docs](https://flask.palletsprojects.com/en/2.2.x/blueprints/#nesting-blueprints) work perfectly fine when using `url_prefix`. However, when mounting the parent blueprint using ...
It looks like if you request `http://localhost:5000/child/`, you'll get 200 OK. It means that when registering child blueprints, they don't respect the subdomain set by the parent. I submitted a PR at #4855.
diff --git a/src/flask/blueprints.py b/src/flask/blueprints.py --- a/src/flask/blueprints.py +++ b/src/flask/blueprints.py @@ -358,6 +358,9 @@ def register(self, app: "Flask", options: dict) -> None: :param options: Keyword arguments forwarded from :meth:`~Flask.register_blueprint`. + .. ...
diff --git a/tests/test_blueprints.py b/tests/test_blueprints.py --- a/tests/test_blueprints.py +++ b/tests/test_blueprints.py @@ -950,6 +950,55 @@ def index(): assert response.status_code == 200 +def test_nesting_subdomains(app, client) -> None: + subdomain = "api" + parent = flask.Blueprint("parent", _...
["tests/test_blueprints.py::test_nesting_subdomains", "tests/test_blueprints.py::test_child_and_parent_subdomain"]
["tests/test_blueprints.py::test_templates_list", "tests/test_blueprints.py::test_dotted_name_not_allowed", "tests/test_blueprints.py::test_route_decorator_custom_endpoint_with_dots", "tests/test_blueprints.py::test_template_filter", "tests/test_blueprints.py::test_add_template_filter", "tests/test_blueprints.py::test_...
null
true
2023-01-04T16:50:46Z
1
14
2
2,642
0
0.8
1
0.55
1
0.487
81.836
3,931
swe_smith::train::29754
swe_smith
train
29,754
getnikola__nikola.0f4c230e.combine_file__n4y01u37
swesmith/getnikola__nikola.0f4c230e
getnikola/nikola
python
null
ReST compiler broken after recent changes #### Description The ReST compiler is completely broken and fails to compile any reStructuredText content. When trying to build a site with ReST posts, compilation fails with a `NotImplementedError`. #### Steps/Code to Reproduce Create a simple ReST file and try to compile ...
diff --git a/nikola/plugins/compile/rest/__init__.py b/nikola/plugins/compile/rest/__init__.py index 97b57a5..62640bc 100644 --- a/nikola/plugins/compile/rest/__init__.py +++ b/nikola/plugins/compile/rest/__init__.py @@ -61,90 +61,14 @@ class CompileRest(PageCompiler): supports_metadata = True metadata_condit...
["tests/integration/test_archive_full.py::test_avoid_double_slash_in_rss", "tests/integration/test_archive_full.py::test_check_links", "tests/integration/test_archive_full.py::test_index_in_sitemap", "tests/integration/test_archive_full.py::test_full_archive[overall]", "tests/integration/test_archive_full.py::test_full...
["tests/integration/test_archive_full.py::test_check_files", "tests/integration/test_archive_per_day.py::test_archive_exists", "tests/integration/test_archive_per_day.py::test_check_files", "tests/integration/test_archive_per_month.py::test_archive_exists", "tests/integration/test_archive_per_month.py::test_check_files...
jyangballin/swesmith.x86_64.getnikola_1776_nikola.0f4c230e
true
null
1
117
99
778
0
0.6
1
0.75
1
0.519667
81.834
3,932
swe_smith::train::39644
swe_smith
train
39,644
tornadoweb__tornado.d5ac65c1.combine_file__a48hphsx
swesmith/tornadoweb__tornado.d5ac65c1
tornadoweb/tornado
python
null
# Authentication methods broken in OAuth2Mixin and TwitterMixin ## Current problem Several authentication methods are broken in the latest version: 1. Facebook login fails with a 500 error when trying to authenticate a user 2. Twitter authentication redirect doesn't work - the `authenticate_redirect` method is missi...
diff --git a/tornado/auth.py b/tornado/auth.py index 64428c5..c13bec0 100644 --- a/tornado/auth.py +++ b/tornado/auth.py @@ -223,12 +223,7 @@ class OpenIdMixin: # Make sure we got back at least an email from attribute exchange ax_ns = None for key in handler.request.arguments: - if...
["test_facebook_login (tornado.test.auth_test.AuthTest)", "test_openid_get_user (tornado.test.auth_test.AuthTest)", "test_twitter_authenticate_redirect (tornado.test.auth_test.AuthTest)"]
["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
48
3
2,154
0
0.6
1
0.75
1
0.519
81.832
3,933
swe_smith::train::5805
swe_smith
train
5,805
luozhouyang__python-string-similarity.115acaac.lm_rewrite__09f4u7g9
swesmith/luozhouyang__python-string-similarity.115acaac
luozhouyang/python-string-similarity
python
null
# SIFT4Options initialization breaks custom options ## Describe the bug After recent changes to the `SIFT4Options` class, it no longer properly handles custom options. When trying to use SIFT4 with custom parameters, the algorithm fails to work correctly. ## Steps/Code to Reproduce ```python from strsimpy.sift4 imp...
diff --git a/strsimpy/sift4.py b/strsimpy/sift4.py index 76adc52..034afa0 100644 --- a/strsimpy/sift4.py +++ b/strsimpy/sift4.py @@ -20,59 +20,25 @@ from .string_distance import MetricStringDistance class SIFT4Options(MetricStringDistance): def __init__(self, options=None): - self.options = { - ...
["strsimpy/sift4_test.py::SIFT4Test::testSIFT4"]
["strsimpy/cosine_test.py::TestCosine::test_cosine", "strsimpy/damerau_test.py::TestDamerau::test_damerau", "strsimpy/jaccard_test.py::TestJaccard::test_jaccard", "strsimpy/jaro_winkler_test.py::TestJaroWinkler::test_jarowinkler", "strsimpy/levenshtein_test.py::TestLevenshtein::test_levenshtein", "strsimpy/longest_comm...
jyangballin/swesmith.x86_64.luozhouyang_1776_python-string-similarity.115acaac
true
null
1
72
1
1,674
0
0.6
1
0.75
1
0.519
81.832
3,934
swe_smith::train::20418
swe_smith
train
20,418
tobymao__sqlglot.036601ba.combine_module__3slpq1j8
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
SQL executor fails with AttributeError on group_by attribute access #### Description The SQL executor is throwing an AttributeError when trying to access the `group_by` attribute on aggregation steps. This appears to be related to how the aggregation method handles grouping operations. #### Steps/Code to Reproduce ...
diff --git a/sqlglot/executor/env.py b/sqlglot/executor/env.py index c6c8ee0..d28e390 100644 --- a/sqlglot/executor/env.py +++ b/sqlglot/executor/env.py @@ -99,25 +99,12 @@ def substring(this, start=None, length=None): @null_if_any def cast(this, to): - if to == exp.DataType.Type.DATE: - if isinstance(thi...
["tests/test_executor.py::TestExecutor::test_aggregate_without_group_by", "tests/test_executor.py::TestExecutor::test_correlated_count", "tests/test_executor.py::TestExecutor::test_execute_callable", "tests/test_executor.py::TestExecutor::test_execute_subqueries", "tests/test_executor.py::TestExecutor::test_execute_tab...
["tests/test_executor.py::TestExecutor::test_agg_order", "tests/test_executor.py::TestExecutor::test_case_sensitivity", "tests/test_executor.py::TestExecutor::test_execute_catalog_db_table", "tests/test_executor.py::TestExecutor::test_nested_table_reference", "tests/test_executor.py::TestExecutor::test_nested_values", ...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
2
102
10
1,063
0
0.6
1
0.75
1
0.517167
81.8265
3,935
swe_smith::train::5044
swe_smith
train
5,044
bottlepy__bottle.a8dfef30.lm_rewrite__iis80th7
swesmith/bottlepy__bottle.a8dfef30
bottlepy/bottle
python
null
### Issue: Cookie Handling Regression #### Description It seems there's a regression in the cookie handling logic after the recent changes. Specifically, the `set_cookie` method is not behaving as expected under certain conditions. This is causing issues with setting cookies that have long names or values, and also w...
diff --git a/bottle.py b/bottle.py index 286b5bc..bf3cb17 100755 --- a/bottle.py +++ b/bottle.py @@ -1795,7 +1795,8 @@ class BaseResponse(object): return self.content_type.split('charset=')[-1].split(';')[0].strip() return default - def set_cookie(self, name, value, secret=None, digestmod=has...
["test/test_environ.py::TestResponse::test_clone_cookie", "test/test_environ.py::TestResponse::test_set_cookie_expires", "test/test_environ.py::TestResponse::test_set_cookie_maxage", "test/test_environ.py::TestResponse::test_set_cookie_name_long_string", "test/test_environ.py::TestResponse::test_set_cookie_samesite", "...
["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
67
9
1,759
0
0.6
1
0.75
1
0.5165
81.8245
3,936
swe_smith::train::49056
swe_smith
train
49,056
facebookresearch__hydra.0f03eb60.pr_2206
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
# Experimental API in hydra no longer raises ImportError when version is 1.2 or higher ## Description I've found an issue with the experimental API in hydra. According to the code comments, the experimental API should be removed in version 1.2, but it seems that the code that checks for version 1.2 and raises an Impo...
diff --git a/hydra/experimental/compose.py b/hydra/experimental/compose.py index f37bbc1..35d47c9 100644 --- a/hydra/experimental/compose.py +++ b/hydra/experimental/compose.py @@ -1,9 +1,9 @@ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved +# DEPRECATED: remove in 1.2 from typing import List, ...
["tests/test_compose.py::test_deprecated_compose", "tests/test_compose.py::test_deprecated_initialize", "tests/test_compose.py::test_deprecated_initialize_config_dir", "tests/test_compose.py::test_deprecated_initialize_config_module"]
["tests/test_compose.py::test_initialize", "tests/test_compose.py::test_initialize_old_version_base", "tests/test_compose.py::test_initialize_bad_version_base", "tests/test_compose.py::test_initialize_dev_version_base", "tests/test_compose.py::test_initialize_cur_version_base", "tests/test_compose.py::test_initialize_c...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
2
59
4
1,913
0
0.6
1
0.75
1
0.5155
81.8215
3,937
swe_smith::train::18510
swe_smith
train
18,510
HIPS__autograd.ac044f0d.lm_rewrite__3kli7885
swesmith/HIPS__autograd.ac044f0d
hips/autograd
python
null
### Unexpected Behavior in `grad_convolve` Function I encountered an issue with the `grad_convolve` function in the `autograd.scipy.signal` module. It seems that the function is not handling certain input configurations correctly, leading to unexpected results. ### Description When using the `grad_convolve` function...
diff --git a/autograd/scipy/signal.py b/autograd/scipy/signal.py index 49b7619..3c43625 100644 --- a/autograd/scipy/signal.py +++ b/autograd/scipy/signal.py @@ -123,40 +123,31 @@ def flipped_idxs(ndim, axes): return tuple(new_idxs) -def grad_convolve(argnum, ans, A, B, axes=None, dot_axes=[(), ()], mode="full"...
["tests/test_scipy.py::test_convolve", "tests/test_scipy.py::test_convolve_2d", "tests/test_scipy.py::test_convolve_ignore", "tests/test_scipy.py::test_convolve_ignore_dot"]
["tests/test_core.py::test_sub", "tests/test_direct.py::test_grad", "tests/test_fft.py::test_rfftn_odd_not_implemented", "tests/test_core.py::test_div", "tests/test_direct.py::test_deriv", "tests/test_linalg.py::test_norm_axis[shape0-2]", "tests/test_linalg.py::test_inv_3d", "tests/test_core.py::test_mul", "tests/test_...
jyangballin/swesmith.x86_64.hips_1776_autograd.ac044f0d
true
null
1
61
4
1,869
0
0.6
1
0.75
1
0.514833
81.8195
3,938
swe_smith::train::35444
swe_smith
train
35,444
alecthomas__voluptuous.a7a55f83.lm_rewrite__v116y3p2
swesmith/alecthomas__voluptuous.a7a55f83
alecthomas/voluptuous
python
null
AttributeError: Missing 'ExtraKeysInvalid' in voluptuous.error #### Description Encountering an `AttributeError` when using schemas that should raise `ExtraKeysInvalid`. It seems that the `ExtraKeysInvalid` attribute is missing from the `voluptuous.error` module. #### Steps/Code to Reproduce ```python from voluptuou...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index cdeb514..eaf366e 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -280,6 +280,7 @@ class Schema(object): additional_candidates.append((skey, (ckey, cvalue))) def validate_mapping(pat...
["voluptuous/tests/tests.md::tests.md", "voluptuous/tests/tests.py::test_in", "voluptuous/tests/tests.py::test_in_unsortable_container", "voluptuous/tests/tests.py::test_not_in", "voluptuous/tests/tests.py::test_not_in_unsortable_container", "voluptuous/tests/tests.py::test_contains", "voluptuous/tests/tests.py::test_r...
["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.py::test_remove_with_error", "voluptuou...
jyangballin/swesmith.x86_64.alecthomas_1776_voluptuous.a7a55f83
true
null
1
96
53
1,167
0
0.6
1
0.75
1
0.5145
81.8185
3,939
swe_smith::train::45242
swe_smith
train
45,242
dask__dask.5f61e423.combine_module__nurma78x
swesmith/dask__dask.5f61e423
dask/dask
python
null
concat function breaks with NameError on missing helper functions #### Description The `concat` function in dask-expr is failing with `NameError` exceptions when trying to concatenate DataFrames. The function appears to be calling undefined helper functions `_maybe_from_pandas` and `_validate_axis` that don't exist i...
diff --git a/dask/dataframe/dask_expr/_collection.py b/dask/dataframe/dask_expr/_collection.py index 7aa07d4..b2a974a 100644 --- a/dask/dataframe/dask_expr/_collection.py +++ b/dask/dataframe/dask_expr/_collection.py @@ -5397,15 +5397,8 @@ def read_parquet( ) -def concat( - dfs, - axis=0, - join="oute...
["dask/dataframe/dask_expr/tests/test_collection.py::test_nunique[False]", "dask/dataframe/dask_expr/tests/test_collection.py::test_nunique[True]", "dask/dataframe/dask_expr/tests/test_collection.py::test_quantile_frame", "dask/dataframe/dask_expr/tests/test_concat.py::test_concat_str", "dask/dataframe/dask_expr/tests/...
["dask/dataframe/dask_expr/tests/test_collection.py::test_del", "dask/dataframe/dask_expr/tests/test_collection.py::test_info[True-None-True]", "dask/dataframe/dask_expr/tests/test_collection.py::test_info[True-None-False]", "dask/dataframe/dask_expr/tests/test_collection.py::test_info[True-None-None]", "dask/dataframe...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
2
97
32
1,146
0
0.6
1
0.75
1
0.514333
81.818
3,940
swe_smith::train::32864
swe_smith
train
32,864
pydantic__pydantic.acb0f10f.pr_10763
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# Decimal validation fails with non-Decimal values ## Describe the bug When using Decimal fields with constraints like `max_digits` or `decimal_places`, the validation fails with a cryptic error message when a non-Decimal value (like a float) is provided. ## How to Reproduce Create a model with a Decimal field that...
diff --git a/pydantic/_internal/_validators.py b/pydantic/_internal/_validators.py index 8261c98..92cfee4 100644 --- a/pydantic/_internal/_validators.py +++ b/pydantic/_internal/_validators.py @@ -353,61 +353,52 @@ def _extract_decimal_digits_info(decimal: Decimal) -> tuple[int, int]: Though this could be divided ...
["tests/test_internal.py::test_decimal_digits_calculation_type_error[1.0]", "tests/test_types.py::test_invalid_schema_constraints[kwargs18-float-1.0]", "tests/test_types.py::test_invalid_schema_constraints[kwargs19-float-1.0]"]
["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
89
3
1,305
0
0.6
1
0.75
1
0.514167
81.8175
3,941
swe_smith::train::31678
swe_smith
train
31,678
benoitc__gunicorn.bacbf8aa.lm_rewrite__9mzalywg
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
### Issue: Worker Initialization Process Fails with Reloader Hello! I'm encountering an issue with the worker initialization process in Gunicorn when using the reloader feature. I'm not entirely sure if this is a bug or if I'm missing something, so any guidance would be appreciated. #### Description I have a setup w...
diff --git a/gunicorn/workers/base.py b/gunicorn/workers/base.py index 93c465c..334747b 100644 --- a/gunicorn/workers/base.py +++ b/gunicorn/workers/base.py @@ -84,64 +84,34 @@ class Worker: raise NotImplementedError() def init_process(self): - """\ - If you override this method in a subcl...
["tests/test_reload.py::test_reload_on_syntax_error", "tests/test_reload.py::test_start_reloader_after_load_wsgi"]
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
68
2
1,719
0
0.6
1
0.75
1
0.513167
81.8145
3,942
swe_smith::train::22523
swe_smith
train
22,523
tweepy__tweepy.91a41c6e.lm_rewrite__0phsmhs8
swesmith/tweepy__tweepy.91a41c6e
tweepy/tweepy
python
null
# MP4 video upload fails with chunked_upload **Describe the bug** When trying to upload an MP4 video file using the chunked_upload method, the upload fails. This happens when trying to upload any MP4 video file. **To Reproduce** Steps to reproduce the behavior: 1. Create a simple script to upload an MP4 video file: `...
diff --git a/tweepy/api.py b/tweepy/api.py index 37caf07..7634cba 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -3536,12 +3536,9 @@ class API: ) def chunked_upload(self, filename, *, file=None, file_type=None, - wait_for_async_finalize=True, media_category=None, - ...
["tests/test_api.py::TweepyAPITests::testmediauploadmp4"]
["tests/test_api.py::TweepyAPITests::test_indicate_direct_message_typing", "tests/test_api.py::TweepyAPITests::testaddremovelistmember", "tests/test_api.py::TweepyAPITests::testaddremovelistmembers", "tests/test_api.py::TweepyAPITests::testcachedifferentqueryparameters", "tests/test_api.py::TweepyAPITests::testcachedre...
jyangballin/swesmith.x86_64.tweepy_1776_tweepy.91a41c6e
true
null
1
104
1
998
0
0.6
1
0.75
1
0.513
81.814
3,943
swe_smith::train::52756
swe_smith
train
52,756
pydicom__pydicom.7d361b3d.lm_rewrite__yiw102xf
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### AttributeError when Converting Dataset to JSON **Describe the bug** When attempting to convert a `Dataset` to a JSON dictionary using the `to_json_dict` method, an `AttributeError` is raised. This issue seems to occur when handling certain data elements, particularly those involving numeric values and person names...
diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py index e7abffd..154127f 100644 --- a/src/pydicom/dataset.py +++ b/src/pydicom/dataset.py @@ -3143,12 +3143,9 @@ class Dataset: dataset.add(data_element) return dataset - def to_json_dict( - self, - bulk_data_threshold: ...
["tests/test_json.py::TestPersonName::test_pn_components_to_json", "tests/test_json.py::TestPersonName::test_empty_value", "tests/test_json.py::TestPersonName::test_multi_value_to_json", "tests/test_json.py::TestAT::test_to_json", "tests/test_json.py::TestDataSetToJson::test_json_from_dicom_file", "tests/test_json.py::...
["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
83
14
1,414
0
0.6
1
0.75
1
0.512333
81.812
3,944
swe_smith::train::5830
swe_smith
train
5,830
mahmoud__boltons.3bfcfdd0.combine_file__7nlifqzn
swesmith/mahmoud__boltons.3bfcfdd0
mahmoud/boltons
python
null
# JSONLIterator with reverse=True not working ### Describe the bug When using `JSONLIterator` with `reverse=True`, the iterator fails to work properly. The code that should handle reverse iteration appears to be broken. ### Steps to Reproduce ```python from boltons.jsonutils import JSONLIterator # Create a sample ...
diff --git a/boltons/jsonutils.py b/boltons/jsonutils.py index bf61b03..4f8620f 100644 --- a/boltons/jsonutils.py +++ b/boltons/jsonutils.py @@ -71,21 +71,9 @@ def reverse_iter_lines(file_obj, blocksize=DEFAULT_BLOCKSIZE, preseek=True, enco generation. """ - # This function is a bit of a pain bec...
["tests/test_jsonutils.py::test_reverse_iter_lines", "tests/test_jsonutils.py::test_jsonl_iterator"]
["tests/test_cacheutils.py::test_lru_add", "tests/test_cacheutils.py::test_lri", "tests/test_cacheutils.py::test_lri_cache_eviction", "tests/test_cacheutils.py::test_cache_sizes_on_repeat_insertions", "tests/test_cacheutils.py::test_lru_basic", "tests/test_cacheutils.py::test_lru_dict_replacement[LRU]", "tests/test_cac...
jyangballin/swesmith.x86_64.mahmoud_1776_boltons.3bfcfdd0
true
null
1
85
2
1,374
0
0.6
1
0.75
1
0.512333
81.812
3,945
swe_smith::train::43841
swe_smith
train
43,841
pydata__patsy.a5d16484.combine_file__x469cyd2
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
# Scalar values not properly handled in categorical data ## Description I've discovered an issue with how scalar values are handled in categorical data processing. When using scalar values (non-iterable data) with categorical functions, they're not being properly converted to the expected format. ## Steps to reprodu...
diff --git a/patsy/categorical.py b/patsy/categorical.py index c88ecd5..94b4d5a 100644 --- a/patsy/categorical.py +++ b/patsy/categorical.py @@ -158,17 +158,11 @@ def test_guess_categorical(): def _categorical_shape_fix(data): - # helper function - # data should not be a _CategoricalBox or pandas Categorical...
["patsy/categorical.py::test_CategoricalSniffer", "patsy/categorical.py::test_categorical_to_int", "patsy/test_highlevel.py::test_0d_data"]
["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
80
3
1,466
0
0.6
1
0.75
1
0.511
81.808
3,946
swe_smith::train::6561
swe_smith
train
6,561
joke2k__faker.8b401a7d.combine_file__igao2n9v
swesmith/joke2k__faker.8b401a7d
joke2k/faker
python
null
# [Bug]: Faker Generator has issues with arguments and seeding ## Bug summary There are multiple issues with the `Generator` class in Faker: 1. The `set_arguments` method has a logic error where it tries to set dictionary values for non-dictionary arguments 2. The `seed_instance` method no longer creates a per-insta...
diff --git a/faker/generator.py b/faker/generator.py index 5eda964..e43601f 100644 --- a/faker/generator.py +++ b/faker/generator.py @@ -65,16 +65,10 @@ class Generator: def random(self, value: random_module.Random) -> None: self.__random = value - def seed_instance(self, seed: Optional[SeedType] = N...
["tests/sphinx/test_docstring.py::TestProviderMethodDocstring::test_stringify_results", "tests/test_generator.py::TestGenerator::test_get_formatter_with_unknown_formatter", "tests/test_generator.py::TestGenerator::test_arguments_group_with_values", "tests/test_generator.py::TestGenerator::test_arguments_group_with_inva...
["tests/providers/__init__.py::TestBaseProvider::test_locale", "tests/providers/__init__.py::TestBaseProvider::test_language_code", "tests/providers/__init__.py::TestBaseProvider::test_random_digit", "tests/providers/__init__.py::TestBaseProvider::test_random_digit_not_null", "tests/providers/__init__.py::TestBaseProvi...
jyangballin/swesmith.x86_64.joke2k_1776_faker.8b401a7d
true
null
1
27
5
2,521
0
0.6
1
0.75
1
0.510167
81.8055
3,947
swe_smith::train::21123
swe_smith
train
21,123
tobymao__sqlglot.036601ba.lm_rewrite__fpqolxwl
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
### Bug report **Bug summary** It seems that after the recent changes, certain expressions are not being annotated correctly, leading to unexpected behavior. Specifically, when attempting to annotate types based on arguments, the process fails, resulting in an `AttributeError`. This issue affects various functions tha...
diff --git a/sqlglot/optimizer/annotate_types.py b/sqlglot/optimizer/annotate_types.py index 8c9c0ae..d133ba1 100644 --- a/sqlglot/optimizer/annotate_types.py +++ b/sqlglot/optimizer/annotate_types.py @@ -381,50 +381,55 @@ class TypeAnnotator(metaclass=_TypeAnnotator): return self._annotate_args(expression) ...
["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_bracket_annotation", "tests/test_optimizer.py::TestOptimizer::test_canonicalize"...
["tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_cache_annotation", "tests/test_optimizer.py::TestOptimizer::test_concat_annotation", "tests/test_optimizer.py::TestOptimizer::test_cte_column_annotation", "tests/test_optimizer.py::TestOptimizer::test_derive...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
1
85
13
1,358
0
0.6
1
0.75
1
0.509667
81.804
3,948
swe_smith::train::50777
swe_smith
train
50,777
python-hyper__h11.bed0dd4a.combine_file__bxhryayu
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
# Multiple critical issues in h11 HTTP protocol handling ## Description I've discovered several critical issues in the h11 library that break HTTP protocol handling in multiple ways. The issues appear to be in the core utility functions that handle protocol validation, error handling, and data conversion. ## Issues ...
diff --git a/h11/_util.py b/h11/_util.py index 6718445..84675ef 100644 --- a/h11/_util.py +++ b/h11/_util.py @@ -40,9 +40,9 @@ class ProtocolError(Exception): def __init__(self, msg: str, error_status_hint: int = 400) -> None: if type(self) is ProtocolError: - raise TypeError("tried to direct...
["h11/tests/test_against_stdlib_http.py::test_h11_as_client", "h11/tests/test_against_stdlib_http.py::test_h11_as_server", "h11/tests/test_connection.py::test_Connection_basics_and_content_length", "h11/tests/test_connection.py::test_chunked", "h11/tests/test_connection.py::test_chunk_boundaries", "h11/tests/test_conne...
["h11/tests/test_connection.py::test__keep_alive", "h11/tests/test_connection.py::test__body_framing", "h11/tests/test_connection.py::test_idle_receive_nothing", "h11/tests/test_connection.py::test_connection_drop", "h11/tests/test_events.py::test_intenum_status_code", "h11/tests/test_events.py::test_header_casing", "h...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
40
44
2,258
0
0.6
1
0.75
1
0.509667
81.804
3,949
swe_smith::train::12659
swe_smith
train
12,659
lepture__mistune.bf54ef67.lm_rewrite__bamxhtpt
swesmith/lepture__mistune.bf54ef67
lepture/mistune
python
null
List Parsing Error with Nested Structures Description It seems there's an issue with the list parsing functionality, particularly when dealing with nested list structures. After the recent changes, attempting to parse lists with nested items results in unexpected behavior, leading to errors. To reproduce the issue, ...
diff --git a/src/mistune/list_parser.py b/src/mistune/list_parser.py index 7b9682e..b33b6d1 100644 --- a/src/mistune/list_parser.py +++ b/src/mistune/list_parser.py @@ -17,63 +17,71 @@ LIST_PATTERN = ( _LINE_HAS_TEXT = re.compile(r'(\s*)\S') -def parse_list(block: "BlockParser", m: Match[str], state: "BlockState")...
["tests/test_commonmark.py::TestCommonMark::test_block_quotes_235", "tests/test_commonmark.py::TestCommonMark::test_emphasis_and_strong_emphasis_366", "tests/test_commonmark.py::TestCommonMark::test_entity_and_numeric_character_references_038", "tests/test_commonmark.py::TestCommonMark::test_html_blocks_175", "tests/te...
["tests/test_commonmark.py::TestCommonMark::test_atx_headings_062", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_063", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_064", "tests/test_commonmark.py::TestCommonMark::test_atx_headings_065", "tests/test_commonmark.py::TestCommonMark::test_atx...
jyangballin/swesmith.x86_64.lepture_1776_mistune.bf54ef67
true
null
1
102
121
1,018
0
0.6
1
0.75
1
0.509667
81.804
3,950
swe_smith::train::35911
swe_smith
train
35,911
stanfordnlp__dspy.651a4c71.lm_rewrite__khj5akri
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Bug: Databricks Unity Catalog directory creation fails with incorrect path validation ## Description When trying to create a directory in Databricks Unity Catalog, the function `_create_directory_in_databricks_unity_catalog` fails to properly validate and handle paths. The current implementation has issues with pat...
diff --git a/dspy/clients/databricks.py b/dspy/clients/databricks.py index 427accf..0d4fde8 100644 --- a/dspy/clients/databricks.py +++ b/dspy/clients/databricks.py @@ -271,37 +271,33 @@ def _get_workspace_client() -> "WorkspaceClient": return WorkspaceClient() -def _create_directory_in_databricks_unity_catalo...
["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
54
4
1,975
0
0.6
1
0.75
1
0.509167
81.8025
3,951
swe_smith::train::17894
swe_smith
train
17,894
pyasn1__pyasn1.0f07d724.func_pm_ctrl_invert_if__o4psa6ma
swesmith/pyasn1__pyasn1.0f07d724
pyasn1/pyasn1
python
null
Sequence encoder fails when asn1Spec is None #### Description When encoding sequences with `asn1Spec=None`, the encoder attempts to access `asn1Spec.componentType.namedTypes` which causes an AttributeError since `asn1Spec` is `None`. #### Steps/Code to Reproduce ```python from pyasn1 import type as univ from pyasn1...
diff --git a/pyasn1/codec/ber/encoder.py b/pyasn1/codec/ber/encoder.py index d16fb1f..15c28d5 100644 --- a/pyasn1/codec/ber/encoder.py +++ b/pyasn1/codec/ber/encoder.py @@ -568,6 +568,55 @@ class SequenceEncoder(AbstractItemEncoder): omitEmptyOptionals and 'not ' or '')) if asn1Spec is N...
["tests/codec/ber/test_encoder.py::SequenceEncoderTestCase::testDefMode", "tests/codec/ber/test_encoder.py::SequenceEncoderTestCase::testDefModeChunked", "tests/codec/ber/test_encoder.py::SequenceEncoderTestCase::testIndefMode", "tests/codec/ber/test_encoder.py::SequenceEncoderTestCase::testIndefModeChunked", "tests/co...
["tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLargeTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testLongTag", "tests/codec/ber/test_decoder.py::LargeTagDecoderTestCase::testTagsEquivalence", "tests/codec/ber/test_decoder.py::DecoderCacheTestCase::testCache", "tests/codec/ber/test_d...
jyangballin/swesmith.x86_64.pyasn1_1776_pyasn1.0f07d724
true
null
1
101
130
1,033
0
0.6
1
0.75
1
0.508833
81.8015
3,952
swe_smith::train::52694
swe_smith
train
52,694
pydicom__pydicom.7d361b3d.lm_rewrite__ibxzh00h
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
# Plugin validation fails when no plugins are available ## Describe the bug When trying to use a DICOM transfer syntax that requires plugins, but no plugins are available, the error message is not helpful and doesn't properly indicate what dependencies are missing. ## How to Reproduce ```python from pydicom.pixels ...
diff --git a/src/pydicom/pixels/common.py b/src/pydicom/pixels/common.py index 10a4a93..c83250b 100644 --- a/src/pydicom/pixels/common.py +++ b/src/pydicom/pixels/common.py @@ -198,9 +198,8 @@ class CoderBase: """Return the corresponding *Transfer Syntax UID* as :class:`~pydicom.uid.UID`.""" return se...
["tests/pixels/test_common.py::TestCoderBase::test_validate_plugins", "tests/pixels/test_decoder_base.py::TestDecoder::test_validate_plugins", "tests/pixels/test_encoder_base.py::TestEncodeRunner_Encode::test_specify_invalid_plugin_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
84
3
1,371
0
0.6
1
0.75
1
0.5085
81.8005
3,953
swe_smith::train::10933
swe_smith
train
10,933
paramiko__paramiko.23f92003.lm_rewrite__qil3q08u
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
### Connection Timeout and Port Forwarding Issues in Paramiko #### Description After updating the `Packetizer` class in `paramiko/packet.py`, there seems to be a problem with connection timeouts and port forwarding requests. The issue arises when attempting to establish a connection or execute commands over an SSH se...
diff --git a/paramiko/packet.py b/paramiko/packet.py index f1de4b0..26fa03d 100644 --- a/paramiko/packet.py +++ b/paramiko/packet.py @@ -391,15 +391,49 @@ class Packetizer: line, so it's okay to attempt large reads. """ buf = self.__remainder - while linefeed_byte not in buf: - ...
["tests/auth.py::AuthHandler_::bad_auth_type", "tests/auth.py::AuthHandler_::bad_password", "tests/auth.py::AuthHandler_::multipart_auth", "tests/auth.py::AuthHandler_::interactive_auth", "tests/auth.py::AuthHandler_::interactive_fallback", "tests/auth.py::AuthHandler_::utf8", "tests/auth.py::AuthHandler_::non_utf8", "...
["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
52
131
2,010
0
0.6
1
0.75
1
0.508333
81.8
3,954
swe_smith::train::32804
swe_smith
train
32,804
pydantic__pydantic.acb0f10f.lm_rewrite__oh84m285
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
Color validation error message changed unexpectedly #### Description When validating an invalid color string, the error message has changed from the expected format. The validation still fails correctly, but the error message text is different than what was previously returned. #### Steps/Code to Reproduce ```pytho...
diff --git a/pydantic/color.py b/pydantic/color.py index 9a42d58..6783ee4 100644 --- a/pydantic/color.py +++ b/pydantic/color.py @@ -297,44 +297,65 @@ def parse_str(value: str) -> RGBA: Raises: ValueError: If the input string cannot be parsed to an RGBA tuple. """ - value_lower = value.lower() - ...
["tests/test_color.py::test_model_validation"]
["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
97
1
1,108
0
0.6
1
0.75
1
0.508
81.799
3,955
swe_smith::train::27432
swe_smith
train
27,432
tkrajina__gpxpy.09fc46b3.lm_rewrite__3jea0o5w
swesmith/tkrajina__gpxpy.09fc46b3
tkrajina/gpxpy
python
null
# Bug: fill_time_data_with_regular_intervals doesn't validate start_time before end_time ### Problem I found a bug when using the `fill_time_data_with_regular_intervals` method. When providing a `start_time` that occurs after the `end_time`, the method doesn't raise an exception as expected. ```python import gpxpy i...
diff --git a/gpxpy/gpx.py b/gpxpy/gpx.py index 73e2024..95e20a1 100644 --- a/gpxpy/gpx.py +++ b/gpxpy/gpx.py @@ -2604,7 +2604,10 @@ class GPX: self.add_missing_data(get_data_function=lambda point: point.speed, add_missing_function=_add) - def fill_time_data_with_regular_inte...
["test.py::GPXTests::test_gpx_fill_time_data_raises_when_start_time_after_end_time"]
["test.py::GPXTests::test_10_to_11_conversion", "test.py::GPXTests::test_add_elevation", "test.py::GPXTests::test_add_missing_data_no_intervals", "test.py::GPXTests::test_add_missing_data_one_interval", "test.py::GPXTests::test_add_missing_data_one_interval_and_empty_points_on_start_and_end", "test.py::GPXTests::test_a...
jyangballin/swesmith.x86_64.tkrajina_1776_gpxpy.09fc46b3
true
null
1
91
1
1,228
0
0.6
1
0.75
1
0.508
81.799
3,956
swe_smith::train::28059
swe_smith
train
28,059
jsvine__pdfplumber.02ff4313.lm_rewrite__o7imxxq9
swesmith/jsvine__pdfplumber.02ff4313
jsvine/pdfplumber
python
null
### Issue with `search` Method in `TextMap` Class Hello, I've encountered an issue with the `search` method in the `TextMap` class after a recent update. The problem arises when attempting to extract groups from regex matches. It seems that the `groups` key is not being populated correctly in the results dictionary. ...
diff --git a/pdfplumber/utils/text.py b/pdfplumber/utils/text.py index 8edafa1..ab1e497 100644 --- a/pdfplumber/utils/text.py +++ b/pdfplumber/utils/text.py @@ -142,33 +142,89 @@ class TextMap: else: return "\n".join(lines) - def match_to_dict( - self, - m: Match[str], -...
["tests/test_utils.py::Test::test_search_regex_compiled", "tests/test_utils.py::Test::test_search_regex_uncompiled", "tests/test_utils.py::Test::test_search_string"]
["tests/test_basics.py::Test::test_annots", "tests/test_basics.py::Test::test_annots_cropped", "tests/test_basics.py::Test::test_annots_rotated", "tests/test_basics.py::Test::test_bad_fileobj", "tests/test_basics.py::Test::test_colors", "tests/test_basics.py::Test::test_crop_and_filter", "tests/test_basics.py::Test::te...
jyangballin/swesmith.x86_64.jsvine_1776_pdfplumber.02ff4313
true
null
1
100
3
1,046
0
0.6
1
0.75
1
0.507667
81.798
3,957
swe_smith::train::39614
swe_smith
train
39,614
pallets__jinja.ada0a9a6.lm_rewrite__rn1rxzqr
swesmith/pallets__jinja.ada0a9a6
pallets/jinja
python
null
### Attribute Errors in Template Filters #### Describe the Bug After the recent changes, several template filters are throwing `AttributeError` when attempting to access attributes within the templates. This seems to be affecting various filters that rely on attribute access, such as `map`, `groupby`, and `unique`. ...
diff --git a/src/jinja2/async_utils.py b/src/jinja2/async_utils.py index f0c1402..66e0717 100644 --- a/src/jinja2/async_utils.py +++ b/src/jinja2/async_utils.py @@ -13,46 +13,24 @@ V = t.TypeVar("V") def async_variant(normal_func): # type: ignore - def decorator(async_func): # type: ignore - pass_arg =...
["tests/test_api.py::TestExtendedAPI::test_item_and_attribute", "tests/test_api.py::TestUndefined::test_logging_undefined", "tests/test_api.py::TestUndefined::test_default_undefined", "tests/test_api.py::TestUndefined::test_chainable_undefined", "tests/test_api.py::TestUndefined::test_debug_undefined", "tests/test_api....
["tests/test_api.py::TestExtendedAPI::test_finalize", "tests/test_api.py::TestExtendedAPI::test_finalize_constant_expression", "tests/test_api.py::TestExtendedAPI::test_no_finalize_template_data", "tests/test_api.py::TestExtendedAPI::test_context_finalize", "tests/test_api.py::TestExtendedAPI::test_eval_finalize", "tes...
jyangballin/swesmith.x86_64.pallets_1776_jinja.ada0a9a6
true
null
1
56
86
1,926
0
0.6
1
0.75
1
0.507667
81.798
3,958
swe_smith::train::32706
swe_smith
train
32,706
pydantic__pydantic.acb0f10f.func_pm_remove_cond__rfnjafzv
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# Multiple field types not working in Pydantic v1 ## Description I've encountered an issue with Pydantic v1 where several field types that used to work are now failing. After making some changes to the codebase, I'm seeing errors when trying to use certain field types. For example, when trying to use a model with Js...
diff --git a/pydantic/v1/fields.py b/pydantic/v1/fields.py index 002b60c..4a2a57c 100644 --- a/pydantic/v1/fields.py +++ b/pydantic/v1/fields.py @@ -583,31 +583,12 @@ class ModelField(Representation): if lenient_issubclass(self.type_, JsonWrapper): self.type_ = self.type_.inner_type s...
["tests/test_docs.py::test_docs_examples[docs/migration.md:191-216]"]
["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
65
1
1,741
0
0.6
1
0.75
1
0.506833
81.7955
3,959
swe_smith::train::34410
swe_smith
train
34,410
iterative__dvc.1d6ea681.pr_7680
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
# Run cache push/pull functionality broken after recent changes ## Description After recent changes to the `StageCache` class, the run cache push and pull functionality is broken. When trying to use run cache with remote storage, the following error occurs: ``` NameError: name 'fs' is not defined ``` This appears t...
diff --git a/dvc/stage/cache.py b/dvc/stage/cache.py index f97b471..3d24647 100644 --- a/dvc/stage/cache.py +++ b/dvc/stage/cache.py @@ -4,14 +4,13 @@ from typing import TYPE_CHECKING, Optional from funcy import first -from dvc import fs from dvc.config import RemoteConfigError from dvc.exceptions import Collect...
["tests/unit/stage/test_cache.py::test_stage_cache", "tests/unit/stage/test_cache.py::test_stage_cache_params", "tests/unit/stage/test_cache.py::test_stage_cache_wdir", "tests/unit/stage/test_cache.py::test_shared_stage_cache"]
["tests/unit/stage/test_cache.py::test_unhashable[kwargs0]", "tests/unit/stage/test_cache.py::test_unhashable[kwargs1]", "tests/unit/stage/test_cache.py::test_unhashable[kwargs2]", "tests/unit/stage/test_cache.py::test_unhashable[kwargs3]", "tests/unit/stage/test_cache.py::test_unhashable[kwargs4]"]
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
1
90
4
1,238
0
0.6
1
0.75
1
0.506333
81.794
3,960
swe_smith::train::38174
swe_smith
train
38,174
john-kurkowski__tldextract.3d1bf184.combine_file__fd95xxid
swesmith/john-kurkowski__tldextract.3d1bf184
john-kurkowski/tldextract
python
null
# DiskCache fails to handle FileNotFoundError correctly when clearing cache I encountered an issue with the `DiskCache` class when trying to clear the cache in a multi-process environment. ## Reproduction When multiple processes try to access and update the cache simultaneously, the following error occurs: ```pytho...
diff --git a/tldextract/cache.py b/tldextract/cache.py index 83a87f0..5ad9f6d 100644 --- a/tldextract/cache.py +++ b/tldextract/cache.py @@ -143,11 +143,9 @@ class DiskCache: try: os.unlink(str(Path(root, filename))) except FileNotFoundError: - ...
["tests/main_test.py::test_cache_permission", "tests/main_test.py::test_find_first_response_without_session", "tests/main_test.py::test_find_first_response_with_session", "tests/test_parallel.py::test_cache_cleared_by_other_process"]
["tests/cli_test.py::test_cli_no_input", "tests/cli_test.py::test_cli_parses_args", "tests/cli_test.py::test_cli_posargs", "tests/cli_test.py::test_cli_namedargs", "tests/cli_test.py::test_cli_json_output", "tests/custom_suffix_test.py::test_private_extraction", "tests/custom_suffix_test.py::test_suffix_which_is_not_in...
jyangballin/swesmith.x86_64.john-kurkowski_1776_tldextract.3d1bf184
true
null
1
70
4
1,634
0
0.6
1
0.75
1
0.505667
81.792
3,961
swe_smith::train::24395
swe_smith
train
24,395
sunpy__sunpy.f8edfd5c.lm_rewrite__cvux4a13
swesmith/sunpy__sunpy.f8edfd5c
sunpy/sunpy
python
null
### Issue: AttributeError in Helioprojective Coordinate Conversion #### Description After the recent changes in the `Helioprojective` frame conversion logic, an `AttributeError` is raised when attempting to convert 2D helioprojective coordinates to 3D. The error message indicates that the `Latitude` instance lacks a ...
diff --git a/sunpy/coordinates/frames.py b/sunpy/coordinates/frames.py index 8e1efd5..c50e651 100644 --- a/sunpy/coordinates/frames.py +++ b/sunpy/coordinates/frames.py @@ -541,54 +541,44 @@ class Helioprojective(SunPyBaseCoordinateFrame): A new frame instance with all the attributes of the original but ...
["sunpy/coordinates/tests/test_frames.py::test_hpc_distance", "sunpy/coordinates/tests/test_frames.py::test_hpc_distance_off_limb", "sunpy/coordinates/tests/test_frames.py::test_hpc_low_precision_float_warning", "sunpy/coordinates/tests/test_frames.py::test_hpc_is_visible_tolerance", "sunpy/coordinates/tests/test_frame...
["sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args0-None]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args1-kwargs1]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args2-None]", "sunpy/coordinates/tests/test_frames.py::test_create_hpc_2d[args3-kwargs3]", "sunpy/coordinate...
jyangballin/swesmith.x86_64.sunpy_1776_sunpy.f8edfd5c
true
null
1
80
24
1,432
0
0.6
1
0.75
1
0.505333
81.791
3,962
swe_smith::train::52693
swe_smith
train
52,693
pydicom__pydicom.7d361b3d.lm_rewrite__h8wxeu28
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
# Dataset.update_raw_element() error message mismatch ## Description The `update_raw_element()` method in the `Dataset` class has inconsistent error messages compared to the expected behavior. When trying to update a raw element, the error messages don't match what's expected. ## To Reproduce ```python from pydicom...
diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py index e7abffd..a59020d 100644 --- a/src/pydicom/dataset.py +++ b/src/pydicom/dataset.py @@ -3255,9 +3255,8 @@ class Dataset: ) ) - def update_raw_element( - self, tag: TagType, *, vr: str | None = None, value: bytes | None = ...
["tests/test_dataset.py::TestDataset::test_update_raw"]
["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
57
1
1,889
0
0.6
1
0.75
1
0.504833
81.7895
3,963
swe_smith::train::43729
swe_smith
train
43,729
sloria__environs.73c372df.lm_rewrite__g0zaf5jy
swesmith/sloria__environs.73c372df
sloria/environs
python
null
The `read_env` function is not behaving as expected when handling `.env` files. ### Steps to Reproduce 1. Ensure that the environment variable `CUSTOM_STRING` is not set: ```python if 'CUSTOM_STRING' in os.environ: os.environ.pop('CUSTOM_STRING') ``` 2. Attempt to read a non-existent `.env` file: ...
diff --git a/src/environs/__init__.py b/src/environs/__init__.py index 00f6072..8f1a9cb 100644 --- a/src/environs/__init__.py +++ b/src/environs/__init__.py @@ -487,13 +487,9 @@ class Env: return f"<{self.__class__.__name__}(eager={self.eager}, expand_vars={self.expand_vars})>" # noqa: E501 @staticmeth...
["tests/test_environs.py::TestEnvFileReading::test_read_env_returns_false_if_file_not_found", "tests/test_environs.py::TestEnvFileReading::test_read_env_recurse", "tests/test_environs.py::TestEnvFileReading::test_read_env_non_recurse", "tests/test_environs.py::TestEnvFileReading::test_read_env_recurse_from_subfolder", ...
["tests/test_environs.py::TestCasting::test_call", "tests/test_environs.py::TestCasting::test_call_with_default", "tests/test_environs.py::TestCasting::test_basic", "tests/test_environs.py::TestCasting::test_empty_str", "tests/test_environs.py::TestCasting::test_int_cast", "tests/test_environs.py::TestCasting::test_inv...
jyangballin/swesmith.x86_64.sloria_1776_environs.73c372df
true
null
1
77
7
1,482
0
0.6
1
0.75
1
0.503667
81.786
3,964
swe_smith::train::45423
swe_smith
train
45,423
dask__dask.5f61e423.lm_rewrite__j0q7otqa
swesmith/dask__dask.5f61e423
dask/dask
python
null
[Bug]: apply_over_axes fails with integer axis and doesn't maintain correct dimensions ### Bug summary When using `apply_over_axes` with a single integer axis instead of a tuple, it fails with a TypeError. Additionally, when using multiple axes, the function doesn't maintain the correct dimensions in the output array...
diff --git a/dask/array/routines.py b/dask/array/routines.py index dc30e91..e628adb 100644 --- a/dask/array/routines.py +++ b/dask/array/routines.py @@ -539,34 +539,49 @@ def apply_along_axis(func1d, axis, arr, *args, dtype=None, shape=None, **kwargs) return result +@derived_from(np) @derived_from(np) def ap...
["dask/array/tests/test_routines.py::test_apply_over_axes[shape1-0-sum0-<lambda>]", "dask/array/tests/test_routines.py::test_apply_over_axes[shape1-0-sum1-<lambda>]", "dask/array/tests/test_routines.py::test_apply_over_axes[shape1-0-range-<lambda>]", "dask/array/tests/test_routines.py::test_apply_over_axes[shape3-axes3...
["dask/array/tests/test_routines.py::test_array", "dask/array/tests/test_routines.py::test_array_return_type", "dask/array/tests/test_routines.py::test_derived_docstrings", "dask/array/tests/test_routines.py::test_atleast_nd_no_args[atleast_1d]", "dask/array/tests/test_routines.py::test_atleast_nd_no_args[atleast_2d]",...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
57
4
1,875
0
0.6
1
0.75
1
0.5025
81.7825
3,965
swe_smith::train::2583
swe_smith
train
2,583
pdfminer__pdfminer.six.1a8bd2f7.lm_rewrite__15ywjori
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
### Unexpected Behavior with PDF Encryption and Color Space Handling #### What happened? After applying the recent changes, I encountered unexpected behavior when processing certain PDF files. Specifically, there are issues with handling encryption and color spaces that were not present before. #### What did you exp...
diff --git a/pdfminer/pdfdocument.py b/pdfminer/pdfdocument.py index 1c06335..d409ac7 100644 --- a/pdfminer/pdfdocument.py +++ b/pdfminer/pdfdocument.py @@ -388,25 +388,38 @@ class PDFStandardSecurityHandler: result += result # 6 return result - def compute_encryption_key(self, password:...
["tests/test_converter.py::TestColorSpace::test_do_rg", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_625_identity_cmap", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_contrib_issue_350", "tests/test_tools_pdf2txt.py::TestPdf2Txt::test_contrib_hash_two_complement", "tests/test_tools_pdf2txt.py::Te...
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
47
6
2,069
0
0.6
1
0.75
1
0.5015
81.7795
3,966
swe_smith::train::32792
swe_smith
train
32,792
pydantic__pydantic.acb0f10f.lm_rewrite__j13l7a9m
swesmith/pydantic__pydantic.acb0f10f
pydantic/pydantic
python
null
# DefaultDict with nested DefaultDict fails with schema generation error I'm trying to use nested defaultdicts in my Pydantic model, but I'm getting an error when trying to create a model with a defaultdict that contains another defaultdict as its value type. ## Description When I define a model with a field that is...
diff --git a/pydantic/_internal/_validators.py b/pydantic/_internal/_validators.py index 8261c98..eca7127 100644 --- a/pydantic/_internal/_validators.py +++ b/pydantic/_internal/_validators.py @@ -428,46 +428,27 @@ def get_defaultdict_default_default_factory(values_source_type: Any) -> Callable FieldInfo = import_...
["tests/test_types.py::test_defaultdict_unknown_default_factory", "tests/test_types.py::test_defaultdict_infer_default_factory"]
["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
61
2
1,788
0
0.6
1
0.75
1
0.501333
81.779
3,967
swe_smith::train::5651
swe_smith
train
5,651
PyCQA__flake8.cf1542ce.lm_rewrite__vjshqvso
swesmith/PyCQA__flake8.cf1542ce
pycqa/flake8
python
null
## Issue with Configuration Parsing in Flake8 ### Description It seems there's an issue with how Flake8 is handling configuration parsing after recent changes. The problem arises when trying to merge command-line arguments with configuration file options, leading to unexpected behavior. ### Steps to Reproduce 1. Cr...
diff --git a/src/flake8/options/aggregator.py b/src/flake8/options/aggregator.py index af8e744..bf687de 100644 --- a/src/flake8/options/aggregator.py +++ b/src/flake8/options/aggregator.py @@ -16,41 +16,33 @@ from flake8.options.manager import OptionManager LOG = logging.getLogger(__name__) -def aggregate_options(...
["tests/integration/test_aggregator.py::test_aggregate_options_with_config", "tests/integration/test_aggregator.py::test_aggregate_options_when_isolated", "tests/integration/test_api_legacy.py::test_legacy_api", "tests/integration/test_main.py::test_form_feed_line_split", "tests/integration/test_main.py::test_e101_inde...
["tests/integration/test_checker.py::test_handle_file_plugins[PluginClass]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_gen]", "tests/integration/test_checker.py::test_handle_file_plugins[plugin_func_list]", "tests/integration/test_checker.py::test_line_check_results[plugin_func_physical_r...
jyangballin/swesmith.x86_64.pycqa_1776_flake8.cf1542ce
true
null
1
66
30
1,688
0
0.6
1
0.75
1
0.501333
81.779
3,968
swe_smith::train::20441
swe_smith
train
20,441
tobymao__sqlglot.036601ba.combine_module__obi0nfcu
swesmith/tobymao__sqlglot.036601ba
tobymao/sqlglot
python
null
UnboundLocalError in optimizer after removing key assignment logic #### Description After recent changes to the optimizer, several functions are throwing `UnboundLocalError: local variable 'key' referenced before assignment` when processing subqueries. The error occurs in the `decorrelate` function in `unnest_subquer...
diff --git a/sqlglot/optimizer/normalize.py b/sqlglot/optimizer/normalize.py index 610833d..fba38c1 100644 --- a/sqlglot/optimizer/normalize.py +++ b/sqlglot/optimizer/normalize.py @@ -44,23 +44,11 @@ def normalize(expression: exp.Expression, dnf: bool = False, max_distance: int = ) re...
["tests/test_optimizer.py::TestOptimizer::test_normalize", "tests/test_optimizer.py::TestOptimizer::test_optimize", "tests/test_optimizer.py::TestOptimizer::test_tpcds", "tests/test_optimizer.py::TestOptimizer::test_tpch", "tests/test_optimizer.py::TestOptimizer::test_unnest_subqueries"]
["tests/test_optimizer.py::TestOptimizer::test_aggfunc_annotation", "tests/test_optimizer.py::TestOptimizer::test_annotate_funcs", "tests/test_optimizer.py::TestOptimizer::test_annotate_types", "tests/test_optimizer.py::TestOptimizer::test_binary_annotation", "tests/test_optimizer.py::TestOptimizer::test_bracket_annota...
jyangballin/swesmith.x86_64.tobymao_1776_sqlglot.036601ba
true
null
2
93
5
1,148
0
0.6
1
0.75
1
0.501333
81.779
3,969
swe_smith::train::42827
swe_smith
train
42,827
python-jsonschema__jsonschema.93e0caa5.lm_rewrite__fqr37t4e
swesmith/python-jsonschema__jsonschema.93e0caa5
python-jsonschema/jsonschema
python
null
# Deprecated attributes in jsonschema.validators no longer emit warnings ## Description After updating the code, I noticed that accessing deprecated attributes in the `jsonschema.validators` module no longer emits the expected deprecation warnings. This affects several deprecated attributes: - `jsonschema.validators...
diff --git a/jsonschema/validators.py b/jsonschema/validators.py index b8ca3bd..17f5762 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -42,40 +42,16 @@ _META_SCHEMAS = _utils.URIDict() def __getattr__(name): - if name == "ErrorTree": - warnings.warn( - "Importing Error...
["jsonschema/tests/test_deprecations.py::TestDeprecations::test_RefResolver", "jsonschema/tests/test_deprecations.py::TestDeprecations::test_validators_ErrorTree", "jsonschema/tests/test_deprecations.py::TestDeprecations::test_validators_meta_schemas", "jsonschema/tests/test_deprecations.py::TestDeprecations::test_vali...
["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
44
4
2,127
0
0.6
1
0.75
1
0.501167
81.7785
3,970
swe_smith::train::8348
swe_smith
train
8,348
cantools__cantools.0c6a7871.pr_701
swesmith/cantools__cantools.0c6a7871
cantools/cantools
python
null
**Unexpected Behavior in ARXML Parsing** **Describe the bug** It seems there's an issue with parsing certain numeric values in ARXML files. When attempting to load ARXML files, the parser throws an error for specific numeric literals. This is causing problems when trying to interpret values that are formatted in scien...
diff --git a/src/cantools/database/can/formats/arxml/utils.py b/src/cantools/database/can/formats/arxml/utils.py index d5236ed..26feed6 100644 --- a/src/cantools/database/can/formats/arxml/utils.py +++ b/src/cantools/database/can/formats/arxml/utils.py @@ -2,7 +2,7 @@ from typing import Union -def parse_number_str...
["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
80
10
1,402
0
0.6
1
0.75
1
0.500333
81.776
3,971
swe_smith::train::51939
swe_smith
train
51,939
pydicom__pydicom.7d361b3d.func_basic__e7vgvq3u
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Pixel data conversion fails when handlers have dependencies available #### Description When trying to access pixel data on DICOM files, the pixel data conversion logic incorrectly filters handlers that have their dependencies available instead of those that don't. This causes the conversion to fail even when proper h...
diff --git a/src/pydicom/dataset.py b/src/pydicom/dataset.py index e7abffd..4a1ab61 100644 --- a/src/pydicom/dataset.py +++ b/src/pydicom/dataset.py @@ -1790,8 +1790,6 @@ class Dataset: """Convert the pixel data using the first matching handler. See :meth:`~Dataset.convert_pixel_data` for more informa...
["tests/test_JPEG_LS_transfer_syntax.py::Test_JPEG_LS_Lossless_transfer_syntax::test_read_mr_without_any_handler", "tests/test_JPEG_LS_transfer_syntax.py::Test_JPEG_LS_Lossless_transfer_syntax::test_read_emri_without_any_handler", "tests/test_dataset.py::TestDataset::test_pixel_array_id_changed", "tests/test_gdcm_pixel...
["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
84
24
1,321
0
0.6
1
0.75
1
0.500167
81.7755
3,972
swe_smith::train::865
swe_smith
train
865
oauthlib__oauthlib.1fd52536.lm_rewrite__9utcevf4
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth1 Client fails to validate body parameters correctly Description Hello, I've encountered an issue with the OAuth1 Client class in the rfc5849 module. The client is not properly validating body parameters in certain scenarios. How to reproduce: 1. Create a client with signature_type set to SIGNATURE_TYPE_BODY:...
diff --git a/oauthlib/oauth1/rfc5849/__init__.py b/oauthlib/oauth1/rfc5849/__init__.py index 85e0b90..adce061 100644 --- a/oauthlib/oauth1/rfc5849/__init__.py +++ b/oauthlib/oauth1/rfc5849/__init__.py @@ -291,76 +291,31 @@ class Client: scheme supplied to the Client constructor, default utf-8. This includes ...
["tests/oauth1/rfc5849/test_client.py::SignatureTypeTest::test_params_in_body", "tests/oauth1/rfc5849/test_client.py::SigningTest::test_sign_no_body"]
["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
83
2
1,340
0
0.6
1
0.75
1
0.5
81.775
3,973
swe_bench::test::1786
swe_bench
test
1,786
sphinx-doc__sphinx-7760
sphinx-doc/sphinx
sphinx-doc/sphinx
python
34f35793302571811dc0a38b4b648dff28bc31f6
coverage ext - config to print missing coverage as warning **Is your feature request related to a problem? Please describe.** I run CI tests with tox and want to test my docs also. I created the following tox env but the problem is that the `docs-test-coverage` env does not fail on missing coverage. ```ini [testenv:do...
I am currently experimenting on a fork with my feature request. I added two conf vars: - `coverage_print_missing_c_items` - `coverage_print_missing_py_items` They default to `False` and when they are set to `True` in `conf.py` the `coverage` builder prints to console. For the output I took the `linkcheck` build...
diff --git a/sphinx/ext/coverage.py b/sphinx/ext/coverage.py --- a/sphinx/ext/coverage.py +++ b/sphinx/ext/coverage.py @@ -22,6 +22,7 @@ from sphinx.builders import Builder from sphinx.locale import __ from sphinx.util import logging +from sphinx.util.console import red # type: ignore from sphinx.util.inspect impo...
diff --git a/tests/test_ext_coverage.py b/tests/test_ext_coverage.py --- a/tests/test_ext_coverage.py +++ b/tests/test_ext_coverage.py @@ -28,6 +28,8 @@ def test_build(app, status, warning): assert ' * mod -- No module named mod' # in the "failed import" section + assert "undocumented py" not in status.ge...
["tests/test_ext_coverage.py::test_show_missing_items", "tests/test_ext_coverage.py::test_show_missing_items_quiet"]
["tests/test_ext_coverage.py::test_build", "tests/test_ext_coverage.py::test_coverage_ignore_pyobjects"]
null
true
2020-05-31T10:59:11Z
1
48
2
1,838
0
0.8
1
0.55
1
0.466333
81.774
3,974
swe_smith::train::51794
swe_smith
train
51,794
pydicom__pydicom.7d361b3d.func_basic__6qj5s9o1
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
get_frame function returns incorrect frames when using extended offset table #### Description When using the `get_frame` function with extended offset tables, frames are being returned incorrectly due to improper buffer positioning. The function appears to be seeking to wrong positions and using incorrect comparison ...
diff --git a/src/pydicom/encaps.py b/src/pydicom/encaps.py index 3493808..c61f814 100644 --- a/src/pydicom/encaps.py +++ b/src/pydicom/encaps.py @@ -453,63 +453,13 @@ def get_frame( number_of_frames: int | None = None, endianness: str = "<", ) -> bytes: - """Return the specified frame at `index`. - - ....
["tests/pixels/test_utils.py::TestGetJpgParameters::test_jpg_app", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jpg_component_ids", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jls_ilv0", "tests/pixels/test_utils.py::TestGetJpgParameters::test_jls_ilv1", "tests/pixels/test_utils.py::TestGetJpgPara...
["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
81
14
1,378
0
0.6
1
0.75
1
0.499667
81.774
3,975
swe_smith::train::10074
swe_smith
train
10,074
paramiko__paramiko.23f92003.combine_file__84d3kors
swesmith/paramiko__paramiko.23f92003
paramiko/paramiko
python
null
SSH connections failing with "Session already active and initialized" error #### Description After a recent update, SSH connections are consistently failing with an SSHException stating "Session already active and initialized". This appears to be happening during the authentication phase when trying to establish a co...
diff --git a/paramiko/transport.py b/paramiko/transport.py index f0fcb97..de7b7ad 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -2104,7 +2104,7 @@ class Transport(threading.Thread, ClosingContextManager): def _sanitize_packet_size(self, max_packet_size): if max_packet_size is None: ...
["tests/auth.py::AuthOnlyHandler_::fallback_pubkey_algorithm::key_type_algo_selected_when_no_server_sig_algs", "tests/auth.py::AuthOnlyHandler_::fallback_pubkey_algorithm::key_type_algo_selection_is_cert_suffix_aware", "tests/auth.py::AuthOnlyHandler_::fallback_pubkey_algorithm::uses_first_preferred_algo_if_key_type_no...
["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
80
59
1,397
0
0.6
1
0.75
1
0.4995
81.7735
3,976
swe_smith::train::1696
swe_smith
train
1,696
agronholm__typeguard.b6a7e438.combine_module__4gos0hbz
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
Import hook breaks function instrumentation #### Description When using the import hook, functions are not being properly instrumented for type checking. The instrumentation appears to be completely broken, causing functions that should be type-checked to not have any type checking applied. #### Steps/Code to Reprod...
diff --git a/src/typeguard/_importhook.py b/src/typeguard/_importhook.py index 0d1c627..368f1df 100644 --- a/src/typeguard/_importhook.py +++ b/src/typeguard/_importhook.py @@ -119,13 +119,13 @@ class TypeguardFinder(MetaPathFinder): path: Sequence[str] | None, target: types.ModuleType | None = None, ...
["tests/test_importhook.py::test_blanket_import", "tests/test_importhook.py::test_debug_instrumentation", "tests/test_pytest_plugin.py::test_config_options", "tests/test_pytest_plugin.py::test_commandline_options", "tests/test_suppression.py::test_contextmanager_typechecked", "tests/test_suppression.py::test_decorator_...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
2
93
130
1,134
0
0.6
1
0.75
1
0.499
81.772
3,977
swe_smith::train::36103
swe_smith
train
36,103
stanfordnlp__dspy.651a4c71.pr_8161
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Retry policy not correctly applied when using LM client ## Description I've discovered an issue with the retry mechanism in the `dspy.LM` client. When setting `num_retries` parameter, it doesn't correctly propagate to the underlying LiteLLM calls. ## Steps to reproduce Here's a minimal example that demonstrates t...
diff --git a/dspy/clients/lm.py b/dspy/clients/lm.py index 0025031..7743f3c 100644 --- a/dspy/clients/lm.py +++ b/dspy/clients/lm.py @@ -5,6 +5,7 @@ import threading from typing import Any, Dict, List, Literal, Optional, cast import litellm +from litellm import RetryPolicy from anyio.streams.memory import MemoryOb...
["tests/clients/test_lm.py::test_retry_number_set_correctly"]
["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
65
1
1,693
0
0.6
1
0.75
1
0.498833
81.7715
3,978
swe_smith::train::49411
swe_smith
train
49,411
mozilla__bleach.73871d76.func_pm_class_shuffle_funcs__kpe12yqr
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
HTML parser fails with NameError when processing select elements #### Description When parsing HTML containing `<select>` elements, the parser throws a `NameError` for undefined functions like `startTagOption`, `startTagOptgroup`, etc. This appears to be related to method references being used before they are defined...
diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py index 5427b7d..3a08935 100644 --- a/bleach/_vendor/html5lib/html5parser.py +++ b/bleach/_vendor/html5lib/html5parser.py @@ -2287,35 +2287,59 @@ def getPhases(debug): class InSelectPhase(Phase): __slots__ = tuple()...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
97
185
1,052
0
0.6
1
0.75
1
0.498667
81.771
3,979
swe_smith::train::50768
swe_smith
train
50,768
python-hyper__h11.bed0dd4a.combine_file__5bgrd1b4
swesmith/python-hyper__h11.bed0dd4a
python-hyper/h11
python
null
# HTTP/1.1 Connection State Management Issues I've encountered some serious issues with the h11 library's connection state management. The library seems to be incorrectly handling state transitions and data processing, causing HTTP connections to fail in various ways. ## Problem Description When using the h11 librar...
diff --git a/h11/_connection.py b/h11/_connection.py index e37d82a..94c8673 100644 --- a/h11/_connection.py +++ b/h11/_connection.py @@ -212,14 +212,14 @@ class Connection: See :ref:`state-machine` for details. """ - return dict(self._cstate.states) + return dict(reversed(self._cstate....
["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_events.py::test_events", "h11/tests/test_events.py::test_intenum_status_code", "h11/tests/test_events.py::test_header_casing", "h11/tests/test_headers.py::test_normalize_and_validate", "h11/tests/test_...
jyangballin/swesmith.x86_64.python-hyper_1776_h11.bed0dd4a
true
null
1
28
30
2,430
0
0.6
1
0.75
1
0.498333
81.77
3,980
swe_smith::train::44536
swe_smith
train
44,536
pydata__patsy.a5d16484.lm_rewrite__su07vm9u
swesmith/pydata__patsy.a5d16484
pydata/patsy
python
null
CubicRegressionSpline Memorize Finish Error Description It seems there's an issue with the `CubicRegressionSpline` class when calling the `memorize_finish` method. If you attempt to use this method without specifying either 'df' or 'knots', it raises a `ValueError`. This is expected behavior, but the error message mi...
diff --git a/patsy/mgcv_cubic_splines.py b/patsy/mgcv_cubic_splines.py index 5f93680..39cda51 100644 --- a/patsy/mgcv_cubic_splines.py +++ b/patsy/mgcv_cubic_splines.py @@ -630,65 +630,73 @@ class CubicRegressionSpline(object): self._tmp.setdefault("xs", []).append(x) def memorize_finish(self): - ...
["patsy/mgcv_cubic_splines.py::test_crs_errors", "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_1smooth", "patsy/mgcv_cubic_splines.py::test_te_2smooths", "patsy/mgcv_cubic_splines.py::test_te_3smooths"]
["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
100
6
985
0
0.6
1
0.75
1
0.4975
81.7675
3,981
swe_smith::train::35970
swe_smith
train
35,970
stanfordnlp__dspy.651a4c71.pr_1502
swesmith/stanfordnlp__dspy.651a4c71
stanfordnlp/dspy
python
null
# Bug in BootstrapFewShotWithRandomSearch when using unshuffled few-shot ## Description When using the `BootstrapFewShotWithRandomSearch` teleprompter with the unshuffled few-shot option (seed = -1), the code attempts to call `program.compile()` instead of using a properly initialized `BootstrapFewShot` optimizer. T...
diff --git a/dspy/teleprompt/random_search.py b/dspy/teleprompt/random_search.py index caba147..ec4bca6 100644 --- a/dspy/teleprompt/random_search.py +++ b/dspy/teleprompt/random_search.py @@ -48,10 +48,16 @@ class BootstrapFewShotWithRandomSearch(Teleprompter): self.max_num_samples = max_bootstrapped_demos ...
["tests/teleprompt/test_random_search.py::test_basic_workflow"]
["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
75
1
1,484
0
0.6
1
0.75
1
0.497333
81.767
3,982
swe_smith::train::2377
swe_smith
train
2,377
pdfminer__pdfminer.six.1a8bd2f7.func_pm_class_rm_funcs__8zsgf76l
swesmith/pdfminer__pdfminer.six.1a8bd2f7
pdfminer/pdfminer.six
python
null
TrueTypeFont.create_unicode_map method missing after refactoring #### Description After a recent change, the `create_unicode_map` method has been removed from the `TrueTypeFont` class, causing failures when processing certain PDF files that rely on TrueType font unicode mapping. #### Steps/Code to Reproduce ```pyth...
diff --git a/pdfminer/pdffont.py b/pdfminer/pdffont.py index e1df40c..eba8183 100644 --- a/pdfminer/pdffont.py +++ b/pdfminer/pdffont.py @@ -739,106 +739,6 @@ class TrueTypeFont: # possible, so continue. pass - def create_unicode_map(self) -> FileUnicodeMap: - if b"cmap" not in sel...
["tests/test_highlevel_extracttext.py::TestExtractText::test_issue_566_cmap_bytes", "tests/test_highlevel_extracttext.py::TestExtractText::test_issue_791_non_unicode_cmap"]
["tests/test_converter.py::TestPaintPath::test_paint_path", "tests/test_converter.py::TestPaintPath::test_paint_path_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_multiple_mlllh", "tests/test_converter.py::TestPaintPath::test_paint_path_quadrilaterals", "tests/test_converter.py::TestPaintPath::test_p...
jyangballin/swesmith.x86_64.pdfminer_1776_pdfminer.six.1a8bd2f7
true
null
1
100
2
981
0
0.6
1
0.75
1
0.496833
81.7655
3,983
swe_smith::train::45429
swe_smith
train
45,429
dask__dask.5f61e423.lm_rewrite__maidizb2
swesmith/dask__dask.5f61e423
dask/dask
python
null
### Bug Description The recent changes to the `AssignPartitioningIndex` operation in the Dask DataFrame shuffle process seem to have introduced an issue. When attempting to shuffle dataframes using certain configurations, the operation fails to generate metadata, resulting in runtime errors. This behavior is unexpecte...
diff --git a/dask/dataframe/dask_expr/_shuffle.py b/dask/dataframe/dask_expr/_shuffle.py index 271f52a..c8b0163 100644 --- a/dask/dataframe/dask_expr/_shuffle.py +++ b/dask/dataframe/dask_expr/_shuffle.py @@ -735,37 +735,42 @@ class AssignPartitioningIndex(Blockwise): _preserves_partitioning_information = True ...
["dask/dataframe/tests/test_shuffle.py::test_shuffle[disk]", "dask/dataframe/tests/test_shuffle.py::test_shuffle[tasks]", "dask/dataframe/tests/test_shuffle.py::test_shuffle_npartitions[disk]", "dask/dataframe/tests/test_shuffle.py::test_shuffle_npartitions[tasks]", "dask/dataframe/tests/test_shuffle.py::test_shuffle_n...
["dask/dataframe/tests/test_shuffle.py::test_default_partitions", "dask/dataframe/tests/test_shuffle.py::test_shuffle_from_one_partition_to_one_other[disk]", "dask/dataframe/tests/test_shuffle.py::test_shuffle_from_one_partition_to_one_other[tasks]", "dask/dataframe/tests/test_shuffle.py::test_partitioning_index", "das...
jyangballin/swesmith.x86_64.dask_1776_dask.5f61e423
true
null
1
63
63
1,721
0
0.6
1
0.75
1
0.496833
81.7655
3,984
swe_smith::train::52711
swe_smith
train
52,711
pydicom__pydicom.7d361b3d.lm_rewrite__onjbg888
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
### Issue: Incorrect Handling of Option Types in RunnerBase #### Description It seems there is an issue with how certain options are being handled in the `RunnerBase` class, particularly when setting options that should be integers or specific types. The problem arises when setting options like `number_of_frames` and...
diff --git a/src/pydicom/pixels/common.py b/src/pydicom/pixels/common.py index 10a4a93..318f016 100644 --- a/src/pydicom/pixels/common.py +++ b/src/pydicom/pixels/common.py @@ -517,24 +517,29 @@ class RunnerBase: value : Any The value of the option. """ - if name == "number_of_fram...
["tests/pixels/test_common.py::TestRunnerBase::test_option_properties", "tests/pixels/test_common.py::TestRunnerBase::test_set_number_of_frames", "tests/pixels/test_common.py::TestRunnerBase::test_set_photometric_interpretation"]
["tests/pixels/test_common.py::TestRunnerBase::test_init", "tests/pixels/test_common.py::TestRunnerBase::test_del_option", "tests/pixels/test_common.py::TestRunnerBase::test_planar_configuration", "tests/pixels/test_common.py::TestRunnerBase::test_options", "tests/pixels/test_common.py::TestRunnerBase::test_validate_op...
jyangballin/swesmith.x86_64.pydicom_1776_pydicom.7d361b3d
true
null
1
39
3
2,195
0
0.6
1
0.75
1
0.495833
81.7625
3,985
swe_smith::train::49412
swe_smith
train
49,412
mozilla__bleach.73871d76.func_pm_class_shuffle_funcs__q0y873rx
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
NameError in html5parser after method reordering #### Description After a recent change to the `InHeadPhase` class in `bleach/_vendor/html5lib/html5parser.py`, many functions are throwing `NameError` exceptions because method references in the `MethodDispatcher` are being defined before the actual methods they refere...
diff --git a/bleach/_vendor/html5lib/html5parser.py b/bleach/_vendor/html5lib/html5parser.py index 5427b7d..1eb401b 100644 --- a/bleach/_vendor/html5lib/html5parser.py +++ b/bleach/_vendor/html5lib/html5parser.py @@ -710,26 +710,45 @@ def getPhases(debug): class InHeadPhase(Phase): __slots__ = tuple() +...
["tests/test_clean.py::test_clean_idempotent[text<em>]", "tests/test_clean.py::test_clean_idempotent_img", "tests/test_clean.py::test_only_text_is_cleaned", "tests/test_clean.py::test_empty", "tests/test_clean.py::test_content_has_no_html", "tests/test_clean.py::test_html_is_lowercased", "tests/test_clean.py::test_comm...
["tests/test_callbacks.py::TestNofollowCallback::test_blank", "tests/test_callbacks.py::TestNofollowCallback::test_no_href", "tests/test_callbacks.py::TestNofollowCallback::test_basic", "tests/test_callbacks.py::TestNofollowCallback::test_mailto", "tests/test_callbacks.py::TestNofollowCallback::test_has_nofollow_alread...
jyangballin/swesmith.x86_64.mozilla_1776_bleach.73871d76
true
null
1
93
185
1,109
0
0.6
1
0.75
1
0.494833
81.7595
3,986
swe_smith::train::34141
swe_smith
train
34,141
iterative__dvc.1d6ea681.combine_module__j1x0u1rh
swesmith/iterative__dvc.1d6ea681
iterative/dvc
python
null
Context methods missing after refactoring #### Description After a recent refactoring, several key methods are missing from the Context class, causing AttributeError when trying to use basic functionality like `select()`, `merge_update()`, and `__repr__()`. #### Steps/Code to Reproduce ```python from dvc.parsing.co...
diff --git a/dvc/parsing/context.py b/dvc/parsing/context.py index af8d1b3..49d923d 100644 --- a/dvc/parsing/context.py +++ b/dvc/parsing/context.py @@ -182,9 +182,6 @@ class Container(Node, ABC): msg = f"Unsupported value of type '{type(value).__name__}' in '{meta}'" raise TypeError(msg) - def _...
["tests/unit/test_context.py::test_repr", "tests/unit/test_context.py::test_select", "tests/unit/test_context.py::test_select_unwrap", "tests/unit/test_context.py::test_merge_dict", "tests/unit/test_context.py::test_merge_list", "tests/unit/test_context.py::test_clone", "tests/unit/test_context.py::test_track", "tests/...
["tests/unit/test_context.py::test_context", "tests/unit/test_context.py::test_context_dict_ignores_keys_except_str", "tests/unit/test_context.py::test_context_list", "tests/unit/test_context.py::test_context_setitem_getitem", "tests/unit/test_context.py::test_loop_context", "tests/unit/test_context.py::test_overwrite_...
jyangballin/swesmith.x86_64.iterative_1776_dvc.1d6ea681
true
null
2
76
27
1,449
0
0.6
1
0.75
1
0.494833
81.7595
3,987
swe_smith::train::33285
swe_smith
train
33,285
django-money__django-money.835c1ab8.lm_rewrite__mrmk0mjz
swesmith/django-money__django-money.835c1ab8
django-money/django-money
python
null
# Setting currency to None in MoneyFieldProxy.__set__ causes multiple issues ### Current problem When setting a Money field value, the `__set__` method in `MoneyFieldProxy` has been rewritten and now has several issues: 1. It doesn't properly handle nullable currency fields when setting non-Money values 2. It fails ...
diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py index dc5f6ad..b780b47 100644 --- a/djmoney/models/fields.py +++ b/djmoney/models/fields.py @@ -105,25 +105,34 @@ class MoneyFieldProxy: data[self.field.name] = self._money_from_obj(obj) return data[self.field.name] - def __set_...
["tests/test_models.py::TestVanillaMoneyField::test_raises_type_error_setting_currency_to_none_on_nullable_currency_field_while_having_amount", "tests/test_models.py::TestNullableCurrency::test_fails_with_null_currency", "tests/test_models.py::TestNullableCurrency::test_fails_with_null_currency_decimal", "tests/test_mo...
["tests/contrib/exchange/test_admin.py::test_last_update", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup0]", "tests/contrib/exchange/test_backends.py::TestBackends::test_get_rates[setup1]", "tests/contrib/exchange/test_backends.py::TestBackends::test_initial_update_rates[setup0]", "tests/...
jyangballin/swesmith.x86_64.django-money_1776_django-money.835c1ab8
true
null
1
41
15
2,142
0
0.6
1
0.75
1
0.493667
81.756
3,988
swe_smith::train::48980
swe_smith
train
48,980
facebookresearch__hydra.0f03eb60.lm_rewrite__ed6ai5z7
swesmith/facebookresearch__hydra.0f03eb60
facebookresearch/hydra
python
null
### Issue: AttributeError in BasicSweeper's `split_arguments` Method **Describe the bug** The `split_arguments` method in the `BasicSweeper` class is currently throwing an `AttributeError` when processing certain override inputs. This seems to occur when the method attempts to handle overrides that are not being split...
diff --git a/hydra/_internal/core_plugins/basic_sweeper.py b/hydra/_internal/core_plugins/basic_sweeper.py index 3e41fcb..a78aa0e 100644 --- a/hydra/_internal/core_plugins/basic_sweeper.py +++ b/hydra/_internal/core_plugins/basic_sweeper.py @@ -104,40 +104,52 @@ class BasicSweeper(Sweeper): yield lst[i : i...
["tests/test_basic_sweeper.py::test_split[simple]", "tests/test_basic_sweeper.py::test_split[not_split_yaml_list]"]
["tests/test_basic_sweeper.py::test_split[split_1d]", "tests/test_basic_sweeper.py::test_split[list_of_lists]", "tests/test_basic_sweeper.py::test_split[no_batching]", "tests/test_basic_sweeper.py::test_split[batches_of_1]", "tests/test_basic_sweeper.py::test_split[batches_of_2]", "tests/test_basic_sweeper.py::test_spl...
jyangballin/swesmith.x86_64.facebookresearch_1776_hydra.0f03eb60
true
null
1
74
2
1,482
0
0.6
1
0.75
1
0.493667
81.756
3,989
swe_smith::train::31590
swe_smith
train
31,590
benoitc__gunicorn.bacbf8aa.func_pm_class_rm_funcs__muyqohw9
swesmith/benoitc__gunicorn.bacbf8aa
benoitc/gunicorn
python
null
# Missing critical methods in Response class ## Description Several critical methods have been removed from the Response class in gunicorn/http/wsgi.py, causing applications to fail when trying to send HTTP responses. The methods `force_close()`, `start_response()`, `send_headers()`, `sendfile()`, and `close()` are m...
diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 419ac50..64b8f17 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -213,9 +213,6 @@ class Response: self.upgrade = False self.cfg = cfg - def force_close(self): - self.must_close = True - def should_close...
["tests/test_http.py::test_http_header_encoding", "tests/test_http.py::test_http_invalid_response_header"]
["tests/test_arbiter.py::test_arbiter_stop_closes_listeners", "tests/test_arbiter.py::test_arbiter_stop_child_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_parent_does_not_unlink_listeners", "tests/test_arbiter.py::test_arbiter_stop_does_not_unlink_systemd_listeners", "tests/test_arbiter.py::tes...
jyangballin/swesmith.x86_64.benoitc_1776_gunicorn.bacbf8aa
true
null
1
78
2
1,402
0
0.6
1
0.75
1
0.493667
81.756
3,990
swe_smith::train::42424
swe_smith
train
42,424
r1chardj0n3s__parse.30da9e4f.lm_rewrite__s3kgcck3
swesmith/r1chardj0n3s__parse.30da9e4f
r1chardj0n3s/parse
python
null
Dotted field names not working in parse results Description When using dotted field names in parse patterns, the parser fails to correctly handle them. Instead of keeping the dotted field names intact, it's trying to expand them into nested dictionaries, which breaks existing code. For example, when parsing a string...
diff --git a/parse.py b/parse.py index 80242e1..175a535 100644 --- a/parse.py +++ b/parse.py @@ -542,29 +542,80 @@ class Parser(object): ) def _expand_named_fields(self, named_fields): + """Expand dotted field names into nested dictionaries. + + For example, if named_fields is {'a.b': ...
["README.rst::README.rst", "tests/test_bugs.py::test_dotted_type_conversion_pull_8", "tests/test_parse.py::test_hyphen_inside_field_name_collision_handling", "tests/test_pattern.py::test_dot_separated_fields", "tests/test_pattern.py::test_dot_separated_fields_name_collisions"]
["parse.py::parse.with_pattern", "tests/test_bugs.py::test_tz_compare_to_None", "tests/test_bugs.py::test_named_date_issue7", "tests/test_bugs.py::test_pm_overflow_issue16", "tests/test_bugs.py::test_pm_handling_issue57", "tests/test_bugs.py::test_user_type_with_group_count_issue60", "tests/test_bugs.py::test_unmatched...
jyangballin/swesmith.x86_64.r1chardj0n3s_1776_parse.30da9e4f
true
null
1
89
5
1,180
0
0.6
1
0.75
1
0.493333
81.755
3,991
swe_smith::train::2653
swe_smith
train
2,653
cknd__stackprinter.219fcc52.combine_file__7gqfh6ju
swesmith/cknd__stackprinter.219fcc52
cknd/stackprinter
python
null
# Stackprinter formatting issues with plaintext and colorful formatters ## Description I've discovered several issues with the formatting functionality in stackprinter. The main problem appears to be that the wrong formatter classes are being used for different styles, causing unexpected output and errors. When usin...
diff --git a/stackprinter/formatting.py b/stackprinter/formatting.py index 25f5fd8..7ffc5fe 100644 --- a/stackprinter/formatting.py +++ b/stackprinter/formatting.py @@ -12,9 +12,9 @@ from stackprinter.frame_formatting import FrameFormatter, ColorfulFrameFormatter def get_formatter(style, **kwargs): if style in ...
["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting", "tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting"]
["tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"]
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
true
null
1
36
4
2,239
0
0.6
1
0.75
1
0.493167
81.7545
3,992
swe_smith::train::52713
swe_smith
train
52,713
pydicom__pydicom.7d361b3d.lm_rewrite__pa2kx763
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Unexpected Behavior in _read_item Function with Encapsulated Data Description There seems to be an issue with the `_read_item` function when handling encapsulated data streams. Specifically, the function does not behave as expected when encountering certain conditions in the data stream. 1. **Unexpected Tag Handling...
diff --git a/src/pydicom/encaps.py b/src/pydicom/encaps.py index 3493808..221973c 100644 --- a/src/pydicom/encaps.py +++ b/src/pydicom/encaps.py @@ -1680,7 +1680,7 @@ def _defragment_data(data: bytes) -> bytes: return b"".join(_decode_data_sequence(data)) -def _read_item(fp: DicomIO) -> bytes | None: +def _rea...
["tests/test_encaps.py::TestReadItem::test_item_undefined_length", "tests/test_encaps.py::TestReadItem::test_item_sequence_delimiter", "tests/test_encaps.py::TestReadItem::test_item_bad_tag"]
["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
48
3
1,992
0
0.6
1
0.75
1
0.492
81.751
3,993
swe_smith::train::2649
swe_smith
train
2,649
cknd__stackprinter.219fcc52.combine_file__3mb4yuht
swesmith/cknd__stackprinter.219fcc52
cknd/stackprinter
python
null
# Incorrect order of format parameters in stackprinter causing display issues While using stackprinter, I noticed that the output formatting is completely broken. The stack traces are being displayed in a very confusing way with information in the wrong order. ## Description I was debugging an application and notice...
diff --git a/stackprinter/frame_formatting.py b/stackprinter/frame_formatting.py index 136920e..fb03733 100644 --- a/stackprinter/frame_formatting.py +++ b/stackprinter/frame_formatting.py @@ -134,24 +134,24 @@ class FrameFormatter(): raise def _format_frame(self, fi): - msg = self.headline_t...
["tests/test_formatting.py::test_frame_formatting", "tests/test_formatting.py::test_exception_formatting"]
["tests/test_formatting.py::test_none_tuple_formatting", "tests/test_formatting.py::test_none_value_formatting", "tests/test_frame_inspection.py::test_frameinfo", "tests/test_source_inspection.py::test_source_annotation", "tests/test_utils.py::test_match"]
jyangballin/swesmith.x86_64.cknd_1776_stackprinter.219fcc52
true
null
1
64
2
1,671
0
0.6
1
0.75
1
0.491833
81.7505
3,994
swe_smith::train::24937
swe_smith
train
24,937
marshmallow-code__marshmallow.9716fc62.lm_rewrite__xysb3s2e
swesmith/marshmallow-code__marshmallow.9716fc62
marshmallow-code/marshmallow
python
null
### Error Handling in Nested Schema Validation #### Description It seems there's an issue with how errors are being stored and reported when validating nested schemas with multiple validators. Specifically, when using the `validate_schema` decorator in a nested schema, the errors are not being merged correctly, leadi...
diff --git a/src/marshmallow/error_store.py b/src/marshmallow/error_store.py index 72b7037..a9e2a00 100644 --- a/src/marshmallow/error_store.py +++ b/src/marshmallow/error_store.py @@ -15,15 +15,27 @@ class ErrorStore: self.errors = {} def store_error(self, messages, field_name=SCHEMA, index=None): - ...
["tests/test_decorators.py::TestValidatesDecorator::test_validates_decorator", "tests/test_decorators.py::TestValidatesDecorator::test_validates_with_data_key", "tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_invalid_data", "tests/test_decorators.py::TestValidatesSchemaDecorator::tes...
["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...
jyangballin/swesmith.x86_64.marshmallow-code_1776_marshmallow.9716fc62
true
null
1
28
16
2,391
0
0.6
1
0.75
1
0.491833
81.7505
3,995
r2e_gym::train::4392
r2e_gym
train
4,392
numpy__4a501a066061ae957b6ccfd752f503da6a5e3337
numpy
numpy/numpy
python
4a501a066061ae957b6ccfd752f503da6a5e3337
**Title:** `assert_allclose` Fails to Report Mismatch Percentage in Error Messages **Description:** When using `numpy.testing.assert_allclose` to compare two arrays that differ, the resulting `AssertionError` does not include the percentage of elements that do not match. This omission makes it challenging to quickly a...
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -2153,59 +2153,12 @@ from numpy import eye return eye(n, dtype=dtype) -def allclose(a, b, rtol=1.e-5, atol=1.e-8): - """ - Returns True if two arrays are element-wise equal within a to...
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py --- a/numpy/testing/tests/test_utils.py +++ b/numpy/testing/tests/test_utils.py @@ -449,6 +449,15 @@ # Should not raise: assert_allclose(a, a) + def test_report_fail_percentage(self): + a = np.array([1, 1, 1...
null
null
namanjain12/numpy_final:4a501a066061ae957b6ccfd752f503da6a5e3337
true
null
1
118
null
1,303
0
0.75
1
0.6375
1
0.6105
81.75025
3,996
swe_smith::train::1937
swe_smith
train
1,937
agronholm__typeguard.b6a7e438.lm_rewrite__1qj0kt0s
swesmith/agronholm__typeguard.b6a7e438
agronholm/typeguard
python
null
# Bug with Union type handling in `get_type_name` function I'm encountering an issue with the `get_type_name` function in typeguard. When working with Union types, especially those created with the PEP 604 syntax (using the pipe `|` operator), the type names are not being displayed correctly. ## Description I have c...
diff --git a/src/typeguard/_utils.py b/src/typeguard/_utils.py index e8f9b03..6c3bb22 100644 --- a/src/typeguard/_utils.py +++ b/src/typeguard/_utils.py @@ -59,38 +59,43 @@ _functions_map: WeakValueDictionary[CodeType, FunctionType] = WeakValueDictionar def get_type_name(type_: Any) -> str: - name: str - for...
["tests/test_checkers.py::TestUnion::test_typing_type_fail", "tests/test_checkers.py::TestTypevar::test_collection_constraints_fail", "tests/test_checkers.py::TestRecursiveType::test_fail", "tests/test_instrumentation.py::test_pep_604_union_args[typechecked]", "tests/test_instrumentation.py::test_pep_604_union_args[imp...
["tests/mypy/test_type_annotations.py::test_positive", "tests/mypy/test_type_annotations.py::test_negative", "tests/test_checkers.py::TestAnyStr::test_valid[str]", "tests/test_checkers.py::TestAnyStr::test_valid[bytes]", "tests/test_checkers.py::TestAnyStr::test_bad_type", "tests/test_checkers.py::TestBytesLike::test_v...
jyangballin/swesmith.x86_64.agronholm_1776_typeguard.b6a7e438
true
null
1
69
5
1,570
0
0.6
1
0.75
1
0.491667
81.75
3,997
swe_smith::train::52344
swe_smith
train
52,344
pydicom__pydicom.7d361b3d.func_pm_class_rm_funcs__8aq3x34w
swesmith/pydicom__pydicom.7d361b3d
pydicom/pydicom
python
null
Encoder.encode method missing after refactoring #### Description The `Encoder.encode` method appears to have been accidentally removed, causing `AttributeError` when trying to encode pixel data. #### Steps/Code to Reproduce ```python from pydicom.pixels.encoders import RLELosslessEncoder from pydicom import dcmread...
diff --git a/src/pydicom/pixels/encoders/base.py b/src/pydicom/pixels/encoders/base.py index c5123f9..f685c44 100644 --- a/src/pydicom/pixels/encoders/base.py +++ b/src/pydicom/pixels/encoders/base.py @@ -496,117 +496,6 @@ class Encoder(CoderBase): """ super().__init__(uid, decoder=False) - def e...
["tests/pixels/test_encoder_base.py::TestEncodeRunner_Encode::test_specify_invalid_plugin_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
112
1
707
0
0.6
1
0.75
1
0.491167
81.7485
3,998
swe_smith::train::49214
swe_smith
train
49,214
mozilla__bleach.73871d76.combine_module__v5cwca4z
swesmith/mozilla__bleach.73871d76
mozilla/bleach
python
null
TreeWalker iteration broken after recent changes #### Description The `NonRecursiveTreeWalker.__iter__` method appears to be broken and only returns the root node. When trying to use bleach to clean HTML content, it fails with `TypeError: iter() returned non-iterator of type 'NoneType'`. #### Steps/Code to Reproduce...
diff --git a/bleach/_vendor/html5lib/treewalkers/base.py b/bleach/_vendor/html5lib/treewalkers/base.py index 80c474c..042bbbb 100644 --- a/bleach/_vendor/html5lib/treewalkers/base.py +++ b/bleach/_vendor/html5lib/treewalkers/base.py @@ -191,62 +191,4 @@ class NonRecursiveTreeWalker(TreeWalker): raise NotImplem...
["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
101
183
926
0
0.6
1
0.75
1
0.491
81.748
3,999
swe_smith::train::187
swe_smith
train
187
oauthlib__oauthlib.1fd52536.combine_module__03hv882r
swesmith/oauthlib__oauthlib.1fd52536
oauthlib/oauthlib
python
null
OAuth2 authorization code grant validation logic inverted #### Description The authorization code grant validation is behaving incorrectly - it's rejecting valid requests and accepting invalid ones. When trying to create authorization responses, the validation logic appears to be inverted, causing legitimate OAuth2 f...
diff --git a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py index 09dc619..ab21a07 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py +++ b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py @@ -332,90 +332,55 @@ class Aut...
["tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py::PreservationTest::test_default_uri", "tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py::PreservationTest::test_default_uri_in_token", "tests/oauth2/rfc6749/endpoints/test_credentials_preservation.py::PreservationTest::test_invalid_redirec...
["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
69
109
1,566
0
0.6
1
0.75
1
0.491
81.748