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
100
swe_bench_verified::test::301
swe_bench_verified
test
301
pydata__xarray-3305
pydata/xarray
pydata/xarray
python
69c7e01e5167a3137c285cb50d1978252bb8bcbf
DataArray.quantile does not honor `keep_attrs` #### MCVE Code Sample ```python # Your code here import xarray as xr da = xr.DataArray([0, 0], dims="x", attrs={'units':'K'}) out = da.quantile(.9, dim='x', keep_attrs=True) out.attrs ``` returns ``` OrderedDict() ``` #### Expected Output ``` OrderedDict([('units', 'K')]...
Looking at the code, I'm confused. The DataArray.quantile method creates a temporary dataset, copies the variable over, calls the Variable.quantile method, then assigns the attributes from the dataset to this new variable. At no point however are attributes assigned to this temporary dataset. My understanding is that V...
diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -4768,7 +4768,10 @@ def quantile( # the former is often more efficient reduce_dims = None variables[name] = var.qua...
diff --git a/xarray/tests/test_dataarray.py b/xarray/tests/test_dataarray.py --- a/xarray/tests/test_dataarray.py +++ b/xarray/tests/test_dataarray.py @@ -2298,17 +2298,17 @@ def test_reduce_out(self): with pytest.raises(TypeError): orig.mean(out=np.ones(orig.shape)) - # skip due to bug in ol...
["xarray/tests/test_dataarray.py::TestDataArray::test_quantile"]
["xarray/tests/test_dataarray.py::TestDataArray::test_properties", "xarray/tests/test_dataarray.py::TestDataArray::test_data_property", "xarray/tests/test_dataarray.py::TestDataArray::test_indexes", "xarray/tests/test_dataarray.py::TestDataArray::test_get_index", "xarray/tests/test_dataarray.py::TestDataArray::test_get...
null
true
2019-09-12T19:27:14Z
2
22
1
1,236
0
1
1
0.85
1
0.279333
93.563
101
swe_gym::train::1554
swe_gym
train
1,554
pandas-dev__pandas-51585
pandas-dev/pandas
pandas-dev/pandas
python
887d2c495d88ec403bb9ec4b6c04b44d09ec06e6
BUG: loc setitem fails with shape mismatch ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the [main br...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index bdbde438217b9..a924b98237dbd 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -1273,6 +1273,7 @@ Indexing - Bug in :meth:`DataFrame.sort_values` where ``None`` was not returned when ``by`` is empty lis...
diff --git a/pandas/tests/indexing/test_loc.py b/pandas/tests/indexing/test_loc.py index 44c0b654db268..bbea179843f3a 100644 --- a/pandas/tests/indexing/test_loc.py +++ b/pandas/tests/indexing/test_loc.py @@ -2599,6 +2599,20 @@ def test_loc_setitem_ndframe_values_alignment(self, using_copy_on_write): else: ...
["pandas/tests/indexing/test_loc.py::TestLocBooleanMask::test_loc_indexer_empty_broadcast", "pandas/tests/indexing/test_loc.py::TestLocBooleanMask::test_loc_indexer_all_false_broadcast"]
["pandas/tests/indexing/test_loc.py::TestLocWithEllipsis::test_loc_iloc_getitem_ellipsis[loc-DataFrame-int32]", "pandas/tests/indexing/test_loc.py::TestLocSeries::test_loc_iloc_setitem_with_listlike[6-list]", "pandas/tests/indexing/test_loc.py::TestLocWithEllipsis::test_loc_iloc_getitem_ellipsis[iloc-DataFrame-repeats]...
null
true
2023-02-23T12:02:34Z
2
15
2
2,522
0
0.85
1
1
1
0.470333
93.561
102
swe_gym::train::1181
swe_gym
train
1,181
pandas-dev__pandas-48246
pandas-dev/pandas
pandas-dev/pandas
python
707039adf0aefcb32f4f2b4db14c528773d6b605
BUG: iloc not possible for sparse DataFrame ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the main br...
I tried above example with dtype=pd.SparseDtype(bool) and get similar error ``` df = pd.DataFrame([[1, 0, 1], [0, 1, 0]], dtype=pd.SparseDtype(bool)) df.iloc[0] ``` NotImplementedError: Default 'empty' implementation is invalid for dtype='Sparse[bool, False]' take @adamjliang any progress on this? Looks like this ...
diff --git a/doc/source/whatsnew/v1.4.4.rst b/doc/source/whatsnew/v1.4.4.rst index e03e6cd41ebd3..fc7a7c915bde5 100644 --- a/doc/source/whatsnew/v1.4.4.rst +++ b/doc/source/whatsnew/v1.4.4.rst @@ -32,7 +32,7 @@ Fixed regressions - Fixed regression in :meth:`DatetimeIndex.intersection` when the :class:`DatetimeIndex` h...
diff --git a/pandas/tests/indexing/test_loc.py b/pandas/tests/indexing/test_loc.py index cf7db65015fa7..4e5571c7087e7 100644 --- a/pandas/tests/indexing/test_loc.py +++ b/pandas/tests/indexing/test_loc.py @@ -1341,6 +1341,14 @@ def test_loc_getitem_sparse_series(self): expected = Series([1.0, 0.0], dtype=Spars...
["pandas/tests/indexing/test_loc.py::TestLocBaseIndependent::test_getitem_single_row_sparse_df[iloc]", "pandas/tests/indexing/test_loc.py::TestLocBaseIndependent::test_getitem_single_row_sparse_df[loc]"]
["pandas/tests/indexing/test_loc.py::TestLocSeries::test_loc_iloc_setitem_with_listlike[6-list]", "pandas/tests/indexing/test_loc.py::TestLocBooleanLabelsAndSlices::test_loc_bool_incompatible_index_raises[num_int64-Series-True]", "pandas/tests/indexing/test_loc.py::TestLocBooleanLabelsAndSlices::test_loc_bool_slice_rai...
null
true
2022-08-25T14:28:15Z
2
19
2
4,621
0
0.85
1
0.92
1
0.563333
93.56
103
swe_gym::train::1567
swe_gym
train
1,567
pandas-dev__pandas-50038
pandas-dev/pandas
pandas-dev/pandas
python
a85a386b780856842dd81155f7ea066df5ccca6d
BUG: to_datetime fails with np.datetime64 and non-ISO format ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exis...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index d8609737b8c7a..b70dcb0ae99fa 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -658,7 +658,7 @@ Datetimelike - Bug in subtracting a ``datetime`` scalar from :class:`DatetimeIndex` failing to retain the ...
diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py index 7df45975475dd..59be88e245fd0 100644 --- a/pandas/tests/tools/test_to_datetime.py +++ b/pandas/tests/tools/test_to_datetime.py @@ -758,6 +758,19 @@ def test_to_datetime_today_now_unicode_bytes(self, arg): def test_to_...
["pandas/tests/tools/test_to_datetime.py::TestToDatetime::test_to_datetime_dt64s_and_str[01-01-2001-%d-%m-%Y]"]
["pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers_timezone_minute_offsets_roundtrip[False-2013-01-01", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers[True-2005/11/09", "pandas/tests/tools/test_to_datetime.py::TestToDatetimeMisc::test_to_datetime_iso8...
null
true
2022-12-03T12:41:37Z
2
14
1
2,538
0
0.85
1
1
1
0.469667
93.559
104
swe_bench_verified::test::258
swe_bench_verified
test
258
matplotlib__matplotlib-20859
matplotlib/matplotlib
matplotlib/matplotlib
python
64619e53e9d0ed417daba287ac0d3a06943a54d5
Adding a legend to a `SubFigure` doesn't work ### Bug report **Bug summary** Adding a legend to a `SubFigure` doesn't work **Code for reproduction** ```python import matplotlib.pyplot as plt subfig = plt.figure().subfigures() ax = subfig.subplots() ax.plot([0, 1, 2], [0, 1, 2], label="test") subfig.legend() ``` ...
Yep that was just an oversight, not a design decision ;-) I don't want to complicate this too much, but a further issue arrises even after changing the line I suggest above (let me know if this should be a separate issue) ```python fig = plt.figure() subfig = fig.subfigures() ax = subfig.subplots() ax.plot([0, 1...
diff --git a/lib/matplotlib/legend.py b/lib/matplotlib/legend.py --- a/lib/matplotlib/legend.py +++ b/lib/matplotlib/legend.py @@ -360,7 +360,7 @@ def __init__( """ # local import only to avoid circularity from matplotlib.axes import Axes - from matplotlib.figure import Figure + ...
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py --- a/lib/matplotlib/tests/test_legend.py +++ b/lib/matplotlib/tests/test_legend.py @@ -871,3 +871,12 @@ def test_handlerline2d(): handles = [mlines.Line2D([0], [0], marker="v")] leg = ax.legend(handles, ["Aardvark"], numpo...
["lib/matplotlib/tests/test_legend.py::test_subfigure_legend"]
["lib/matplotlib/tests/test_legend.py::test_legend_ordereddict", "lib/matplotlib/tests/test_legend.py::test_legend_auto1[png]", "lib/matplotlib/tests/test_legend.py::test_legend_auto1[pdf]", "lib/matplotlib/tests/test_legend.py::test_legend_auto2[png]", "lib/matplotlib/tests/test_legend.py::test_legend_auto2[pdf]", "li...
null
true
2021-08-19T09:03:04Z
1
8
1
1,495
0
1
1
0.85
1
0.275833
93.5525
105
swe_gym::train::1826
swe_gym
train
1,826
pandas-dev__pandas-48736
pandas-dev/pandas
pandas-dev/pandas
python
6b93a0c6687ad1362ec58715b1751912783be411
BUG: AttributeError: 'function' object has no attribute 'currentframe' ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed thi...
Hi, thanks for your report. This is not considered public, so there are not guarantees that the class is stable from one release to another cc @MarcoGorelli ``` commit e94faa23e24c0abf9db74d79cfebe06676577867 Author: Marco Edward Gorelli <marcogorelli@protonmail.com> Date: Wed Aug 17 23:00:08 2022 +0100 ...
diff --git a/doc/source/whatsnew/v1.5.1.rst b/doc/source/whatsnew/v1.5.1.rst index da0bd746e3da5..d61a8f720a0b4 100644 --- a/doc/source/whatsnew/v1.5.1.rst +++ b/doc/source/whatsnew/v1.5.1.rst @@ -74,7 +74,7 @@ Fixed regressions - Regression in :func:`.read_csv` causing an ``EmptyDataError`` when using an UTF-8 file h...
diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index ee55837324f20..1bfb85f369415 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -1357,10 +1357,17 @@ def test_not_reflect_all_tables(self): def test_warning_case_insensitive_table_name(self, test_frame1): ...
["pandas/tests/io/test_sql.py::TestSQLApi::test_warning_case_insensitive_table_name"]
["pandas/tests/io/test_sql.py::TestSQLiteAlchemyConn::test_get_schema_create_table", "pandas/tests/io/test_sql.py::TestSQLApiConn::test_integer_col_names", "pandas/tests/io/test_sql.py::test_to_sql[None-sqlite_buildin]", "pandas/tests/io/test_sql.py::TestSQLiteAlchemyConn::test_invalid_engine", "pandas/tests/io/test_sq...
null
true
2022-09-23T14:25:38Z
2
18
1
3,076
0
0.85
1
0.92
1
0.56
93.55
106
swe_bench_pro::test::110
swe_bench_pro
test
110
instance_ansible__ansible-e64c6c1ca50d7d26a8e7747d8eb87642e767cd74-v0f01c69f1e2528b935359cfe578530722bca2c59
ansible/ansible
ansible/ansible
python
a0aad17912da687a3b0b5a573ab6ed0394b569ad
# Title: Unarchive: ValueError: time data '19800000.000000' does not match format '%Y%m%d.%H%M%S' # Summary: Attempting to download and extract the following zipfile: ``` - name: firefox ublock origin unarchive: src: \"https://addons.mozilla.org/firefox/downloads/file/4121906/ublock_origin-1.50.0.xpi\" d...
## Requirements - `ZipArchive._valid_time_stamp` must accept a timestamp string and produce a sanitized time value suitable for file-time comparisons. - `_valid_time_stamp` must use a regular expression to extract date components from the timestamp string in `YYYYMMDD.HHMMSS` format. - Valid year limits for ZIP file ...
diff --git a/changelogs/fragments/unarchive_timestamp.yml b/changelogs/fragments/unarchive_timestamp.yml new file mode 100644 index 00000000000000..a945b9c41d62cc --- /dev/null +++ b/changelogs/fragments/unarchive_timestamp.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - unarchive - Better handling of files with an invalid ti...
diff --git a/test/units/modules/test_unarchive.py b/test/units/modules/test_unarchive.py index e66d0a184cce95..6a2f0d9a676de6 100644 --- a/test/units/modules/test_unarchive.py +++ b/test/units/modules/test_unarchive.py @@ -1,6 +1,9 @@ +# Copyright: Contributors to the Ansible project +# GNU General Public License v3.0+...
["test/units/modules/test_unarchive.py::TestCaseZipArchive::test_valid_time_stamp[invalid-month-1980]", "test/units/modules/test_unarchive.py::TestCaseZipArchive::test_valid_time_stamp[invalid-year-1979]", "test/units/modules/test_unarchive.py::TestCaseZipArchive::test_valid_time_stamp[valid-datetime]", "test/units/mod...
["test/units/modules/test_unarchive.py::TestCaseTgzArchive::test_no_tar_binary"]
ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-e64c6c1ca50d7d26a8e7747d8eb87642e767cd74-v0f01c69f1e2528b935359cfe578530722bca2c59
true
null
2
28
5
5,194
0
0.95
1
0.92
1
0.593333
93.55
107
swe_gym::train::1609
swe_gym
train
1,609
pandas-dev__pandas-48854
pandas-dev/pandas
pandas-dev/pandas
python
336896907748389e2cd0d57504508475d425348e
BUG: `pd.to_timedelta()` does not accept nullable float ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on...
diff --git a/doc/source/whatsnew/v1.6.0.rst b/doc/source/whatsnew/v1.6.0.rst index 9f793532e5e6b..0c4b5ac88a4ac 100644 --- a/doc/source/whatsnew/v1.6.0.rst +++ b/doc/source/whatsnew/v1.6.0.rst @@ -169,7 +169,7 @@ Datetimelike Timedelta ^^^^^^^^^ -- +- Bug in :func:`to_timedelta` raising error when input has nullabl...
diff --git a/pandas/tests/tools/test_to_timedelta.py b/pandas/tests/tools/test_to_timedelta.py index 488e266a1c5c1..13d663474aff0 100644 --- a/pandas/tests/tools/test_to_timedelta.py +++ b/pandas/tests/tools/test_to_timedelta.py @@ -278,3 +278,10 @@ def test_to_timedelta_zerodim(self, fixed_now_ts): result = t...
["pandas/tests/tools/test_to_timedelta.py::TestTimedeltas::test_to_timedelta_numeric_ea[Float64]", "pandas/tests/tools/test_to_timedelta.py::TestTimedeltas::test_to_timedelta_numeric_ea[Float32]"]
["pandas/tests/tools/test_to_timedelta.py::TestTimedeltas::test_to_timedelta_oob_non_nano", "pandas/tests/tools/test_to_timedelta.py::TestTimedeltas::test_unambiguous_timedelta_values[2day-None]", "pandas/tests/tools/test_to_timedelta.py::TestTimedeltas::test_to_timedelta_coerce_strings_unit", "pandas/tests/tools/test_...
null
true
2022-09-29T12:45:13Z
2
9
2
2,609
0
0.85
1
1
1
0.464833
93.5445
108
swe_gym::train::1416
swe_gym
train
1,416
pandas-dev__pandas-56347
pandas-dev/pandas
pandas-dev/pandas
python
17aa2ba3f9b75bb4083f469b3649e18b80a5352c
`.interpolate()` Method Incompatible with `float[pyarrow]` Dtype ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug ...
The incorrect error message was fixed in 2.1.2 https://github.com/pandas-dev/pandas/pull/55347 Generally this doesn't work (not supported) as an ExtensionArray needs to implement `interpolate` on the array now: https://github.com/pandas-dev/pandas/pull/53659, so will mark as an enhancement request
diff --git a/pandas/core/arrays/arrow/array.py b/pandas/core/arrays/arrow/array.py index 32044d1fc233a..89e916153ffa8 100644 --- a/pandas/core/arrays/arrow/array.py +++ b/pandas/core/arrays/arrow/array.py @@ -2086,6 +2086,23 @@ def interpolate( See NDFrame.interpolate.__doc__. """ # NB: we re...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index b49f107859159..9f8985788cb95 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -3436,6 +3436,26 @@ def test_string_to_datetime_parsing_cast(): tm.assert_series_equal(result, ...
["pandas/tests/extension/test_arrow.py::test_interpolate_not_numeric[duration[us]]", "pandas/tests/extension/test_arrow.py::test_interpolate_not_numeric[bool]", "pandas/tests/extension/test_arrow.py::test_interpolate_not_numeric[duration[ms]]", "pandas/tests/extension/test_arrow.py::test_interpolate_not_numeric[date32[...
["pandas/tests/extension/test_arrow.py::TestArrowArray::test_setitem_mask[False-int32-numpy-array]", "pandas/tests/extension/test_arrow.py::TestArrowArray::test_value_counts_returns_pyarrow_int64[timestamp[ms,", "pandas/tests/extension/test_arrow.py::TestArrowArray::test_argmin_argmax[uint32]", "pandas/tests/extension/...
null
true
2023-12-05T23:33:10Z
1
17
23
5,194
0
0.85
1
0.92
1
0.556667
93.54
109
swe_bench_verified::test::364
swe_bench_verified
test
364
scikit-learn__scikit-learn-14053
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
6ab8c86c383dd847a1be7103ad115f174fe23ffd
IndexError: list index out of range in export_text when the tree only has one feature #### Description `export_text` returns `IndexError` when there is single feature. #### Steps/Code to Reproduce ```python from sklearn.tree import DecisionTreeClassifier from sklearn.tree.export import export_text from sklearn.datase...
Thanks for the report. A patch is welcome. @jnothman Obviously, `feature_names` should have the same length as the number of features in the dataset, which in this reported issue, `feature_names` should be of length 4. Do you hope to fix this bug by adding a condition in the `if feature_names` statement, such as `i...
diff --git a/sklearn/tree/export.py b/sklearn/tree/export.py --- a/sklearn/tree/export.py +++ b/sklearn/tree/export.py @@ -890,7 +890,8 @@ def export_text(decision_tree, feature_names=None, max_depth=10, value_fmt = "{}{} value: {}\n" if feature_names: - feature_names_ = [feature_names[i] for i i...
diff --git a/sklearn/tree/tests/test_export.py b/sklearn/tree/tests/test_export.py --- a/sklearn/tree/tests/test_export.py +++ b/sklearn/tree/tests/test_export.py @@ -396,6 +396,21 @@ def test_export_text(): assert export_text(reg, decimals=1) == expected_report assert export_text(reg, decimals=1, show_weight...
["sklearn/tree/tests/test_export.py::test_export_text"]
["sklearn/tree/tests/test_export.py::test_graphviz_toy", "sklearn/tree/tests/test_export.py::test_graphviz_errors", "sklearn/tree/tests/test_export.py::test_friedman_mse_in_graphviz", "sklearn/tree/tests/test_export.py::test_precision", "sklearn/tree/tests/test_export.py::test_export_text_errors"]
null
true
2019-06-09T15:36:55Z
1
3
1
2,501
0
1
1
1
0.8
0.426833
93.5305
110
swe_gym::train::1280
swe_gym
train
1,280
pandas-dev__pandas-57965
pandas-dev/pandas
pandas-dev/pandas
python
8dc8f64525550c85c4132b41d3ed3a37455bfbc8
BUG: na_values dict form not working on index column ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on th...
import io import pandas as pd file_contents = """ ,x,y MA,1,2 NA,2,1 OA,,3 """ default_nan_values = set(["NA", "squid"]) names = [None, "x", "y"] nan_mapping = {name: default_nan_values for name in names} dtype = {0: "object", "x": "float32", "y": "float32"} try: df = pd.read_csv( io.StringI...
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index ef561d50066d1..bce5c7927c72d 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -301,6 +301,7 @@ Bug fixes - Fixed bug in :meth:`Series.diff` allowing non-integer values for the ``periods`` argument. (:i...
diff --git a/pandas/tests/io/parser/test_na_values.py b/pandas/tests/io/parser/test_na_values.py index ba0e3033321e4..1e370f649aef8 100644 --- a/pandas/tests/io/parser/test_na_values.py +++ b/pandas/tests/io/parser/test_na_values.py @@ -532,6 +532,47 @@ def test_na_values_dict_aliasing(all_parsers): tm.assert_dict...
["pandas/tests/io/parser/test_na_values.py::test_na_values_dict_null_column_name[python]", "pandas/tests/io/parser/test_na_values.py::test_na_values_dict_null_column_name[c_high]", "pandas/tests/io/parser/test_na_values.py::test_na_values_dict_null_column_name[c_low]"]
["pandas/tests/io/parser/test_na_values.py::test_str_nan_dropped[python]", "pandas/tests/io/parser/test_na_values.py::test_inf_na_values_with_int_index[python]", "pandas/tests/io/parser/test_na_values.py::test_cast_NA_to_bool_raises_error[c_low-false,1\\nnan,1\\ntrue-None]", "pandas/tests/io/parser/test_na_values.py::t...
null
true
2024-03-22T14:51:57Z
3
16
3
5,066
0
0.85
1
0.92
1
0.553333
93.53
111
swe_gym::train::1455
swe_gym
train
1,455
pandas-dev__pandas-50976
pandas-dev/pandas
pandas-dev/pandas
python
74b13fa8996f796cc487ebb12ef97e826386dd4d
BUG: `object`s not converted in `DataFrame.convert_dtypes()` on empty `DataFrame` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have co...
Since the default of `infer_objects=True` in `convert_dtypes` > For object-dtyped columns, if infer_objects is True, use the inference rules as during normal Series/DataFrame construction. Then, if possible, convert to StringDtype, BooleanDtype or an appropriate integer or floating extension type, otherwise leave a...
diff --git a/pandas/core/arrays/arrow/array.py b/pandas/core/arrays/arrow/array.py index 0e70b3795bc85..57759af23ddd5 100644 --- a/pandas/core/arrays/arrow/array.py +++ b/pandas/core/arrays/arrow/array.py @@ -137,15 +137,17 @@ def to_pyarrow_type( Convert dtype to a pyarrow type instance. """ if isinstan...
diff --git a/pandas/tests/frame/methods/test_convert_dtypes.py b/pandas/tests/frame/methods/test_convert_dtypes.py index aaccaff0c0c42..919d25f5ba993 100644 --- a/pandas/tests/frame/methods/test_convert_dtypes.py +++ b/pandas/tests/frame/methods/test_convert_dtypes.py @@ -120,3 +120,11 @@ def test_pyarrow_dtype_backend...
["pandas/tests/frame/methods/test_convert_dtypes.py::TestConvertDtypes::test_pyarrow_dtype_empty_object"]
["pandas/tests/frame/methods/test_convert_dtypes.py::TestConvertDtypes::test_convert_dtypes[python-True-Int32]", "pandas/tests/frame/methods/test_convert_dtypes.py::TestConvertDtypes::test_pyarrow_dtype_backend", "pandas/tests/frame/methods/test_convert_dtypes.py::TestConvertDtypes::test_convert_dtypes_retain_column_na...
null
true
2023-01-25T22:06:54Z
1
16
1
4,576
0
0.85
1
0.92
1
0.553333
93.53
112
swe_gym::train::1313
swe_gym
train
1,313
pandas-dev__pandas-50024
pandas-dev/pandas
pandas-dev/pandas
python
4d16e7067213cd8e96148daa8480f8eda3f7912d
BUG: when `floor`ing, `ambiguous` parameter unnecessarily used (and raising Error) ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have c...
I can take this one
diff --git a/doc/source/whatsnew/v1.5.3.rst b/doc/source/whatsnew/v1.5.3.rst index b6c1c857717c7..763f9f87194d5 100644 --- a/doc/source/whatsnew/v1.5.3.rst +++ b/doc/source/whatsnew/v1.5.3.rst @@ -33,7 +33,6 @@ Bug fixes Other ~~~~~ - -- .. -------------------------------------------------------------------------...
diff --git a/pandas/tests/scalar/timestamp/test_timezones.py b/pandas/tests/scalar/timestamp/test_timezones.py index 3ebffaad23910..d7db99333cd03 100644 --- a/pandas/tests/scalar/timestamp/test_timezones.py +++ b/pandas/tests/scalar/timestamp/test_timezones.py @@ -6,6 +6,7 @@ datetime, timedelta, ) +import r...
["pandas/tests/scalar/timestamp/test_timezones.py::TestTimestampTZOperations::test_tz_localize_ambiguous"]
["pandas/tests/scalar/timestamp/test_timezones.py::TestTimestampTZOperations::test_tz_localize_roundtrip['UTC+01:15'-2014-11-01", "pandas/tests/scalar/timestamp/test_timezones.py::TestTimestampTZOperations::test_timestamp_tz_localize_nonexistent_shift[ms-dateutil/-2018-03-11", "pandas/tests/scalar/timestamp/test_timezo...
null
true
2022-12-02T19:00:38Z
3
12
1
2,504
0
0.85
1
1
1
0.457333
93.522
113
swe_gym::train::1713
swe_gym
train
1,713
pandas-dev__pandas-54087
pandas-dev/pandas
pandas-dev/pandas
python
dbb19b9f6ec77edcbdf535ff506c3b7659fc0c69
BUG: In development version, `pd.merge` with `Series` arguments an `how="cross"` fails ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I ha...
I cannot reproduce this error on the most recent version of Pandas. consider closing this issue @Dr-Irv > I cannot reproduce this error on the most recent version of Pandas. consider closing this issue @Dr-Irv It's not on version 2.0.3. It's on the development version on github in the `main` branch > > I cannot re...
diff --git a/pandas/core/reshape/merge.py b/pandas/core/reshape/merge.py index 0e4a64d7e6c5f..a904f4d9fbe13 100644 --- a/pandas/core/reshape/merge.py +++ b/pandas/core/reshape/merge.py @@ -145,10 +145,12 @@ def merge( indicator: str | bool = False, validate: str | None = None, ) -> DataFrame: + left_df = ...
diff --git a/pandas/tests/reshape/merge/test_merge_cross.py b/pandas/tests/reshape/merge/test_merge_cross.py index 7e14b515836cf..14f9036e43fce 100644 --- a/pandas/tests/reshape/merge/test_merge_cross.py +++ b/pandas/tests/reshape/merge/test_merge_cross.py @@ -1,6 +1,9 @@ import pytest -from pandas import DataFrame ...
["pandas/tests/reshape/merge/test_merge_cross.py::test_merge_cross_series"]
["pandas/tests/reshape/merge/test_merge_cross.py::test_merge_cross_error_reporting[kwargs3]", "pandas/tests/reshape/merge/test_merge_cross.py::test_merge_cross_null_values[NoneType]", "pandas/tests/reshape/merge/test_merge_cross.py::test_merge_cross_error_reporting[kwargs2]", "pandas/tests/reshape/merge/test_merge_cros...
null
true
2023-07-11T19:18:46Z
1
14
1
3,039
0
0.85
1
0.92
1
0.546667
93.51
114
swe_gym::train::2409
swe_gym
train
2,409
modin-project__modin-6825
modin-project/modin
modin-project/modin
python
7f2dc36a0d096ba9e472bd626f7eca7eb4549909
BUG: Filtering empty partitions should invalidate `ModinIndex._lengths_id` cache ### Modin version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the latest released version of Modin. - [X] I have confirmed this bug exists on the main branch of Mo...
diff --git a/modin/core/dataframe/pandas/dataframe/dataframe.py b/modin/core/dataframe/pandas/dataframe/dataframe.py --- a/modin/core/dataframe/pandas/dataframe/dataframe.py +++ b/modin/core/dataframe/pandas/dataframe/dataframe.py @@ -808,8 +808,17 @@ def _filter_empties(self, compute_metadata=True): i...
diff --git a/modin/test/storage_formats/pandas/test_internals.py b/modin/test/storage_formats/pandas/test_internals.py --- a/modin/test/storage_formats/pandas/test_internals.py +++ b/modin/test/storage_formats/pandas/test_internals.py @@ -1277,6 +1277,43 @@ def test_index_updates_axis(self): assert df2.index.e...
["modin/test/storage_formats/pandas/test_internals.py::TestModinIndexIds::test_filter_empties_resets_lengths"]
["modin/test/storage_formats/pandas/test_internals.py::test_reorder_labels_cache[unbalanced_partitioning-no_reordering-projection_only]", "modin/test/storage_formats/pandas/test_internals.py::TestZeroComputationDtypes::test_preserve_dtypes_setitem[3.5-value_dtype0-unknown]", "modin/test/storage_formats/pandas/test_inte...
null
true
2023-12-13T15:08:10Z
2
17
1
2,375
0
0.85
1
1
1
0.4525
93.5075
115
swe_gym::train::211
swe_gym
train
211
getmoto__moto-6716
getmoto/moto
getmoto/moto
python
a853fd714d133c9a9ca0479cb99537d9a39d85bf
IAM: mock_iam() is keeping the state when working with roles ## Description I think this is a little bit weird but I'm getting and strange error when executing some tests in a specific order related with IAM policies. ## How to reproduce the issue It can be tested with the following code, we have two context managers...
IIRC there is some caching there, to make sure Moto doesn't have to constantly recreate default IAM resources. But it sounds like we're caching a little bit too much. @bblommers at least I don't see the point of caching policies since by default there is none created. Until some fix is ready, my workaround is the fo...
diff --git a/moto/iam/models.py b/moto/iam/models.py --- a/moto/iam/models.py +++ b/moto/iam/models.py @@ -1,4 +1,5 @@ import base64 +import copy import os import string from datetime import datetime @@ -438,6 +439,12 @@ def create_from_cloudformation_json( # type: ignore[misc] ) return polic...
diff --git a/tests/test_iam/test_iam.py b/tests/test_iam/test_iam.py --- a/tests/test_iam/test_iam.py +++ b/tests/test_iam/test_iam.py @@ -3368,7 +3368,7 @@ def test_get_account_summary(): "ServerCertificatesQuota": 20, "MFADevices": 0, "UserPolicySizeQuota": 2048, - "PolicyVersionsInU...
["tests/test_iam/test_iam.py::test_get_account_summary"]
["tests/test_iam/test_iam.py::test_create_policy_already_exists", "tests/test_iam/test_iam.py::test_create_policy_with_tag_containing_large_key", "tests/test_iam/test_iam.py::test_policy_list_config_discovered_resources", "tests/test_iam/test_iam.py::test_list_policy_tags", "tests/test_iam/test_iam.py::test_signing_cer...
null
true
2023-08-22 20:57:43
1
13
1
5,108
0
0.85
1
0.92
1
0.543333
93.5
116
swe_gym::train::1749
swe_gym
train
1,749
pandas-dev__pandas-47605
pandas-dev/pandas
pandas-dev/pandas
python
37e6239f618adc8913e80fa689cdb8c8ad0f2af1
BUG: `df.groupby().resample()[[cols]]` without key columns raise KeyError ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed ...
Thanks @wany-oh for the report and detailed investigation. > I think this behavior is unnatural. (Even if this is not a bug, this error message is difficult to understand.) I agree. The only difference between `df_re.groupby("group").resample("10D", on="date")[["val"]].mean()` and `df_re.groupby("group").resample...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index 0b450fab53137..5b07fc31287e5 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -996,6 +996,8 @@ Groupby/resample/rolling - Bug in :meth:`.DataFrameGroupBy.describe` and :meth:`.SeriesGroupBy.describe` p...
diff --git a/pandas/tests/resample/test_resampler_grouper.py b/pandas/tests/resample/test_resampler_grouper.py index c54d9de009940..8aff217cca5c1 100644 --- a/pandas/tests/resample/test_resampler_grouper.py +++ b/pandas/tests/resample/test_resampler_grouper.py @@ -470,3 +470,30 @@ def test_resample_groupby_agg_object_d...
["pandas/tests/resample/test_resampler_grouper.py::test_groupby_resample_with_list_of_keys"]
["pandas/tests/resample/test_resampler_grouper.py::test_resample_groupby_agg_listlike", "pandas/tests/resample/test_resampler_grouper.py::test_methods[sum]", "pandas/tests/resample/test_resampler_grouper.py::test_deferred_with_groupby", "pandas/tests/resample/test_resampler_grouper.py::test_groupby_with_origin", "panda...
null
true
2022-07-06T04:44:26Z
2
13
1
4,634
0
0.85
1
0.92
1
0.543333
93.5
117
swe_gym::train::1244
swe_gym
train
1,244
pandas-dev__pandas-55844
pandas-dev/pandas
pandas-dev/pandas
python
ed10a140d17fb3faa361c2b733c9e690bd88dd95
BUG: QuarterBegin Does not work with Period ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on the [main b...
@cancan101 Try this for quarter This is working import pandas as pd period=pd.Period(year=2014, month=3, freq="Q") print (period) That is the same as using `QuarterEnd`. These are the same: ``` pd.Period(year=2014, month=3, freq="Q") ``` and ``` pd.Period(year=2014, quarter=3, freq=pd.offsets.Quarter...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 2bc031e4b5f61..38f39270d12c7 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -103,6 +103,7 @@ Other enhancements - :meth:`ExtensionArray.duplicated` added to allow extension type implementations of th...
diff --git a/pandas/tests/dtypes/test_dtypes.py b/pandas/tests/dtypes/test_dtypes.py index 27994708d2bdb..04b3feabb9854 100644 --- a/pandas/tests/dtypes/test_dtypes.py +++ b/pandas/tests/dtypes/test_dtypes.py @@ -444,7 +444,7 @@ def test_construction(self): def test_cannot_use_custom_businessday(self): ...
["pandas/tests/dtypes/test_dtypes.py::TestPeriodDtype::test_cannot_use_custom_businessday", "pandas/tests/scalar/period/test_period.py::test_invalid_frequency_error_message", "pandas/tests/scalar/period/test_asfreq.py::TestFreqConversion::test_asfreq_MS", "pandas/tests/indexes/period/test_constructors.py::TestPeriodInd...
["pandas/tests/scalar/period/test_asfreq.py::TestFreqConversion::test_conv_weekly_legacy", "pandas/tests/scalar/period/test_asfreq.py::TestFreqConversion::test_conv_annual", "pandas/tests/dtypes/test_dtypes.py::TestIntervalDtype::test_basic_dtype", "pandas/tests/scalar/period/test_period.py::TestPeriodComparisons::test...
null
true
2023-11-06T15:23:28Z
3
13
8
4,151
0
0.85
1
0.92
1
0.543333
93.5
118
swe_bench_verified::test::15
swe_bench_verified
test
15
astropy__astropy-14995
astropy/astropy
astropy/astropy
python
b16c7d12ccbc7b2d20364b89fb44285bcbfede54
In v5.3, NDDataRef mask propagation fails when one of the operand does not have a mask ### Description This applies to v5.3. It looks like when one of the operand does not have a mask, the mask propagation when doing arithmetic, in particular with `handle_mask=np.bitwise_or` fails. This is not a problem in v5.2. I ...
Welcome to Astropy 👋 and thank you for your first issue! A project member will respond to you as soon as possible; in the meantime, please double-check the [guidelines for submitting issues](https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md#reporting-issues) and make sure you've provided the requested deta...
diff --git a/astropy/nddata/mixins/ndarithmetic.py b/astropy/nddata/mixins/ndarithmetic.py --- a/astropy/nddata/mixins/ndarithmetic.py +++ b/astropy/nddata/mixins/ndarithmetic.py @@ -520,10 +520,10 @@ def _arithmetic_mask(self, operation, operand, handle_mask, axis=None, **kwds): elif self.mask is None and ope...
diff --git a/astropy/nddata/mixins/tests/test_ndarithmetic.py b/astropy/nddata/mixins/tests/test_ndarithmetic.py --- a/astropy/nddata/mixins/tests/test_ndarithmetic.py +++ b/astropy/nddata/mixins/tests/test_ndarithmetic.py @@ -1310,3 +1310,42 @@ def test_raise_method_not_supported(): # raise error for unsupported ...
["astropy/nddata/mixins/tests/test_ndarithmetic.py::test_nddata_bitmask_arithmetic"]
["astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data10-data20]", "astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data11-data21]", "astropy/nddata/mixins/tests/test_ndarithmetic.py::test_arithmetics_data[data12-data22]", "astropy/nddata/mixins/tests/test_ndarithmetic.py...
null
true
2023-06-27T19:48:18Z
1
4
1
2,401
0
1
1
1
0.8
0.4135
93.4905
119
swe_gym::train::1467
swe_gym
train
1,467
pandas-dev__pandas-48782
pandas-dev/pandas
pandas-dev/pandas
python
6b93a0c6687ad1362ec58715b1751912783be411
BUG: Regression on pandas 1.5.0 using describe with Int64 dtype getting a TypeError ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have ...
Thanks @killerrex for the report From [git bisect](https://www.kaggle.com/code/marcogorelli/pandas-regression-example/notebook?scriptVersionId=106546912), this was due to #48501 cc @rhshadrach
diff --git a/doc/source/whatsnew/v1.5.1.rst b/doc/source/whatsnew/v1.5.1.rst index da0bd746e3da5..6798c7074228c 100644 --- a/doc/source/whatsnew/v1.5.1.rst +++ b/doc/source/whatsnew/v1.5.1.rst @@ -72,6 +72,7 @@ Fixed regressions - Fixed Regression in :meth:`Series.__setitem__` casting ``None`` to ``NaN`` for object dt...
diff --git a/pandas/tests/frame/methods/test_describe.py b/pandas/tests/frame/methods/test_describe.py index 3a1228ee5c4a5..24d327a101143 100644 --- a/pandas/tests/frame/methods/test_describe.py +++ b/pandas/tests/frame/methods/test_describe.py @@ -397,3 +397,15 @@ def test_describe_with_duplicate_columns(self): ...
["pandas/tests/frame/methods/test_describe.py::TestDataFrameDescribe::test_ea_with_na[Int16]", "pandas/tests/series/methods/test_describe.py::TestSeriesDescribe::test_numeric_result_dtype[UInt8]", "pandas/tests/series/methods/test_describe.py::TestSeriesDescribe::test_numeric_result_dtype[UInt32]", "pandas/tests/frame/...
["pandas/tests/series/methods/test_describe.py::TestSeriesDescribe::test_numeric_result_dtype[complex]", "pandas/tests/series/methods/test_describe.py::TestSeriesDescribe::test_describe_with_tz[pytz.FixedOffset(-300)]", "pandas/tests/series/methods/test_describe.py::TestSeriesDescribe::test_numeric_result_dtype[uint8]"...
null
true
2022-09-26T11:23:02Z
2
12
20
5,793
0
0.85
1
0.92
1
0.54
93.49
120
swe_gym::train::2087
swe_gym
train
2,087
Project-MONAI__MONAI-3619
Project-MONAI/MONAI
project-monai/monai
python
3907cb4b6ba79887a649ffc17f45ed9bebcd0431
GeneralizedDiceLoss is not differentiable **Describe the bug** The [code](https://github.com/Project-MONAI/MONAI/blob/a93b8ccb5c13e723f2ff28c1e54ffe1011c9f9b1/monai/losses/dice.py#L350) used for weight clamping in the forward method of the GeneralizedDiceLoss module is not differentiable: ```python w = self.w_func(gro...
Hi @josafatburmeister , Thanks for your feedback, let me try to verify and investigate this issue ASAP. I can reproduce the issue locally now, seems we don't test `requires_grad=True` in CI: https://github.com/Project-MONAI/MONAI/blob/dev/tests/test_generalized_dice_loss.py I will try to fix it and also test oth...
diff --git a/monai/losses/dice.py b/monai/losses/dice.py --- a/monai/losses/dice.py +++ b/monai/losses/dice.py @@ -348,10 +348,14 @@ def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch.Tensor: denominator = ground_o + pred_o w = self.w_func(ground_o.float()) - for b in w: - ...
diff --git a/tests/test_generalized_dice_loss.py b/tests/test_generalized_dice_loss.py --- a/tests/test_generalized_dice_loss.py +++ b/tests/test_generalized_dice_loss.py @@ -173,6 +173,26 @@ def test_input_warnings(self): loss = GeneralizedDiceLoss(to_onehot_y=True) loss.forward(chn_input, ch...
["tests/test_generalized_dice_loss.py::TestGeneralizedDiceLoss::test_batch", "tests/test_generalized_dice_loss.py::TestGeneralizedDiceLoss::test_differentiability"]
["tests/test_generalized_dice_loss.py::TestGeneralizedDiceLoss::test_ill_opts", "tests/test_generalized_dice_loss.py::TestGeneralizedDiceLoss::test_shape_04", "tests/test_generalized_dice_loss.py::TestGeneralizedDiceLoss::test_input_warnings", "tests/test_generalized_dice_loss.py::TestGeneralizedDiceLoss::test_shape_00...
null
true
2022-01-09T13:53:06Z
1
12
2
3,017
0
0.85
1
0.92
1
0.54
93.49
121
swe_bench_verified::test::211
swe_bench_verified
test
211
django__django-15957
django/django
django/django
python
f387d024fc75569d2a4a338bfda76cc2f328f627
Prefetch objects don't work with slices Description ​Prefetch() objects does not work with sliced querysets. For example the following code results in AssertionError: Cannot filter a query once a slice has been taken.: Category.objects.prefetch_related(Prefetch( 'post_set', queryset=Post.objects.all()[:3], to_attr=...
It seems to me that #26565 ("Allow Prefetch query to use .values()") is related. Hi ludwik, #26565 is about a different issue. The only way we could support slices would be to extract it from the provided queryset to make it filterable again and apply it when in-memory joining. The prefect queryset would still have to ...
diff --git a/django/db/models/fields/related_descriptors.py b/django/db/models/fields/related_descriptors.py --- a/django/db/models/fields/related_descriptors.py +++ b/django/db/models/fields/related_descriptors.py @@ -64,8 +64,10 @@ class Child(Model): """ from django.core.exceptions import FieldError -from django...
diff --git a/tests/prefetch_related/tests.py b/tests/prefetch_related/tests.py --- a/tests/prefetch_related/tests.py +++ b/tests/prefetch_related/tests.py @@ -1908,3 +1908,67 @@ def test_nested_prefetch_is_not_overwritten_by_related_object(self): self.assertIs(Room.house.is_cached(self.room), True) wi...
["test_foreignkey_reverse (prefetch_related.tests.PrefetchLimitTests)", "test_m2m_forward (prefetch_related.tests.PrefetchLimitTests)", "test_m2m_reverse (prefetch_related.tests.PrefetchLimitTests)", "test_reverse_ordering (prefetch_related.tests.PrefetchLimitTests)"]
["The prefetched relationship is used rather than populating the reverse", "test_bug (prefetch_related.tests.Ticket19607Tests)", "When intermediary results are prefetched without a destination", "In-bulk does correctly prefetch objects by not using .iterator()", "test_prefetch_nullable (prefetch_related.tests.NullableT...
null
true
2022-08-13T06:18:25Z
1
33
4
852
0
1
1
0.85
1
0.252
93.481
122
swe_gym::train::2411
swe_gym
train
2,411
modin-project__modin-6631
modin-project/modin
modin-project/modin
python
77b8d367962766ad5cfe45a2a0981827a6508214
BUG: .diff() does not work on modin.pandas.groupby.DataFrameGroupBy object ### Modin version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the latest released version of Modin. - [X] I have confirmed this bug exists on the main branch of Modin. (...
thanks for the detailed reproducer! Indeed, I reproduce that TypeError, will take a look
diff --git a/modin/pandas/groupby.py b/modin/pandas/groupby.py --- a/modin/pandas/groupby.py +++ b/modin/pandas/groupby.py @@ -23,7 +23,12 @@ import pandas.core.groupby from pandas._libs import lib from pandas.core.apply import reconstruct_func -from pandas.core.dtypes.common import is_integer, is_list_like, is_nume...
diff --git a/modin/pandas/test/test_groupby.py b/modin/pandas/test/test_groupby.py --- a/modin/pandas/test/test_groupby.py +++ b/modin/pandas/test/test_groupby.py @@ -2726,6 +2726,21 @@ def test_groupby_pct_change_diff_6194(): ) +def test_groupby_datetime_diff_6628(): + dates = pd.date_range(start="2023-01-...
["modin/pandas/test/test_groupby.py::test_groupby_datetime_diff_6628"]
["modin/pandas/test/test_groupby.py::test_agg_func_None_rename[False-by_and_agg_dict0]", "modin/pandas/test/test_groupby.py::test_validate_by", "modin/pandas/test/test_groupby.py::test_not_str_by[True-by4]", "modin/pandas/test/test_groupby.py::test_unknown_groupby[columns1]", "modin/pandas/test/test_groupby.py::test_gr...
null
true
2023-10-04T21:50:33Z
1
11
1
5,296
0
0.85
1
0.92
1
0.536667
93.48
123
swe_gym::train::1575
swe_gym
train
1,575
pandas-dev__pandas-47273
pandas-dev/pandas
pandas-dev/pandas
python
6db95e79297a4dcefff53ca151324949b0c956c3
BUG: DataFrame eval will not work with 'Timestamp' column name ### - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on the master bra...
The issue looks to be the fact that you've used "Timestamp" as a column name, and that word is used to refer to the Timestamp class. Simply renaming your column to "timestamp" would fix your issue. > The issue looks to be the fact that you've used "Timestamp" as a column name, and that word is used to refer to the Tim...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index a0d33cb513722..1379a13f0e42a 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -932,6 +932,8 @@ Conversion - Bug in :meth:`DataFrame.to_dict` for ``orient="list"`` or ``orient="index"`` was not returnin...
diff --git a/pandas/tests/computation/test_eval.py b/pandas/tests/computation/test_eval.py index b0ad2f69a75b9..672a87edbad66 100644 --- a/pandas/tests/computation/test_eval.py +++ b/pandas/tests/computation/test_eval.py @@ -49,6 +49,7 @@ _binary_ops_dict, _unary_math_ops, ) +from pandas.core.computation.sco...
["pandas/tests/computation/test_eval.py::test_eval_no_support_column_name[Timestamp]", "pandas/tests/computation/test_eval.py::test_eval_no_support_column_name[list]", "pandas/tests/computation/test_eval.py::test_eval_no_support_column_name[datetime]", "pandas/tests/computation/test_eval.py::test_eval_no_support_column...
["pandas/tests/computation/test_eval.py::TestScope::test_no_new_locals[numexpr-pandas]", "pandas/tests/computation/test_eval.py::TestEval::test_complex_cmp_ops[DataFrameNaN-DataFrameNaN-numexpr-python-or-gt-lt]", "pandas/tests/computation/test_eval.py::TestEval::test_binary_arith_ops[float-DataFrameNaN-python-python-/]...
null
true
2022-06-07T15:08:34Z
2
11
4
3,997
0
0.85
1
0.92
1
0.536667
93.48
124
swe_gym::train::1161
swe_gym
train
1,161
pandas-dev__pandas-51854
pandas-dev/pandas
pandas-dev/pandas
python
acf3395aaafbc15ce461f6667f0b1d63bf3766d1
BUG: Pandas 2.0rc0 can't handle string column with PyArrow (large_string error) ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have conf...
Thanks for the report. Could you post the full traceback? > Thanks for the report. Could you post the full traceback? Sure... <details> ```python --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) Cell In[4]...
diff --git a/pandas/core/arrays/arrow/dtype.py b/pandas/core/arrays/arrow/dtype.py index a262a45feb9c5..2ba0711de98f9 100644 --- a/pandas/core/arrays/arrow/dtype.py +++ b/pandas/core/arrays/arrow/dtype.py @@ -27,6 +27,7 @@ StorageExtensionDtype, register_extension_dtype, ) +from pandas.core.dtypes.dtypes imp...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index 712fccae83cfe..22920e077123e 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -39,6 +39,7 @@ from pandas.errors import PerformanceWarning from pandas.core.dtypes.common impor...
["pandas/tests/extension/test_arrow.py::test_arrow_dtype_type[arrow_dtype3-str]", "pandas/tests/extension/test_arrow.py::test_arrow_dtype_type[arrow_dtype7-CategoricalDtypeType]", "pandas/tests/extension/test_arrow.py::test_arrow_dtype_type[arrow_dtype5-list]", "pandas/tests/extension/test_arrow.py::test_arrow_dtype_ty...
["pandas/tests/extension/test_arrow.py::TestBaseSetitem::test_setitem_scalar[timestamp[s,", "pandas/tests/extension/test_arrow.py::TestConstructors::test_from_dtype[timestamp[us,", "pandas/tests/extension/test_arrow.py::TestBaseMethods::test_shift_0_periods[binary]", "pandas/tests/extension/test_arrow.py::TestBaseInter...
null
true
2023-03-09T00:43:39Z
1
11
5
3,318
0
0.85
1
0.92
1
0.536667
93.48
125
swe_gym::train::128
swe_gym
train
128
getmoto__moto-4972
getmoto/moto
getmoto/moto
python
1f9f4af1c42ca73224123a558102f565a62cd7ab
mock_logs delete_metric_filter raises unexpected InvalidParameterException #### Issue description When using the `moto.mock_logs`, `boto3` fails to delete a metric_filter arguing that the `logGroupName` parameter is invalid, even if the log group already exists and that the metric_filter was already created using the ...
Hi @guimorg, thanks for raising this! Marking it as a bug. Looks like our regex is a bit too strict when validating the name.
diff --git a/moto/logs/responses.py b/moto/logs/responses.py --- a/moto/logs/responses.py +++ b/moto/logs/responses.py @@ -9,6 +9,9 @@ # See http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/Welcome.html +REGEX_LOG_GROUP_NAME = r"[-._\/#A-Za-z0-9]+" + + def validate_param( param_name, param...
diff --git a/tests/test_logs/test_logs.py b/tests/test_logs/test_logs.py --- a/tests/test_logs/test_logs.py +++ b/tests/test_logs/test_logs.py @@ -181,26 +181,32 @@ def test_describe_metric_filters_multiple_happy(): @mock_logs def test_delete_metric_filter(): - conn = boto3.client("logs", "us-west-2") - - res...
["tests/test_logs/test_logs.py::test_delete_metric_filter"]
["tests/test_logs/test_logs.py::test_create_log_group[arn:aws:kms:us-east-1:000000000000:key/51d81fab-b138-4bd2-8a09-07fd6d37224d]", "tests/test_logs/test_logs.py::test_describe_log_streams_invalid_order_by[LogStreamname]", "tests/test_logs/test_logs.py::test_create_log_group_invalid_name_length[513]", "tests/test_logs...
null
true
2022-03-26 20:19:17
1
11
1
3,511
0
0.85
1
0.92
1
0.536667
93.48
126
swe_gym::train::44
swe_gym
train
44
getmoto__moto-6082
getmoto/moto
getmoto/moto
python
0fb00eda5f98d7b159fb2efc94fd96a52f911397
DynamoDB UpdateExpression Syntax with Special Characters Rejected with ValidationException Looks like this might relate to #4580 ### Problem Statement I am working with some internal tables where we use attributes prefixed by the underscore character to indicate metadata fields on DynamoDB records. For example, the `_...
Thanks for raising this @arohm-ff - marking it as a bug!
diff --git a/moto/dynamodb/parsing/tokens.py b/moto/dynamodb/parsing/tokens.py --- a/moto/dynamodb/parsing/tokens.py +++ b/moto/dynamodb/parsing/tokens.py @@ -116,8 +116,9 @@ def is_expression_attribute_name(cls, input_string: str) -> bool: An expression attribute name must begin with a pound sign (#), and be ...
diff --git a/tests/test_dynamodb/test_dynamodb_expression_tokenizer.py b/tests/test_dynamodb/test_dynamodb_expression_tokenizer.py --- a/tests/test_dynamodb/test_dynamodb_expression_tokenizer.py +++ b/tests/test_dynamodb/test_dynamodb_expression_tokenizer.py @@ -231,6 +231,18 @@ def test_expression_tokenizer_single_set...
["tests/test_dynamodb/test_dynamodb_expression_tokenizer.py::test_expression_tokenizer_single_set_action_attribute_name_leading_underscore"]
["tests/test_dynamodb/test_dynamodb_expression_tokenizer.py::test_expression_tokenizer_leading_underscore_in_attribute_value_expression", "tests/test_dynamodb/test_dynamodb_expression_tokenizer.py::test_expression_tokenizer_list_index_surrounded_with_whitespace", "tests/test_dynamodb/test_dynamodb_expression_tokenizer....
null
true
2023-03-17 12:10:00
1
10
1
3,801
0
0.85
1
0.92
1
0.533333
93.47
127
swe_gym::train::1638
swe_gym
train
1,638
pandas-dev__pandas-50530
pandas-dev/pandas
pandas-dev/pandas
python
e00b75b44230049a7877f8da67dc95bd91a3a52c
BUG: DatetimeIndex creation with BusinessHour frequency fails when first hour of the day is not included as Timestamp ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/ind...
take @mshah0722 would you mind me having a go at this as well? take
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 13b60f7f05352..c35a0abb3a389 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -881,6 +881,7 @@ Indexing - Bug in :func:`~DataFrame.describe` when formatting percentiles in the resulting index showed mo...
diff --git a/pandas/tests/tseries/offsets/test_business_hour.py b/pandas/tests/tseries/offsets/test_business_hour.py index 79e7a5ff67010..319cc053d5d7d 100644 --- a/pandas/tests/tseries/offsets/test_business_hour.py +++ b/pandas/tests/tseries/offsets/test_business_hour.py @@ -241,6 +241,12 @@ def test_sub(self, dt, off...
["pandas/tests/tseries/offsets/test_business_hour.py::TestBusinessHour::test_short_datetimeindex_creation", "pandas/tests/tseries/offsets/test_business_hour.py::TestBusinessHour::test_multiply_by_zero"]
["pandas/tests/tseries/offsets/test_business_hour.py::TestBusinessHour::test_neq[offset12-offset22]", "pandas/tests/tseries/offsets/test_business_hour.py::TestBusinessHour::test_neq[offset11-offset21]", "pandas/tests/tseries/offsets/test_business_hour.py::TestBusinessHour::test_eq_attribute[offset9]", "pandas/tests/tse...
null
true
2023-01-02T15:14:22Z
2
10
2
3,594
0
0.85
1
0.92
1
0.533333
93.47
128
swe_gym::train::1573
swe_gym
train
1,573
pandas-dev__pandas-48954
pandas-dev/pandas
pandas-dev/pandas
python
d8e76517ee98f957d461309de26022acde5714d8
BUG: guess_datetime_format doesn't guess format correctly for UTC+1 ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this b...
Can I take this? sure, though it might not be the simplest issue to start with
diff --git a/pandas/_libs/tslibs/parsing.pyx b/pandas/_libs/tslibs/parsing.pyx index a181133c14f2b..763530520cd29 100644 --- a/pandas/_libs/tslibs/parsing.pyx +++ b/pandas/_libs/tslibs/parsing.pyx @@ -62,6 +62,7 @@ from pandas._libs.tslibs.np_datetime cimport ( string_to_dts, ) from pandas._libs.tslibs.offsets c...
diff --git a/pandas/tests/tslibs/test_parsing.py b/pandas/tests/tslibs/test_parsing.py index 03084fcbdcb11..e0166c876cdf5 100644 --- a/pandas/tests/tslibs/test_parsing.py +++ b/pandas/tests/tslibs/test_parsing.py @@ -152,25 +152,27 @@ def test_parsers_month_freq(date_str, expected): ("2011-12-30T00:00:00", "%Y...
["pandas/tests/tslibs/test_parsing.py::test_guess_datetime_format_with_parseable_formats[2011-12-30T00:00:00+9-None]", "pandas/tests/tslibs/test_parsing.py::test_guess_datetime_format_with_parseable_formats[2011-12-30T00:00:00+9:0-None]", "pandas/tests/tslibs/test_parsing.py::test_guess_datetime_format_with_parseable_f...
["pandas/tests/tslibs/test_parsing.py::test_guess_datetime_format_with_dayfirst[True-%d/%m/%Y]", "pandas/tests/tslibs/test_parsing.py::test_guess_datetime_format_invalid_inputs[2013]", "pandas/tests/tslibs/test_parsing.py::test_parsers_quarter_invalid[22Q2005]", "pandas/tests/tslibs/test_parsing.py::test_does_not_conve...
null
true
2022-10-05T16:44:43Z
1
10
8
5,352
0
0.85
1
0.92
1
0.533333
93.47
129
swe_gym::train::1646
swe_gym
train
1,646
pandas-dev__pandas-52516
pandas-dev/pandas
pandas-dev/pandas
python
9271d25ca4cfa458deb068ccf14d2654516ff48a
BUG: call to _constructor of Series before __init__ is finished if initialized from dict ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I ...
Noting that we are considering deprecating `_constructor` returning a callable xref https://github.com/pandas-dev/pandas/issues/51772 https://github.com/pandas-dev/pandas/pull/52420 cc @jbrockmendel @theOehrly thanks for the report! This is actually a regression compared to 1.5, so labeled it as such. Will try to fix ...
diff --git a/doc/source/whatsnew/v2.0.1.rst b/doc/source/whatsnew/v2.0.1.rst index bf21d6402d621..fd00f3ed1ff0a 100644 --- a/doc/source/whatsnew/v2.0.1.rst +++ b/doc/source/whatsnew/v2.0.1.rst @@ -13,7 +13,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ -- +- Fixed regression for subcla...
diff --git a/pandas/tests/series/test_subclass.py b/pandas/tests/series/test_subclass.py index a5620de7de65b..a3550c6de6780 100644 --- a/pandas/tests/series/test_subclass.py +++ b/pandas/tests/series/test_subclass.py @@ -58,3 +58,21 @@ def test_equals(self): s2 = tm.SubclassedSeries([1, 2, 3]) assert ...
["pandas/tests/series/test_subclass.py::test_constructor_from_dict"]
["pandas/tests/series/test_subclass.py::TestSeriesSubclassing::test_explode", "pandas/tests/series/test_subclass.py::TestSeriesSubclassing::test_equals", "pandas/tests/series/test_subclass.py::TestSeriesSubclassing::test_to_frame", "pandas/tests/series/test_subclass.py::TestSeriesSubclassing::test_subclass_empty_repr",...
null
true
2023-04-07T13:33:40Z
2
9
1
4,573
0
0.85
1
0.92
1
0.53
93.46
130
swe_gym::train::1410
swe_gym
train
1,410
pandas-dev__pandas-54133
pandas-dev/pandas
pandas-dev/pandas
python
6e7025d50dbb1c669cddc557f8a1a9682de72fdc
BUG: Cannot pass both 'freq' and 'fill_value' to DataFrame.shift ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug ...
https://github.com/pandas-dev/pandas/pull/53832 is the relevant PR. cc @jbrockmendel Before #53832, passing both freq and fill_value would cause one to be silently ignored (off the top of my head I dont remember which, guessing fill_value). now it raises instead of ignoring. just pass one of them. @jbrockmendel i...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 31293a42a3977..137f2e5c12211 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -618,7 +618,7 @@ Other - Bug in :func:`assert_almost_equal` now throwing assertion error for two unequal sets (:issue:`5172...
diff --git a/pandas/tests/groupby/test_groupby_shift_diff.py b/pandas/tests/groupby/test_groupby_shift_diff.py index 656471b2f6eb0..cec8ea9d351cf 100644 --- a/pandas/tests/groupby/test_groupby_shift_diff.py +++ b/pandas/tests/groupby/test_groupby_shift_diff.py @@ -7,6 +7,7 @@ Series, Timedelta, Timestamp...
["pandas/tests/groupby/test_groupby_shift_diff.py::test_shift_periods_freq"]
["pandas/tests/groupby/test_groupby_shift_diff.py::test_multindex_empty_shift_with_fill", "pandas/tests/groupby/test_groupby_shift_diff.py::test_group_shift_with_null_key", "pandas/tests/groupby/test_groupby_shift_diff.py::test_group_diff_real_frame[int8]", "pandas/tests/groupby/test_groupby_shift_diff.py::test_group_d...
null
true
2023-07-15T00:32:51Z
2
9
1
4,857
0
0.85
1
0.92
1
0.53
93.46
131
swe_gym::train::1176
swe_gym
train
1,176
pandas-dev__pandas-49706
pandas-dev/pandas
pandas-dev/pandas
python
86f182829d2cfe2f4c380d7f2ecd6ea27d6e0f1d
BUG: `Series.searchsorted(...)` fails with `Timestamp` `DataFrame`s ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this b...
I have reproduced this issue on the main branch. I also tried `float`, `str` and `bool`. Their behavior on `DataFrame` is the same as `Series`. It seems that there is an implict conversion happens when `searchsorted` receives `DataFrame`. In this conversion, `Timestamp` is converted to `StringArray`. I will try to tak...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 1ca513e8f5e6a..4f61cc51e9f7e 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -740,6 +740,8 @@ Metadata Other ^^^^^ +- Bug in :meth:`Series.searchsorted` inconsistent behavior when accepting :class:...
diff --git a/pandas/tests/series/methods/test_searchsorted.py b/pandas/tests/series/methods/test_searchsorted.py index 5a7eb3f8cfc97..239496052b99b 100644 --- a/pandas/tests/series/methods/test_searchsorted.py +++ b/pandas/tests/series/methods/test_searchsorted.py @@ -1,5 +1,7 @@ import numpy as np +import pytest +i...
["pandas/tests/series/methods/test_searchsorted.py::TestSeriesSearchSorted::test_searchsorted_dataframe_fail"]
["pandas/tests/series/methods/test_searchsorted.py::TestSeriesSearchSorted::test_searchsorted_datetime64_scalar_mixed_timezones", "pandas/tests/series/methods/test_searchsorted.py::TestSeriesSearchSorted::test_searchsorted_datetime64_scalar", "pandas/tests/series/methods/test_searchsorted.py::TestSeriesSearchSorted::te...
null
true
2022-11-15T05:53:01Z
2
9
1
5,603
0
0.85
1
0.92
1
0.53
93.46
132
swe_gym::train::2120
swe_gym
train
2,120
Project-MONAI__MONAI-3042
Project-MONAI/MONAI
project-monai/monai
python
28fb7d6af1a74aac1576637403603de1c3d8a59a
GradCAM not working with cryptic error message **Describe the bug** I am trying to use the `GradCAM` on my model but I can't seem to get it working and the error isn't really helping me figure out the issue. Hoping someone here could provide some insight. For context, this model is based on a `resnet50` backbone, so t...
Strange here the param is `target_layers="model.layer4.2.relu"` but the error is about `KeyError: 'layer4.2.relu’`. It's not possible to reproduce the issue without `MyModule, MyDataModule`, could you make a self-contained example? I can then look into it. @wyli Here is a minimal reproducible example: ```py from mon...
diff --git a/monai/visualize/class_activation_maps.py b/monai/visualize/class_activation_maps.py --- a/monai/visualize/class_activation_maps.py +++ b/monai/visualize/class_activation_maps.py @@ -137,6 +137,11 @@ def __call__(self, x, class_idx=None, retain_graph=False): self.score = self.class_score(logits...
diff --git a/tests/test_vis_gradcam.py b/tests/test_vis_gradcam.py --- a/tests/test_vis_gradcam.py +++ b/tests/test_vis_gradcam.py @@ -88,6 +88,16 @@ def test_shape(self, input_data, expected_shape): result2 = cam(x=image, layer_idx=-1, class_idx=model(image).max(1)[-1].cpu()) torch.testing.assert_all...
["tests/test_vis_gradcam.py::TestGradientClassActivationMap::test_ill"]
["tests/test_vis_gradcam.py::TestGradientClassActivationMap::test_shape_0", "tests/test_vis_gradcam.py::TestGradientClassActivationMap::test_shape_1", "tests/test_vis_gradcam.py::TestGradientClassActivationMap::test_shape_2", "tests/test_vis_gradcam.py::TestGradientClassActivationMap::test_shape_3"]
null
true
2021-09-28T17:25:22Z
1
9
1
5,715
0
0.85
1
0.92
1
0.53
93.46
133
swe_gym::train::1278
swe_gym
train
1,278
pandas-dev__pandas-56767
pandas-dev/pandas
pandas-dev/pandas
python
d8e952949b7d325862d11289dad69da3e15b1435
BUG: Rounding on `BooleanDtype` raises an exception ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the...
After debugging a little more. It looks like `round(0)` is crashed by Pandas' `self._maybe_mask_result`[1] Whereas `round(4)` is crashed by numpy's `np.round` [2] [1] https://github.com/pandas-dev/pandas/blob/b2d9ec17c52084ee2b629633c9119c01ea11d387/pandas/core/arrays/masked.py#L844 [2] https://github.com/pan...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index b138e91b41661..93b63f99ea399 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -790,6 +790,7 @@ Numeric - Bug in :meth:`Series.__floordiv__` for :class:`ArrowDtype` with integral dtypes raising for larg...
diff --git a/pandas/tests/series/methods/test_round.py b/pandas/tests/series/methods/test_round.py index 7f60c94f10e4f..c330b7a7dfbbb 100644 --- a/pandas/tests/series/methods/test_round.py +++ b/pandas/tests/series/methods/test_round.py @@ -63,3 +63,12 @@ def test_round_nat(self, method, freq, unit): round_met...
["pandas/tests/series/methods/test_round.py::TestSeriesRound::test_round_ea_boolean"]
["pandas/tests/series/methods/test_round.py::TestSeriesRound::test_round_numpy_with_nan[float64]", "pandas/tests/series/methods/test_round.py::TestSeriesRound::test_round_nat[ns-5s-round]", "pandas/tests/series/methods/test_round.py::TestSeriesRound::test_round_nat[ns-s-round]", "pandas/tests/series/methods/test_round....
null
true
2024-01-07T18:16:26Z
3
9
1
3,747
0
0.85
1
0.92
1
0.53
93.46
134
swe_gym::train::1182
swe_gym
train
1,182
pandas-dev__pandas-54002
pandas-dev/pandas
pandas-dev/pandas
python
172b7c116a66c63bed605c633683778f828d2e57
BUG: Partial slicing of unordered datetimeindex inconsistent between providing start and end points ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas...
Thanks for your report. This certainly looks inconsistent. Investigations are welcome! What is the intended behaviour? If either endpoint is not in the index, then a keyerror should be returned? There are, AFAICT, a number of problems with the logic here: ```python mask = np.array(True) raise_mask...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 6390fbeed8548..8644caef21de2 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -368,6 +368,7 @@ Categorical Datetimelike ^^^^^^^^^^^^ - :meth:`DatetimeIndex.map` with ``na_action="ignore"`` now works ...
diff --git a/pandas/tests/indexing/test_partial.py b/pandas/tests/indexing/test_partial.py index 5d1d4ba6f638a..bc6e8aed449f3 100644 --- a/pandas/tests/indexing/test_partial.py +++ b/pandas/tests/indexing/test_partial.py @@ -664,5 +664,14 @@ def test_slice_irregular_datetime_index_with_nan(self): index = pd.to...
["pandas/tests/indexing/test_partial.py::TestStringSlicing::test_slice_irregular_datetime_index_with_nan", "pandas/tests/series/indexing/test_datetime.py::test_indexing_unordered"]
["pandas/tests/indexing/test_partial.py::TestEmptyFrameSetitemExpansion::test_loc_setitem_zerolen_list_length_must_match_columns", "pandas/tests/indexing/test_partial.py::TestEmptyFrameSetitemExpansion::test_empty_frame_setitem_index_name_retained", "pandas/tests/indexing/test_partial.py::TestPartialSetting::test_parti...
null
true
2023-07-05T10:16:25Z
2
9
2
3,094
0
0.85
1
0.92
1
0.53
93.46
135
swe_gym::train::818
swe_gym
train
818
iterative__dvc-8364
iterative/dvc
iterative/dvc
python
8b1e61d3c56c9fdf441d15a841239b60bb016b3c
pull: fails if pulling to a symlink from outside of the symlink # Bug Report ## Description When running `dvc pull path/to/symlink/*.dvc` from inside of a `dvc` repository, I get this error: ``` ERROR: unexpected error Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help! ``` I can...
Repro script: ```bash #!/bin/bash set -exu pushd $TMPDIR wsp=test_wspace rep=test_repo rm -rf $wsp && mkdir $wsp && pushd $wsp main=$(pwd) mkdir $rep && pushd $rep mkdir data git init dvc init echo data >> data/file dvc add data/file dvc remote add -d str $main/storage dvc push git add ...
diff --git a/dvc/repo/index.py b/dvc/repo/index.py --- a/dvc/repo/index.py +++ b/dvc/repo/index.py @@ -256,9 +256,7 @@ def partial_imports( collect_targets = ensure_list(targets) pairs = chain.from_iterable( - self.stage_collector.collect_granular( - target, recursive=r...
diff --git a/tests/func/test_stage.py b/tests/func/test_stage.py --- a/tests/func/test_stage.py +++ b/tests/func/test_stage.py @@ -265,6 +265,23 @@ def test_collect_repo_ignored_dir_unignored_pattern(tmp_dir, dvc, scm): assert dvc.stage.collect_repo() == [stage] +@pytest.mark.parametrize("with_deps", (False, T...
["tests/func/test_stage.py::test_collect_symlink[False]", "tests/func/test_stage.py::test_collect_symlink[True]"]
["tests/func/test_stage.py::test_md5_ignores_comments", "tests/func/test_stage.py::test_cmd_obj", "tests/func/test_stage.py::test_stage_run_checkpoint[False]", "tests/func/test_stage.py::TestExternalRemoteResolution::test_remote_output", "tests/func/test_stage.py::test_no_cmd", "tests/func/test_stage.py::test_stage_on_...
null
true
2022-09-26T18:03:21Z
2
9
2
3,675
0
0.85
1
0.92
1
0.53
93.46
136
swe_gym::train::1175
swe_gym
train
1,175
pandas-dev__pandas-48890
pandas-dev/pandas
pandas-dev/pandas
python
2f7dce4e6e5efcc8e4defd2edb5a0e7461469ab7
BUG: DataFrame.at fails when setting a whole row ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the ma...
Hey @Jeaksen , thanks for the report [From git bisect](https://www.kaggle.com/code/marcogorelli/pandas-regression-48729?scriptVersionId=106355081), looks this was caused by #47074 cc @jorisvandenbossche The new behavior is correct. at should only work on single values, not on a complete row I would assume from the ...
diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 8b6235374bed0..728130cc93b89 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -91,6 +91,7 @@ function as nv, np_percentile_argname, ) +from pandas.errors import InvalidIndexError from pandas.util._decorators import ( Appender...
diff --git a/pandas/tests/indexing/test_at.py b/pandas/tests/indexing/test_at.py index f6d2fb12c5d81..9df6cb640257e 100644 --- a/pandas/tests/indexing/test_at.py +++ b/pandas/tests/indexing/test_at.py @@ -211,8 +211,12 @@ def test_at_frame_raises_key_error2(self, indexer_al): def test_at_frame_multiple_columns(sel...
["pandas/tests/indexing/test_at.py::TestAtErrors::test_at_frame_multiple_columns", "pandas/tests/indexing/test_at.py::TestAtErrors::test_at_applied_for_rows"]
["pandas/tests/indexing/test_at.py::TestAtErrors::test_at_getitem_mixed_index_no_fallback", "pandas/tests/indexing/test_at.py::TestAtSetItemWithExpansion::test_at_setitem_expansion_series_dt64tz_value['US/Eastern']", "pandas/tests/indexing/test_at.py::TestAtSetItemWithExpansion::test_at_setitem_expansion_series_dt64tz_...
null
true
2022-09-30T15:37:14Z
1
8
2
3,910
0
0.85
1
0.92
1
0.526667
93.45
137
swe_gym::train::52
swe_gym
train
52
getmoto__moto-6212
getmoto/moto
getmoto/moto
python
8c0c688c7b37f87dfcc00dbf6318d4dd959f91f5
mock_athena fails to get "primary" work group Hello! After upgrading from moto version 4.1.4 to 4.1.7, we now experience errors when performing the `athena_client.get_work_group(WorkGroup="primary")` call. Querying any other work group than "primary" (existent or non-existent work groups) works fine. The only code ada...
Thanks for letting us know @dani-g1 - that is indeed a bug. Will raise a fix shortly.
diff --git a/moto/athena/models.py b/moto/athena/models.py --- a/moto/athena/models.py +++ b/moto/athena/models.py @@ -42,7 +42,7 @@ def __init__( self, athena_backend: "AthenaBackend", name: str, - configuration: str, + configuration: Dict[str, Any], description: str, ...
diff --git a/tests/test_athena/test_athena.py b/tests/test_athena/test_athena.py --- a/tests/test_athena/test_athena.py +++ b/tests/test_athena/test_athena.py @@ -12,7 +12,7 @@ def test_create_work_group(): client = boto3.client("athena", region_name="us-east-1") - response = client.create_work_group( + c...
["tests/test_athena/test_athena.py::test_get_primary_workgroup"]
["tests/test_athena/test_athena.py::test_create_and_get_workgroup", "tests/test_athena/test_athena.py::test_create_work_group", "tests/test_athena/test_athena.py::test_stop_query_execution", "tests/test_athena/test_athena.py::test_get_named_query", "tests/test_athena/test_athena.py::test_list_query_executions", "tests/...
null
true
2023-04-14 19:13:35
1
8
1
5,341
0
0.85
1
0.92
1
0.526667
93.45
138
swe_gym::train::1564
swe_gym
train
1,564
pandas-dev__pandas-48824
pandas-dev/pandas
pandas-dev/pandas
python
fba672389b74ca4afece56040ae079a1f2b71544
BUG: pandas 1.5 fails to groupby on (nullable) Int64 column with dropna=False ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confir...
cc @rhshadrach ``` commit 56a71845decdc308d4210d74c7a59e42f0762c31 Author: Richard Shadrach <45562402+rhshadrach@users.noreply.github.com> Date: Thu Aug 18 12:09:09 2022 -0400 BUG: algorithms.factorize moves null values when sort=False (#46601) ``` Thanks for the report! The PR identified above added c...
diff --git a/doc/source/whatsnew/v1.5.1.rst b/doc/source/whatsnew/v1.5.1.rst index f58e10a701740..ab80bdb9ed782 100644 --- a/doc/source/whatsnew/v1.5.1.rst +++ b/doc/source/whatsnew/v1.5.1.rst @@ -83,7 +83,7 @@ Fixed regressions - Fixed :meth:`.DataFrameGroupBy.size` not returning a Series when ``axis=1`` (:issue:`487...
diff --git a/pandas/tests/groupby/test_groupby_dropna.py b/pandas/tests/groupby/test_groupby_dropna.py index 360e3096ceb63..ee660dd073ce9 100644 --- a/pandas/tests/groupby/test_groupby_dropna.py +++ b/pandas/tests/groupby/test_groupby_dropna.py @@ -393,74 +393,91 @@ def test_groupby_drop_nan_with_multi_index(): tm...
["pandas/tests/groupby/test_groupby_dropna.py::test_no_sort_keep_na[True-UInt8-63]", "pandas/tests/groupby/test_groupby_dropna.py::test_no_sort_keep_na[True-Float64-63]", "pandas/tests/groupby/test_groupby_dropna.py::test_no_sort_keep_na[True-UInt32-63]", "pandas/tests/groupby/test_groupby_dropna.py::test_no_sort_keep_...
["pandas/tests/groupby/test_groupby_dropna.py::test_no_sort_keep_na[True-category-12]", "pandas/tests/groupby/test_groupby_dropna.py::test_no_sort_keep_na[True-Int16-50]", "pandas/tests/groupby/test_groupby_dropna.py::test_no_sort_keep_na[False-period[d]-30]", "pandas/tests/groupby/test_groupby_dropna.py::test_no_sort_...
null
true
2022-09-28T01:05:12Z
3
8
44
4,815
0
0.85
1
0.92
1
0.526667
93.45
139
swe_gym::train::1427
swe_gym
train
1,427
pandas-dev__pandas-49766
pandas-dev/pandas
pandas-dev/pandas
python
8020bf1b25ef50ae22f8c799df6982804a2bd543
BUG: can't use `.loc` with boolean values in MultiIndex ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on...
As per the [user guide][1], in the MultiIndex case the notation `.loc[True]` is shorthand for `.loc[(True,)]`. As a workaround use the tuple notation instead: ``` python import pandas as pd df = pd.DataFrame({'a': [True, True, False, False], 'b': [True, False, True, False], 'c': [1,2,3,4]}) df.set_index(['a', ...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 1ad66b07a9d08..620d16ccf8b41 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -661,6 +661,7 @@ Indexing ^^^^^^^^ - Bug in :meth:`DataFrame.reindex` filling with wrong values when indexing columns and ...
diff --git a/pandas/tests/frame/indexing/test_indexing.py b/pandas/tests/frame/indexing/test_indexing.py index 4e4d0590830de..be67ce50a0634 100644 --- a/pandas/tests/frame/indexing/test_indexing.py +++ b/pandas/tests/frame/indexing/test_indexing.py @@ -1436,6 +1436,24 @@ def test_loc_rhs_empty_warning(self): ...
["pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_loc_bool_multiindex[bool-True]", "pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_loc_bool_multiindex[boolean-True]"]
["pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_setting_mismatched_na_into_nullable_fails[Int16-null2]", "pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_set_2d_casting_date_to_int[col1-a]", "pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_...
null
true
2022-11-18T10:34:10Z
2
8
2
3,713
0
0.85
1
0.92
1
0.526667
93.45
140
swe_gym::train::1760
swe_gym
train
1,760
pandas-dev__pandas-48234
pandas-dev/pandas
pandas-dev/pandas
python
3370c8179de16b3f0556891a1ff06131e186dfd1
BUG: RecursionError when attempting to replace `np.nan` values under main branch ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have con...
From my testing and debugging, I think this regression is caused from PR #45304 (merged to main branch with the 1.5 milestone), specifically the change in the `coerce_to_target_dtype` method under `pandas/core/internals/blocks.py`. Reverting this method to its previous code avoids the RecursionError. solution is to add...
diff --git a/doc/source/whatsnew/v1.5.2.rst b/doc/source/whatsnew/v1.5.2.rst index aaf00804262bb..4f6274b9084da 100644 --- a/doc/source/whatsnew/v1.5.2.rst +++ b/doc/source/whatsnew/v1.5.2.rst @@ -13,7 +13,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ -- +- Fixed regression in :meth:`...
diff --git a/pandas/tests/frame/methods/test_replace.py b/pandas/tests/frame/methods/test_replace.py index 39d6bedf8d5ec..9eaba56a23e0f 100644 --- a/pandas/tests/frame/methods/test_replace.py +++ b/pandas/tests/frame/methods/test_replace.py @@ -1496,6 +1496,18 @@ def test_replace_list_with_mixed_type( result =...
["pandas/tests/series/methods/test_replace.py::TestSeriesReplace::test_replace_value_none_dtype_numeric[nan]", "pandas/tests/frame/methods/test_replace.py::TestDataFrameReplace::test_replace_value_none_dtype_numeric[2]", "pandas/tests/series/methods/test_replace.py::TestSeriesReplace::test_replace_value_none_dtype_nume...
["pandas/tests/frame/methods/test_replace.py::TestDataFrameReplace::test_regex_replace_dict_nested_non_first_character[string[python]]", "pandas/tests/series/methods/test_replace.py::TestSeriesReplace::test_replace_nat_with_tz", "pandas/tests/series/methods/test_replace.py::TestSeriesReplace::test_replace_commutative[s...
null
true
2022-08-24T20:04:25Z
2
8
6
3,295
0
0.85
1
0.92
1
0.526667
93.45
141
swe_gym::train::1251
swe_gym
train
1,251
pandas-dev__pandas-47446
pandas-dev/pandas
pandas-dev/pandas
python
fc113111e01c5da5a4f8f39de0b92b268d06cfed
BUG: Unexpected keyword argument `maxsplit` on `rsplit` even though it is accepted in vanilla Python ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of panda...
Hey @paw-lu The parameter rpslit does accept (`n`), but it's a bit different to `maxsplits`, as it treats 0 and -1 the same way (split as much as possible): ``` >>> string 'foo,bar,lorep' >>> string.rsplit(',', maxsplit=0) # no splits ['foo,bar,lorep'] >>> pd.Series(string).str.rsplit(',', n=0) # all splits...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index a5cb716317689..4c23e5e5b1906 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -705,6 +705,7 @@ Other Deprecations - Deprecated the ``closed`` argument in :meth:`interval_range` in favor of ``inclusive`...
diff --git a/pandas/tests/strings/test_split_partition.py b/pandas/tests/strings/test_split_partition.py index 74458c13e8df7..7d73414a672c8 100644 --- a/pandas/tests/strings/test_split_partition.py +++ b/pandas/tests/strings/test_split_partition.py @@ -130,6 +130,23 @@ def test_rsplit_max_number(any_string_dtype): ...
["pandas/tests/strings/test_split_partition.py::test_posargs_deprecation[rsplit]", "pandas/tests/strings/test_split_partition.py::test_posargs_deprecation[split]"]
["pandas/tests/strings/test_split_partition.py::test_partition_series_more_than_one_char[string[pyarrow]-partition-exp0]", "pandas/tests/strings/test_split_partition.py::test_partition_with_name[string[python]]", "pandas/tests/strings/test_split_partition.py::test_split_noargs[string[pyarrow]-rsplit]", "pandas/tests/st...
null
true
2022-06-21T17:26:03Z
2
8
2
3,158
0
0.85
1
0.92
1
0.526667
93.45
142
swe_gym::train::1225
swe_gym
train
1,225
pandas-dev__pandas-50171
pandas-dev/pandas
pandas-dev/pandas
python
5fe95c60c7b1db349a92e36b23816cfd4f2cc515
BUG: IndexError: .iloc requires numeric indexers, got [0 1 2 3] ### Pandas version checks - [x] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug e...
Thanks for reporting this @anbjork! Looks like the same issue as #39133? I think this is a bit different. The op should work already
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index d6e0bb2ae0830..b41768a215b68 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -753,6 +753,7 @@ Indexing - Bug in :meth:`DataFrame.loc` raising ``ValueError`` with ``bool`` indexer and :class:`MultiInde...
diff --git a/pandas/tests/frame/indexing/test_indexing.py b/pandas/tests/frame/indexing/test_indexing.py index 81a5e3d9947be..5ce8800de1f67 100644 --- a/pandas/tests/frame/indexing/test_indexing.py +++ b/pandas/tests/frame/indexing/test_indexing.py @@ -1437,6 +1437,28 @@ def test_loc_rhs_empty_warning(self): ...
["pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_iloc_ea_series_indexer", "pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_iloc_ea_series_indexer_with_na"]
["pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_setting_mismatched_na_into_nullable_fails[Int16-null2]", "pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_set_2d_casting_date_to_int[col1-a]", "pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_...
null
true
2022-12-10T20:55:32Z
2
8
2
3,105
0
0.85
1
0.92
1
0.526667
93.45
143
swe_gym::train::1727
swe_gym
train
1,727
pandas-dev__pandas-49438
pandas-dev/pandas
pandas-dev/pandas
python
6122c7de128fce3a84d91ef91b9dc3a914531745
BUG: pivot_table with margins=True on empty DataFrame results in ValueError ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirme...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 6d1f2afab3c6d..6c15c056fc7ce 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -441,7 +441,7 @@ Reshaping - Bug in :meth:`DataFrame.unstack` and :meth:`Series.unstack` unstacking wrong level of :class:`...
diff --git a/pandas/tests/reshape/test_pivot.py b/pandas/tests/reshape/test_pivot.py index b021b1aa97a0e..39ca2c1b75589 100644 --- a/pandas/tests/reshape/test_pivot.py +++ b/pandas/tests/reshape/test_pivot.py @@ -2086,8 +2086,9 @@ def test_pivot_table_aggfunc_scalar_dropna(self, dropna): tm.assert_frame_equa...
["pandas/tests/reshape/test_pivot.py::TestPivotTable::test_pivot_table_empty_aggfunc[True]"]
["pandas/tests/reshape/test_pivot.py::TestPivotTable::test_pivot_timegrouper", "pandas/tests/reshape/test_pivot.py::TestPivotTable::test_daily[86]", "pandas/tests/reshape/test_pivot.py::TestPivot::test_pivot_index_none", "pandas/tests/reshape/test_pivot.py::TestPivotTable::test_daily[106]", "pandas/tests/reshape/test_p...
null
true
2022-11-01T12:49:44Z
2
8
1
2,436
0
0.85
1
1
1
0.432667
93.448
144
swe_gym::train::1525
swe_gym
train
1,525
pandas-dev__pandas-48057
pandas-dev/pandas
pandas-dev/pandas
python
065b51c1a17c6ee472af0273c0a16dfc55e26fb5
REGR: ValueError: setting an array element with a sequence. when assigning an array.array using .loc ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of panda...
I get an error on master. Could you please try on master too? ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) ValueError: could not convert string to float: array('d', [45.345343]) The above exception wa...
diff --git a/doc/source/whatsnew/v1.4.4.rst b/doc/source/whatsnew/v1.4.4.rst index 57b8fdee5888a..32b4d1f8a8012 100644 --- a/doc/source/whatsnew/v1.4.4.rst +++ b/doc/source/whatsnew/v1.4.4.rst @@ -18,6 +18,7 @@ Fixed regressions - Fixed regression in :func:`concat` materializing :class:`Index` during sorting even if :...
diff --git a/pandas/tests/indexing/test_indexing.py b/pandas/tests/indexing/test_indexing.py index 9d10e487e0cc2..069e5a62895af 100644 --- a/pandas/tests/indexing/test_indexing.py +++ b/pandas/tests/indexing/test_indexing.py @@ -1,5 +1,6 @@ """ test fancy indexing & misc """ +import array from datetime import datet...
["pandas/tests/indexing/test_indexing.py::test_scalar_setitem_with_nested_value_length1[value0]", "pandas/tests/indexing/test_indexing.py::test_scalar_setitem_with_nested_value_length1[value3]", "pandas/tests/indexing/test_indexing.py::test_scalar_setitem_with_nested_value_length1[value1]"]
["pandas/tests/indexing/test_indexing.py::TestDatetimelikeCoercion::test_setitem_dt64_string_values[<UTC>-setitem-key1-Index]", "pandas/tests/indexing/test_indexing.py::TestDatetimelikeCoercion::test_setitem_dt64_string_values['Asia/Tokyo'-loc-key0-array1]", "pandas/tests/indexing/test_indexing.py::TestDatetimelikeCoer...
null
true
2022-08-12T13:22:48Z
2
7
3
3,332
0
0.85
1
0.92
1
0.523333
93.44
145
swe_gym::train::1917
swe_gym
train
1,917
facebookresearch__hydra-1671
facebookresearch/hydra
facebookresearch/hydra
python
2039df435ecfd7e382ffa07ddfaccf6e3972ab62
[bug] Interpolation of `hydra/launcher` configuration name in defaults list causes `hydra.errors.ConfigCompositionException` **Describe the bug** By switching from version `1.0` to `1.1`, this configuration: ```yaml defaults: ... - override hydra/launcher: ${oc.env:HYDRA_LAUNCHER} ``` throws the following error: `...
Thanks for reporting, we will take a look. This was never formally supported and worked accidentally. I have a solution that enables it, but there is a possibility that we will need to officially drop support for this. I recommend that you override your defaults list from the command line and not from an environmen...
diff --git a/hydra/_internal/defaults_list.py b/hydra/_internal/defaults_list.py --- a/hydra/_internal/defaults_list.py +++ b/hydra/_internal/defaults_list.py @@ -543,13 +543,6 @@ def add_child( for idx, dd in enumerate(children): if isinstance(dd, InputDefault) and dd.is_interpolation(): - i...
diff --git a/tests/defaults_list/data/group1/group2/interpolation_ext.yaml b/tests/defaults_list/data/group1/group2/interpolation_ext.yaml new file mode 100644 diff --git a/tests/defaults_list/data/group1/interpolation.yaml b/tests/defaults_list/data/group1/interpolation.yaml --- a/tests/defaults_list/data/group1/inter...
["tests/defaults_list/test_defaults_tree.py::test_interpolation[interpolation_in_nested]", "tests/defaults_list/test_defaults_tree.py::test_interpolation[interpolation_resolver_in_nested]"]
["tests/defaults_list/test_defaults_tree.py::test_deprecated_package_header_keywords[deprecated_headers/group_foo]", "tests/defaults_list/test_defaults_tree.py::test_interpolation[interpolation_with_nested_defaults_list_with_override]", "tests/defaults_list/test_defaults_tree.py::test_simple_defaults_tree_cases[empty]"...
null
true
2021-06-14T17:45:39Z
1
7
2
4,687
0
0.85
1
0.92
1
0.523333
93.44
146
swe_gym::train::1211
swe_gym
train
1,211
pandas-dev__pandas-47794
pandas-dev/pandas
pandas-dev/pandas
python
6db95e79297a4dcefff53ca151324949b0c956c3
BUG: Calling to_datetime With errrors="coerce" Still Raises After 50 Rows ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed ...
This seems related to https://github.com/pandas-dev/pandas/issues/31491 and https://github.com/pandas-dev/pandas/pull/31520 (though those are both closed). I can confirm this behavior does not appear on 0.25 as #31491 suggests. I'm also running into this error with Pandas 1.4.0. Some example code is below. ``` s = ...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index a0d33cb513722..3a9c24251b12f 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -897,6 +897,7 @@ Datetimelike - Bug in :meth:`DatetimeIndex.resolution` incorrectly returning "day" instead of "nanosecond"...
diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py index b128838318ac0..aa5c3324fe0f0 100644 --- a/pandas/tests/tools/test_to_datetime.py +++ b/pandas/tests/tools/test_to_datetime.py @@ -2777,3 +2777,34 @@ def test_to_datetime_monotonic_increasing_index(cache): result = to...
["pandas/tests/tools/test_to_datetime.py::test_to_datetime_cache_coerce_50_lines_outofbounds[50]", "pandas/tests/tools/test_to_datetime.py::test_to_datetime_cache_coerce_50_lines_outofbounds[51]", "pandas/tests/tools/test_to_datetime.py::test_to_datetime_cache_coerce_50_lines_outofbounds[55]"]
["pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers_timezone_minute_offsets_roundtrip[False-2013-01-01", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers[True-2005/11/09", "pandas/tests/tools/test_to_datetime.py::TestToDatetimeMisc::test_to_datetime_iso8...
null
true
2022-07-19T23:56:13Z
2
7
3
4,464
0
0.85
1
0.92
1
0.523333
93.44
147
swe_gym::train::1692
swe_gym
train
1,692
pandas-dev__pandas-51401
pandas-dev/pandas
pandas-dev/pandas
python
0e12bfcd4b4d4e6f5ebe6cc6f99c0a5836df4478
BUG: Some `Index` reductions fail with `string[pyarrow]` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists o...
Hmm, actually this may be more generic than when there's repeated data. I just stumbled across this case where there aren't any repeated items in the index ```python In [1]: import pandas as pd In [2]: x = pd.Index(['k', 'l', 'i'], dtype='string[python]') In [3]: x.min() Out[3]: 'i' In [4]: x = pd.Index([...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 75aec514031b4..14ae995d2fd57 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -308,6 +308,7 @@ Other enhancements - :meth:`Series.dropna` and :meth:`DataFrame.dropna` has gained ``ignore_index`` keywor...
diff --git a/pandas/tests/indexes/test_numpy_compat.py b/pandas/tests/indexes/test_numpy_compat.py index 788d03d5b7212..07ebe6fa04beb 100644 --- a/pandas/tests/indexes/test_numpy_compat.py +++ b/pandas/tests/indexes/test_numpy_compat.py @@ -158,10 +158,6 @@ def test_numpy_ufuncs_reductions(index, func, request): i...
["pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[string-pyarrow-minimum]", "pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[string-pyarrow-maximum]"]
["pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[float64-log1p]", "pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[timedelta-expm1]", "pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_other[tuples-isfinite]", "pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufunc...
null
true
2023-02-15T11:23:04Z
2
7
2
3,244
0
0.85
1
0.92
1
0.523333
93.44
148
swe_gym::train::1808
swe_gym
train
1,808
pandas-dev__pandas-48334
pandas-dev/pandas
pandas-dev/pandas
python
3f9c04275e87e806dc8f5082aa3f3fc987c41a51
BUG: TypeError exception when using read_html with extract_links='all' argument ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have conf...
This patch fixes your example locally ``` --- a/pandas/io/html.py +++ b/pandas/io/html.py @@ -34,6 +34,7 @@ from pandas.core.dtypes.common import is_list_like from pandas import isna from pandas.core.construction import create_series_with_explicit_dtype from pandas.core.indexes.base import Index +from pand...
diff --git a/pandas/io/html.py b/pandas/io/html.py index f890ad86519df..acf98a2f83921 100644 --- a/pandas/io/html.py +++ b/pandas/io/html.py @@ -34,6 +34,7 @@ from pandas import isna from pandas.core.construction import create_series_with_explicit_dtype from pandas.core.indexes.base import Index +from pandas.core.in...
diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index 045c22f106105..de0d4c1b49ea5 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -1416,3 +1416,18 @@ def test_extract_links_bad(self, spam_data): ) with pytest.raises(ValueError, match=msg): ...
["pandas/tests/io/test_html.py::TestReadHtml::test_extract_links_all_no_header[lxml]", "pandas/tests/io/test_html.py::TestReadHtml::test_extract_links_all_no_header[bs4]"]
["pandas/tests/io/test_html.py::TestReadHtml::test_file_url[lxml]", "pandas/tests/io/test_html.py::TestReadHtml::test_rowspan_only_rows[bs4]", "pandas/tests/io/test_html.py::TestReadHtml::test_parse_header_of_non_string_column[lxml]", "pandas/tests/io/test_html.py::TestReadHtml::test_bool_header_arg[True-lxml]", "panda...
null
true
2022-08-31T17:12:50Z
1
7
2
4,035
0
0.85
1
0.92
1
0.523333
93.44
149
swe_gym::train::1800
swe_gym
train
1,800
pandas-dev__pandas-48797
pandas-dev/pandas
pandas-dev/pandas
python
5e503b4bdb6c21a4813a210a1078bca9a251ff7b
REGR: df.apply('any', axis=1) fails with ValueError ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the...
Thanks @vnlitvinov for the report, looks like this was caused by https://github.com/pandas-dev/pandas/pull/44896 Yep, can confirm: ``` commit a59582da8c9fa410ac05e25ee117a7fef996247f Author: Sachin Yadav <40866128+yadav-sachin@users.noreply.github.com> Date: Mon Apr 11 01:04:27 2022 +0530 DEPR: non-keywo...
diff --git a/doc/source/whatsnew/v1.5.1.rst b/doc/source/whatsnew/v1.5.1.rst index ce19453691018..855bcb706b210 100644 --- a/doc/source/whatsnew/v1.5.1.rst +++ b/doc/source/whatsnew/v1.5.1.rst @@ -81,6 +81,8 @@ Fixed regressions - Fixed regression in :meth:`DataFrame.fillna` replacing wrong values for ``datetime64[ns]...
diff --git a/pandas/tests/apply/test_frame_apply.py b/pandas/tests/apply/test_frame_apply.py index d2882f46d25bf..3bcb7d964fad1 100644 --- a/pandas/tests/apply/test_frame_apply.py +++ b/pandas/tests/apply/test_frame_apply.py @@ -1604,3 +1604,38 @@ def test_unique_agg_type_is_series(test, constant): result = df1.ag...
["pandas/tests/apply/test_frame_apply.py::test_any_apply_keyword_non_zero_axis_regression"]
["pandas/tests/groupby/test_any_all.py::test_object_type_missing_vals[DataFrame-all-data2-True]", "pandas/tests/apply/test_frame_apply.py::test_result_type_series_result_other_index", "pandas/tests/apply/test_frame_apply.py::test_applymap_empty[<lambda>-expected0]", "pandas/tests/apply/test_frame_apply.py::test_agg_axi...
null
true
2022-09-26T22:39:05Z
2
7
1
3,566
0
0.85
1
0.92
1
0.523333
93.44
150
swe_gym::train::1772
swe_gym
train
1,772
pandas-dev__pandas-50332
pandas-dev/pandas
pandas-dev/pandas
python
3da778cb04a2f62461f103c1669ff02f430f9171
BUG: missing values encoded in pandas.Int64Dtype not supported by json table scheme - [x] I have checked that this issue has not already been reported. - [x] I have confirmed this bug exists on the latest version of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note...
can you provide more descriptive title xref #29752 cc @jorisvandenbossche
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index bc5d66e8e7955..f75242d32df1a 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -876,6 +876,7 @@ I/O - Bug when a pickling a subset PyArrow-backed data that would serialize the entire data instead of the...
diff --git a/pandas/tests/io/json/test_json_table_schema_ext_dtype.py b/pandas/tests/io/json/test_json_table_schema_ext_dtype.py index ae926173e129b..cf521aafdc241 100644 --- a/pandas/tests/io/json/test_json_table_schema_ext_dtype.py +++ b/pandas/tests/io/json/test_json_table_schema_ext_dtype.py @@ -8,9 +8,13 @@ impor...
["pandas/tests/io/json/test_json_table_schema_ext_dtype.py::TestTableOrient::test_json_ext_dtype_reading", "pandas/tests/io/json/test_json_table_schema_ext_dtype.py::TestTableOrient::test_json_ext_dtype_reading_roundtrip"]
["pandas/tests/io/json/test_json_table_schema_ext_dtype.py::TestTableSchemaType::test_as_json_table_type_ext_date_array_dtype[date_data0]", "pandas/tests/io/json/test_json_table_schema_ext_dtype.py::TestTableSchemaType::test_as_json_table_type_ext_date_dtype", "pandas/tests/io/json/test_json_table_schema_ext_dtype.py::...
null
true
2022-12-17T23:29:48Z
2
7
2
3,151
0
0.85
1
0.92
1
0.523333
93.44
151
swe_gym::train::1529
swe_gym
train
1,529
pandas-dev__pandas-47757
pandas-dev/pandas
pandas-dev/pandas
python
5eca3905a171f570ac2e07ea891237e5156754f8
BUG: wide_to_long fails/works depending on whether id variable is string/object ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have conf...
@MichaelTiemannOSC just as an addition, if you are picking this up; maybe `pd.wide_to_long` can also be rewritten to be more performant
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index 22a5f2a08362f..841b24bb06b6c 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -1019,6 +1019,7 @@ Reshaping - Bug in :meth:`DataFrame.join` with a list when using suffixes to join DataFrames with duplic...
diff --git a/pandas/tests/reshape/test_melt.py b/pandas/tests/reshape/test_melt.py index 4fbfee6f829ba..2013b3484ebff 100644 --- a/pandas/tests/reshape/test_melt.py +++ b/pandas/tests/reshape/test_melt.py @@ -1086,3 +1086,27 @@ def test_warn_of_column_name_value(self): with tm.assert_produces_warning(FutureWar...
["pandas/tests/reshape/test_melt.py::TestWideToLong::test_missing_stubname[string]"]
["pandas/tests/reshape/test_melt.py::TestMelt::test_pandas_dtypes[col0]", "pandas/tests/reshape/test_melt.py::TestWideToLong::test_mixed_type_suffix", "pandas/tests/reshape/test_melt.py::TestMelt::test_tuple_vars_fail_with_multiindex[id_vars0-value_vars0]", "pandas/tests/reshape/test_melt.py::TestWideToLong::test_chara...
null
true
2022-07-16T20:57:00Z
2
7
1
3,824
0
0.85
1
0.92
1
0.523333
93.44
152
swe_gym::train::1340
swe_gym
train
1,340
pandas-dev__pandas-56120
pandas-dev/pandas
pandas-dev/pandas
python
38e29ab7d049015b428a880ed0a160b10418fae6
BUG: Unclear error message assign a column with an empty DataFrame Edit: This turned out to be an issue with the error message when setting a single column using a DataFrame with no columns; see https://github.com/pandas-dev/pandas/issues/55956#issuecomment-1819359136 - rhshadach ### Pandas version checks - [X] I hav...
> I was expecting to see `KeyError 'test'` in the error traceback Why are you expecting the provided lambda to get called? E.g. ``` for x in []: raise ValueError ``` does not raise an error. In your case, there are now rows to iterate over, so you get an empty DataFrame. ``` df = pd.DataFrame() print(...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 280eb11abb781..a23270fba9c9e 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -496,6 +496,7 @@ Other - Bug in :meth:`Dataframe.from_dict` which would always sort the rows of the created :class:`DataFra...
diff --git a/pandas/tests/frame/indexing/test_setitem.py b/pandas/tests/frame/indexing/test_setitem.py index bd916f230bead..bc632209ff7e1 100644 --- a/pandas/tests/frame/indexing/test_setitem.py +++ b/pandas/tests/frame/indexing/test_setitem.py @@ -93,6 +93,11 @@ def test_setitem_error_msmgs(self): with pytest...
["pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItem::test_setitem_error_msmgs"]
["pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItemBooleanMask::test_setitem_ea_boolean_mask", "pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItemBooleanMask::test_setitem_loc_only_false_indexer_dtype_changed[Series]", "pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItem::te...
null
true
2023-11-22T22:01:57Z
2
7
1
4,363
0
0.85
1
0.92
1
0.523333
93.44
153
swe_gym::train::1590
swe_gym
train
1,590
pandas-dev__pandas-55761
pandas-dev/pandas
pandas-dev/pandas
python
192a4e3e5964dcf991db5225bfc4a468e6ea90ed
BUG: Taking a diff on datetimes yield an OverflowError (or TypeError) in pandas==2.1.0 ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I ha...
I can confirm this is a bug on the main branch. I ran both test cases locally on the main branch `2.1.0` and received errors on each.
diff --git a/doc/source/whatsnew/v2.1.3.rst b/doc/source/whatsnew/v2.1.3.rst index 1359123ef153e..3b1cd1c152baa 100644 --- a/doc/source/whatsnew/v2.1.3.rst +++ b/doc/source/whatsnew/v2.1.3.rst @@ -21,7 +21,7 @@ Fixed regressions Bug fixes ~~~~~~~~~ -- +- Bug in :meth:`DatetimeIndex.diff` raising ``TypeError`` (:iss...
diff --git a/pandas/tests/indexes/test_datetimelike.py b/pandas/tests/indexes/test_datetimelike.py index 71cc7f29c62bc..5ad2e9b2f717e 100644 --- a/pandas/tests/indexes/test_datetimelike.py +++ b/pandas/tests/indexes/test_datetimelike.py @@ -159,3 +159,11 @@ def test_where_cast_str(self, simple_index): result...
["pandas/tests/indexes/test_datetimelike.py::TestDatetimeLike::test_diff[ns]", "pandas/tests/indexes/test_datetimelike.py::TestDatetimeLike::test_diff[ms]", "pandas/tests/indexes/test_datetimelike.py::TestDatetimeLike::test_diff[us]", "pandas/tests/indexes/test_datetimelike.py::TestDatetimeLike::test_diff[s]"]
["pandas/tests/indexes/test_datetimelike.py::TestDatetimeLike::test_getitem_preserves_freq[simple_index2]", "pandas/tests/indexes/test_datetimelike.py::TestDatetimeLike::test_view[simple_index1]", "pandas/tests/indexes/test_datetimelike.py::TestDatetimeLike::test_map_dictlike[simple_index1-<lambda>1]", "pandas/tests/in...
null
true
2023-10-30T12:03:06Z
2
6
4
3,713
0
0.85
1
0.92
1
0.52
93.43
154
swe_gym::train::1324
swe_gym
train
1,324
pandas-dev__pandas-57139
pandas-dev/pandas
pandas-dev/pandas
python
dc5586baa9e47318051ce311b4f4da765e632490
BUG: empty dataframe indexing raises ValueError: buffer source array is read-only only when coming from db ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of...
@jkittner Somehow this is occurring in pandas versions >= 2.0.0 but not for version 1.5.3. Haven't checked for versions below that.
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index ff5fadec735e6..adf79ef5e7714 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -27,7 +27,7 @@ Fixed regressions Bug fixes ~~~~~~~~~ -- +- Fixed bug in :meth:`DataFrame.__getitem__` for empty :class:`...
diff --git a/pandas/tests/indexes/base_class/test_constructors.py b/pandas/tests/indexes/base_class/test_constructors.py index fd5176a28565e..338509dd239e6 100644 --- a/pandas/tests/indexes/base_class/test_constructors.py +++ b/pandas/tests/indexes/base_class/test_constructors.py @@ -71,3 +71,10 @@ def test_inference_o...
["pandas/tests/indexes/base_class/test_constructors.py::TestIndexConstructor::test_constructor_not_read_only", "pandas/tests/indexes/test_common.py::test_compare_read_only_array"]
["pandas/tests/indexes/test_common.py::TestCommon::test_drop_duplicates[int8-last]", "pandas/tests/indexes/test_common.py::TestCommon::test_hasnans_isnans[complex128]", "pandas/tests/indexes/test_common.py::TestCommon::test_astype_preserves_name[bool-object-category]", "pandas/tests/indexes/test_common.py::test_sort_va...
null
true
2024-01-30T00:51:26Z
3
6
2
4,880
0
0.85
1
0.92
1
0.52
93.43
155
swe_gym::train::305
swe_gym
train
305
getmoto__moto-5960
getmoto/moto
getmoto/moto
python
d1e3f50756fdaaea498e8e47d5dcd56686e6ecdf
Scan of DynamoDB table with GSI ignores projection type and returns all attributes ## Description Scanning the global secondary index (GSI) of a dynamodb table with the GSI projection type set to `INCLUDE` or `KEYS_ONLY` returns all the table attributes (i.e. ignores which attributes are projected to the index). ## S...
Thanks for raising this and providing the test cased @DrGFreeman! Marking it as a bug.
diff --git a/moto/dynamodb/models/table.py b/moto/dynamodb/models/table.py --- a/moto/dynamodb/models/table.py +++ b/moto/dynamodb/models/table.py @@ -843,6 +843,12 @@ def scan( if passes_all_conditions: results.append(item) + results = copy.deepcopy(results) + if index_nam...
diff --git a/tests/test_dynamodb/test_dynamodb.py b/tests/test_dynamodb/test_dynamodb.py --- a/tests/test_dynamodb/test_dynamodb.py +++ b/tests/test_dynamodb/test_dynamodb.py @@ -4708,6 +4708,17 @@ def test_gsi_projection_type_include(): } ) + # Same when scanning the table + items = table.scan(In...
["tests/test_dynamodb/test_dynamodb.py::test_gsi_projection_type_include", "tests/test_dynamodb/test_dynamodb.py::test_lsi_projection_type_keys_only"]
["tests/test_dynamodb/test_dynamodb.py::test_remove_list_index__remove_existing_nested_index", "tests/test_dynamodb/test_dynamodb.py::test_basic_projection_expressions_using_query_with_attr_expression_names", "tests/test_dynamodb/test_dynamodb.py::test_transact_write_items_put_conditional_expressions_return_values_on_c...
null
true
2023-02-21 22:33:47
1
6
2
4,714
0
0.85
1
0.92
1
0.52
93.43
156
swe_gym::train::1679
swe_gym
train
1,679
pandas-dev__pandas-55534
pandas-dev/pandas
pandas-dev/pandas
python
820d5a902f50b076d10fbc97a2b50d4d2995cd4e
BUG: Series.str.extractall with arrow string returns object dtype ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug...
Thanks for the bug report. I don't think this is implemented yet for the pyarrow string dtype. @lithomas1 I'm happy to take this one. Just wanted to confirm the expected behaviour to close this particular issue. Should it just raise a NotImplementedError for now and is it ok to implement this for the pyarrow string...
diff --git a/doc/source/whatsnew/v2.1.2.rst b/doc/source/whatsnew/v2.1.2.rst index 28b271f9cf446..97a718dd496e9 100644 --- a/doc/source/whatsnew/v2.1.2.rst +++ b/doc/source/whatsnew/v2.1.2.rst @@ -31,6 +31,7 @@ Bug fixes - Fixed bug in :meth:`Series.all` and :meth:`Series.any` not treating missing values correctly fo...
diff --git a/pandas/tests/strings/test_extract.py b/pandas/tests/strings/test_extract.py index 4773c13aad376..b8319e90e09a8 100644 --- a/pandas/tests/strings/test_extract.py +++ b/pandas/tests/strings/test_extract.py @@ -4,6 +4,8 @@ import numpy as np import pytest +from pandas.core.dtypes.dtypes import ArrowDtype ...
["pandas/tests/strings/test_extract.py::test_extractall_preserves_dtype"]
["pandas/tests/strings/test_extract.py::test_extract_dataframe_capture_groups_index[range-string[python]]", "pandas/tests/strings/test_extract.py::test_extract_index_one_two_groups", "pandas/tests/strings/test_extract.py::test_extract_expand_capture_groups_index[float32-object]", "pandas/tests/strings/test_extract.py::...
null
true
2023-10-15T16:12:34Z
2
6
1
3,358
0
0.85
1
0.92
1
0.52
93.43
157
swe_bench_verified::test::144
swe_bench_verified
test
144
django__django-14140
django/django
django/django
python
45814af6197cfd8f4dc72ee43b90ecde305a1d5a
Combining Q() objects with boolean expressions crashes. Description (last modified by jonathan-golorry) Currently Q objects with 1 child are treated differently during deconstruct. >>> from django.db.models import Q >>> Q(x=1).deconstruct() ('django.db.models.Q', (), {'x': 1}) >>> Q(x=1, y=2).deconstruct() ('django...
Conditional expressions can be combined together, so it's not necessary to encapsulate Exists() with Q(). Moreover it's an undocumented and untested to pass conditional expressions to Q(). Nevertheless I think it makes sense to support this. There is no need to change the current format of deconstruct(), it should be e...
diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py --- a/django/db/models/query_utils.py +++ b/django/db/models/query_utils.py @@ -84,14 +84,10 @@ def deconstruct(self): path = '%s.%s' % (self.__class__.__module__, self.__class__.__name__) if path.startswith('django.db.mode...
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py --- a/tests/expressions/tests.py +++ b/tests/expressions/tests.py @@ -833,11 +833,21 @@ def test_boolean_expression_combined_with_empty_Q(self): Q() & Exists(is_poc), Exists(is_poc) | Q(), Q() | Exists(is_poc), +...
["test_deconstruct (queries.test_q.QTests)", "test_deconstruct_boolean_expression (queries.test_q.QTests)", "test_deconstruct_negated (queries.test_q.QTests)", "test_boolean_expression_combined_with_empty_Q (expressions.tests.BasicExpressionsTests)"]
["test_aggregates (expressions.tests.ReprTests)", "test_distinct_aggregates (expressions.tests.ReprTests)", "test_expressions (expressions.tests.ReprTests)", "test_filtered_aggregates (expressions.tests.ReprTests)", "test_functions (expressions.tests.ReprTests)", "test_empty_group_by (expressions.tests.ExpressionWrappe...
null
true
2021-03-17T11:37:55Z
1
12
4
1,147
0
1
1
0.85
1
0.231167
93.4185
158
swe_gym::train::2262
swe_gym
train
2,262
Project-MONAI__MONAI-4263
Project-MONAI/MONAI
project-monai/monai
python
0bbeb1e084d1c06a5f14af70ad340c798a1567aa
Some bug in `transforms.RandCropByPosNegLabeld` caused by `spatial_size` **Describe the bug** `RandCropByPosNegLabeld.spatial_size` will be wrongly replaced when the transform function applied to sequential data. **To Reproduce** ``` from monai.transforms import RandCropByPosNegLabeld import numpy as np trans = RandCr...
diff --git a/monai/transforms/croppad/array.py b/monai/transforms/croppad/array.py --- a/monai/transforms/croppad/array.py +++ b/monai/transforms/croppad/array.py @@ -903,7 +903,7 @@ def __init__( bg_indices: Optional[NdarrayOrTensor] = None, allow_smaller: bool = False, ) -> None: - self....
diff --git a/tests/test_rand_crop_by_pos_neg_label.py b/tests/test_rand_crop_by_pos_neg_label.py --- a/tests/test_rand_crop_by_pos_neg_label.py +++ b/tests/test_rand_crop_by_pos_neg_label.py @@ -118,6 +118,7 @@ def test_type_shape(self, input_param, input_data, expected_shape): cropper = RandCropByPosNegLa...
["tests/test_rand_crop_by_pos_neg_label.py::TestRandCropByPosNegLabel::test_type_shape_3", "tests/test_rand_crop_by_pos_neg_label.py::TestRandCropByPosNegLabel::test_type_shape_2", "tests/test_rand_crop_by_pos_neg_label.py::TestRandCropByPosNegLabel::test_type_shape_4", "tests/test_rand_crop_by_pos_neg_label.py::TestRa...
[]
null
true
2022-05-12T08:20:08Z
2
32
10
1,884
0
0.85
1
1
1
0.420667
93.412
159
swe_bench_verified::test::416
swe_bench_verified
test
416
sphinx-doc__sphinx-9320
sphinx-doc/sphinx
sphinx-doc/sphinx
python
e05cef574b8f23ab1b57f57e7da6dee509a4e230
`sphinx-quickstart` with existing conf.py doesn't exit easily **Describe the bug** I've attached a screenshot in the screenshots section which I think explains the bug better. - I'm running `sphinx-quickstart` in a folder with a conf.py already existing. - It says *"Please enter a new root path name (or just Enter to ...
I could try fix this myself (maybe?) Good catch @dogenstein! In my opinion, if the selected path already has a `conf.py`, `sphinx-quickstart` should exit with status 1 immediately.
diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -95,6 +95,12 @@ def is_path(x: str) -> str: return x +def is_path_or_empty(x: str) -> str: + if x == '': + return x + return is_path(x) + + def allow_empty(x: str) -> ...
diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py --- a/tests/test_quickstart.py +++ b/tests/test_quickstart.py @@ -10,6 +10,7 @@ import time from io import StringIO +from os import path import pytest @@ -250,3 +251,18 @@ def test_extensions(tempdir): ns = {} exec(conffile.read_text(),...
["tests/test_quickstart.py::test_exits_when_existing_confpy"]
["tests/test_quickstart.py::test_do_prompt", "tests/test_quickstart.py::test_do_prompt_inputstrip", "tests/test_quickstart.py::test_do_prompt_with_nonascii", "tests/test_quickstart.py::test_quickstart_defaults", "tests/test_quickstart.py::test_quickstart_all_answers", "tests/test_quickstart.py::test_generated_files_eol...
null
true
2021-06-11T13:29:04Z
1
8
1
1,072
0
1
1
0.85
1
0.205333
93.341
160
swe_bench_verified::test::278
swe_bench_verified
test
278
matplotlib__matplotlib-25332
matplotlib/matplotlib
matplotlib/matplotlib
python
66ba515e671638971bd11a34cff12c107a437e0b
[Bug]: Unable to pickle figure with aligned labels ### Bug summary Unable to pickle figure after calling `align_labels()` ### Code for reproduction ```python import matplotlib.pyplot as plt import pickle fig = plt.figure() ax1 = fig.add_subplot(211) ax2 = fig.add_subplot(212) time=[0,1,2,3,4] speed=[40000,4300,450...
As you've noted, pickling is pretty fragile. Do you _need_ to pickle?
diff --git a/lib/matplotlib/cbook.py b/lib/matplotlib/cbook.py --- a/lib/matplotlib/cbook.py +++ b/lib/matplotlib/cbook.py @@ -788,6 +788,19 @@ class Grouper: def __init__(self, init=()): self._mapping = {weakref.ref(x): [weakref.ref(x)] for x in init} + def __getstate__(self): + return { + ...
diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py --- a/lib/matplotlib/tests/test_pickle.py +++ b/lib/matplotlib/tests/test_pickle.py @@ -58,6 +58,7 @@ def _generate_complete_test_figure(fig_ref): # Ensure lists also pickle correctly. plt.subplot(3, 3, 1) plt.plot(lis...
["lib/matplotlib/tests/test_pickle.py::test_complete[png]"]
["lib/matplotlib/tests/test_pickle.py::test_simple", "lib/matplotlib/tests/test_pickle.py::test_gcf", "lib/matplotlib/tests/test_pickle.py::test_no_pyplot", "lib/matplotlib/tests/test_pickle.py::test_renderer", "lib/matplotlib/tests/test_pickle.py::test_image", "lib/matplotlib/tests/test_pickle.py::test_polar", "lib/ma...
null
true
2023-02-26T11:18:40Z
1
13
1
937
0
1
1
0.85
1
0.1995
93.3235
161
swe_gym::train::2407
swe_gym
train
2,407
modin-project__modin-7075
modin-project/modin
modin-project/modin
python
7fc119dbf06ef0a34bf61e29514b5cafa51b7dbb
BUG: The H&M benchmark fails on Ray ### Modin version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the latest released version of Modin. - [X] I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow [thi...
diff --git a/modin/core/execution/ray/common/engine_wrapper.py b/modin/core/execution/ray/common/engine_wrapper.py --- a/modin/core/execution/ray/common/engine_wrapper.py +++ b/modin/core/execution/ray/common/engine_wrapper.py @@ -307,6 +307,19 @@ def post_materialize(self, materialized): """ raise No...
diff --git a/modin/test/storage_formats/pandas/test_internals.py b/modin/test/storage_formats/pandas/test_internals.py --- a/modin/test/storage_formats/pandas/test_internals.py +++ b/modin/test/storage_formats/pandas/test_internals.py @@ -41,7 +41,10 @@ NPartitions.put(4) if Engine.get() == "Ray": + import ray +...
["modin/test/storage_formats/pandas/test_internals.py::test_materialization_hook_serialization"]
["modin/test/storage_formats/pandas/test_internals.py::test_reorder_labels_cache[unbalanced_partitioning-no_reordering-projection_only]", "modin/test/storage_formats/pandas/test_internals.py::TestZeroComputationDtypes::test_preserve_dtypes_setitem[3.5-value_dtype0-unknown]", "modin/test/storage_formats/pandas/test_inte...
null
true
2024-03-12T20:43:56Z
1
13
1
2,026
0
0.85
1
1
1
0.381
93.293
162
swe_bench_verified::test::58
swe_bench_verified
test
58
django__django-11740
django/django
django/django
python
003bb34b218adb23d1a7e67932a6ba9b3c4dcc81
Change uuid field to FK does not create dependency Description (last modified by Simon Charette) Hi! I am new in django community, so please help me, because i really dont know is it really "bug". I have a django project named "testproject" and two apps: testapp1, testapp2. It will be simpler to understand, with th...
Django project which show the bug There's a lot of history in here, so it may turn out this is a duplicate, but I'll accept this for now, as there's certainly a bug. makemigrations generats this: dependencies = [ ('testapp1', '0002_app1_another_app'), ] operations = [ migrations.AlterField( model_name='app1', name='ano...
diff --git a/django/db/migrations/autodetector.py b/django/db/migrations/autodetector.py --- a/django/db/migrations/autodetector.py +++ b/django/db/migrations/autodetector.py @@ -912,6 +912,7 @@ def generate_altered_fields(self): old_field_name = self.renamed_fields.get((app_label, model_name, field_name),...
diff --git a/tests/migrations/test_autodetector.py b/tests/migrations/test_autodetector.py --- a/tests/migrations/test_autodetector.py +++ b/tests/migrations/test_autodetector.py @@ -352,6 +352,11 @@ class AutodetectorTests(TestCase): ("author", models.ForeignKey("migrations.UnmigratedModel", models.CASCADE)),...
["test_alter_field_to_fk_dependency_other_app (migrations.test_autodetector.AutodetectorTests)"]
["test_add_alter_order_with_respect_to (migrations.test_autodetector.AutodetectorTests)", "test_add_blank_textfield_and_charfield (migrations.test_autodetector.AutodetectorTests)", "Test change detection of new constraints.", "test_add_date_fields_with_auto_now_add_asking_for_default (migrations.test_autodetector.Autod...
null
true
2019-09-03T10:44:38Z
1
5
1
1,967
0
1
1
1
0.8
0.3445
93.2835
163
swe_bench_verified::test::85
swe_bench_verified
test
85
django__django-12708
django/django
django/django
python
447980e72ac01da1594dd3373a03ba40b7ee6f80
Migration crashes deleting an index_together if there is a unique_together on the same fields Description Happens with Django 1.11.10 Steps to reproduce: 1) Create models with 2 fields, add 2 same fields to unique_together and to index_together 2) Delete index_together -> Fail It will fail at django/db/backends/base/s...
Reproduced on master at 623139b5d1bd006eac78b375bcaf5948e695c3c6. I haven't looked under the hood on this yet, but could it be related to the ordering of the operations generated for the mgiration? on first inspection it feels like this and #28862 could be caused by the same/similar underlying problem in how FieldRelat...
diff --git a/django/db/backends/base/schema.py b/django/db/backends/base/schema.py --- a/django/db/backends/base/schema.py +++ b/django/db/backends/base/schema.py @@ -393,7 +393,12 @@ def alter_index_together(self, model, old_index_together, new_index_together): news = {tuple(fields) for fields in new_index_to...
diff --git a/tests/migrations/test_base.py b/tests/migrations/test_base.py --- a/tests/migrations/test_base.py +++ b/tests/migrations/test_base.py @@ -62,7 +62,11 @@ def assertIndexExists(self, table, columns, value=True, using='default', index_t any( c["index"] ...
["test_alter_index_together_remove_with_unique_together (migrations.test_operations.OperationTests)"]
["test_references_model_mixin (migrations.test_operations.TestCreateModel)", "test_reference_field_by_through_fields (migrations.test_operations.FieldOperationTests)", "test_references_field_by_from_fields (migrations.test_operations.FieldOperationTests)", "test_references_field_by_name (migrations.test_operations.Fiel...
null
true
2020-04-12T22:20:59Z
1
7
1
957
0
1
1
0.85
1
0.182833
93.2735
164
swe_bench_verified::test::88
swe_bench_verified
test
88
django__django-12754
django/django
django/django
python
18759b2209ff556aed7f20d83cbf23e3d234e41c
FieldError when migrating field to new model subclass. Description Analogous to #21890. If creating a model subclass and moving a field onto it in the same step, makemigrations works but migrate dies with django.core.exceptions.FieldError: Local field 'title' in class 'Book' clashes with field of the same name from ba...
Tentatively accepted for a future investigation. I'm not sure if this is feasible because detecting changes related with models' bases are tricky. Moreover you will lose data with such change, so IMO it's preferable to handle this manually. Maybe the makemigrations could present some kind of info about the data being l...
diff --git a/django/db/migrations/autodetector.py b/django/db/migrations/autodetector.py --- a/django/db/migrations/autodetector.py +++ b/django/db/migrations/autodetector.py @@ -563,6 +563,16 @@ def generate_created_models(self): if isinstance(base, str) and "." in base: base_app_...
diff --git a/tests/migrations/test_autodetector.py b/tests/migrations/test_autodetector.py --- a/tests/migrations/test_autodetector.py +++ b/tests/migrations/test_autodetector.py @@ -2454,3 +2454,28 @@ def test_mti_inheritance_model_removal(self): self.assertNumberMigrations(changes, 'app', 1) self.as...
["test_add_model_with_field_removed_from_base_model (migrations.test_autodetector.AutodetectorTests)"]
["test_add_alter_order_with_respect_to (migrations.test_autodetector.AutodetectorTests)", "test_add_blank_textfield_and_charfield (migrations.test_autodetector.AutodetectorTests)", "Test change detection of new constraints.", "test_add_date_fields_with_auto_now_add_asking_for_default (migrations.test_autodetector.Autod...
null
true
2020-04-19T10:59:30Z
1
10
1
858
0
1
1
0.85
1
0.176333
93.254
165
swe_bench_verified::test::214
swe_bench_verified
test
214
django__django-16032
django/django
django/django
python
0c3981eb5094419fe200eb46c71b5376a2266166
__in doesn't clear selected fields on the RHS when QuerySet.alias() is used after annotate(). Description Here is a test case to reproduce the bug, you can add this in tests/annotations/tests.py def test_annotation_and_alias_filter_in_subquery(self): long_books_qs = ( Book.objects.filter( pages__gt=400, )...
This is a ​documented and expected behavior. Using either .alias or .annotate works as expected without using .values to limit to 1 column. Why is that? but using both of them doesn't seem work. Replying to Gabriel Muj: Using either .alias or .annotate works as expected without using .values to limit to 1 column. Why i...
diff --git a/django/db/models/fields/related_lookups.py b/django/db/models/fields/related_lookups.py --- a/django/db/models/fields/related_lookups.py +++ b/django/db/models/fields/related_lookups.py @@ -93,7 +93,6 @@ def get_prep_lookup(self): elif not getattr(self.rhs, "has_select_fields", True) and not g...
diff --git a/tests/annotations/tests.py b/tests/annotations/tests.py --- a/tests/annotations/tests.py +++ b/tests/annotations/tests.py @@ -989,6 +989,34 @@ def test_annotation_filter_with_subquery(self): publisher_books_qs, [{"name": "Sams"}, {"name": "Morgan Kaufmann"}] ) + def test_annotati...
["test_annotation_and_alias_filter_in_subquery (annotations.tests.NonAggregateAnnotationTestCase)", "test_annotation_and_alias_filter_related_in_subquery (annotations.tests.NonAggregateAnnotationTestCase)"]
["test_aggregate_alias (annotations.tests.AliasTests)", "test_alias_after_annotation (annotations.tests.AliasTests)", "test_alias_annotate_with_aggregation (annotations.tests.AliasTests)", "test_alias_annotation_expression (annotations.tests.AliasTests)", "test_alias_default_alias_expression (annotations.tests.AliasTes...
null
true
2022-09-06T09:54:57Z
2
11
2
776
0
1
1
0.85
1
0.166
93.223
166
swe_bench_verified::test::415
swe_bench_verified
test
415
sphinx-doc__sphinx-9281
sphinx-doc/sphinx
sphinx-doc/sphinx
python
8ec06e9a1bd862cd713b9db748e039ccc7b3e15b
Python Enum values (used to show default values in function signatures) are rendered ugly. Python Enum values (used to show default values in function signatures) are rendered ugly. **To Reproduce** I made a minimal example to show the issue: https://github.com/sidneycadot/sphinx_issue_ugly_enum ``` $ git clone git...
Probably the repr() representation of default arguments is used, and it should be; that is supposed to give a string that, when evaluated, yields the value. Unfortunately, the enum.Enum implementation in Python does not honor this convention; their repr() includes the Enum value and the "<>" brackets. In an ideal...
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py --- a/sphinx/util/inspect.py +++ b/sphinx/util/inspect.py @@ -442,14 +442,14 @@ def object_description(object: Any) -> str: (object_description(key), object_description(object[key])) for key in sorted_keys) ...
diff --git a/tests/test_util_inspect.py b/tests/test_util_inspect.py --- a/tests/test_util_inspect.py +++ b/tests/test_util_inspect.py @@ -10,6 +10,7 @@ import ast import datetime +import enum import functools import sys import types @@ -516,6 +517,14 @@ def __repr__(self): assert "<CustomType(2)>: 2" in de...
["tests/test_util_inspect.py::test_object_description_enum"]
["tests/test_util_inspect.py::test_TypeAliasNamespace", "tests/test_util_inspect.py::test_signature", "tests/test_util_inspect.py::test_signature_partial", "tests/test_util_inspect.py::test_signature_methods", "tests/test_util_inspect.py::test_signature_partialmethod", "tests/test_util_inspect.py::test_signature_annota...
null
true
2021-05-29T17:16:30Z
1
7
1
776
0
1
1
0.85
1
0.152667
93.183
167
swe_gym::train::689
swe_gym
train
689
iterative__dvc-9646
iterative/dvc
iterative/dvc
python
276d499c9b94d40bc3d46520be77c6bd7f9aaab5
`dvc add dir` doesn't use new `files/md5` folder in cache # Bug Report ## Description With the new DVC 3 release, files should be cached to `.dvc/cache/files/md5` if I understand the [release note](https://github.com/iterative/dvc/releases#:~:text=The%20files%20will%20be%20stored%20in%20cache%20at%20.dvc/cache/files/...
diff --git a/dvc/output.py b/dvc/output.py --- a/dvc/output.py +++ b/dvc/output.py @@ -692,8 +692,7 @@ def save(self) -> None: if self.metric: self.verify_metric() - if self.hash_name == "md5-dos2unix" and self.changed_checksum(): - self.hash_name = "md5" + self._update_...
diff --git a/tests/func/test_add.py b/tests/func/test_add.py --- a/tests/func/test_add.py +++ b/tests/func/test_add.py @@ -784,6 +784,7 @@ def test_add_preserve_fields(tmp_dir, dvc): remote: testremote md5: acbd18db4cc2f85cedef654fccc4a4d8 size: 3 + hash: md5 meta: som...
["tests/func/test_add.py::test_add_preserve_fields"]
["tests/func/test_add.py::test_add_filtered_files_in_dir[dir/subdir/subdata*-expected_def_paths0-expected_rel_paths0]", "tests/func/test_add.py::test_add_from_data_dir", "tests/func/test_add.py::test_escape_gitignore_entries", "tests/func/test_add.py::test_add_file_in_symlink_dir", "tests/func/test_add.py::test_add_doe...
null
true
2023-06-22T12:48:42Z
1
8
1
1,869
0
0.85
1
1
1
0.338167
93.1645
168
swe_bench_verified::test::263
swe_bench_verified
test
263
matplotlib__matplotlib-23299
matplotlib/matplotlib
matplotlib/matplotlib
python
3eadeacc06c9f2ddcdac6ae39819faa9fbee9e39
[Bug]: get_backend() clears figures from Gcf.figs if they were created under rc_context ### Bug summary calling `matplotlib.get_backend()` removes all figures from `Gcf` if the *first* figure in `Gcf.figs` was created in an `rc_context`. ### Code for reproduction ```python import matplotlib.pyplot as plt from matplo...
My knee-jerk guess is that : - the `rcParams['backend']` in the auto-sentinel - that is stashed by rc_context - if you do the first thing to force the backend to be resolved in the context manager it get changes - the context manager sets it back to the sentinel an the way out - `get_backend()` re-resolv...
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -1059,6 +1059,8 @@ def rc_context(rc=None, fname=None): """ Return a context manager for temporarily changing rcParams. + The :rc:`backend` will not be reset by the co...
diff --git a/lib/matplotlib/tests/test_rcparams.py b/lib/matplotlib/tests/test_rcparams.py --- a/lib/matplotlib/tests/test_rcparams.py +++ b/lib/matplotlib/tests/test_rcparams.py @@ -496,6 +496,13 @@ def test_keymaps(): assert isinstance(mpl.rcParams[k], list) +def test_no_backend_reset_rccontext(): + a...
["lib/matplotlib/tests/test_rcparams.py::test_no_backend_reset_rccontext"]
["lib/matplotlib/tests/test_rcparams.py::test_rcparams", "lib/matplotlib/tests/test_rcparams.py::test_RcParams_class", "lib/matplotlib/tests/test_rcparams.py::test_Bug_2543", "lib/matplotlib/tests/test_rcparams.py::test_legend_colors[same", "lib/matplotlib/tests/test_rcparams.py::test_legend_colors[inherited", "lib/mat...
null
true
2022-06-18T01:34:39Z
1
5
1
1,707
0
1
1
1
0.8
0.301167
93.1535
169
swe_bench_verified::test::465
swe_bench_verified
test
465
sympy__sympy-18211
sympy/sympy
sympy/sympy
python
b4f1aa3540fe68d078d76e78ba59d022dd6df39f
`solveset` raises `NotImplementedError` instead of returning `ConditionSet` The problem is ```julia In [10]: Eq(n*cos(n) - 3*sin(n), 0).as_set() --------------------------------------------------------------------------- NotImplementedError ``` Here `solveset` raises `NotImplementedError` but probably a `ConditionSet` ...
this is currently blocking #17771 I think that this can fix it: ```diff diff --git a/sympy/core/relational.py b/sympy/core/relational.py index f4ede7de61..5232a277c8 100644 --- a/sympy/core/relational.py +++ b/sympy/core/relational.py @@ -379,11 +379,18 @@ def __nonzero__(self): def _eval_as_set(self): ...
diff --git a/sympy/core/relational.py b/sympy/core/relational.py --- a/sympy/core/relational.py +++ b/sympy/core/relational.py @@ -389,10 +389,17 @@ def __nonzero__(self): def _eval_as_set(self): # self is univariate and periodicity(self, x) in (0, None) from sympy.solvers.inequalities import sol...
diff --git a/sympy/core/tests/test_relational.py b/sympy/core/tests/test_relational.py --- a/sympy/core/tests/test_relational.py +++ b/sympy/core/tests/test_relational.py @@ -1,7 +1,7 @@ from sympy.utilities.pytest import XFAIL, raises, warns_deprecated_sympy from sympy import (S, Symbol, symbols, nan, oo, I, pi, Flo...
["test_issue_18188"]
["test_rel_ne", "test_rel_subs", "test_wrappers", "test_Eq", "test_as_poly", "test_rel_Infinity", "test_infinite_symbol_inequalities", "test_bool", "test_rich_cmp", "test_doit", "test_new_relational", "test_relational_arithmetic", "test_relational_bool_output", "test_relational_logic_symbols", "test_univariate_relation...
null
true
2020-01-03T06:39:19Z
1
9
1
606
0
1
1
0.85
1
0.131
93.118
170
swe_gym::train::1583
swe_gym
train
1,583
pandas-dev__pandas-54174
pandas-dev/pandas
pandas-dev/pandas
python
e0964c2da4486896302e933044c6059d523c681f
BUG: iter(Series.str) does not raise a TypeError ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the [m...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 839870cb18a0b..8de25db5c58e4 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -488,7 +488,7 @@ Conversion Strings ^^^^^^^ -- +- Bug in :meth:`Series.str` that did not raise a ``TypeError`` when iter...
diff --git a/pandas/tests/dtypes/test_inference.py b/pandas/tests/dtypes/test_inference.py index 9931e71c16254..78f960f4d46d5 100644 --- a/pandas/tests/dtypes/test_inference.py +++ b/pandas/tests/dtypes/test_inference.py @@ -150,8 +150,9 @@ def shape(self): ((_ for _ in []), True, "generator-empty"), (Series(...
["pandas/tests/dtypes/test_inference.py::test_is_list_like[StringMethods-empty]", "pandas/tests/dtypes/test_inference.py::test_is_list_like_disallow_sets[StringMethods]", "pandas/tests/dtypes/test_inference.py::test_is_list_like_disallow_sets[StringMethods-empty]", "pandas/tests/strings/test_strings.py::test_iter_raise...
["pandas/tests/dtypes/test_inference.py::TestInference::test_maybe_convert_objects_itemsize[data17-1.0_1]", "pandas/tests/strings/test_strings.py::test_index[index-object-index-EF-None-None-expected0]", "pandas/tests/dtypes/test_inference.py::test_is_list_like[DataFrame]", "pandas/tests/dtypes/test_inference.py::test_i...
null
true
2023-07-18T00:34:54Z
2
46
5
961
0
0.85
1
1
1
0.3135
93.0905
171
swe_bench_verified::test::68
swe_bench_verified
test
68
django__django-11999
django/django
django/django
python
84633905273fc916e3d17883810d9969c03f73c2
Cannot override get_FOO_display() in Django 2.2+. Description I cannot override the get_FIELD_display function on models since version 2.2. It works in version 2.1. Example: class FooBar(models.Model): foo_bar = models.CharField(_("foo"), choices=[(1, 'foo'), (2, 'bar')]) def __str__(self): return self.get_foo_bar...
Thanks for this report. Regression in a68ea231012434b522ce45c513d84add516afa60. Reproduced at 54a7b021125d23a248e70ba17bf8b10bc8619234. OK, I have a lead on this. Not at all happy about how it looks at first pass, but I'll a proof of concept PR together for it tomorrow AM. I don't think it should be marked as blocker s...
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -763,8 +763,12 @@ def contribute_to_class(self, cls, name, private_only=False): if not getattr(cls, self.attname, None): ...
diff --git a/tests/model_fields/tests.py b/tests/model_fields/tests.py --- a/tests/model_fields/tests.py +++ b/tests/model_fields/tests.py @@ -168,6 +168,16 @@ def test_get_FIELD_display_translated(self): self.assertIsInstance(val, str) self.assertEqual(val, 'translated') + def test_overriding_FI...
["test_overriding_FIELD_display (model_fields.tests.GetFieldDisplayTests)"]
["test_blank_in_choices (model_fields.tests.GetChoicesTests)", "test_blank_in_grouped_choices (model_fields.tests.GetChoicesTests)", "test_empty_choices (model_fields.tests.GetChoicesTests)", "test_lazy_strings_not_evaluated (model_fields.tests.GetChoicesTests)", "test_check (model_fields.tests.ChoicesTests)", "test_ch...
null
true
2019-10-31T10:39:18Z
1
8
1
510
0
1
1
0.85
1
0.111667
93.06
172
swe_gym::train::401
swe_gym
train
401
python__mypy-15642
python/mypy
python/mypy
python
67cc05926b037243b71e857a394318c3a09d1daf
Better support for default arguments to new-style attrs API **Bug Report** attrs.define has `slots=True` by default. Mypy does not use the default value when analysing **To Reproduce** ```python # demo.py import attr @attr.define class A: x: int def __init__(self, x :int) -> None: self.x = x # ok ...
diff --git a/mypy/plugins/attrs.py b/mypy/plugins/attrs.py --- a/mypy/plugins/attrs.py +++ b/mypy/plugins/attrs.py @@ -294,6 +294,7 @@ def attr_class_maker_callback( ctx: mypy.plugin.ClassDefContext, auto_attribs_default: bool | None = False, frozen_default: bool = False, + slots_default: bool = False...
diff --git a/test-data/unit/check-plugin-attrs.test b/test-data/unit/check-plugin-attrs.test --- a/test-data/unit/check-plugin-attrs.test +++ b/test-data/unit/check-plugin-attrs.test @@ -1631,6 +1631,24 @@ reveal_type(A.__attrs_init__) # N: Revealed type is "def (self: __main__.A, b: [case testAttrsClassWithSlots] i...
["mypy/test/testcheck.py::TypeCheckSuite::check-plugin-attrs.test::testAttrsClassWithSlots"]
[]
null
true
2023-07-12T05:30:57Z
2
7
1
1,456
0
0.85
1
1
1
0.266
92.948
173
swe_bench_verified::test::10
swe_bench_verified
test
10
astropy__astropy-14365
astropy/astropy
astropy/astropy
python
7269fa3e33e8d02485a647da91a5a2a60a06af61
ascii.qdp Table format assumes QDP commands are upper case ### Description ascii.qdp assumes that commands in a QDP file are upper case, for example, for errors they must be "READ SERR 1 2" whereas QDP itself is not case sensitive and case use "read serr 1 2". As many QDP files are created by hand, the expectation th...
Welcome to Astropy 👋 and thank you for your first issue! A project member will respond to you as soon as possible; in the meantime, please double-check the [guidelines for submitting issues](https://github.com/astropy/astropy/blob/main/CONTRIBUTING.md#reporting-issues) and make sure you've provided the requested deta...
diff --git a/astropy/io/ascii/qdp.py b/astropy/io/ascii/qdp.py --- a/astropy/io/ascii/qdp.py +++ b/astropy/io/ascii/qdp.py @@ -68,7 +68,7 @@ def _line_type(line, delimiter=None): _new_re = rf"NO({sep}NO)+" _data_re = rf"({_decimal_re}|NO|[-+]?nan)({sep}({_decimal_re}|NO|[-+]?nan))*)" _type_re = rf"^\s*((...
diff --git a/astropy/io/ascii/tests/test_qdp.py b/astropy/io/ascii/tests/test_qdp.py --- a/astropy/io/ascii/tests/test_qdp.py +++ b/astropy/io/ascii/tests/test_qdp.py @@ -43,7 +43,18 @@ def test_get_tables_from_qdp_file(tmp_path): assert np.isclose(table2["MJD_nerr"][0], -2.37847222222222e-05) -def test_roundt...
["astropy/io/ascii/tests/test_qdp.py::test_roundtrip[True]"]
["astropy/io/ascii/tests/test_qdp.py::test_get_tables_from_qdp_file", "astropy/io/ascii/tests/test_qdp.py::test_roundtrip[False]", "astropy/io/ascii/tests/test_qdp.py::test_read_example", "astropy/io/ascii/tests/test_qdp.py::test_roundtrip_example", "astropy/io/ascii/tests/test_qdp.py::test_roundtrip_example_comma", "a...
null
true
2023-02-06T19:20:34Z
1
4
1
1,301
0
1
1
1
0.8
0.230167
92.9405
174
swe_gym::train::2396
swe_gym
train
2,396
modin-project__modin-6823
modin-project/modin
modin-project/modin
python
324099d8737ead092e4acacfe03b1caa82e01986
BUG: `NotImplementedError` when trying to set duplicated column names ### Modin version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the latest released version of Modin. - [X] I have confirmed this bug exists on the main branch of Modin. (In or...
diff --git a/modin/core/dataframe/pandas/dataframe/dataframe.py b/modin/core/dataframe/pandas/dataframe/dataframe.py --- a/modin/core/dataframe/pandas/dataframe/dataframe.py +++ b/modin/core/dataframe/pandas/dataframe/dataframe.py @@ -709,11 +709,19 @@ def _set_columns(self, new_columns): return ...
diff --git a/modin/test/storage_formats/pandas/test_internals.py b/modin/test/storage_formats/pandas/test_internals.py --- a/modin/test/storage_formats/pandas/test_internals.py +++ b/modin/test/storage_formats/pandas/test_internals.py @@ -2171,6 +2171,17 @@ def test_set_index_dataframe(self, initial_dtypes, result_dtyp...
["modin/test/storage_formats/pandas/test_internals.py::TestModinDtypes::test_set_index_with_dupl_labels"]
["modin/test/storage_formats/pandas/test_internals.py::test_reorder_labels_cache[unbalanced_partitioning-no_reordering-projection_only]", "modin/test/storage_formats/pandas/test_internals.py::TestZeroComputationDtypes::test_preserve_dtypes_setitem[3.5-value_dtype0-unknown]", "modin/test/storage_formats/pandas/test_inte...
null
true
2023-12-13T11:54:16Z
2
19
1
1,192
0
0.85
1
1
1
0.262
92.936
175
swe_gym::train::1594
swe_gym
train
1,594
pandas-dev__pandas-47810
pandas-dev/pandas
pandas-dev/pandas
python
f7e0e68f340b62035c30c8bf1ea4cba38a39613d
BUG: SparseArray.unique fails to keep original elements order ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [x] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exi...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index 090fea57872c5..acd7cec480c39 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -1026,6 +1026,7 @@ Reshaping Sparse ^^^^^^ - Bug in :meth:`Series.where` and :meth:`DataFrame.where` with ``SparseDtype``...
diff --git a/pandas/tests/arrays/sparse/test_array.py b/pandas/tests/arrays/sparse/test_array.py index 492427b2be213..9b78eb345e188 100644 --- a/pandas/tests/arrays/sparse/test_array.py +++ b/pandas/tests/arrays/sparse/test_array.py @@ -391,23 +391,36 @@ def test_setting_fill_value_updates(): @pytest.mark.parametr...
["pandas/tests/arrays/sparse/test_array.py::test_unique_na_fill[1-arr3]", "pandas/tests/arrays/sparse/test_array.py::test_unique_na_fill[1-arr4]", "pandas/tests/arrays/sparse/test_array.py::test_first_fill_value_loc[arr10-0-1]", "pandas/tests/arrays/sparse/test_array.py::test_first_fill_value_loc[arr7-1-1]", "pandas/te...
["pandas/tests/arrays/sparse/test_array.py::TestSparseArray::test_fillna", "pandas/tests/arrays/sparse/test_array.py::TestSparseArrayAnalytics::test_density", "pandas/tests/arrays/sparse/test_array.py::test_first_fill_value_loc[arr5-None--1]", "pandas/tests/arrays/sparse/test_array.py::TestSparseArray::test_set_fill_va...
null
true
2022-07-21T00:50:35Z
2
23
5
969
0
0.85
1
1
1
0.238167
92.8645
176
swe_gym::train::1408
swe_gym
train
1,408
pandas-dev__pandas-47493
pandas-dev/pandas
pandas-dev/pandas
python
70adab9eacbb231c0e5b454c7ae718745606527b
DEPR: read_csv header with non-exisiting rows behaving differently ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this b...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index 35594fbc8fb8a..5629ebf604697 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -873,6 +873,7 @@ I/O - Bug in :func:`read_csv` interpreting second row as :class:`Index` names even when ``index_col=False`...
diff --git a/pandas/tests/io/parser/test_header.py b/pandas/tests/io/parser/test_header.py index 3fc23525df89e..4ded70db8bae7 100644 --- a/pandas/tests/io/parser/test_header.py +++ b/pandas/tests/io/parser/test_header.py @@ -666,3 +666,15 @@ def test_header_none_and_on_bad_lines_skip(all_parsers): ) expected ...
["pandas/tests/io/parser/test_header.py::test_header_missing_rows[python]"]
["pandas/tests/io/parser/test_header.py::test_header_multi_index_invalid[pyarrow-kwargs2-cannot", "pandas/tests/io/parser/test_header.py::test_mangles_multi_index[python-A,A,A,B,B\\none,one,one.1,two,two\\n0,40,34,0.1,0.1-expected2]", "pandas/tests/io/parser/test_header.py::test_negative_multi_index_header[pyarrow-head...
null
true
2022-06-24T10:21:23Z
2
13
1
1,076
0
0.85
1
1
1
0.222667
92.818
177
swe_gym::train::1834
swe_gym
train
1,834
pandas-dev__pandas-48943
pandas-dev/pandas
pandas-dev/pandas
python
ff9a1dcda9580f5b7a1480b67044e11374bf3187
BUG: ExcelWriter.book - attribute not accessible for setting ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exis...
Hi, thanks for your report. All ``ExcelWriter`` attributes were considered private prior to 1.5, but this was not enforced. We made some attributes public in 1.5, but put some restrictions on what you can do with them. For example, you can not set a book. cc @rhshadrach to double check > Hi, thanks for your re...
diff --git a/doc/source/whatsnew/v1.5.1.rst b/doc/source/whatsnew/v1.5.1.rst index ab80bdb9ed782..4d7576c013fd6 100644 --- a/doc/source/whatsnew/v1.5.1.rst +++ b/doc/source/whatsnew/v1.5.1.rst @@ -84,6 +84,7 @@ Fixed regressions - Fixed Regression in :meth:`DataFrameGroupBy.apply` when user defined function is called ...
diff --git a/pandas/tests/io/excel/test_writers.py b/pandas/tests/io/excel/test_writers.py index 3f9ab78e720b9..d4b74ddbd66e0 100644 --- a/pandas/tests/io/excel/test_writers.py +++ b/pandas/tests/io/excel/test_writers.py @@ -1301,6 +1301,17 @@ def test_deprecated_method(self, engine, ext, attr, args): ...
["pandas/tests/io/excel/test_writers.py::TestExcelWriter::test_deprecated_book_setter[xlsxwriter-.xlsx]", "pandas/tests/io/excel/test_writers.py::TestExcelWriter::test_deprecated_book_setter[openpyxl-.xlsm]", "pandas/tests/io/excel/test_writers.py::TestExcelWriter::test_deprecated_book_setter[xlwt-.xls]", "pandas/tests...
["pandas/tests/io/excel/test_writers.py::TestExcelWriter::test_excel_roundtrip_datetime[True-openpyxl-.xlsx]", "pandas/tests/io/excel/test_writers.py::TestExcelWriter::test_excel_writer_context_manager[openpyxl-.xlsx]", "pandas/tests/io/excel/test_writers.py::TestExcelWriter::test_deprecated_attr[cur_sheet-xlsxwriter-....
null
true
2022-10-04T22:35:29Z
6
72
5
2,857
0
0.85
1
1
0.85
0.716167
92.736
178
swe_gym::train::1888
swe_gym
train
1,888
facebookresearch__hydra-1725
facebookresearch/hydra
facebookresearch/hydra
python
27ab477ef1976725e1d3a583e3f0c35966dac198
Hydra 1.1 when composing a config that is a list at the top level. Hydra 1.1 raises an error when composing a config if a used config is a ListConfig. 1. Determine behavior in Hydra 1.0 2. If behavior makes sense, allow maintain compatibility, otherwise issue an appropriate error. Current error: ```python if n...
diff --git a/hydra/_internal/config_loader_impl.py b/hydra/_internal/config_loader_impl.py --- a/hydra/_internal/config_loader_impl.py +++ b/hydra/_internal/config_loader_impl.py @@ -168,6 +168,11 @@ def _process_config_searchpath( else: primary_config = OmegaConf.create() + if not OmegaC...
diff --git a/hydra/test_utils/configs/top_level_list/file1.yaml b/hydra/test_utils/configs/top_level_list/file1.yaml new file mode 100644 --- /dev/null +++ b/hydra/test_utils/configs/top_level_list/file1.yaml @@ -0,0 +1 @@ +- a diff --git a/tests/test_compose.py b/tests/test_compose.py --- a/tests/test_compose.py +++ b...
["tests/test_compose.py::TestCompose::test_compose_config[None-overrides4-expected4-../hydra/test_utils/configs]", "tests/test_compose.py::TestCompose::test_strict_failure_global_strict[None-overrides4-expected4-../hydra/test_utils/configs]", "tests/test_compose.py::TestCompose::test_compose_config[None-overrides5-expe...
["tests/test_compose.py::TestAdd::test_force_add", "tests/test_compose.py::TestComposeInits::test_initialize_config_dir_ctx_with_relative_dir[None-overrides1-expected1]", "tests/test_compose.py::test_initialize_config_module_ctx", "tests/test_compose.py::TestConfigSearchPathOverride::test_searchpath_in_primary_config[w...
null
true
2021-07-20T17:09:30Z
1
18
5
702
0
0.85
1
1
1
0.177
92.681
179
swe_gym::train::1323
swe_gym
train
1,323
pandas-dev__pandas-47451
pandas-dev/pandas
pandas-dev/pandas
python
878504dc31fa3c3e1d6006e0762ffc99850ac2f0
BUG: Wrong error message output for pd.DataFrame.from_dict ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists...
diff --git a/doc/source/whatsnew/v1.4.3.rst b/doc/source/whatsnew/v1.4.3.rst index 39e9a55b5c384..70b451a231453 100644 --- a/doc/source/whatsnew/v1.4.3.rst +++ b/doc/source/whatsnew/v1.4.3.rst @@ -52,6 +52,7 @@ Bug fixes ~~~~~~~~~ - Bug in :func:`pandas.eval`, :meth:`DataFrame.eval` and :meth:`DataFrame.query` where ...
diff --git a/pandas/tests/frame/constructors/test_from_dict.py b/pandas/tests/frame/constructors/test_from_dict.py index 72107d849f598..7c2b009673bb7 100644 --- a/pandas/tests/frame/constructors/test_from_dict.py +++ b/pandas/tests/frame/constructors/test_from_dict.py @@ -17,11 +17,6 @@ class TestFromDict: # Note:...
["pandas/tests/frame/constructors/test_from_dict.py::TestFromDict::test_from_dict_orient_invalid"]
["pandas/tests/frame/constructors/test_from_dict.py::TestFromDict::test_from_dict_scalars_requires_index", "pandas/tests/frame/constructors/test_from_dict.py::TestFromDict::test_constructor_list_of_series", "pandas/tests/frame/constructors/test_from_dict.py::TestFromDict::test_constructor_orient", "pandas/tests/frame/c...
null
true
2022-06-21T20:17:07Z
2
8
1
880
0
0.85
1
1
1
0.173333
92.67
180
swe_gym::train::97
swe_gym
train
97
getmoto__moto-6409
getmoto/moto
getmoto/moto
python
1dfbeed5a72a4bd57361e44441d0d06af6a2e58a
When deleting a layer using delete_layer_version if provided the Arn moto skips mocking and calls aws Issue: When using lambda delete_layer_version the AWS API Documentation specifies you can use either the Layer Name or ARN in the LayerName property. The test which was running this was setup with a fake boto3 session....
Thanks for raising this and for providing the repro @bfbenf! Marking it as a bug.
diff --git a/moto/awslambda/exceptions.py b/moto/awslambda/exceptions.py --- a/moto/awslambda/exceptions.py +++ b/moto/awslambda/exceptions.py @@ -1,4 +1,5 @@ from moto.core.exceptions import JsonRESTError +from typing import Any class LambdaClientError(JsonRESTError): @@ -63,6 +64,16 @@ def __init__(self) -> Non...
diff --git a/tests/test_awslambda/test_lambda_layers.py b/tests/test_awslambda/test_lambda_layers.py --- a/tests/test_awslambda/test_lambda_layers.py +++ b/tests/test_awslambda/test_lambda_layers.py @@ -115,7 +115,7 @@ def test_get_lambda_layers(): assert result["LayerVersions"] == [] # Test create function...
["tests/test_awslambda/test_lambda_layers.py::test_get_lambda_layers", "tests/test_awslambda/test_lambda_layers.py::test_delete_layer_version[True]"]
["tests/test_awslambda/test_lambda_layers.py::test_get_layer_version__unknown", "tests/test_awslambda/test_lambda_layers.py::test_publish_lambda_layers__without_content", "tests/test_awslambda/test_lambda_layers.py::test_get_layer_version", "tests/test_awslambda/test_lambda_layers.py::test_get_layer_with_no_layer_versi...
null
true
2023-06-14 19:52:46
4
57
2
2,557
0
0.85
1
1
0.85
0.616167
92.436
181
swe_bench_verified::test::388
swe_bench_verified
test
388
sphinx-doc__sphinx-11510
sphinx-doc/sphinx
sphinx-doc/sphinx
python
6cb783c0024a873722952a67ebb9f41771c8eb6d
source-read event does not modify include'd files source ### Describe the bug In [Yocto documentation](https://git.yoctoproject.org/yocto-docs), we use a custom extension to do some search and replace in literal blocks, see https://git.yoctoproject.org/yocto-docs/tree/documentation/sphinx/yocto-vars.py. We discovered...
Unfortunately, the `source-read` event does not support the `include` directive. So it will not be emitted on inclusion. >Note that the dumping docname and source[0] shows that the function actually gets called for something-to-include.rst file and its content is correctly replaced in source[0], it just does not mak...
diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -8,6 +8,7 @@ from docutils.parsers.rst.directives.admonitions import BaseAdmonition from docutils.parsers.rst.directives.misc import Class from docutils.parsers.rst.directives.mis...
diff --git a/tests/roots/test-directive-include/baz/baz.rst b/tests/roots/test-directive-include/baz/baz.rst new file mode 100644 --- /dev/null +++ b/tests/roots/test-directive-include/baz/baz.rst @@ -0,0 +1,6 @@ +Baz +=== + +.. include:: foo.rst + +Baz was here. \ No newline at end of file diff --git a/tests/roots/tes...
["tests/test_directive_other.py::test_include_source_read_event", "tests/test_directive_other.py::test_include_source_read_event_nested_includes"]
["tests/test_directive_other.py::test_toctree", "tests/test_directive_other.py::test_relative_toctree", "tests/test_directive_other.py::test_toctree_urls_and_titles", "tests/test_directive_other.py::test_toctree_glob", "tests/test_directive_other.py::test_toctree_glob_and_url", "tests/test_directive_other.py::test_reve...
null
true
2023-07-24T22:46:12Z
1
36
2
5,193
0
1
1
0.77
1
0.62
92.305
182
swe_bench_verified::test::329
swe_bench_verified
test
329
pylint-dev__pylint-8898
pylint-dev/pylint
pylint-dev/pylint
python
1f8c4d9eb185c16a2c1d881c054f015e1c2eb334
bad-names-rgxs mangles regular expressions with commas ### Bug description Since pylint splits on commas in this option, instead of taking a list of strings, if there are any commas in the regular expression, the result is mangled before being parsed. The config below demonstrates this clearly by causing pylint to cra...
The crash will be fixed in https://github.com/PyCQA/pylint/pull/7228. Regarding the issue with the comma, I think a list of regex is not possible and it could be a big regex with both smaller regex and a ``|``. So we might want to change the way we handle this. thanks for the response! As you mentioned, this isn't urge...
diff --git a/pylint/config/argument.py b/pylint/config/argument.py --- a/pylint/config/argument.py +++ b/pylint/config/argument.py @@ -114,7 +114,7 @@ def _regex_transformer(value: str) -> Pattern[str]: def _regexp_csv_transfomer(value: str) -> Sequence[Pattern[str]]: """Transforms a comma separated list of regul...
diff --git a/tests/config/test_config.py b/tests/config/test_config.py --- a/tests/config/test_config.py +++ b/tests/config/test_config.py @@ -5,8 +5,10 @@ from __future__ import annotations import os +import re from pathlib import Path from tempfile import TemporaryDirectory +from typing import Any import pyt...
["tests/config/test_config.py::test_csv_regex_error"]
["tests/config/test_config.py::test_can_read_toml_env_variable", "tests/config/test_config.py::test_unknown_message_id", "tests/config/test_config.py::test_unknown_option_name", "tests/config/test_config.py::test_unknown_short_option_name", "tests/config/test_config.py::test_unknown_confidence", "tests/config/test_conf...
null
true
2023-07-29T21:53:59Z
3
32
1
3,376
0
1
1
0.77
1
0.606667
92.265
183
swe_bench_pro::test::72
swe_bench_pro
test
72
instance_ansible__ansible-77658704217d5f166404fc67997203c25381cb6e-v390e508d27db7a51eece36bb6d9698b63a5b638a
ansible/ansible
ansible/ansible
python
db2d5b09eff918e981c9e10787a5f2c500d1784f
# Title: Manually Configurable Route-Target Values in nxos\_vrf\_af ## Summary The `nxos_vrf_af` module currently lacks support for explicitly configuring `route-target import` and `route-target export` values under VRF address-family contexts. This functionality is required in MPLS VPN environments where multiple im...
## Requirements - The module must support management of VRF address-family contexts (`ipv4` and `ipv6`) with `state` options `present` and `absent`. - When `state=present`, the module must create the address-family context if it does not already exist. - When `state=absent`, the module must remove the address-family ...
diff --git a/lib/ansible/modules/network/nxos/nxos_vrf_af.py b/lib/ansible/modules/network/nxos/nxos_vrf_af.py index 224668fc76f9a7..f1916557cd9c98 100644 --- a/lib/ansible/modules/network/nxos/nxos_vrf_af.py +++ b/lib/ansible/modules/network/nxos/nxos_vrf_af.py @@ -32,6 +32,9 @@ notes: - Tested against NXOSv 7.3.(...
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg b/test/units/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg new file mode 100644 index 00000000000000..1ac093f71f3d10 --- /dev/null +++ b/test/units/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg @@ -0,0 +1,22 @@ +vrf context vrf1 ...
["test/units/modules/network/nxos/test_nxos_vrf_af.py::TestNxosVrfafModule::test_nxos_vrf_af_auto_evpn_route_target_and_manual_route_target", "test/units/modules/network/nxos/test_nxos_vrf_af.py::TestNxosVrfafModule::test_nxos_vrf_af_auto_evpn_route_target_and_manual_route_targets_with_absent_vrf", "test/units/modules/...
["test/units/modules/network/nxos/test_nxos_vrf_af.py::TestNxosVrfafModule::test_nxos_vrf_af_absent_current_existing", "test/units/modules/network/nxos/test_nxos_vrf_af.py::TestNxosVrfafModule::test_nxos_vrf_af_absent_current_non_existing", "test/units/modules/network/nxos/test_nxos_vrf_af.py::TestNxosVrfafModule::test...
ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-77658704217d5f166404fc67997203c25381cb6e-v390e508d27db7a51eece36bb6d9698b63a5b638a
true
null
1
148
33
1,944
0
0.95
1
0.85
1
0.817333
92.227
184
swe_bench_verified::test::390
swe_bench_verified
test
390
sphinx-doc__sphinx-7454
sphinx-doc/sphinx
sphinx-doc/sphinx
python
aca3f825f2e4a8817190f3c885a242a285aa0dba
Inconsistent handling of None by `autodoc_typehints` **Describe the bug** With `autodoc_typehints='description'`, a function that returns `None` generates a clickable link to [None's documentation](https://docs.python.org/3/library/constants.html#None). With `autodoc_typehints='signature'`, the `None` in the signature...
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -71,8 +71,13 @@ def _parse_annotation(annotation: str) -> List[Node]: """Parse type annotation.""" def make_xref(text: str) -> addnodes.pending_xref: + if text == 'None': +...
diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py --- a/tests/test_domain_py.py +++ b/tests/test_domain_py.py @@ -239,6 +239,7 @@ def test_get_full_qualified_name(): def test_parse_annotation(): doctree = _parse_annotation("int") assert_node(doctree, ([pending_xref, "int"],)) + assert_node(do...
["tests/test_domain_py.py::test_parse_annotation"]
["tests/test_domain_py.py::test_function_signatures", "tests/test_domain_py.py::test_domain_py_xrefs", "tests/test_domain_py.py::test_domain_py_objects", "tests/test_domain_py.py::test_resolve_xref_for_properties", "tests/test_domain_py.py::test_domain_py_find_obj", "tests/test_domain_py.py::test_get_full_qualified_nam...
null
true
2020-04-09T17:08:30Z
1
7
1
2,606
0
1
1
0.85
1
0.457667
92.098
185
swe_gym::train::1362
swe_gym
train
1,362
pandas-dev__pandas-50857
pandas-dev/pandas
pandas-dev/pandas
python
626b65101c875ae8462954c5a46cf43877057787
BUG: Replacing categorical values with NA raises "boolean value of NA is ambiguous" error ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I...
Possibly loosely related to https://github.com/pandas-dev/pandas/issues/32075 I see the same issue using the dict form of replace. `phonetic.replace({"x": "unknown"}, pd.NA)`.
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index dc05745c8c0e5..873c7aabde785 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -883,6 +883,7 @@ Performance improvements - Performance improvement in :func:`merge` and :meth:`DataFrame.join` when joinin...
diff --git a/pandas/tests/arrays/categorical/test_replace.py b/pandas/tests/arrays/categorical/test_replace.py index a3ba420c84a17..c25f1d9c9feac 100644 --- a/pandas/tests/arrays/categorical/test_replace.py +++ b/pandas/tests/arrays/categorical/test_replace.py @@ -21,6 +21,11 @@ ((5, 6), 2, [1, 2, 3], False), ...
["pandas/tests/arrays/categorical/test_replace.py::test_replace_categorical_series[to_replace11-value11-expected11-False]", "pandas/tests/arrays/categorical/test_replace.py::test_replace_categorical_series[1-value13-expected13-False]", "pandas/tests/arrays/categorical/test_replace.py::test_replace_categorical_ea_dtype"...
["pandas/tests/arrays/categorical/test_replace.py::test_replace_categorical_series[to_replace6-4-expected6-False]", "pandas/tests/arrays/categorical/test_replace.py::test_replace_categorical_series[to_replace10-value10-expected10-False]", "pandas/tests/arrays/categorical/test_replace.py::test_replace_categorical_series...
null
true
2023-01-19T04:52:44Z
3
80
3
2,792
0
0.85
1
0.85
1
0.732
92.071
186
swe_gym::train::1128
swe_gym
train
1,128
pandas-dev__pandas-53375
pandas-dev/pandas
pandas-dev/pandas
python
cadfd1c5c9a52e7d97f986228391f8491499e796
BUG: Period.now() does not accept kwarg "freq" but doc and typing say otherwise ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have conf...
Hi, Thanks for reporting this issue. The issue is with the passing of ``freq`` as a keyword style. This function is defined in our Cython code, and by default that doesn't support single arguments passed in in keyword style (for perf reasons? https://github.com/cython/cython/issues/3090). ``` >>> import pandas ...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 44e091e12bfa6..b7cc254d5c7e5 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -528,6 +528,7 @@ Period - Bug in :class:`PeriodDtype` constructor raising ``ValueError`` instead of ``TypeError`` when an i...
diff --git a/pandas/tests/scalar/period/test_period.py b/pandas/tests/scalar/period/test_period.py index d908c641a30c6..1e8c2bce1d90d 100644 --- a/pandas/tests/scalar/period/test_period.py +++ b/pandas/tests/scalar/period/test_period.py @@ -72,14 +72,16 @@ def test_construction(self): assert i1 != i4 ...
["pandas/tests/scalar/period/test_period.py::TestPeriodConstruction::test_construction"]
["pandas/tests/scalar/period/test_period.py::TestPeriodComparisons::test_comparison_numpy_zerodim_arr[zerodim_arr0-False]", "pandas/tests/scalar/period/test_period.py::TestPeriodConstruction::test_period_constructor_nanosecond[.999999000-0-23:59:59-1981/09/13", "pandas/tests/scalar/period/test_period.py::TestPeriodCons...
null
true
2023-05-24T19:43:55Z
5
9
1
2,783
0
0.85
1
1
0.85
0.493833
92.069
187
swe_bench_verified::test::383
swe_bench_verified
test
383
sphinx-doc__sphinx-10449
sphinx-doc/sphinx
sphinx-doc/sphinx
python
36367765fe780f962bba861bf368a765380bbc68
`autodoc_typehints = "description"` causes autoclass to put a return type ### Describe the bug Using the `autodoc_typehints = "description"` option causes Sphinx's `autoclass` to include the class's "return type" for code such as this: ```py class Square: """A class representing a square figure.""" def __init...
Confirmed also on Python 3.10, Sphinx 4.4.0.
diff --git a/sphinx/ext/autodoc/typehints.py b/sphinx/ext/autodoc/typehints.py --- a/sphinx/ext/autodoc/typehints.py +++ b/sphinx/ext/autodoc/typehints.py @@ -59,7 +59,10 @@ def merge_typehints(app: Sphinx, domain: str, objtype: str, contentnode: Element for field_list in field_lists: if app.con...
diff --git a/tests/test_ext_autodoc_configs.py b/tests/test_ext_autodoc_configs.py --- a/tests/test_ext_autodoc_configs.py +++ b/tests/test_ext_autodoc_configs.py @@ -1041,9 +1041,6 @@ def test_autodoc_typehints_description_with_documented_init(app): ' Parameters:\n' ' **x** (*int*) --\...
["tests/test_ext_autodoc_configs.py::test_autodoc_typehints_description_with_documented_init"]
["tests/test_ext_autodoc_configs.py::test_autoclass_content_class", "tests/test_ext_autodoc_configs.py::test_autoclass_content_init", "tests/test_ext_autodoc_configs.py::test_autodoc_class_signature_mixed", "tests/test_ext_autodoc_configs.py::test_autodoc_class_signature_separated_init", "tests/test_ext_autodoc_configs...
null
true
2022-05-14T14:02:26Z
1
12
1
4,297
0
1
1
0.77
1
0.54
92.065
188
swe_bench_verified::test::268
swe_bench_verified
test
268
matplotlib__matplotlib-24149
matplotlib/matplotlib
matplotlib/matplotlib
python
af39f1edffcd828f05cfdd04f2e59506bb4a27bc
[Bug]: ax.bar raises for all-nan data on matplotlib 3.6.1 ### Bug summary `ax.bar` raises an exception in 3.6.1 when passed only nan data. This irrevocably breaks seaborn's histogram function (which draws and then removes a "phantom" bar to trip the color cycle). ### Code for reproduction ```python import numpy as n...
This is the PR in question: https://github.com/matplotlib/matplotlib/pull/23751 (although I have not checked is that is causing it). Thanks @oscargus that indeed looks like the culprit: it asks for the "next" finite value and does not handle the `StopIteration` exception that you get if there isn't one. > which draws a...
diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2182,11 +2182,19 @@ def _convert_dx(dx, x0, xconv, convert): x0 = cbook._safe_first_finite(x0) except (TypeError, IndexError, KeyError): ...
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -8195,3 +8195,16 @@ def test_bar_leading_nan(): for b in rest: assert np.isfinite(b.xy).all() assert np.isfinite(b.get_...
["lib/matplotlib/tests/test_axes.py::test_bar_all_nan[png]"]
["lib/matplotlib/tests/test_axes.py::test_invisible_axes[png]", "lib/matplotlib/tests/test_axes.py::test_get_labels", "lib/matplotlib/tests/test_axes.py::test_repr", "lib/matplotlib/tests/test_axes.py::test_label_loc_vertical[png]", "lib/matplotlib/tests/test_axes.py::test_label_loc_vertical[pdf]", "lib/matplotlib/test...
null
true
2022-10-12T22:00:54Z
1
8
1
3,161
0
1
1
0.77
1
0.526667
92.025
189
swe_bench_verified::test::246
swe_bench_verified
test
246
django__django-16938
django/django
django/django
python
1136aa5005f0ae70fea12796b7e37d6f027b9263
Serialization of m2m relation fails with custom manager using select_related Description Serialization of many to many relation with custom manager using select_related cause FieldError: Field cannot be both deferred and traversed using select_related at the same time. Exception is raised because performance optimaliz...
Thanks for the report! Regression in 19e0587ee596debf77540d6a08ccb6507e60b6a7. Reproduced at 4142739af1cda53581af4169dbe16d6cd5e26948. Maybe we could clear select_related(): django/core/serializers/python.py diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py index 36048601af..5c6e1c2689 ...
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py --- a/django/core/serializers/python.py +++ b/django/core/serializers/python.py @@ -79,7 +79,9 @@ def m2m_value(value): return self._value_from_field(value, value._meta.pk) def queryset_iterator(ob...
diff --git a/tests/serializers/models/base.py b/tests/serializers/models/base.py --- a/tests/serializers/models/base.py +++ b/tests/serializers/models/base.py @@ -53,12 +53,24 @@ def __str__(self): return self.name +class TopicManager(models.Manager): + def get_queryset(self): + return super().ge...
["The ability to create new objects by modifying serialized content.", "Deserialized content can be saved with force_insert as a parameter.", "Mapping such as fields should be deterministically ordered. (#24558)", "Year values before 1000AD are properly formatted", "Basic serialization works.", "test_serialize_no_only_...
["test_stream_class (serializers.tests.SerializerAPITests.test_stream_class)", "test_lazy_string_encoding (serializers.test_json.DjangoJSONEncoderTests.test_lazy_string_encoding)", "test_timedelta (serializers.test_json.DjangoJSONEncoderTests.test_timedelta)", "Using yaml deserializer without pyyaml raises ImportError"...
null
true
2023-06-03T11:18:11Z
2
8
23
4,013
0
1
1
0.77
1
0.526667
92.025
190
swe_bench_verified::test::279
swe_bench_verified
test
279
matplotlib__matplotlib-25479
matplotlib/matplotlib
matplotlib/matplotlib
python
7fdf772201e4c9bafbc16dfac23b5472d6a53fa2
Confusing (broken?) colormap name handling Consider the following example in which one creates and registers a new colormap and attempt to use it with the `pyplot` interface. ``` python from matplotlib import cm from matplotlib.colors import LinearSegmentedColormap import matplotlib.pyplot as plt import matplotlib mat...
Seems like the issue is coming up in the `set_cmap` function: https://github.com/matplotlib/matplotlib/blob/bb75f737a28f620fe023742f59dc6ed4f53b094f/lib/matplotlib/pyplot.py#L2072-L2078 The name you pass to that function is only used to grab the colormap, but this doesn't account for the fact that in the internal list...
diff --git a/lib/matplotlib/cm.py b/lib/matplotlib/cm.py --- a/lib/matplotlib/cm.py +++ b/lib/matplotlib/cm.py @@ -146,6 +146,11 @@ def register(self, cmap, *, name=None, force=False): "that was already in the registry.") self._cmaps[name] = cmap.copy() + # Someone may ...
diff --git a/lib/matplotlib/tests/test_colors.py b/lib/matplotlib/tests/test_colors.py --- a/lib/matplotlib/tests/test_colors.py +++ b/lib/matplotlib/tests/test_colors.py @@ -195,10 +195,10 @@ def test_colormap_equals(): # Make sure we can compare different sizes without failure cm_copy._lut = cm_copy._lut[:1...
["lib/matplotlib/tests/test_colors.py::test_colormap_equals", "lib/matplotlib/tests/test_colors.py::test_set_cmap_mismatched_name"]
["lib/matplotlib/tests/test_colors.py::test_create_lookup_table[5-result0]", "lib/matplotlib/tests/test_colors.py::test_create_lookup_table[2-result1]", "lib/matplotlib/tests/test_colors.py::test_create_lookup_table[1-result2]", "lib/matplotlib/tests/test_colors.py::test_index_dtype[uint8]", "lib/matplotlib/tests/test_...
null
true
2023-03-16T17:59:41Z
2
7
2
5,777
0
1
1
0.77
1
0.523333
92.015
191
swe_gym::train::1203
swe_gym
train
1,203
pandas-dev__pandas-57061
pandas-dev/pandas
pandas-dev/pandas
python
f5bb77564e447fb023c3e02539e3178fd53e3cb9
BUG: Getting "Out of bounds on buffer access" error when .loc indexing a non-unique index with Int64 dtype ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of...
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index ff5fadec735e6..386e8cbc51f6f 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -17,6 +17,7 @@ Fixed regressions - Fixed performance regression in :meth:`Series.combine_first` (:issue:`55845`) - Fixed r...
diff --git a/pandas/tests/indexing/test_loc.py b/pandas/tests/indexing/test_loc.py index c446f2c44b745..b155c3aabd287 100644 --- a/pandas/tests/indexing/test_loc.py +++ b/pandas/tests/indexing/test_loc.py @@ -3347,3 +3347,15 @@ def test_getitem_loc_str_periodindex(self): index = pd.period_range(start="2000...
["pandas/tests/indexing/test_loc.py::TestLocSeries::test_loc_nonunique_masked_index"]
["pandas/tests/indexing/test_loc.py::TestLoc::test_loc_getitem_label_slice[Series-slc1-indexes1-1-TypeError]", "pandas/tests/indexing/test_loc.py::TestLocSeries::test_loc_iloc_setitem_with_listlike[6-list]", "pandas/tests/indexing/test_loc.py::TestLocWithEllipsis::test_loc_iloc_getitem_ellipsis[Series-iloc-complex128]"...
null
true
2024-01-25T00:58:03Z
2
64
1
3,277
0
0.85
1
0.92
1
0.713333
92.01
192
swe_bench_verified::test::312
swe_bench_verified
test
312
pydata__xarray-6599
pydata/xarray
pydata/xarray
python
6bb2b855498b5c68d7cca8cceb710365d58e6048
`polyval` with timedelta64 coordinates produces wrong results ### What happened? I'm not sure if this is a bug or an expected breaking change, but I'm not able to reproduce the results generated by `polyval` using a timedelta64 coordinate. The results are correct in `xarray=2022.3.0`, whereas they are wrong in the lat...
As listed in breaking changes, the new polyval algorithm uses the values of the `coord` argument and not the index coordinate. Your coordinate is a Timedelta `values -values[0]`, try using that directly or `azimuth_time.coords["azimuth_time"]`. Thanks - I think I might be misunderstanding how the new implementation wo...
diff --git a/xarray/core/computation.py b/xarray/core/computation.py --- a/xarray/core/computation.py +++ b/xarray/core/computation.py @@ -1933,7 +1933,8 @@ def _ensure_numeric(data: T_Xarray) -> T_Xarray: from .dataset import Dataset def to_floatable(x: DataArray) -> DataArray: - if x.dtype.kind in ...
diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py --- a/xarray/tests/test_computation.py +++ b/xarray/tests/test_computation.py @@ -2010,6 +2010,14 @@ def test_where_attrs() -> None: ), id="datetime", ), + pytest.param( + xr.DataArray( ...
["xarray/tests/test_computation.py::test_polyval[timedelta-False]"]
["xarray/tests/test_computation.py::test_signature_properties", "xarray/tests/test_computation.py::test_result_name", "xarray/tests/test_computation.py::test_ordered_set_union", "xarray/tests/test_computation.py::test_ordered_set_intersection", "xarray/tests/test_computation.py::test_join_dict_keys", "xarray/tests/test...
null
true
2022-05-12T15:12:41Z
1
6
1
4,162
0
1
1
0.77
1
0.52
92.005
193
swe_gym::train::151
swe_gym
train
151
getmoto__moto-7208
getmoto/moto
getmoto/moto
python
624de34d82a1b2c521727b14a2173380e196f1d8
DynamoDB Table.query() returns the wrong ScannedCount value ## Description The `Table.query()` method returns the total number of items in the stable instead of the total number of items with the specified partition key. ## Steps to reproduce ```python import boto3 from boto3.dynamodb.conditions import Key from moto...
Hi @DrGFreeman, thanks for raising this. We identified the same problem in `scan()`, and that was fixed in #7085, so hopefully we can reuse the solution for `query()`.
diff --git a/moto/dynamodb/models/table.py b/moto/dynamodb/models/table.py --- a/moto/dynamodb/models/table.py +++ b/moto/dynamodb/models/table.py @@ -656,8 +656,8 @@ def query( filter_expression: Any = None, **filter_kwargs: Any, ) -> Tuple[List[Item], int, Optional[Dict[str, Any]]]: - re...
diff --git a/tests/test_dynamodb/test_dynamodb.py b/tests/test_dynamodb/test_dynamodb.py --- a/tests/test_dynamodb/test_dynamodb.py +++ b/tests/test_dynamodb/test_dynamodb.py @@ -689,18 +689,21 @@ def test_nested_projection_expression_using_query(): } ) - # Test a query returning all items + # Tes...
["tests/test_dynamodb/test_dynamodb_table_with_range_key.py::test_query_pagination", "tests/test_dynamodb/test_dynamodb_table_with_range_key.py::test_boto3_query_gsi_range_comparison", "tests/test_dynamodb/test_dynamodb.py::test_nested_projection_expression_using_query"]
["tests/test_dynamodb/test_dynamodb.py::test_remove_list_index__remove_existing_nested_index", "tests/test_dynamodb/test_dynamodb.py::test_basic_projection_expressions_using_query_with_attr_expression_names", "tests/test_dynamodb/test_dynamodb_table_with_range_key.py::test_update_item_delete_with_expression", "tests/te...
null
true
2024-01-13 14:11:15
1
96
3
2,333
0
0.85
1
0.85
1
0.708833
92.0015
194
swe_gym::train::855
swe_gym
train
855
iterative__dvc-10386
iterative/dvc
iterative/dvc
python
ec92cc14d13d273634cc6a5af9ac392be5e0f115
artifacts: doesn't work with monorepos # Bug Report ## Description See https://iterativeai.slack.com/archives/C05L7S1TWAW/p1712247647559389. `dvc.api.artifacts_show()` can't find artifacts in subrepos. ### Reproduce ```python import os import dvc.api URL = 'https://github.com/mnrozhkov/monorepo-multiproject-detach...
I have changed the issue from a https://github.com/iterative/dvc/labels/bug to a https://github.com/iterative/dvc/labels/feature%20request.
diff --git a/dvc/api/artifacts.py b/dvc/api/artifacts.py --- a/dvc/api/artifacts.py +++ b/dvc/api/artifacts.py @@ -1,3 +1,4 @@ +import os from typing import Any, Optional from dvc.repo import Repo @@ -36,12 +37,22 @@ def artifacts_show( if version and stage: raise ValueError("Artifact version and stag...
diff --git a/tests/func/api/test_artifacts.py b/tests/func/api/test_artifacts.py new file mode 100644 --- /dev/null +++ b/tests/func/api/test_artifacts.py @@ -0,0 +1,74 @@ +from os.path import join, normpath + +import pytest + +from dvc.api import artifacts_show +from dvc.testing.tmp_dir import make_subrepo +from dvc.u...
["tests/func/artifacts/test_artifacts.py::test_artifacts_download[sub]", "tests/func/api/test_artifacts.py::test_artifacts_show_subrepo[]", "tests/func/api/test_artifacts.py::test_artifacts_show_subrepo[sub]", "tests/func/artifacts/test_artifacts.py::test_artifacts_download_subrepo[sub]", "tests/func/artifacts/test_art...
["tests/func/artifacts/test_artifacts.py::test_artifacts_read_subdir", "tests/func/artifacts/test_artifacts.py::test_broken_dvcyaml_extra_field[bad_dvcyaml0]", "tests/func/artifacts/test_artifacts.py::test_broken_dvcyaml_extra_field[bad_dvcyaml1]", "tests/func/artifacts/test_artifacts.py::test_name_is_compatible_fails[...
null
true
2024-04-11T12:21:26Z
2
74
6
2,684
0
0.85
1
0.85
1
0.694
91.957
195
swe_gym::train::14
swe_gym
train
14
getmoto__moto-6075
getmoto/moto
getmoto/moto
python
52154f951c37b81ea54bef0b3d6918198daaf3fe
get_object_attributes returns incorrect response (object content) ## Problem It appears that the `get_object_attributes` on the s3 client does not return the expected XML for the object, instead simply the file contents. I noticed this while trying to work with different checksum algorithms but on further testing, the...
Hi @Kieran-Bacon, thanks for raising this! As far as I know, `get_object_attributes` is not yet implemented at all. Moto just behaves as if it was a `get_object` request, that's why we're returning `b'Content'` instead. Marking it as an enhancement to implement this feature. I can have a look at it this week, if n...
diff --git a/moto/s3/models.py b/moto/s3/models.py --- a/moto/s3/models.py +++ b/moto/s3/models.py @@ -12,7 +12,7 @@ import urllib.parse from bisect import insort -from typing import Optional +from typing import Any, Dict, List, Optional from importlib import reload from moto.core import BaseBackend, BaseModel, B...
diff --git a/tests/test_s3/test_s3_object_attributes.py b/tests/test_s3/test_s3_object_attributes.py new file mode 100644 --- /dev/null +++ b/tests/test_s3/test_s3_object_attributes.py @@ -0,0 +1,113 @@ +import boto3 +import pytest +from moto import mock_s3 +from uuid import uuid4 + + +@mock_s3 +class TestS3ObjectAttri...
["tests/test_s3/test_s3_object_attributes.py::TestS3ObjectAttributes::test_get_attributes_storageclass", "tests/test_s3/test_s3_object_attributes.py::TestS3ObjectAttributes::test_get_attributes_checksum[algo_val1]", "tests/test_s3/test_s3_object_attributes.py::TestS3ObjectAttributes::test_get_attributes_multiple", "tes...
[]
null
true
2023-03-14 23:19:10
2
66
8
2,783
0
0.85
1
0.85
1
0.683833
91.9265
196
swe_gym::train::1555
swe_gym
train
1,555
pandas-dev__pandas-50309
pandas-dev/pandas
pandas-dev/pandas
python
e413b91d601217238d7e3e701f2e92a4c5d215db
BUG: misleading message when using to_datetime with format='%V %a' ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bu...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index cbad169fe4d56..161bfc3cb0a08 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -786,6 +786,7 @@ Datetimelike - Bug in :func:`to_datetime` was raising ``ValueError`` when parsing :class:`Timestamp`, ``da...
diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py index 7e1a3e9129a12..db5a968458044 100644 --- a/pandas/tests/tools/test_to_datetime.py +++ b/pandas/tests/tools/test_to_datetime.py @@ -629,8 +629,8 @@ def test_to_datetime_iso_week_year_format(self, s, _format, dt): "...
["pandas/tests/tools/test_to_datetime.py::TestToDatetime::test_error_iso_week_year[Day", "pandas/tests/tools/test_to_datetime.py::TestToDatetime::test_error_iso_week_year[ISO"]
["pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers_timezone_minute_offsets_roundtrip[False-2013-01-01", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers[True-2005/11/09", "pandas/tests/tools/test_to_datetime.py::TestToDatetimeMisc::test_to_datetime_iso8...
null
true
2022-12-17T09:25:06Z
2
53
2
4,945
0
0.85
1
0.92
1
0.676667
91.9
197
swe_bench_pro::test::111
swe_bench_pro
test
111
instance_ansible__ansible-e9e6001263f51103e96e58ad382660df0f3d0e39-v30a923fb5c164d6cd18280c02422f75e611e8fb2
ansible/ansible
ansible/ansible
python
bddb9a7490b5e9475d0d01a8d906332e81789cde
## Title WinRM Kerberos: Obtaining the TGT with `kinit` fails or is inconsistent depending on the environment and the presence of optional dependencies ## Description The WinRM connection plugin obtains the Kerberos TGT by running `kinit` during the connection. Before the fix, behavior varied depending on the presence...
## Requirements - Obtaining the Kerberos TGT in the winrm plugin must work without relying on optional third-party libraries; the flow must not vary based on the presence or absence of pexpect and must operate with standard library functionality. - The `kinit` invocation must read the password from `stdin` on all plat...
diff --git a/changelogs/fragments/winrm-kinit-pexpect.yml b/changelogs/fragments/winrm-kinit-pexpect.yml new file mode 100644 index 00000000000000..004987f6751c4c --- /dev/null +++ b/changelogs/fragments/winrm-kinit-pexpect.yml @@ -0,0 +1,5 @@ +minor_changes: + - >- + winrm - Remove need for pexpect on macOS hosts ...
diff --git a/test/units/plugins/connection/test_winrm.py b/test/units/plugins/connection/test_winrm.py index d5b76ca8f2..986e30a7b3 100644 --- a/test/units/plugins/connection/test_winrm.py +++ b/test/units/plugins/connection/test_winrm.py @@ -5,6 +5,7 @@ from __future__ import annotations import os +import subproce...
["test/units/plugins/connection/test_winrm.py::TestWinRMKerbAuth::test_kinit_success_subprocess[options2-expected2]", "test/units/plugins/connection/test_winrm.py::TestWinRMKerbAuth::test_kinit_success_subprocess[options4-expected4]", "test/units/plugins/connection/test_winrm.py::TestWinRMKerbAuth::test_kinit_error_pas...
["test/units/plugins/connection/test_winrm.py::TestConnectionWinRM::test_set_options[options11-direct11-expected11-False]", "test/units/plugins/connection/test_winrm.py::TestConnectionWinRM::test_set_options[options5-direct5-expected5-True]", "test/units/plugins/connection/test_winrm.py::TestConnectionWinRM::test_set_o...
ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-e9e6001263f51103e96e58ad382660df0f3d0e39-v30a923fb5c164d6cd18280c02422f75e611e8fb2
true
null
2
96
8
2,232
0
0.95
1
0.85
1
0.692
91.851
198
swe_bench_verified::test::382
swe_bench_verified
test
382
sphinx-doc__sphinx-10435
sphinx-doc/sphinx
sphinx-doc/sphinx
python
f1061c012e214f16fd8790dec3c283d787e3daa8
LaTeX: new Inline code highlighting from #10251 adds whitespace at start and end in pdf output ### Describe the bug The #10251 enhancement activates syntax highlighting for the Docutiles `code` role. For LaTeX output, a space character is inserted at start and end of the inline code. Example ``` Inline \sphinxcode{\s...
diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1710,11 +1710,11 @@ def visit_literal(self, node: Element) -> None: # TODO: Use nowrap option once LaTeX formatter supports it # https://github.com/pygments/pygments/pull/1343...
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -1623,7 +1623,7 @@ def test_latex_code_role(app): r'\PYG{p}{)}' r'\PYG{p}{:} ' r'\PYG{k}{pass}') - assert (r'Inline \sphinxcode{\sphinxupquote{' + '\n' + - ...
["tests/test_build_latex.py::test_latex_code_role"]
["tests/test_build_latex.py::test_writer", "tests/test_build_latex.py::test_latex_warnings", "tests/test_build_latex.py::test_latex_basic", "tests/test_build_latex.py::test_latex_basic_manual", "tests/test_build_latex.py::test_latex_basic_howto", "tests/test_build_latex.py::test_latex_basic_manual_ja", "tests/test_buil...
null
true
2022-05-08T09:37:06Z
1
6
1
2,101
0
1
1
0.85
1
0.370167
91.8355
199
swe_bench_verified::test::457
swe_bench_verified
test
457
sympy__sympy-16792
sympy/sympy
sympy/sympy
python
09786a173e7a0a488f46dd6000177c23e5d24eed
autowrap with cython backend fails when array arguments do not appear in wrapped expr When using the cython backend for autowrap, it appears that the code is not correctly generated when the function in question has array arguments that do not appear in the final expression. A minimal counterexample is: ```python from...
diff --git a/sympy/utilities/codegen.py b/sympy/utilities/codegen.py --- a/sympy/utilities/codegen.py +++ b/sympy/utilities/codegen.py @@ -695,6 +695,11 @@ def routine(self, name, expr, argument_sequence=None, global_vars=None): arg_list = [] # setup input argument list + + # helper to get di...
diff --git a/sympy/utilities/tests/test_codegen.py b/sympy/utilities/tests/test_codegen.py --- a/sympy/utilities/tests/test_codegen.py +++ b/sympy/utilities/tests/test_codegen.py @@ -582,6 +582,25 @@ def test_ccode_cse(): ) assert source == expected +def test_ccode_unused_array_arg(): + x = MatrixSymbol(...
["test_ccode_unused_array_arg"]
["test_Routine_argument_order", "test_empty_c_code", "test_empty_c_code_with_comment", "test_empty_c_header", "test_simple_c_code", "test_c_code_reserved_words", "test_numbersymbol_c_code", "test_c_code_argument_order", "test_simple_c_header", "test_simple_c_codegen", "test_multiple_results_c", "test_no_results_c", "te...
null
true
2019-05-09T03:40:54Z
1
16
1
1,878
0
1
1
0.85
1
0.366333
91.824