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
500
swe_gym::train::659
swe_gym
train
659
conan-io__conan-15185
conan-io/conan
conan-io/conan
python
2e568138707a4d35a53e063a86af2aa6ee2793fb
[bug] `conan profile show` crashes when requesting json output if profile contains a reference. ### Environment details * Operating System+version: macOS 12.6 * Conan version: 2.0.14 * Python version: 3.11.4 ### Steps to reproduce Issuing `conan profile show -pr:h ourprofile`, we get: ``` [settings] arch=x86_64 ......
diff --git a/conans/model/profile.py b/conans/model/profile.py --- a/conans/model/profile.py +++ b/conans/model/profile.py @@ -30,12 +30,14 @@ def __repr__(self): return self.dumps() def serialize(self): - # TODO: Remove it seems dead + def _serialize_tool_requires(): + return {...
diff --git a/conans/test/integration/command/test_profile.py b/conans/test/integration/command/test_profile.py --- a/conans/test/integration/command/test_profile.py +++ b/conans/test/integration/command/test_profile.py @@ -133,9 +133,13 @@ def test_shorthand_syntax(): def test_profile_show_json(): c = TestClien...
["conans/test/unittests/model/profile_test.py::test_profile_serialize", "conans/test/integration/command/test_profile.py::test_profile_show_json"]
["conans/test/unittests/model/profile_test.py::ProfileTest::test_profile_settings_update", "conans/test/integration/command/test_profile.py::test_profile_path", "conans/test/unittests/model/profile_test.py::ProfileTest::test_apply", "conans/test/integration/command/test_profile.py::test_profile_path_missing", "conans/t...
null
true
2023-11-27T18:11:51Z
1
6
2
2,703
0
0.85
1
0.85
1
0.4705
89.2865
501
swe_gym::train::1787
swe_gym
train
1,787
pandas-dev__pandas-57665
pandas-dev/pandas
pandas-dev/pandas
python
7977a37187238e5e646079903af71f78e7a4f636
BUG: interchange protocol with nullable datatypes a non-null validity provides nonsense results ### 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. -...
this issue is here https://github.com/pandas-dev/pandas/blob/5f87a2dafcd5d05966e2f7cf9eab53dbba5abde1/pandas/core/interchange/column.py#L301 The other issue is https://github.com/pandas-dev/pandas/blob/5f87a2dafcd5d05966e2f7cf9eab53dbba5abde1/pandas/core/interchange/column.py#L191-L199 same with `'Int64[pyarro...
diff --git a/doc/source/whatsnew/v2.2.2.rst b/doc/source/whatsnew/v2.2.2.rst index 058f7aebcd538..96f210ce6b7b9 100644 --- a/doc/source/whatsnew/v2.2.2.rst +++ b/doc/source/whatsnew/v2.2.2.rst @@ -13,6 +13,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ +- :meth:`DataFrame.__dataframe__...
diff --git a/pandas/tests/interchange/test_impl.py b/pandas/tests/interchange/test_impl.py index e4fa6e4451a4c..94b2da894ad0f 100644 --- a/pandas/tests/interchange/test_impl.py +++ b/pandas/tests/interchange/test_impl.py @@ -8,7 +8,6 @@ is_ci_environment, is_platform_windows, ) -import pandas.util._test_deco...
["pandas/tests/interchange/test_impl.py::test_pandas_nullable_w_missing_values[data0-Int64-int64]", "pandas/tests/interchange/test_impl.py::test_pandas_nullable_w_missing_values[data1-UInt64-uint64]"]
["pandas/tests/interchange/test_impl.py::test_bitmasks_pyarrow[2-None-expected_values2]", "pandas/tests/interchange/test_impl.py::test_empty_string_column", "pandas/tests/interchange/test_impl.py::test_datetimetzdtype[us-UTC]", "pandas/tests/interchange/test_impl.py::test_dataframe[<lambda>2]", "pandas/tests/interchang...
null
true
2024-02-28T19:56:04Z
2
19
2
3,334
0
0.85
1
0.77
1
0.563333
89.285
502
swe_gym::train::854
swe_gym
train
854
iterative__dvc-5336
iterative/dvc
iterative/dvc
python
9638dde4daf3f338e3538712133c4457e96d23ad
add: Fails to add file to shared cache on windows drive mount, regression from 1.7.2 # Bug Report ## add: Fails to add file to shared cache on windows drive mount ## Description We have a shared dvc cache on a ZFS file server shared via Samba. On Windows machines, it is mounted as a drive letter. At one point, we co...
Hi @gamis ! Looks like shutil.move properly fallen back to copy&delete logic but then failed to delete the source file https://github.com/python/cpython/blob/117830de332c8dfbd9a437c0968e16e11aa7e6a1/Lib/shutil.py#L581 What are the permissions on `dvcregression\TC3-096.oct`, is it read-only? Hi @efiop , note that the...
diff --git a/dvc/tree/local.py b/dvc/tree/local.py --- a/dvc/tree/local.py +++ b/dvc/tree/local.py @@ -1,4 +1,3 @@ -import errno import logging import os import stat @@ -247,19 +246,11 @@ def chmod(self, path_info, mode): path = os.fspath(path_info) try: os.chmod(path, mode) - e...
diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -2,7 +2,8 @@ version: '3.2' services: azurite: - image: mcr.microsoft.com/azure-storage/azurite:3.9.0 + image: mcr.microsoft.com/azure-storage/azurite:3.10.0 + command: azurite...
["tests/unit/remote/test_local.py::test_protect_ignore_errors[1]", "tests/unit/remote/test_local.py::test_protect_ignore_errors[13]"]
["tests/unit/remote/test_local.py::test_is_protected[symlink]", "tests/unit/remote/test_local.py::test_protect_ignore_errors[30]", "tests/unit/remote/test_local.py::test_status_download_optimization", "tests/unit/remote/test_local.py::test_is_protected[hardlink]"]
null
true
2021-01-26T01:47:33Z
1
19
2
5,664
0
0.85
1
0.77
1
0.563333
89.285
503
swe_gym::train::1633
swe_gym
train
1,633
pandas-dev__pandas-57314
pandas-dev/pandas
pandas-dev/pandas
c
fc37c83c2deb59253ae2d10ca631b6a1242cfdcb
BUG: Localizing Timestamp.min changes dtype to 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. - [x] I have confirmed this bug exists on t...
Thanks for the report, confirmed on main. Further investigations and PRs to fix are welcome! I did a bisect and looks like this PR introduced that behavior change: https://github.com/pandas-dev/pandas/pull/55151 ``` commit e477eee4916ab0a867f2755d008dde9cf006f671 Author: William Ayd <will_ayd@innobi.io> Date: W...
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index e381f9df16383..8be235e7810ae 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -21,6 +21,7 @@ Fixed regressions ~~~~~~~~~~~~~~~~~ - Fixed memory leak in :func:`read_csv` (:issue:`57039`) - Fixed perfo...
diff --git a/pandas/tests/tslibs/test_array_to_datetime.py b/pandas/tests/tslibs/test_array_to_datetime.py index 30ea3a70552aa..89328e4bb0032 100644 --- a/pandas/tests/tslibs/test_array_to_datetime.py +++ b/pandas/tests/tslibs/test_array_to_datetime.py @@ -262,6 +262,23 @@ def test_to_datetime_barely_out_of_bounds(): ...
["pandas/tests/tslibs/test_array_to_datetime.py::test_to_datetime_barely_inside_bounds[1677-09-21T00:12:43.145224193]", "pandas/tests/tslibs/test_array_to_datetime.py::test_to_datetime_barely_inside_bounds[1677-09-21T00:12:43.145224999]"]
["pandas/tests/tslibs/test_array_to_datetime.py::TestArrayToDatetimeResolutionInference::test_infer_homogeoneous_datetimes_strings", "pandas/tests/tslibs/test_array_to_datetime.py::test_coerce_outside_ns_bounds[coerce-invalid_date0]", "pandas/tests/tslibs/test_array_to_datetime.py::test_parsing_timezone_offsets[2013-01...
null
true
2024-02-09T09:45:39Z
2
19
2
3,273
0
0.85
1
0.77
1
0.563333
89.285
504
swe_gym::train::1689
swe_gym
train
1,689
pandas-dev__pandas-49047
pandas-dev/pandas
pandas-dev/pandas
python
c9fb01823bfc987581711bda8bf9625a8ed7fccf
BUG: guess_datetime_format doesn't guess 2018-01-01T00:00:00.000 ### 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 ...
diff --git a/pandas/_libs/tslibs/parsing.pyx b/pandas/_libs/tslibs/parsing.pyx index 51bb21404e7b5..9bd6eb91af8ef 100644 --- a/pandas/_libs/tslibs/parsing.pyx +++ b/pandas/_libs/tslibs/parsing.pyx @@ -976,7 +976,6 @@ def guess_datetime_format(dt_str: str, bint dayfirst=False) -> str | None: (('hour',), '%H', 2...
diff --git a/pandas/tests/tslibs/test_parsing.py b/pandas/tests/tslibs/test_parsing.py index e0166c876cdf5..9588f54388d1e 100644 --- a/pandas/tests/tslibs/test_parsing.py +++ b/pandas/tests/tslibs/test_parsing.py @@ -295,3 +295,18 @@ def test_is_iso_format(fmt, expected): # see gh-41047 result = parsing.forma...
["pandas/tests/tslibs/test_parsing.py::test_guess_datetime_format_f[2018-01-01T00:00:00.123456789]", "pandas/tests/tslibs/test_parsing.py::test_guess_datetime_format_f[2018-01-01T00:00:00.123]"]
["pandas/tests/tslibs/test_parsing.py::test_guess_datetime_format_with_parseable_formats[2011-12-30T00:00:00.000000+9-None]", "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/te...
null
true
2022-10-11T18:40:51Z
2
18
2
2,446
0
0.85
1
0.85
1
0.467667
89.278
505
swe_gym::train::1387
swe_gym
train
1,387
pandas-dev__pandas-53215
pandas-dev/pandas
pandas-dev/pandas
python
c96dbb77eb294252b3e56837a8bce73866d9f329
BUG: Unexpected Behaviour `pd.merge` using `left_on` and `right_index=True` with single level 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 p...
Thanks @Romain-Vuillez for the bug report. Can you add expected output to the bug report, it makes it easier to ensure all readers of the bug report understand the issue the same way. However, I think I see the same as you, so I agree this is a bug. This is possibly related to/a duplicate of #32067. Thanks a lot...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 299adc5af8aea..1c0798e6cf9b1 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -425,6 +425,7 @@ Reshaping ^^^^^^^^^ - Bug in :func:`crosstab` when ``dropna=False`` would not keep ``np.nan`` in the resu...
diff --git a/pandas/tests/reshape/merge/test_merge.py b/pandas/tests/reshape/merge/test_merge.py index 088ebf6c88e6a..cb773a30901a2 100644 --- a/pandas/tests/reshape/merge/test_merge.py +++ b/pandas/tests/reshape/merge/test_merge.py @@ -2797,3 +2797,16 @@ def test_merge_datetime_different_resolution(tzinfo): ) ...
["pandas/tests/reshape/merge/test_merge.py::test_merge_multiindex_single_level"]
["pandas/tests/reshape/merge/test_merge.py::TestMerge::test_other_datetime_unit[m]", "pandas/tests/reshape/merge/test_merge.py::test_merge_string_float_column_result", "pandas/tests/reshape/merge/test_merge.py::TestMerge::test_merge_type", "pandas/tests/reshape/merge/test_merge.py::TestMerge::test_merge_empty_frame[boo...
null
true
2023-05-13T18:59:39Z
2
18
1
4,111
0
0.85
1
0.77
1
0.56
89.275
506
swe_gym::train::1921
swe_gym
train
1,921
facebookresearch__hydra-1487
facebookresearch/hydra
facebookresearch/hydra
python
56cb6d636201b9e832bdc90b72a45202172099df
[Bug] PyTorch Lightning crashes run when optimizer is instatiated with Hydra (dev version) # 🐛 Bug Hi, should bugs related to hydra dev version be reported? If so I have a couple of interesting edge cases. Here comes the first one. When instantiating optimizer with Hydra using PyTorch Lightning, using "betas" paramet...
I think you might need `_convert_="partial"`. See here: https://hydra.cc/docs/next/advanced/instantiate_objects/overview#parameter-conversion-strategies @thomkeh thank you, this works. Closing. What version is this with? can you provide a complete runnable repro (as minimal as possible?) @omry the repro was in my post...
diff --git a/hydra/_internal/instantiate/_instantiate2.py b/hydra/_internal/instantiate/_instantiate2.py --- a/hydra/_internal/instantiate/_instantiate2.py +++ b/hydra/_internal/instantiate/_instantiate2.py @@ -49,6 +49,16 @@ def _call_target(target: Callable, *args, **kwargs) -> Any: # type: ignore """Call targe...
diff --git a/tests/instantiate/test_instantiate.py b/tests/instantiate/test_instantiate.py --- a/tests/instantiate/test_instantiate.py +++ b/tests/instantiate/test_instantiate.py @@ -1,5 +1,6 @@ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy +import pickle import re from dataclas...
["tests/instantiate/test_instantiate.py::test_regression_1483[instantiate2]"]
["tests/test_config_loader.py::TestConfigLoader::test_load_with_missing_default[pkg]", "tests/test_config_loader.py::test_complex_defaults[overrides0-expected0]", "tests/test_completion.py::test_strip[-0-hydra_app", "tests/instantiate/test_instantiate.py::test_instantiated_regular_class_container_types_partial[instanti...
null
true
2021-03-23T06:52:24Z
2
18
1
4,360
0
0.85
1
0.77
1
0.56
89.275
507
swe_bench_verified::test::288
swe_bench_verified
test
288
mwaskom__seaborn-3187
mwaskom/seaborn
mwaskom/seaborn
python
22cdfb0c93f8ec78492d87edb810f10cb7f57a31
Wrong legend values of large ranges As of 0.12.1, legends describing large numbers that were created using `ScalarFormatter` with an offset are formatted without their multiplicative offset value. An example: ```python import seaborn as sns import seaborn.objects as so penguins = sns.load_dataset("Penguins") penguins[...
Why do you say "as of v0.12.1"? It looks like `relplot` has the same bug in 0.11.2. > Why do you say "as of v0.12.1"? It looks like `relplot` has the same bug in 0.11.2. Only because I didn't try to reproduce using other seaborn versions.
diff --git a/seaborn/_core/scales.py b/seaborn/_core/scales.py --- a/seaborn/_core/scales.py +++ b/seaborn/_core/scales.py @@ -378,6 +378,14 @@ def spacer(x): axis.set_view_interval(vmin, vmax) locs = axis.major.locator() locs = locs[(vmin <= locs) & (locs <= vmax)] + #...
diff --git a/tests/_core/test_plot.py b/tests/_core/test_plot.py --- a/tests/_core/test_plot.py +++ b/tests/_core/test_plot.py @@ -2051,6 +2051,15 @@ def _legend_artist(self, variables, value, scales): p = Plot(**xy, color=["a", "b", "c", "d"]).add(NoLegendMark()).plot() assert not p._figure.legends ...
["tests/_core/test_plot.py::TestLegend::test_legend_has_no_offset", "tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset"]
["tests/_core/test_plot.py::TestInit::test_empty", "tests/_core/test_plot.py::TestInit::test_data_only", "tests/_core/test_plot.py::TestInit::test_df_and_named_variables", "tests/_core/test_plot.py::TestInit::test_df_and_mixed_variables", "tests/_core/test_plot.py::TestInit::test_vector_variables_only", "tests/_core/te...
null
true
2022-12-18T00:04:22Z
2
12
2
1,409
0
1
1
0.7
1
0.274833
89.2745
508
swe_bench_verified::test::476
swe_bench_verified
test
476
sympy__sympy-20438
sympy/sympy
sympy/sympy
python
33b47e4bd60e2302e42616141e76285038b724d6
`is_subset` gives wrong results @sylee957 Current status on `master`, ```python >>> a = FiniteSet(1, 2) >>> b = ProductSet(a, a) >>> c = FiniteSet((1, 1), (1, 2), (2, 1), (2, 2)) >>> b.intersection(c) == c.intersection(b) True >>> b.is_subset(c) >>> c.is_subset(b) True >>> Eq(b, c).simplify() Traceback (most recent cal...
is_subset doesn't work ProductSet.is_subset(FiniteSet).
diff --git a/sympy/core/relational.py b/sympy/core/relational.py --- a/sympy/core/relational.py +++ b/sympy/core/relational.py @@ -302,9 +302,12 @@ def equals(self, other, failing_expression=False): def _eval_simplify(self, **kwargs): from .add import Add + from sympy.core.expr import Expr ...
diff --git a/sympy/sets/tests/test_sets.py b/sympy/sets/tests/test_sets.py --- a/sympy/sets/tests/test_sets.py +++ b/sympy/sets/tests/test_sets.py @@ -1251,7 +1251,7 @@ def test_Eq(): assert Eq(FiniteSet({x, y}).subs(y, x+1), FiniteSet({x})) is S.false assert Eq(FiniteSet({x, y}), FiniteSet({x})).subs(y, x+1)...
["test_Eq", "test_issue_19378"]
["test_imageset", "test_is_empty", "test_is_finiteset", "test_deprecated_is_EmptySet", "test_interval_arguments", "test_interval_symbolic_end_points", "test_interval_is_empty", "test_union", "test_union_iter", "test_union_is_empty", "test_difference", "test_Complement", "test_set_operations_nonsets", "test_complement",...
null
true
2020-11-17T08:24:33Z
3
20
2
1,236
0
1
1
0.7
1
0.272667
89.268
509
swe_gym::train::1208
swe_gym
train
1,208
pandas-dev__pandas-52195
pandas-dev/pandas
pandas-dev/pandas
python
b63d35d2c6b6587dfb5c6d79e2e48db82d7f3cf0
BUG: inconsistant parsing between Timestamp and to_datetime ### 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 exist...
`date_range` also correctly parse without a `UserWarning` `pd.date_range('10 june 2000 8:30', periods=2)` thanks for the report this is expected: `to_datetime` can work on an array of elements, so it needs to check that they can all be parsed with the same format, whereas `Timestamp` only parses a single element s...
diff --git a/pandas/core/tools/datetimes.py b/pandas/core/tools/datetimes.py index 0265b4404d6ab..3cd3dec185ccf 100644 --- a/pandas/core/tools/datetimes.py +++ b/pandas/core/tools/datetimes.py @@ -139,13 +139,16 @@ def _guess_datetime_format_for_array(arr, dayfirst: bool | None = False) -> str ) ...
diff --git a/pandas/tests/io/parser/test_parse_dates.py b/pandas/tests/io/parser/test_parse_dates.py index f3c49471b5bb2..8c3474220cde8 100644 --- a/pandas/tests/io/parser/test_parse_dates.py +++ b/pandas/tests/io/parser/test_parse_dates.py @@ -1252,13 +1252,15 @@ def test_bad_date_parse(all_parsers, cache_dates, value...
["pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers[True-4Q00-expected12]", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers[False-00Q4-expected10]", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers_dayfirst_yearfirst[Tr...
["pandas/tests/test_algos.py::TestFactorize::test_factorize[string-pyarrow-True]", "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::TestToDatetimeMisc::test_to_datetime_iso8601_valid[2020-01-0...
null
true
2023-03-25T08:17:59Z
1
17
118
3,035
0
0.85
1
0.77
1
0.556667
89.265
510
swe_gym::train::1992
swe_gym
train
1,992
Project-MONAI__MONAI-5416
Project-MONAI/MONAI
project-monai/monai
python
8925e3eea656dd1c24c90db70449c44d8ca0f044
include_background=False, softmax=True doesn't work properly in DiceFocalLoss for binary segmentation **Environment** monai 1.0.1 **Describe the bug** When using `include_background=False, softmax=True` in DiceFocalLoss for binary segmentation, the Dice part produces this warning and does not apply softmax when calcul...
diff --git a/monai/losses/dice.py b/monai/losses/dice.py --- a/monai/losses/dice.py +++ b/monai/losses/dice.py @@ -60,12 +60,12 @@ def __init__( include_background: if False, channel index 0 (background category) is excluded from the calculation. if the non-background segmentations are sma...
diff --git a/tests/test_dice_focal_loss.py b/tests/test_dice_focal_loss.py --- a/tests/test_dice_focal_loss.py +++ b/tests/test_dice_focal_loss.py @@ -13,6 +13,7 @@ import numpy as np import torch +from parameterized import parameterized from monai.losses import DiceFocalLoss, DiceLoss, FocalLoss from tests.uti...
["tests/test_dice_focal_loss.py::TestDiceFocalLoss::test_result_no_onehot_no_bg_1", "tests/test_dice_focal_loss.py::TestDiceFocalLoss::test_result_no_onehot_no_bg_0"]
["tests/test_dice_focal_loss.py::TestDiceFocalLoss::test_ill_lambda", "tests/test_dice_focal_loss.py::TestDiceFocalLoss::test_script", "tests/test_dice_focal_loss.py::TestDiceFocalLoss::test_result_onehot_target_include_bg", "tests/test_dice_focal_loss.py::TestDiceFocalLoss::test_ill_shape"]
null
true
2022-10-27T09:19:24Z
1
81
2
1,154
0
0.85
1
0.85
1
0.462333
89.262
511
swe_gym::train::1782
swe_gym
train
1,782
pandas-dev__pandas-53557
pandas-dev/pandas
pandas-dev/pandas
python
bc4f1493b214604458fbc3bfa6a957803f139f0a
BUG: Either incorrect unit validation for 'T' in to_timedelta() or incorrect documentation ### 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] ...
If you look down the code path, you'll see that the code will be converted to lower case: https://github.com/pandas-dev/pandas/blob/1bf3ff77174ec6448c94c2dd98882add9fecb33a/pandas/_libs/tslibs/timedeltas.pyx#L708-L730 So code-wise, the choice of case won't matter. Now if you look into the type definition, you'...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index d9cdc8beaebea..5fd6953d0443a 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -295,10 +295,10 @@ Deprecations - Deprecated option "mode.use_inf_as_na", convert inf entries to ``NaN`` before instead (:i...
diff --git a/pandas/tests/indexes/timedeltas/test_timedelta_range.py b/pandas/tests/indexes/timedeltas/test_timedelta_range.py index 05fdddd7a4f4f..72bdc6da47d94 100644 --- a/pandas/tests/indexes/timedeltas/test_timedelta_range.py +++ b/pandas/tests/indexes/timedeltas/test_timedelta_range.py @@ -38,10 +38,27 @@ def tes...
["pandas/tests/indexes/timedeltas/test_timedelta_range.py::TestTimedeltas::test_timedelta_units_T_L_deprecated[t-minute]", "pandas/tests/indexes/timedeltas/test_timedelta_range.py::TestTimedeltas::test_timedelta_units_T_L_deprecated[L-millisecond]", "pandas/tests/indexes/timedeltas/test_timedelta_range.py::TestTimedelt...
["pandas/tests/scalar/timedelta/test_timedelta.py::TestNonNano::test_to_pytimedelta[ms]", "pandas/tests/scalar/timedelta/test_timedelta.py::test_truthiness[value1-True]", "pandas/tests/scalar/timedelta/test_timedelta.py::TestTimedeltas::test_unit_parser[Index-Millisecond-ms]", "pandas/tests/scalar/timedelta/test_timede...
null
true
2023-06-07T22:44:08Z
3
16
4
3,180
0
0.85
1
0.77
1
0.553333
89.255
512
swe_gym::train::1528
swe_gym
train
1,528
pandas-dev__pandas-50151
pandas-dev/pandas
pandas-dev/pandas
python
e3143f6119c4745472d8291f72fc06121e72c699
BUG: `DataFrame.dtypes` doesn't include backend for `string` columns ### 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 ...
I _think_ the Series repr uses `__str__` of each element which is why this may be happening ``` In [6]: str(df.x.dtype) Out[6]: 'string' In [7]: repr(df.x.dtype) Out[7]: 'string[pyarrow]' ```
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index e16ef0857685d..c5c2f8ece4325 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -788,6 +788,7 @@ I/O - Improved error message in :func:`read_excel` by including the offending sheet name when an exception...
diff --git a/pandas/tests/io/formats/test_to_string.py b/pandas/tests/io/formats/test_to_string.py index 5e7aeb7f226de..31ba018a178ca 100644 --- a/pandas/tests/io/formats/test_to_string.py +++ b/pandas/tests/io/formats/test_to_string.py @@ -5,6 +5,8 @@ import numpy as np import pytest +import pandas.util._test_deco...
["pandas/tests/io/formats/test_to_string.py::test_to_string_string_dtype"]
["pandas/tests/io/formats/test_to_string.py::test_truncation_no_index[10-None-", "pandas/tests/io/formats/test_to_string.py::test_to_string_max_rows_zero[data0-", "pandas/tests/io/formats/test_to_string.py::test_format_remove_leading_space_series[input_array2-1\\na]", "pandas/tests/io/formats/test_to_string.py::test_nu...
null
true
2022-12-09T14:28:00Z
3
16
1
3,008
0
0.85
1
0.77
1
0.553333
89.255
513
swe_gym::train::1021
swe_gym
train
1,021
dask__dask-8316
dask/dask
dask/dask
python
752555aa5d93ed359b49c4158a7418b7327a5664
Specify worker ressource for dask.Delayed object with dask.annotate I tried to execute a python function via the "dask.delayed" interface on different workers according to their resources via the "dask.annotate" context manager. According to [the doc](https://distributed.dask.org/en/latest/resources.html#resources-with...
Thanks for raising an issue @juergend7lytix. It looks like you're not creating a `Client`, which is what will cause `compute()` calls to run on the distributed cluster you created, in your first code snippet. Does adding a `Client` improve the situation? Also FWIW when I tried running the second code snippet in an ...
diff --git a/dask/delayed.py b/dask/delayed.py --- a/dask/delayed.py +++ b/dask/delayed.py @@ -16,10 +16,9 @@ ) from .base import tokenize as _tokenize from .context import globalmethod -from .core import quote +from .core import flatten, quote from .highlevelgraph import HighLevelGraph -from .optimization import c...
diff --git a/dask/tests/test_delayed.py b/dask/tests/test_delayed.py --- a/dask/tests/test_delayed.py +++ b/dask/tests/test_delayed.py @@ -13,6 +13,7 @@ import dask.bag as db from dask import compute from dask.delayed import Delayed, delayed, to_task_dask +from dask.highlevelgraph import HighLevelGraph from dask.ut...
["dask/tests/test_highgraph.py::test_materializedlayer_cull_preserves_annotations", "dask/tests/test_delayed.py::test_annotations_survive_optimization"]
["dask/tests/test_delayed.py::test_pickle[f0]", "dask/tests/test_delayed.py::test_finalize_name", "dask/tests/test_delayed.py::test_literates", "dask/tests/test_highgraph.py::test_node_tooltips_exist", "dask/tests/test_delayed.py::test_keys_from_array", "dask/tests/test_highgraph.py::test_len_does_not_materialize", "da...
null
true
2021-10-29T00:30:49Z
2
16
2
3,251
0
0.85
1
0.77
1
0.553333
89.255
514
swe_gym::train::363
swe_gym
train
363
python__mypy-12767
python/mypy
python/mypy
python
03901ef657daf6f477e6fe933c42ac270cf5034b
Crash when using total_ordering and a Generic class **Crash Report** When using a test snippet that uses `functools.total_ordering` and a `Generic` class whose `TypeVar` is bound by some other class, there is an internal crash in mypy. The reproduction cases are below the traceback. This may be related to #8539, but ...
Same assertion is hit in #12113, #10140, #10672, #12252 and #12112
diff --git a/mypy/plugins/default.py b/mypy/plugins/default.py --- a/mypy/plugins/default.py +++ b/mypy/plugins/default.py @@ -96,7 +96,6 @@ def get_class_decorator_hook(self, fullname: str ) -> Optional[Callable[[ClassDefContext], None]]: from mypy.plugins import attrs ...
diff --git a/test-data/unit/check-functools.test b/test-data/unit/check-functools.test --- a/test-data/unit/check-functools.test +++ b/test-data/unit/check-functools.test @@ -132,3 +132,24 @@ from typing import TypeVar, Generic _T = TypeVar('_T') class cached_property(Generic[_T]): ... [builtins fixtures/property.py...
["mypy/test/testcheck.py::TypeCheckSuite::check-functools.test::testTotalOrderingWithForwardReference"]
[]
null
true
2022-05-11T13:19:30Z
2
16
1
4,889
0
0.85
1
0.77
1
0.553333
89.255
515
swe_gym::train::1259
swe_gym
train
1,259
pandas-dev__pandas-53049
pandas-dev/pandas
pandas-dev/pandas
python
9bd8b5d8d05f9513886e26765e7cf2d9998eb344
BUG: SeriesGroupby with sort=False behaves inconsistently with .quantiles(...).unstack() ### 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 ...
Thanks for the report. Can include the expected and current output - this can change overtime and it is helpful to people who look into the issue in the future. unstack is using `.index.levels` to determine the result, and this appears inconsistent in the result of groupby: ``` ind = pd.MultiIndex.from_tuples([(...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 9fb039de8f73a..08ea347708b8f 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -412,6 +412,7 @@ Groupby/resample/rolling the function operated on the whole index rather than each element of the index....
diff --git a/pandas/tests/groupby/test_quantile.py b/pandas/tests/groupby/test_quantile.py index 5801223c0e718..7bf168944a1ac 100644 --- a/pandas/tests/groupby/test_quantile.py +++ b/pandas/tests/groupby/test_quantile.py @@ -471,3 +471,33 @@ def test_groupby_quantile_dt64tz_period(): expected.index = expected.inde...
["pandas/tests/groupby/test_quantile.py::test_groupby_quantile_nonmulti_levels_order"]
["pandas/tests/groupby/test_quantile.py::test_groupby_quantile_with_arraylike_q_and_int_columns[q0-groupby0-frame_size0]", "pandas/tests/groupby/test_quantile.py::test_quantile[0.75-a_vals5-b_vals5-higher]", "pandas/tests/groupby/test_quantile.py::test_groupby_quantile_all_na_group_masked_interp[UInt8-midpoint]", "pand...
null
true
2023-05-03T07:09:33Z
2
16
1
3,917
0
0.85
1
0.77
1
0.553333
89.255
516
swe_gym::train::2424
swe_gym
train
2,424
modin-project__modin-6324
modin-project/modin
modin-project/modin
python
f32a9bda4be075e9c5c99252bfeeb23d5d135d4c
TEST: signature verification for `.rename_axis` disabled due to pandas bug in 1.5.0 ### 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...
Thanks @vnlitvinov. https://github.com/pandas-dev/pandas/issues/48692 is not considered a regression, so I think this is blocked on pandas releasing the next minor version, 1.6.
diff --git a/modin/pandas/series.py b/modin/pandas/series.py --- a/modin/pandas/series.py +++ b/modin/pandas/series.py @@ -1412,6 +1412,22 @@ def reindex( fill_value=fill_value, ) + def rename_axis( + self, + mapper=no_default, + *, + index=no_default, + axi...
diff --git a/modin/pandas/test/test_api.py b/modin/pandas/test/test_api.py --- a/modin/pandas/test/test_api.py +++ b/modin/pandas/test/test_api.py @@ -272,8 +272,6 @@ def test_series_api_equality(): # These have to be checked manually allowed_different = ["to_hdf", "hist"] - # skip verifying .rename_axis...
["modin/pandas/test/test_api.py::test_series_api_equality"]
["modin/pandas/test/test_api.py::test_groupby_api_equality[SeriesGroupBy]", "modin/pandas/test/test_api.py::test_sparse_accessor_api_equality[Series]", "modin/pandas/test/test_api.py::test_groupby_api_equality[DataFrameGroupBy]", "modin/pandas/test/test_api.py::test_series_str_api_equality", "modin/pandas/test/test_api...
null
true
2023-06-29T16:54:26Z
1
16
1
3,178
0
0.85
1
0.77
1
0.553333
89.255
517
swe_gym::train::1585
swe_gym
train
1,585
pandas-dev__pandas-57938
pandas-dev/pandas
pandas-dev/pandas
python
192db0d2acb5cf307beadb8d98c07b80ff29eeaf
Multiple dateoffsets in Holiday raises a TypeError #### Code Sample, a copy-pastable example if possible ```python import pandas as pd from pandas.tseries.holiday import Holiday, USThanksgivingDay blackfriday = Holiday('Black Friday', month=USThanksgivingDay.month, day=USThanksgivingDay.day, offset=[USThanksgivingDay....
diff --git a/pandas/tseries/holiday.py b/pandas/tseries/holiday.py index cc9e2e3be8c38..8e51183138b5c 100644 --- a/pandas/tseries/holiday.py +++ b/pandas/tseries/holiday.py @@ -4,6 +4,7 @@ datetime, timedelta, ) +from typing import Callable import warnings from dateutil.relativedelta import ( @@ -17,6 +1...
diff --git a/pandas/tests/tseries/holiday/test_holiday.py b/pandas/tests/tseries/holiday/test_holiday.py index b2eefd04ef93b..08f4a1250392e 100644 --- a/pandas/tests/tseries/holiday/test_holiday.py +++ b/pandas/tests/tseries/holiday/test_holiday.py @@ -271,6 +271,25 @@ def test_both_offset_observance_raises(): ...
["pandas/tests/tseries/holiday/test_holiday.py::test_list_of_list_of_offsets_raises"]
["pandas/tests/tseries/holiday/test_holiday.py::test_holidays_within_dates[New", "pandas/tests/tseries/holiday/test_holiday.py::test_holidays_within_dates[holiday7-2015-11-26-expected7]", "pandas/tests/tseries/holiday/test_holiday.py::test_argument_types[<lambda>0]", "pandas/tests/tseries/holiday/test_holiday.py::test_...
null
true
2024-03-20T21:39:57Z
1
47
1
1,817
0
0.85
1
0.85
1
0.4595
89.2535
518
swe_gym::train::412
swe_gym
train
412
python__mypy-13648
python/mypy
python/mypy
python
0f17aff06ac1c05c442ba989e23655a2c6adbfbf
problem with `ABCMeta` as base class inside an iter without annotation **Crash Report** Mypy crashed, the code snippet below is enough to reproduce that. **Traceback** ``` bug.py:34: error: INTERNAL ERROR -- Please try using mypy master on Github: https://mypy.rtfd.io/en/latest/common_issues.html#using-a-developmen...
Confirmed on master. The assert fails because `ret` is `Any`, evidently the result of the join between C (a function) and D (a class).
diff --git a/mypy/join.py b/mypy/join.py --- a/mypy/join.py +++ b/mypy/join.py @@ -559,10 +559,10 @@ def join_similar_callables(t: CallableType, s: CallableType) -> CallableType: arg_types: list[Type] = [] for i in range(len(t.arg_types)): arg_types.append(meet_types(t.arg_types[i], s.arg_types[i])) ...
diff --git a/test-data/unit/check-classes.test b/test-data/unit/check-classes.test --- a/test-data/unit/check-classes.test +++ b/test-data/unit/check-classes.test @@ -865,6 +865,23 @@ class C(B): pass class D(C): pass class D2(C): pass +[case testConstructorJoinsWithCustomMetaclass] +# flags: --strict-optional +fro...
["mypy/test/testcheck.py::TypeCheckSuite::check-classes.test::testConstructorJoinsWithCustomMetaclass"]
[]
null
true
2022-09-12T02:37:56Z
1
15
1
5,344
0
0.85
1
0.77
1
0.55
89.245
519
swe_gym::train::1464
swe_gym
train
1,464
pandas-dev__pandas-54015
pandas-dev/pandas
pandas-dev/pandas
python
c92b3701efff16293bd110a3f06f458040b43d97
BUG: Parameter `col_space` of `to_html` method not working with multi-level columns ### 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 ...
`DataFrame.to_html()` is quite old and has not been extended in a number of years. It contains some deprecated HTML features as well as producing inline-styles which some modern CSPs (content security policies) do not allow. I would recommend using `df.style.to_html()` where you can use CSS to control the size of any ...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 137f2e5c12211..24def10266ab7 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -523,6 +523,7 @@ I/O - Bug in :func:`read_html`, tail texts were removed together with elements containing ``display:none``...
diff --git a/pandas/tests/io/formats/test_to_html.py b/pandas/tests/io/formats/test_to_html.py index 9c128756339ab..bea0eebef2cf6 100644 --- a/pandas/tests/io/formats/test_to_html.py +++ b/pandas/tests/io/formats/test_to_html.py @@ -896,3 +896,59 @@ def test_to_html_float_format_object_col(datapath): result = df.t...
["pandas/tests/io/formats/test_to_html.py::test_to_html_multiindex_col_with_colspace"]
["pandas/tests/io/formats/test_to_html.py::test_to_html_basic_alignment[row_index2-unnamed_multi-column_index0-unnamed_standard-True-False-True]", "pandas/tests/io/formats/test_to_html.py::test_to_html_alignment_with_truncation[row_index1-named_standard-column_index1-named_standard-False-False-True]", "pandas/tests/io/...
null
true
2023-07-05T22:02:36Z
2
15
1
3,362
0
0.85
1
0.77
1
0.55
89.245
520
swe_gym::train::1776
swe_gym
train
1,776
pandas-dev__pandas-57225
pandas-dev/pandas
pandas-dev/pandas
python
8d1dd0783f709b4a32bdccdb2dba150a3b30b8cb
BUG: ewm.sum() gives incorrect values when used with halflife parameter ### 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 th...
The docs say about `halflife`: > If times is specified, a timedelta convertible unit over which an observation decays to half its value. Only applicable to mean(), and halflife value will not apply to the other functions. It looks like in your example it just sets `halflife` to 1 and ignores `times`, which is def...
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index f9117253b61c1..7c74a2698093d 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -205,7 +205,7 @@ Plotting Groupby/resample/rolling ^^^^^^^^^^^^^^^^^^^^^^^^ - Bug in :meth:`.DataFrameGroupBy.quantile` w...
diff --git a/pandas/tests/window/test_ewm.py b/pandas/tests/window/test_ewm.py index 2e2cfa156019f..35c896dc0090b 100644 --- a/pandas/tests/window/test_ewm.py +++ b/pandas/tests/window/test_ewm.py @@ -173,6 +173,18 @@ def test_ewm_sum_adjust_false_notimplemented(): data.sum() +@pytest.mark.parametrize("met...
["pandas/tests/window/test_ewm.py::test_times_only_mean_implemented[DataFrame-var]", "pandas/tests/window/test_ewm.py::test_times_only_mean_implemented[Series-corr]", "pandas/tests/window/test_ewm.py::test_times_only_mean_implemented[Series-cov]", "pandas/tests/window/test_ewm.py::test_times_only_mean_implemented[Serie...
["pandas/tests/window/test_ewm.py::test_ewm_getitem_attributes_retained[True-True-com]", "pandas/tests/window/test_ewm.py::test_ewm_with_times_getitem[1", "pandas/tests/window/test_ewm.py::test_ewm_sum[expected_data1-True]", "pandas/tests/window/test_ewm.py::test_ewm_getitem_attributes_retained[False-True-com]", "panda...
null
true
2024-02-03T14:57:55Z
2
14
10
3,103
0
0.85
1
0.77
1
0.546667
89.235
521
swe_gym::train::641
swe_gym
train
641
conan-io__conan-13326
conan-io/conan
conan-io/conan
python
00700331f59e1e01b53315fec786e7f78d7bced2
[bug] qcc cannot calculate dep graph because it fails to produce a list of compatible cppstd per compiler verison ### Environment details * Operating System+version: Ubuntu 20.04 * Compiler+version: qcc 8.3.0 * Conan version: 2.0.1 * Python version: 3.8.10 ### Steps to reproduce ### command conan build -pr:b l...
I have a fix for this and would like to help
diff --git a/conan/tools/build/cppstd.py b/conan/tools/build/cppstd.py --- a/conan/tools/build/cppstd.py +++ b/conan/tools/build/cppstd.py @@ -112,7 +112,9 @@ def supported_cppstd(conanfile, compiler=None, compiler_version=None): "gcc": _gcc_supported_cppstd, "msvc": _msvc_supported_cppstd, ...
diff --git a/conans/test/unittests/tools/build/test_cppstd.py b/conans/test/unittests/tools/build/test_cppstd.py --- a/conans/test/unittests/tools/build/test_cppstd.py +++ b/conans/test/unittests/tools/build/test_cppstd.py @@ -104,6 +104,16 @@ def test_supported_cppstd_mcst(compiler, compiler_version, values): sot...
["conans/test/unittests/tools/build/test_cppstd.py::test_supported_cppstd_qcc[qcc-5.4-values1]", "conans/test/unittests/tools/build/test_cppstd.py::test_supported_cppstd_qcc[qcc-4.4-values0]", "conans/test/unittests/tools/build/test_cppstd.py::test_supported_cppstd_qcc[qcc-8.3-values2]"]
["conans/test/unittests/tools/build/test_cppstd.py::test_supported_cppstd_gcc[gcc-4.3-values3]", "conans/test/unittests/tools/build/test_cppstd.py::test_valid_min_cppstd_from_settings[11]", "conans/test/unittests/tools/build/test_cppstd.py::test_supported_cppstd_clang[clang-3.4-values4]", "conans/test/unittests/tools/b...
null
true
2023-03-04T18:14:02Z
1
14
3
3,639
0
0.85
1
0.77
1
0.546667
89.235
522
swe_gym::train::1123
swe_gym
train
1,123
pydantic__pydantic-6282
pydantic/pydantic
pydantic/pydantic
python
1826419f9db274ff5e64f2823d72e260527f0407
v2.0b3: Discriminator on union of models in RootModel yields TypeError ### Initial Checks - [X] I confirm that I'm using Pydantic V2 installed directly from the `main` branch, or equivalent ### Description If unionizing types on a RootModel, providing a discriminator seems to fail with a TypeError: ``` TypeError: 'd...
Just hit the same `TypeError: 'definition-ref' is not a valid discriminated union variant; should be a BaseModel or dataclass` ```python import sys if sys.version_info >= (3, 9): from typing import List, Optional, Literal, Union, Annotated else: from typing import List, Optional, Union from typi...
diff --git a/pydantic/_internal/_discriminated_union.py b/pydantic/_internal/_discriminated_union.py --- a/pydantic/_internal/_discriminated_union.py +++ b/pydantic/_internal/_discriminated_union.py @@ -318,6 +318,12 @@ def _infer_discriminator_values_for_choice( # noqa C901 elif choice['type'] == 'typed-dict...
diff --git a/tests/test_root_model.py b/tests/test_root_model.py --- a/tests/test_root_model.py +++ b/tests/test_root_model.py @@ -3,7 +3,7 @@ import pytest from pydantic_core import CoreSchema from pydantic_core.core_schema import SerializerFunctionWrapHandler -from typing_extensions import Annotated +from typing_e...
["tests/test_root_model.py::test_root_and_data_error", "tests/test_root_model.py::test_mixed_discriminated_union[SModel]", "tests/test_root_model.py::test_mixed_discriminated_union[IModel]"]
["tests/test_root_model.py::test_root_model_specialized[list[int]]", "tests/test_root_model.py::test_root_model_base_model_equality", "tests/test_root_model.py::test_construct", "tests/test_root_model.py::test_assignment", "tests/test_root_model.py::test_validate_assignment_false", "tests/test_root_model.py::test_valid...
null
true
2023-06-28T12:01:33Z
2
14
3
3,469
0
0.85
1
0.77
1
0.546667
89.235
523
swe_gym::train::1838
swe_gym
train
1,838
pandas-dev__pandas-48760
pandas-dev/pandas
pandas-dev/pandas
python
4baeede019754603c64f700821f43f35469e9a45
BUG: `df.groupby(axis=1).size()` returns weird output ### 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 t...
I've found a simpler reproducer which does not include multi-index but exhibits same weird output for `.size()`, so I've added that, too. Hi, thanks for your report. ``` commit 15a06d3d9e7656afff239da7a295a7b684456680 Author: Richard Shadrach <45562402+rhshadrach@users.noreply.github.com> Date: Mon Feb 14 20:00...
diff --git a/doc/source/whatsnew/v1.5.1.rst b/doc/source/whatsnew/v1.5.1.rst index d61a8f720a0b4..96b5a554071b3 100644 --- a/doc/source/whatsnew/v1.5.1.rst +++ b/doc/source/whatsnew/v1.5.1.rst @@ -75,6 +75,7 @@ Fixed regressions - Fixed regression in :meth:`DataFrame.plot` ignoring invalid ``colormap`` for ``kind="sca...
diff --git a/pandas/tests/groupby/test_size.py b/pandas/tests/groupby/test_size.py index a614cf7abd684..92012436f6b47 100644 --- a/pandas/tests/groupby/test_size.py +++ b/pandas/tests/groupby/test_size.py @@ -33,12 +33,12 @@ def test_size_axis_1(df, axis_1, by, sort, dropna): counts = {key: sum(value == key for va...
["pandas/tests/groupby/test_size.py::test_size_axis_1[axis='columns'-False-True-by3]", "pandas/tests/groupby/test_size.py::test_size_axis_1[axis=1-False-True-by2]", "pandas/tests/groupby/test_size.py::test_size_axis_1[axis=1-True-True-by1]", "pandas/tests/groupby/test_size.py::test_size_axis_1[axis=1-True-False-by1]", ...
["pandas/tests/groupby/transform/test_transform.py::test_null_group_str_reducer_series[True-max]", "pandas/tests/groupby/transform/test_transform.py::test_null_group_str_transformer_series[False-ffill]", "pandas/tests/groupby/transform/test_transform.py::test_group_fill_methods[ffill-None-exp_vals0-1.0-2.0-True-False]"...
null
true
2022-09-24T13:36:05Z
2
14
33
4,144
0
0.85
1
0.77
1
0.546667
89.235
524
swe_gym::train::1684
swe_gym
train
1,684
pandas-dev__pandas-53505
pandas-dev/pandas
pandas-dev/pandas
python
abcd440e11d061171b0a4eeb058748629a288568
BUG: Data corruption when `mode` is performed on `timedelta64` dtype in pandas-2.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 have c...
Simpler repro: ```py import pandas as pd df = pd.DataFrame( { '0': pd.Series(['a', 'b', 'c']), '1': pd.Series( np.array([1, 21], dtype="timedelta64[s]"), ) } ) df # outputs 0 1 0 a 0 days 00:00:01 1 b 0 days 00:0...
diff --git a/doc/source/whatsnew/v2.0.3.rst b/doc/source/whatsnew/v2.0.3.rst index 3da469c2e1fe6..a40d8e333abed 100644 --- a/doc/source/whatsnew/v2.0.3.rst +++ b/doc/source/whatsnew/v2.0.3.rst @@ -22,6 +22,7 @@ Fixed regressions Bug fixes ~~~~~~~~~ - Bug in :func:`RangeIndex.union` when using ``sort=True`` with anot...
diff --git a/pandas/tests/series/methods/test_reindex.py b/pandas/tests/series/methods/test_reindex.py index 16fc04d588a52..614002d755b6d 100644 --- a/pandas/tests/series/methods/test_reindex.py +++ b/pandas/tests/series/methods/test_reindex.py @@ -12,6 +12,7 @@ NaT, Period, PeriodIndex, + RangeIndex,...
["pandas/tests/series/methods/test_reindex.py::test_reindex_expand_nonnano_nat[timedelta64]"]
["pandas/tests/series/methods/test_reindex.py::test_reindex_nearest", "pandas/tests/series/methods/test_reindex.py::test_reindex_empty_series_tz_dtype", "pandas/tests/series/methods/test_reindex.py::test_reindex_astype_order_consistency", "pandas/tests/series/methods/test_reindex.py::test_reindex_fill_value", "pandas/t...
null
true
2023-06-02T20:55:22Z
2
14
1
4,287
0
0.85
1
0.77
1
0.546667
89.235
525
swe_bench_verified::test::224
swe_bench_verified
test
224
django__django-16315
django/django
django/django
python
7d5329852f19c6ae78c6f6f3d3e41835377bf295
QuerySet.bulk_create() crashes on mixed case columns in unique_fields/update_fields. Description Not sure exactly how to phrase this, but when I I'm calling bulk_update on the manager for a class with db_column set on fields the SQL is invalid. Ellipses indicate other fields excluded for clarity. class ActivityBlackLi...
Thanks for the report! Bug in 0f6946495a8ec955b471ca1baaf408ceb53d4796. We should use columns instead of field names, e.g. django/db/models/query.py diff --git a/django/db/models/query.py b/django/db/models/query.py index de49e1c58c..fcf0a0616c 100644 a b class QuerySet(AltersData): 798798 self._prepare_for_bulk_create...
diff --git a/django/db/models/query.py b/django/db/models/query.py --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -720,7 +720,6 @@ def _check_bulk_create_options( "Unique fields that can trigger the upsert must be provided." ) # Updating primary key...
diff --git a/tests/bulk_create/models.py b/tests/bulk_create/models.py --- a/tests/bulk_create/models.py +++ b/tests/bulk_create/models.py @@ -69,6 +69,11 @@ class TwoFields(models.Model): name = models.CharField(max_length=15, null=True) +class FieldsWithDbColumns(models.Model): + rank = models.IntegerFiel...
["test_update_conflicts_unique_fields_update_fields_db_column (bulk_create.tests.BulkCreateTests)"]
["test_batch_same_vals (bulk_create.tests.BulkCreateTests)", "test_bulk_insert_expressions (bulk_create.tests.BulkCreateTests)", "test_bulk_insert_nullable_fields (bulk_create.tests.BulkCreateTests)", "test_efficiency (bulk_create.tests.BulkCreateTests)", "test_empty_model (bulk_create.tests.BulkCreateTests)", "test_ex...
null
true
2022-11-22T09:44:54Z
2
13
1
1,296
0
1
1
0.7
1
0.259333
89.228
526
swe_gym::train::447
swe_gym
train
447
python__mypy-10308
python/mypy
python/mypy
python
1567e36165b00d532f232cb3d33d1faf04aaf63d
INTERNAL ERROR when defining "__add__" in two related Protocol classes The following minimal example causes a crash: ``` from typing import Protocol, TypeVar, Union T1 = TypeVar("T1", bound=float) T2 = TypeVar("T2", bound=float) class Vector(Protocol[T1]): def __len__(self) -> int: ... def __add__(...
Thanks for the report! Confirmed that it reproes against master. The self types aren't necessary for the crash, for whatever that's worth. Yep, was just about to report this, but found it already was reported. Note that I did notice if you add `--pdb`, besides not really working to show anything (probably due to the c...
diff --git a/mypy/subtypes.py b/mypy/subtypes.py --- a/mypy/subtypes.py +++ b/mypy/subtypes.py @@ -522,6 +522,14 @@ def f(self) -> A: ... assert right.type.is_protocol # We need to record this check to generate protocol fine-grained dependencies. TypeState.record_protocol_subtype_check(left.type, right.t...
diff --git a/test-data/unit/check-protocols.test b/test-data/unit/check-protocols.test --- a/test-data/unit/check-protocols.test +++ b/test-data/unit/check-protocols.test @@ -886,6 +886,47 @@ x: P1 = A() # E: Incompatible types in assignment (expression has type "A", vari # N: attr1: expected "P2", got...
["mypy/test/testcheck.py::TypeCheckSuite::testTwoUncomfortablyIncompatibleProtocolsWithoutRunningInIssue9771"]
[]
null
true
2021-04-11T13:10:29Z
1
13
1
3,894
0
0.85
1
0.77
1
0.543333
89.225
527
swe_gym::train::2078
swe_gym
train
2,078
Project-MONAI__MONAI-7000
Project-MONAI/MONAI
project-monai/monai
python
5a644e4edcc37e5c963e52fda6fab4c85b3ff02e
`itk_torch_bridge.metatensor_to_itk_image()` incorrect orientation **Describe the bug** I have been trying to use `itk_torch_bridge.metatensor_to_itk_image()` to save the predicted masks, but it consistently fails to save them in the correct orientation. I initially suspected that something went wrong in the inverse tr...
thanks, that's a good point, I'll try to enhance the code logic as the current `metatensor_to_itk_image ` assumes itk convention. for now please use `LoadImaged(keys=["image"], affine_lps_to_ras=False, reader="ITKReader")`. Thanks! Is there a way to achieve that not by changing the LoadImaged args, but by applying some...
diff --git a/monai/data/image_reader.py b/monai/data/image_reader.py --- a/monai/data/image_reader.py +++ b/monai/data/image_reader.py @@ -1316,6 +1316,8 @@ def get_data(self, img: NrrdImage | list[NrrdImage]) -> tuple[np.ndarray, dict]: if self.affine_lps_to_ras: header = self._switch_l...
diff --git a/tests/test_itk_torch_bridge.py b/tests/test_itk_torch_bridge.py --- a/tests/test_itk_torch_bridge.py +++ b/tests/test_itk_torch_bridge.py @@ -11,13 +11,17 @@ from __future__ import annotations +import itertools import os +import tempfile import unittest import numpy as np import torch from para...
["tests/test_itk_torch_bridge.py::TestITKTorchRW::test_rw_itk_08_copd1_highres_INSP_STD_COPD_img_nii_gz", "tests/test_itk_torch_bridge.py::TestITKTorchRW::test_rw_itk_12_copd1_highres_EXP_STD_COPD_img_nii_gz", "tests/test_itk_torch_bridge.py::TestITKTorchRW::test_rw_itk_04_CT_2D_head_moving_mha", "tests/test_itk_torch_...
["tests/test_itk_torch_bridge.py::TestITKTorchRW::test_rw_itk_01_CT_2D_head_fixed_mha", "tests/test_itk_torch_bridge.py::TestITKTorchAffineMatrixBridge::test_monai_to_itk_0_CT_2D_head_fixed_mha", "tests/test_itk_torch_bridge.py::TestITKTorchAffineMatrixBridge::test_arbitary_center_of_rotation_0_CT_2D_head_fixed_mha", "...
null
true
2023-09-18T11:20:39Z
2
13
10
5,555
0
0.85
1
0.77
1
0.543333
89.225
528
swe_gym::train::2346
swe_gym
train
2,346
modin-project__modin-6275
modin-project/modin
modin-project/modin
python
c9f7f6506a5b7503bcd9ec9b9a08d6a008747a52
BUG: since pandas 2.0, median(axis=None) gives median over entire frame in pandas but not in modin ### 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...
Another ones: Changed behavior of [DataFrame.max()](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.max.html#pandas.DataFrame.max), [DataFrame.min](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.min.html#pandas.DataFrame.min), [DataFrame.mean](https://pandas.pydata.org/docs/reference/api/p...
diff --git a/modin/core/dataframe/algebra/default2pandas/default.py b/modin/core/dataframe/algebra/default2pandas/default.py --- a/modin/core/dataframe/algebra/default2pandas/default.py +++ b/modin/core/dataframe/algebra/default2pandas/default.py @@ -128,6 +128,10 @@ def applyier(df, *args, **kwargs): ...
diff --git a/modin/pandas/test/dataframe/test_reduce.py b/modin/pandas/test/dataframe/test_reduce.py --- a/modin/pandas/test/dataframe/test_reduce.py +++ b/modin/pandas/test/dataframe/test_reduce.py @@ -328,7 +328,7 @@ def test_sum_single_column(data): @pytest.mark.parametrize( "fn", ["max", "min", "median", "mea...
["modin/pandas/test/dataframe/test_reduce.py::test_reduce_specific[numeric_only_True-None-mean]", "modin/pandas/test/dataframe/test_reduce.py::test_reduce_specific[numeric_only_True-None-max]", "modin/pandas/test/dataframe/test_reduce.py::test_reduce_specific[numeric_only_True-None-skew]", "modin/pandas/test/dataframe/...
["modin/pandas/test/dataframe/test_reduce.py::test_sum[data0-over_columns_int-skipna_None-True]", "modin/pandas/test/dataframe/test_reduce.py::test_min_max_mean[data0-over_columns_str-skipna_False-numeric_only_True-True-max]", "modin/pandas/test/dataframe/test_reduce.py::test_min_max_mean[data0-over_rows_str-skipna_Tru...
null
true
2023-06-16T13:43:16Z
4
141
6
2,989
0
0.85
1
0.85
0.85
0.968167
89.217
529
swe_gym::train::1741
swe_gym
train
1,741
pandas-dev__pandas-57169
pandas-dev/pandas
pandas-dev/pandas
python
db11e25d2b1175fdf85d963a88ff5a1d4bdb6fd8
BUG: Stable sort on DatetimeIndex is not stable ### 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 [ma...
Thanks for the report! Result of a git bisect: ``` commit b6834f8b93d20c99cf3f1c527ba4ba2a462c69d9 Author: Luke Manley Date: Thu Nov 23 14:45:42 2023 -0500 PERF: Index.sort_values for already sorted index (#56128) ``` cc @lukemanley
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index 19b7e3493f964..713e3787825fb 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -18,6 +18,7 @@ Fixed regressions - Fixed regression in :func:`merge_ordered` raising ``TypeError`` for ``fill_method="ffill...
diff --git a/pandas/tests/frame/methods/test_sort_index.py b/pandas/tests/frame/methods/test_sort_index.py index 821b2e0d7a6da..1a5df0778ec52 100644 --- a/pandas/tests/frame/methods/test_sort_index.py +++ b/pandas/tests/frame/methods/test_sort_index.py @@ -1001,3 +1001,27 @@ def test_axis_columns_ignore_index(): r...
["pandas/tests/frame/methods/test_sort_index.py::test_sort_index_stable_sort"]
["pandas/tests/frame/methods/test_sort_index.py::TestDataFrameSortIndex::test_sort_index_level2", "pandas/tests/frame/methods/test_sort_index.py::TestDataFrameSortIndex::test_sort_index_categorical_index", "pandas/tests/frame/methods/test_sort_index.py::TestDataFrameSortIndex::test_sort_index_level_mixed", "pandas/test...
null
true
2024-01-31T11:37:11Z
2
12
1
3,691
0
0.85
1
0.77
1
0.54
89.215
530
swe_gym::train::1765
swe_gym
train
1,765
pandas-dev__pandas-53623
pandas-dev/pandas
pandas-dev/pandas
python
4149f323882a55a2fe57415ccc190ea2aaba869b
BUG: inconsistent treatment of `numpy.Inf` between `groupby.sum()` and `groupby.apply(lambda: _grp: _grp.sum())` ### 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.ht...
Thanks for the report. #50367 handled the mean case, I think something similar can be done for sum.
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index ba5334b2f4fa8..bdd83e2adefd6 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -458,8 +458,9 @@ Groupby/resample/rolling - Bug in :meth:`GroupBy.groups` with a datetime key in conjunction with another k...
diff --git a/pandas/tests/groupby/test_libgroupby.py b/pandas/tests/groupby/test_libgroupby.py index d10bcf9053d1a..92c3b68d87fad 100644 --- a/pandas/tests/groupby/test_libgroupby.py +++ b/pandas/tests/groupby/test_libgroupby.py @@ -6,6 +6,7 @@ group_cumprod, group_cumsum, group_mean, + group_sum, ...
["pandas/tests/groupby/test_libgroupby.py::test_cython_group_sum_Inf_at_begining_and_end[values0-out0]", "pandas/tests/groupby/test_libgroupby.py::test_cython_group_sum_Inf_at_begining_and_end[values3-out3]"]
["pandas/tests/groupby/test_libgroupby.py::TestGroupVarFloat64::test_group_var_constant", "pandas/tests/groupby/test_libgroupby.py::test_cython_group_mean_Inf_at_begining_and_end", "pandas/tests/groupby/test_libgroupby.py::TestGroupVarFloat64::test_group_var_large_inputs", "pandas/tests/groupby/test_libgroupby.py::test...
null
true
2023-06-12T17:10:23Z
2
12
2
3,897
0
0.85
1
0.77
1
0.54
89.215
531
swe_bench_verified::test::262
swe_bench_verified
test
262
matplotlib__matplotlib-22871
matplotlib/matplotlib
matplotlib/matplotlib
python
a7b7260bf06c20d408215d95ce20a1a01c12e5b1
[Bug]: ConciseDateFormatter not showing year anywhere when plotting <12 months ### Bug summary When I plot < 1 year and January is not included in the x-axis, the year doesn't show up anywhere. This bug is different from bug #21670 (fixed in #21785). ### Code for reproduction ```python import matplotlib.pyplot as pl...
@anntzer working on this
diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py --- a/lib/matplotlib/dates.py +++ b/lib/matplotlib/dates.py @@ -796,8 +796,10 @@ def format_ticks(self, values): # mostly 0: years, 1: months, 2: days, # 3: hours, 4: minutes, 5: seconds, 6: microseconds for level in range(5, -1...
diff --git a/lib/matplotlib/tests/test_dates.py b/lib/matplotlib/tests/test_dates.py --- a/lib/matplotlib/tests/test_dates.py +++ b/lib/matplotlib/tests/test_dates.py @@ -630,6 +630,10 @@ def test_offset_changes(): ax.set_xlim(d1, d1 + datetime.timedelta(weeks=3)) fig.draw_without_rendering() assert form...
["lib/matplotlib/tests/test_dates.py::test_offset_changes"]
["lib/matplotlib/tests/test_dates.py::test_date_numpyx", "lib/matplotlib/tests/test_dates.py::test_date_date2num_numpy[datetime64[s]-t00]", "lib/matplotlib/tests/test_dates.py::test_date_date2num_numpy[datetime64[s]-t01]", "lib/matplotlib/tests/test_dates.py::test_date_date2num_numpy[datetime64[s]-t02]", "lib/matplotli...
null
true
2022-04-21T13:10:50Z
1
6
1
1,398
0
1
1
0.7
1
0.253
89.209
532
swe_gym::train::1154
swe_gym
train
1,154
pandas-dev__pandas-57968
pandas-dev/pandas
pandas-dev/pandas
python
39047111ca945f35c6b85780e8978d6e5a3357ed
BUG: encoding is **silently** ignored for `read_csv` on FileLike objects ### 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 t...
Hm, I guess we could raise if we're passed a file-like object and encoding != None, when the given encoding doesn't match the encoding for the file-like object. PRs for this would be welcome. take
diff --git a/pandas/io/parsers/readers.py b/pandas/io/parsers/readers.py index b234a6b78e051..7ecd8cd6d5012 100644 --- a/pandas/io/parsers/readers.py +++ b/pandas/io/parsers/readers.py @@ -1310,6 +1310,16 @@ def _check_file_or_buffer(self, f, engine: CSVEngine) -> None: raise ValueError( "...
diff --git a/pandas/tests/io/parser/test_c_parser_only.py b/pandas/tests/io/parser/test_c_parser_only.py index 090235c862a2a..98a460f221592 100644 --- a/pandas/tests/io/parser/test_c_parser_only.py +++ b/pandas/tests/io/parser/test_c_parser_only.py @@ -511,7 +511,7 @@ def __next__(self): def test_buffer_rd_bytes_bad_u...
["pandas/tests/io/parser/test_textreader.py::TestTextReader::test_encoding_mismatch_warning"]
["pandas/tests/io/parser/test_c_parser_only.py::test_1000_sep_with_decimal[c_low-A|B|C\\n1|2.334,01|5\\n10|13|10,\\n-.-,-None]", "pandas/tests/io/parser/test_c_parser_only.py::test_1000_sep_with_decimal[c_high-A|B|C\\n1|2,334.01|5\\n10|13|10.\\n-,-.-legacy]", "pandas/tests/io/parser/test_textreader.py::TestTextReader::...
null
true
2024-03-22T20:58:01Z
1
11
1
3,652
0
0.85
1
0.77
1
0.536667
89.205
533
swe_gym::train::1419
swe_gym
train
1,419
pandas-dev__pandas-47774
pandas-dev/pandas
pandas-dev/pandas
python
eb226bdfbe24f4be49c42b4a29d56cca554e921e
BUG: multi-index df fillna with value not working after 1.4.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. - [x] I have confirmed this bug exi...
First bad commit: https://github.com/pandas-dev/pandas/commit/3364f9af4c5e3ea1d5585217d8c97cfe6631d8e1 https://github.com/pandas-dev/pandas/pull/47327 cc @phofl Yeah this is unfortunate, but directly related to the other issues referencing the loc problems when setting with a MultiIndex ``` import numpy as np impo...
diff --git a/doc/source/whatsnew/v1.4.4.rst b/doc/source/whatsnew/v1.4.4.rst index dbdeebad06af0..3d0a6e01826f8 100644 --- a/doc/source/whatsnew/v1.4.4.rst +++ b/doc/source/whatsnew/v1.4.4.rst @@ -14,6 +14,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ +- Fixed regression in :meth:`Dat...
diff --git a/pandas/tests/frame/methods/test_fillna.py b/pandas/tests/frame/methods/test_fillna.py index 20e59ed72666a..8355502c47c61 100644 --- a/pandas/tests/frame/methods/test_fillna.py +++ b/pandas/tests/frame/methods/test_fillna.py @@ -715,6 +715,34 @@ def test_single_block_df_with_horizontal_axis(self): ...
["pandas/tests/frame/methods/test_fillna.py::TestFillNA::test_fillna_with_multi_index_frame"]
["pandas/tests/frame/methods/test_fillna.py::TestFillNA::test_inplace_dict_update_view[val1]", "pandas/tests/frame/methods/test_fillna.py::TestFillNA::test_fillna_downcast", "pandas/tests/frame/methods/test_fillna.py::TestFillNA::test_fillna_downcast_false[DataFrame]", "pandas/tests/frame/methods/test_fillna.py::TestFi...
null
true
2022-07-17T23:34:50Z
2
11
1
3,990
0
0.85
1
0.77
1
0.536667
89.205
534
swe_gym::train::248
swe_gym
train
248
getmoto__moto-5486
getmoto/moto
getmoto/moto
python
b0e78140f5b5f74b0cb3da43e5becc48bbc29cff
Create EC2 instance with nonexistent security group raises exception instead of giving an appropriate error My team encountered this when moving from an old version of localstack to a newer one. Apparently in an older version, we could just pass in a non-existent security group as part of the configuration for an EC2 i...
Thanks for raising this @cheshirex! Looks like AWS returns this error: `{'Code': 'InvalidGroup.NotFound', 'Message': "The security group 'sg-bbfe0e' does not exist in VPC 'vpc-...'"}`
diff --git a/moto/ec2/models/instances.py b/moto/ec2/models/instances.py --- a/moto/ec2/models/instances.py +++ b/moto/ec2/models/instances.py @@ -21,6 +21,7 @@ InvalidInstanceIdError, InvalidInstanceTypeError, InvalidParameterValueErrorUnknownAttribute, + InvalidSecurityGroupNotFoundError, Opera...
diff --git a/tests/test_ec2/test_instances.py b/tests/test_ec2/test_instances.py --- a/tests/test_ec2/test_instances.py +++ b/tests/test_ec2/test_instances.py @@ -688,6 +688,19 @@ def test_get_instances_filtering_by_ni_private_dns(): reservations[0]["Instances"].should.have.length_of(1) +@mock_ec2 +def test_ru...
["tests/test_ec2/test_instances.py::test_run_instances_with_unknown_security_group"]
["tests/test_ec2/test_instances.py::test_run_instance_with_block_device_mappings_missing_ebs", "tests/test_ec2/test_instances.py::test_get_instances_filtering_by_tag", "tests/test_ec2/test_instances.py::test_run_instance_and_associate_public_ip", "tests/test_ec2/test_instances.py::test_modify_instance_attribute_securit...
null
true
2022-09-19 20:30:59
1
11
1
5,721
0
0.85
1
0.77
1
0.536667
89.205
535
swe_gym::train::1705
swe_gym
train
1,705
pandas-dev__pandas-52264
pandas-dev/pandas
pandas-dev/pandas
python
1e2d87ba64783ebbaa90fb0829df29a3812014d0
BUG: Inconsistent behavior with bitwise operations on Series with np.array vs. list ### 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 ...
yah this is weird. let's deprecate the heck out of it
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index bac567b537edc..475d48be01a9e 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -115,6 +115,7 @@ Deprecations - Deprecated 'method', 'limit', and 'fill_axis' keywords in :meth:`DataFrame.align` and :meth...
diff --git a/pandas/tests/series/test_arithmetic.py b/pandas/tests/series/test_arithmetic.py index fa72bf4368b69..98fecca0c43ca 100644 --- a/pandas/tests/series/test_arithmetic.py +++ b/pandas/tests/series/test_arithmetic.py @@ -801,6 +801,14 @@ def test_series_ops_name_retention(self, flex, box, names, all_binary_oper...
["pandas/tests/series/test_arithmetic.py::TestNamePreservation::test_series_ops_name_retention[numexpr-names0-rand_-False-list]", "pandas/tests/series/test_arithmetic.py::TestNamePreservation::test_series_ops_name_retention[numexpr-names0-rxor-False-list]", "pandas/tests/series/test_arithmetic.py::TestNamePreservation:...
["pandas/tests/series/test_arithmetic.py::TestNamePreservation::test_series_ops_name_retention[python-names2-rpow-True-Index]", "pandas/tests/series/test_arithmetic.py::TestNamePreservation::test_series_ops_name_retention[python-names5-rsub-False-Series]", "pandas/tests/series/test_arithmetic.py::TestNamePreservation::...
null
true
2023-03-28T21:47:34Z
2
11
173
3,202
0
0.85
1
0.77
1
0.536667
89.205
536
swe_gym::train::362
swe_gym
train
362
python__mypy-15882
python/mypy
python/mypy
python
14418bc3d2c38b9ea776da6029e9d9dc6650b7ea
Guard clause prevents `match` from seeing that all paths return **Bug Report** In a `match` statement in which all `case`s include a return statement, _mypy_ 0.942 falsely reports "Missing return statement [return]" if at least one `case` includes a guard clause. **To Reproduce** ``` def func(e) -> int: match e:...
diff --git a/mypy/checker.py b/mypy/checker.py --- a/mypy/checker.py +++ b/mypy/checker.py @@ -4944,7 +4944,7 @@ def visit_match_stmt(self, s: MatchStmt) -> None: self.push_type_map(pattern_map) self.push_type_map(pattern_type.captures) if g is not ...
diff --git a/test-data/unit/check-python310.test b/test-data/unit/check-python310.test --- a/test-data/unit/check-python310.test +++ b/test-data/unit/check-python310.test @@ -1372,7 +1372,7 @@ match m: reveal_type(m) # N: Revealed type is "__main__.Medal" [case testMatchNarrowUsingPatternGuardSpecialCase] ...
["mypy/test/testcheck.py::TypeCheckSuite::check-python310.test::testMatchNarrowUsingPatternGuardSpecialCase", "mypy/test/testcheck.py::TypeCheckSuite::check-python310.test::testMatchGuardReachability"]
[]
null
true
2023-08-16T03:03:10Z
1
17
2
2,310
0
0.85
1
0.85
1
0.441667
89.2
537
swe_gym::train::1477
swe_gym
train
1,477
pandas-dev__pandas-53962
pandas-dev/pandas
pandas-dev/pandas
python
c126eeb39206e1fb68db19e9289f30b35e25fa9f
BUG: interpolate with ffill/bfill method, axis=1, multi-block ### 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 exi...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 0f669beaa036f..ad84058d2b75a 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -446,6 +446,7 @@ Indexing Missing ^^^^^^^ +- Bug in :meth:`DataFrame.interpolate` failing to fill across multiblock data...
diff --git a/pandas/tests/frame/methods/test_interpolate.py b/pandas/tests/frame/methods/test_interpolate.py index ac862e5673411..fcdf7db35446e 100644 --- a/pandas/tests/frame/methods/test_interpolate.py +++ b/pandas/tests/frame/methods/test_interpolate.py @@ -451,8 +451,11 @@ def test_interp_string_axis(self, axis_nam...
["pandas/tests/frame/methods/test_interpolate.py::TestDataFrameInterpolate::test_interp_fillna_methods[axis=1-ffill-True]", "pandas/tests/frame/methods/test_interpolate.py::TestDataFrameInterpolate::test_interp_fillna_methods[axis='columns'-bfill-True]", "pandas/tests/frame/methods/test_interpolate.py::TestDataFrameInt...
["pandas/tests/frame/methods/test_interpolate.py::TestDataFrameInterpolate::test_interp_fillna_methods[axis=0-ffill-True]", "pandas/tests/frame/methods/test_interpolate.py::TestDataFrameInterpolate::test_interp_axis_names[rows_0]", "pandas/tests/frame/methods/test_interpolate.py::TestDataFrameInterpolate::test_interp_f...
null
true
2023-07-01T07:17:42Z
2
57
6
1,508
0
0.85
1
0.85
1
0.441333
89.199
538
swe_gym::train::1357
swe_gym
train
1,357
pandas-dev__pandas-48280
pandas-dev/pandas
pandas-dev/pandas
python
55dc32437ea43a238975439ddb6c9dda81b33020
BUG: array ufuncs with more than 2 inputs fails with 2 or more pd.Series and scalar arguments - [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. - [x] (optional) I have confirmed this bug exists on the master branch of pandas. -...
Sorry for the delay. Would you be able to reproduce this with a more minimal example without the gsw library? If there is a bug, we would need to be able to add a regression test without this dependency Hi @mroeschke no worries about the delay. Here is a reproducible example using only numpy and pandas. I do need to ma...
diff --git a/doc/source/whatsnew/v1.6.0.rst b/doc/source/whatsnew/v1.6.0.rst index bdaea89776b7c..ce60844f68b51 100644 --- a/doc/source/whatsnew/v1.6.0.rst +++ b/doc/source/whatsnew/v1.6.0.rst @@ -189,7 +189,7 @@ Timezones Numeric ^^^^^^^ -- +- Bug in :meth:`DataFrame.add` cannot apply ufunc when inputs contain mix...
diff --git a/pandas/tests/frame/test_ufunc.py b/pandas/tests/frame/test_ufunc.py index b884224315a61..8c79611003013 100644 --- a/pandas/tests/frame/test_ufunc.py +++ b/pandas/tests/frame/test_ufunc.py @@ -1,4 +1,5 @@ from functools import partial +import re import numpy as np import pytest @@ -301,3 +302,24 @@ def...
["pandas/tests/frame/test_ufunc.py::test_array_ufuncs_for_many_arguments", "pandas/tests/series/test_ufunc.py::test_array_ufuncs_for_many_arguments"]
["pandas/tests/series/test_ufunc.py::test_binary_ufunc_with_series[straight-aligned-sparse-add]", "pandas/tests/frame/test_ufunc.py::test_ufunc_passes_args[power-arg2-expected2]", "pandas/tests/frame/test_ufunc.py::test_ufunc_passes_args[subtract-2-expected3]", "pandas/tests/frame/test_ufunc.py::test_frame_outer_deprec...
null
true
2022-08-27T10:29:02Z
2
10
2
3,639
0
0.85
1
0.77
1
0.533333
89.195
539
swe_gym::train::1389
swe_gym
train
1,389
pandas-dev__pandas-50175
pandas-dev/pandas
pandas-dev/pandas
python
acd2f5f889df788be7c308bff7db282d71c80b3a
BUG: `frame.isetitem` incorrectly casts `Int64` columns to dtype `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 confirmed ...
cc @jbrockmendel Is a DataFrame a valid input for isetitem? If yes, we should special case to convert column by column to avoid coercion to object > Is a DataFrame a valid input for isetitem? I think so, yes. > If yes, we should special case to convert column by column to avoid coercion to object I expect ...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index b1387e9717079..d0e10af7c51a5 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -876,6 +876,7 @@ Indexing - Bug in :meth:`DataFrame.iloc` raising ``IndexError`` when indexer is a :class:`Series` with num...
diff --git a/pandas/tests/frame/methods/test_isetitem.py b/pandas/tests/frame/methods/test_isetitem.py new file mode 100644 index 0000000000000..59328aafefefb --- /dev/null +++ b/pandas/tests/frame/methods/test_isetitem.py @@ -0,0 +1,37 @@ +from pandas import ( + DataFrame, + Series, +) +import pandas._testing as...
["pandas/tests/frame/methods/test_isetitem.py::TestDataFrameSetItem::test_isetitem_ea_df", "pandas/tests/frame/methods/test_isetitem.py::TestDataFrameSetItem::test_isetitem_ea_df_scalar_indexer"]
[]
null
true
2022-12-10T23:16:44Z
2
10
2
3,553
0
0.85
1
0.77
1
0.533333
89.195
540
swe_gym::train::524
swe_gym
train
524
python__mypy-11521
python/mypy
python/mypy
python
421fcc2362ad9cec32fe06d666a3ac9b343b5a8a
support narrowing enum values using `==` and `!=` ```py from typing import NoReturn, Literal from enum import auto, Enum def foo(value: Literal["foo","bar"]) -> None: if value == "foo": reveal_type(value) #note: Revealed type is "Literal['foo']" elif value != "bar": reveal_type(value) #error: S...
If you use the `is` and `is not` operators rather than `==` and `!=`, mypy will perform narrowing for enum values. Why? is it an anti pattern to use `==`/`!=` on enum values? if so should a warning be raised when they are used?. I don't know why mypy handles `is` and `is not` but not `==` and `!=` in this case. I'm gue...
diff --git a/mypy/checker.py b/mypy/checker.py --- a/mypy/checker.py +++ b/mypy/checker.py @@ -4802,7 +4802,15 @@ def refine_identity_comparison_expression(self, """ should_coerce = True if coerce_only_in_literal_context: - should_coerce = any(is_literal_type_like(operand_types[i])...
diff --git a/test-data/unit/check-narrowing.test b/test-data/unit/check-narrowing.test --- a/test-data/unit/check-narrowing.test +++ b/test-data/unit/check-narrowing.test @@ -699,47 +699,47 @@ class FlipFlopStr: def mutate(self) -> None: self.state = "state-2" if self.state == "state-1" else "state-1" -...
["mypy/test/testcheck.py::TypeCheckSuite::testNarrowingEqualityRequiresExplicitEnumLiteral"]
["mypy/test/testcheck.py::TypeCheckSuite::testNarrowingEqualityDisabledForCustomEquality", "mypy/test/testcheck.py::TypeCheckSuite::testNarrowingEqualityRequiresExplicitStrLiteral", "mypy/test/testcheck.py::TypeCheckSuite::testNarrowingEqualityDisabledForCustomEqualityChain"]
null
true
2021-11-11T09:41:29Z
1
10
1
3,429
0
0.85
1
0.77
1
0.533333
89.195
541
swe_gym::train::1540
swe_gym
train
1,540
pandas-dev__pandas-58301
pandas-dev/pandas
pandas-dev/pandas
python
a99fb7d054ee0831f1c00d8bea1b54e383185802
BUG: Setting values on `DataFrame` with multi-index `.loc(axis=0)` access adds columns ### 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...
take > take @eshaready What do you mean, by 'take'? It means I assigned myself to the issue! Great thanks a lot for looking into this. Hey! It looks like for the behavior you want, you should be using the syntax `frame.loc[("2001-01-01", "i1"):("2001-01-01", "i2")] = None` I think this produces the behavior you'r...
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index 7a4f709e56104..177a38b526c6e 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -397,7 +397,7 @@ Missing MultiIndex ^^^^^^^^^^ -- +- :func:`DataFrame.loc` with ``axis=0`` and :class:`MultiIndex` when...
diff --git a/pandas/tests/indexing/multiindex/test_loc.py b/pandas/tests/indexing/multiindex/test_loc.py index 67b9ddebfb8bf..d482d20591a8a 100644 --- a/pandas/tests/indexing/multiindex/test_loc.py +++ b/pandas/tests/indexing/multiindex/test_loc.py @@ -381,6 +381,29 @@ def test_multiindex_setitem_columns_enlarging(self...
["pandas/tests/indexing/multiindex/test_loc.py::TestMultiIndexLoc::test_multiindex_setitem_axis_set"]
["pandas/tests/indexing/multiindex/test_loc.py::TestMultiIndexLoc::test_loc_multiindex_labels", "pandas/tests/indexing/multiindex/test_loc.py::TestMultiIndexLoc::test_loc_getitem_general[False-uint8]", "pandas/tests/indexing/multiindex/test_loc.py::TestMultiIndexLoc::test_loc_getitem_nested_indexer[slice-ndarray]", "pa...
null
true
2024-04-18T00:11:49Z
2
10
1
3,351
0
0.85
1
0.77
1
0.533333
89.195
542
swe_gym::train::1400
swe_gym
train
1,400
pandas-dev__pandas-57875
pandas-dev/pandas
pandas-dev/pandas
python
9eb15535662ac80bef1522b483fc2a6a42e0e192
BUG: to_csv with mode 'a' and zip compression if write by chunk creates multiple files insead of appending content ### 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....
We had similar issues in the past ([seems for tar and zip](https://github.com/pandas-dev/pandas/blob/04b45b10b1e46780a903e03f885163bc06d4aa8a/pandas/io/common.py#L949)) where pandas internally called `write` multiple times (which causes issues for zip files: https://bugs.python.org/issue2824). In your case, `to_csv` is...
diff --git a/pandas/io/common.py b/pandas/io/common.py index 35c3a24d8e8f6..4507a7d08c8ba 100644 --- a/pandas/io/common.py +++ b/pandas/io/common.py @@ -361,6 +361,16 @@ def _get_filepath_or_buffer( stacklevel=find_stack_level(), ) + if "a" in mode and compression_method in ["zip", "tar"]: + ...
diff --git a/pandas/tests/frame/methods/test_to_csv.py b/pandas/tests/frame/methods/test_to_csv.py index 5b9ced8d47ed7..f87fa4137d62d 100644 --- a/pandas/tests/frame/methods/test_to_csv.py +++ b/pandas/tests/frame/methods/test_to_csv.py @@ -1405,3 +1405,20 @@ def test_to_csv_categorical_and_interval(self): exp...
["pandas/tests/frame/methods/test_to_csv.py::TestDataFrameToCSV::test_to_csv_warn_when_zip_tar_and_append_mode"]
["pandas/tests/frame/methods/test_to_csv.py::TestDataFrameToCSV::test_to_csv_params[df_params0-func_params0-4-202]", "pandas/tests/frame/methods/test_to_csv.py::TestDataFrameToCSV::test_to_csv_idx_ncols[3-10]", "pandas/tests/frame/methods/test_to_csv.py::TestDataFrameToCSV::test_to_csv_idx_ncols[4-10]", "pandas/tests/f...
null
true
2024-03-17T13:55:14Z
1
10
1
3,254
0
0.85
1
0.77
1
0.533333
89.195
543
swe_gym::train::116
swe_gym
train
116
getmoto__moto-6687
getmoto/moto
getmoto/moto
python
1fe69d55a50b404d7c0a59707e88ce03c5ded784
@mock_cloudtrail is not being able to retrieve the trail status in a different region for a multiregion trail ## Description As per the AWS Boto3 documentation, the [get_trail_status](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudtrail/client/get_trail_status.html) call is able to get...
diff --git a/moto/cloudtrail/models.py b/moto/cloudtrail/models.py --- a/moto/cloudtrail/models.py +++ b/moto/cloudtrail/models.py @@ -300,21 +300,22 @@ def get_trail(self, name_or_arn: str) -> Trail: def get_trail_status(self, name: str) -> TrailStatus: if len(name) < 3: raise TrailNameTooSh...
diff --git a/tests/test_cloudtrail/test_cloudtrail.py b/tests/test_cloudtrail/test_cloudtrail.py --- a/tests/test_cloudtrail/test_cloudtrail.py +++ b/tests/test_cloudtrail/test_cloudtrail.py @@ -319,6 +319,38 @@ def test_get_trail_status_after_starting_and_stopping(): assert "TimeLoggingStopped" in status # .equa...
["tests/test_cloudtrail/test_cloudtrail.py::test_get_trail_status_multi_region_not_from_the_home_region"]
["tests/test_cloudtrail/test_cloudtrail.py::test_list_trails_different_home_region_no_multiregion", "tests/test_cloudtrail/test_cloudtrail.py::test_update_trail_full", "tests/test_cloudtrail/test_cloudtrail.py::test_get_trail_unknown", "tests/test_cloudtrail/test_cloudtrail.py::test_get_trail_status_inactive", "tests/t...
null
true
2023-08-17 07:53:29
1
11
1
2,415
0
0.85
1
0.85
1
0.439167
89.1925
544
swe_bench_verified::test::185
swe_bench_verified
test
185
django__django-15278
django/django
django/django
python
0ab58c120939093fea90822f376e1866fc714d1f
Adding nullable OneToOneField crashes on SQLite. Description This new sqlite3 error has cropped up between building django-oauth-toolkit between Django 4.0 and main branch for migrations.AddField of a OneToOneField (see ​https://github.com/jazzband/django-oauth-toolkit/issues/1064): self = <django.db.backends.sqlite3....
Thanks for the report! Regression in 2f73e5406d54cb8945e187eff302a3a3373350be.
diff --git a/django/db/backends/sqlite3/schema.py b/django/db/backends/sqlite3/schema.py --- a/django/db/backends/sqlite3/schema.py +++ b/django/db/backends/sqlite3/schema.py @@ -324,10 +324,15 @@ def delete_model(self, model, handle_autom2m=True): def add_field(self, model, field): """Create a field on...
diff --git a/tests/schema/tests.py b/tests/schema/tests.py --- a/tests/schema/tests.py +++ b/tests/schema/tests.py @@ -624,6 +624,18 @@ def get_prep_value(self, value): # Make sure the values were transformed correctly self.assertEqual(Author.objects.extra(where=["thing = 1"]).count(), 2) + def t...
["test_add_field_o2o_nullable (schema.tests.SchemaTests)"]
["effective_default() should be used for DateField, DateTimeField, and", "Tests adding fields to models", "Tests binary fields get a sane default (#22851)", "test_add_field_db_collation (schema.tests.SchemaTests)", "test_add_field_default_dropped (schema.tests.SchemaTests)", "test_add_field_default_nullable (schema.tes...
null
true
2022-01-03T20:01:32Z
1
13
1
1,219
0
1
1
0.7
1
0.2465
89.1895
545
swe_bench_verified::test::69
swe_bench_verified
test
69
django__django-12039
django/django
django/django
python
58c1acb1d6054dfec29d0f30b1033bae6ef62aec
Use proper whitespace in CREATE INDEX statements Description (last modified by Hannes Ljungberg) Creating an index through: index = Index( fields=['-name’], name='idx' ) Will generate the valid but not so pretty CREATE INDEX statement: CREATE INDEX "idx" ON "schema_author" ("name"DESC) The following would be expe...
PR: ​https://github.com/django/django/pull/12039 OK, I'll Accept this as a clean up (there's not actually an error right?). The patch looks small/clean enough at first glance. Correct, no error. But since it's not documented as valid syntax to not have whitespace between the column and the ordering it could break in fu...
diff --git a/django/db/backends/ddl_references.py b/django/db/backends/ddl_references.py --- a/django/db/backends/ddl_references.py +++ b/django/db/backends/ddl_references.py @@ -83,10 +83,14 @@ def __init__(self, table, columns, quote_name, col_suffixes=()): def __str__(self): def col_str(column, idx):...
diff --git a/tests/indexes/tests.py b/tests/indexes/tests.py --- a/tests/indexes/tests.py +++ b/tests/indexes/tests.py @@ -75,6 +75,22 @@ def test_index_together_single_list(self): index_sql = connection.schema_editor()._model_indexes_sql(IndexTogetherSingleList) self.assertEqual(len(index_sql), 1) ...
["test_descending_columns_list_sql (indexes.tests.SchemaIndexesTests)"]
["test_columns_list_sql (indexes.tests.SchemaIndexesTests)", "test_index_name (indexes.tests.SchemaIndexesTests)", "test_index_name_hash (indexes.tests.SchemaIndexesTests)", "test_index_together (indexes.tests.SchemaIndexesTests)", "test_index_together_single_list (indexes.tests.SchemaIndexesTests)", "test_create_index...
null
true
2019-11-06T21:14:34Z
1
12
1
1,238
0
1
1
0.7
1
0.246333
89.189
546
swe_gym::train::526
swe_gym
train
526
python__mypy-16356
python/mypy
python/mypy
python
2aa2443107534715a650dbe78474e7d91cc9df20
Maybe __all__ should be added explicitly in stubgen **Feature** (A clear and concise description of your feature proposal.) Maybe `__all__` should be added explicitly in stubgen. **Pitch** (Please explain why this feature should be implemented and how it would be used. Add examples, if applicable.) Adding `__all__...
diff --git a/mypy/stubutil.py b/mypy/stubutil.py --- a/mypy/stubutil.py +++ b/mypy/stubutil.py @@ -614,10 +614,24 @@ def get_imports(self) -> str: def output(self) -> str: """Return the text for the stub.""" - imports = self.get_imports() - if imports and self._output: - imports...
diff --git a/test-data/unit/stubgen.test b/test-data/unit/stubgen.test --- a/test-data/unit/stubgen.test +++ b/test-data/unit/stubgen.test @@ -587,6 +587,8 @@ __all__ = [] + ['f'] def f(): ... def g(): ... [out] +__all__ = ['f'] + def f() -> None: ... [case testOmitDefsNotInAll_semanal] @@ -594,6 +596,8 @@ __all...
["mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testExportPackageOfAModule_import", "mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testVarDefsNotInAll_import", "mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testExportModule2_import", "mypy/test/teststubgen.py::StubgenPythonSuit...
["mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testRelativeImportAll", "mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testCannotCalculateMRO_semanal", "mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testAttrsClass_semanal"]
null
true
2023-10-28T18:13:32Z
1
56
8
1,504
0
0.85
1
0.85
1
0.437333
89.187
547
swe_gym::train::8
swe_gym
train
8
getmoto__moto-4950
getmoto/moto
getmoto/moto
python
0fcf6529ab549faf7a2555d209ce2418391b7f9f
Timestream Write has the wrong response returned ### Environment Python 3.10.2 (and 3.9 in lambda) Libraries involved installed from pip: boto3 1.20.49 botocore 1.23.49 moto 3.1.0 pytest 7.1.0 pytest-mock 3.7.0 ### Expectation for response The AWS...
Thanks for raising this @jhogarth - marking it as an enhancement.
diff --git a/moto/timestreamwrite/responses.py b/moto/timestreamwrite/responses.py --- a/moto/timestreamwrite/responses.py +++ b/moto/timestreamwrite/responses.py @@ -85,7 +85,14 @@ def write_records(self): table_name = self._get_param("TableName") records = self._get_param("Records") self.ti...
diff --git a/tests/test_timestreamwrite/test_timestreamwrite_table.py b/tests/test_timestreamwrite/test_timestreamwrite_table.py --- a/tests/test_timestreamwrite/test_timestreamwrite_table.py +++ b/tests/test_timestreamwrite/test_timestreamwrite_table.py @@ -1,3 +1,4 @@ +import time import boto3 import sure # noqa #...
["tests/test_timestreamwrite/test_timestreamwrite_table.py::test_write_records"]
["tests/test_timestreamwrite/test_timestreamwrite_table.py::test_update_table", "tests/test_timestreamwrite/test_timestreamwrite_table.py::test_describe_table", "tests/test_timestreamwrite/test_timestreamwrite_table.py::test_create_table", "tests/test_timestreamwrite/test_timestreamwrite_table.py::test_create_multiple_...
null
true
2022-03-19 02:53:34
1
9
1
3,178
0
0.85
1
0.77
1
0.53
89.185
548
swe_gym::train::1629
swe_gym
train
1,629
pandas-dev__pandas-57060
pandas-dev/pandas
pandas-dev/pandas
python
8ed7dae2a3a76bdae0da402c12111bf033124b55
BUG: `is_datetime64_any_dtype` returns `False` for Series with 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. - [X] I have confirm...
Thanks for the report, confirmed on main. PRs to fix are welcome! > This check > ... > Only enters if we provide a dtype, not array-like. I believe it should be similar to the one for ints The check you highlighted is a fastpath for dtypes, and I'm guessing we should leave it as such. The line to fix would be ...
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index f9117253b61c1..d6d33ed873564 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -130,7 +130,6 @@ Bug fixes ~~~~~~~~~ - Fixed bug in :meth:`DataFrame.join` inconsistently setting result index name (:issu...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index 6970c589dd36f..62e4629ca7cb7 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -53,6 +53,7 @@ from pandas.api.extensions import no_default from pandas.api.types import ( is...
["pandas/tests/extension/test_arrow.py::test_is_datetime64_any_dtype[timestamp[us,", "pandas/tests/extension/test_arrow.py::test_is_datetime64_any_dtype[date32[day]]", "pandas/tests/extension/test_arrow.py::test_is_datetime64_any_dtype[timestamp[s]]", "pandas/tests/extension/test_arrow.py::test_is_datetime64_any_dtype[...
["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
2024-01-24T22:58:07Z
2
9
10
3,020
0
0.85
1
0.77
1
0.53
89.185
549
swe_gym::train::1381
swe_gym
train
1,381
pandas-dev__pandas-55259
pandas-dev/pandas
pandas-dev/pandas
python
9e1096e8373bc99675fd1b3490cfb7cf26041395
BUG: Union of timezone-aware indices with different units returns index with dtype '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 can confirm this Bug exists on the main development branch. ```Python >>> import pandas as pd >>> idx_tz = pd.date_range("2023-1-1", periods=5, freq="H", tz="UTC") >>> pd.Index.union(idx_tz, idx_tz.as_unit("us")) Index([2023-01-01 00:00:00+00:00, 2023-01-01 01:00:00+00:00, 2023-01-01 02:00:00+00:00, 20...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 930e03ae7d75a..ca09a69f603ab 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -259,7 +259,7 @@ Categorical Datetimelike ^^^^^^^^^^^^ -- +- Bug in :meth:`DatetimeIndex.union` returning object dtype f...
diff --git a/pandas/tests/indexes/datetimes/test_setops.py b/pandas/tests/indexes/datetimes/test_setops.py index b56bad7f2e833..ca784948a5d29 100644 --- a/pandas/tests/indexes/datetimes/test_setops.py +++ b/pandas/tests/indexes/datetimes/test_setops.py @@ -189,6 +189,14 @@ def test_union_with_DatetimeIndex(self, sort):...
["pandas/tests/indexes/datetimes/test_setops.py::TestDatetimeIndexSetOps::test_union_same_timezone_different_units"]
["pandas/tests/indexes/datetimes/test_setops.py::TestDatetimeIndexSetOps::test_union[None-dateutil/Asia/Singapore]", "pandas/tests/indexes/datetimes/test_setops.py::TestDatetimeIndexSetOps::test_intersection_empty['+01:15'-min]", "pandas/tests/indexes/datetimes/test_setops.py::TestDatetimeIndexSetOps::test_union_bug_17...
null
true
2023-09-24T01:13:41Z
2
9
1
3,250
0
0.85
1
0.77
1
0.53
89.185
550
swe_gym::train::1602
swe_gym
train
1,602
pandas-dev__pandas-50676
pandas-dev/pandas
pandas-dev/pandas
python
7cb7592523380133f552e258f272a5694e37957a
DEPR: pandas.io.sql.execute There is currently a bug in `pandas.io.sql.execute` on the main branch (not in any released versions). I created the bug in #49531 while working on #48576. In #49531, I changed `SQLDatabase` to only accept a `Connection` and not an `Engine`, because sqlalchemy 2.0 restricts the methods that...
So ``pandas.io.sql.execute`` is not public. How does this impact the public API? When putting your query into read_sql it works as expected No impacts outside of `pandas.io.sql.execute`. This method is mentioned above this line, so I should at least update the documentation: https://pandas.pydata.org/docs/user_guide...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 9a99dbad30708..39a93304bfe5a 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -556,9 +556,10 @@ Other API changes Deprecations ~~~~~~~~~~~~ - Deprecated argument ``infer_datetime_format`` in :func:`t...
diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index 31ca060e36ad1..f83b6b0373a87 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -668,6 +668,16 @@ def test_execute_typeerror(sqlite_iris_engine): sql.execute("select * from iris", sqlite_iris_engine) +de...
["pandas/tests/io/test_sql.py::test_execute_deprecated"]
["pandas/tests/io/test_sql.py::TestSQLiteAlchemy::test_mixed_dtype_insert", "pandas/tests/io/test_sql.py::test_to_sql[None-sqlite_buildin]", "pandas/tests/io/test_sql.py::TestSQLApi::test_sqlalchemy_integer_mapping[uint32-BIGINT]", "pandas/tests/io/test_sql.py::TestSQLiteAlchemy::test_default_date_load", "pandas/tests/...
null
true
2023-01-11T15:29:58Z
2
9
1
4,313
0
0.85
1
0.77
1
0.53
89.185
551
swe_gym::train::1316
swe_gym
train
1,316
pandas-dev__pandas-54388
pandas-dev/pandas
pandas-dev/pandas
python
232d84e9a5add831c753e67f1c88863442dc3c92
BUG: `Series.astype("object_")` and `Series.astype("object0")` unsupported. ### 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 confirme...
np.object0 shouldn't be supported as it is deprecated. https://github.com/numpy/numpy/pull/22607 I guess "object_" should work given ``np.object_`` does work. Supporting it doesn't look hard, it's probably just a manner of changing this line to include "object_" https://github.com/pandas-dev/pandas/blob/d2f05c2...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index bc187361493c0..914f6d4d9b566 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -487,6 +487,7 @@ Conversion - Bug in :meth:`DataFrame.info` raising ``ValueError`` when ``use_numba`` is set (:issue:`5192...
diff --git a/pandas/tests/dtypes/test_common.py b/pandas/tests/dtypes/test_common.py index d0a34cedb7dbe..60047cd3cc8fc 100644 --- a/pandas/tests/dtypes/test_common.py +++ b/pandas/tests/dtypes/test_common.py @@ -53,6 +53,7 @@ def test_invalid_dtype_error(self, box): np.float64, float, ...
["pandas/tests/dtypes/test_common.py::TestNumpyEADtype::test_pandas_dtype_valid[object_1]"]
["pandas/tests/dtypes/test_common.py::test_is_not_int64_dtype[float]", "pandas/tests/dtypes/test_common.py::test_dtype_equal[float-float64-datetime-datetime64[ns]]", "pandas/tests/dtypes/test_common.py::test_is_integer_dtype[uint64_0]", "pandas/tests/dtypes/test_common.py::test__is_dtype_type[input_param13-CategoricalD...
null
true
2023-08-03T17:21:42Z
2
9
1
3,080
0
0.85
1
0.77
1
0.53
89.185
552
swe_gym::train::1604
swe_gym
train
1,604
pandas-dev__pandas-49875
pandas-dev/pandas
pandas-dev/pandas
python
d95bf9a04f10590fff41e75de94c321a8743af72
BUG: Construction of Series with NAs and interval-of-datetime dtype raises error - [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. --- #### Code...
Thanks for reporting this @tlaytongoogle! Could you please add an informative title to the issue? Title added. Hi, I try to work on this problem. I am not sure whether this is considered bug. I notice that in this file pandas\tests\indexes\interval\test_astype.py, the function ``` index = IntervalIndex.from_arrays(...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index be81e462c30ea..cfd5ceacf012d 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -622,6 +622,8 @@ Categorical ^^^^^^^^^^^ - Bug in :meth:`Categorical.set_categories` losing dtype information (:issue:`488...
diff --git a/pandas/tests/arrays/categorical/test_constructors.py b/pandas/tests/arrays/categorical/test_constructors.py index 570f04fae2c33..ba33cfe055bb3 100644 --- a/pandas/tests/arrays/categorical/test_constructors.py +++ b/pandas/tests/arrays/categorical/test_constructors.py @@ -33,6 +33,13 @@ class TestCateg...
["pandas/tests/arrays/categorical/test_constructors.py::TestCategoricalConstructors::test_categorical_from_cat_and_dtype_str_preserve_ordered", "pandas/tests/indexes/datetimes/test_constructors.py::TestDatetimeIndex::test_from_dt64_unsupported_unit"]
["pandas/tests/indexes/datetimes/test_constructors.py::TestTimeSeries::test_from_freq_recreate_from_data[Q]", "pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_constructor_period_incompatible_frequency", "pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_construction_to_dateti...
null
true
2022-11-23T22:11:03Z
3
9
2
3,683
0
0.85
1
0.77
1
0.53
89.185
553
swe_bench_verified::test::254
swe_bench_verified
test
254
matplotlib__matplotlib-14623
matplotlib/matplotlib
matplotlib/matplotlib
python
d65c9ca20ddf81ef91199e6d819f9d3506ef477c
Inverting an axis using its limits does not work for log scale ### Bug report **Bug summary** Starting in matplotlib 3.1.0 it is no longer possible to invert a log axis using its limits. **Code for reproduction** ```python import numpy as np import matplotlib.pyplot as plt y = np.linspace(1000e2, 1, 100) x = np.exp(...
Good catch. This was broken in https://github.com/matplotlib/matplotlib/pull/13409; on master this is fixed by https://github.com/matplotlib/matplotlib/pull/13593, which is too big to backport, but I can just extract https://github.com/matplotlib/matplotlib/commit/160de568e1f6d3e5e1bd10192f049815bf778dea#diff-cdfe9e4f...
diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -3262,8 +3262,11 @@ def set_xlim(self, left=None, right=None, emit=True, auto=False, cbook._warn_external( f"Attempting to set identical left ==...
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 @@ -936,7 +936,12 @@ def test_inverted_limits(): assert ax.get_xlim() == (-5, 4) assert ax.get_ylim() == (5, -3) - plt.close() + + # Test i...
["lib/matplotlib/tests/test_axes.py::test_inverted_limits"]
["lib/matplotlib/tests/test_axes.py::test_get_labels", "lib/matplotlib/tests/test_axes.py::test_spy_invalid_kwargs", "lib/matplotlib/tests/test_axes.py::test_twinx_cla", "lib/matplotlib/tests/test_axes.py::test_twinx_axis_scales[png]", "lib/matplotlib/tests/test_axes.py::test_twin_inherit_autoscale_setting", "lib/matpl...
null
true
2019-06-25T14:01:17Z
3
19
1
1,075
0
1
1
0.7
1
0.2425
89.1775
554
swe_gym::train::2052
swe_gym
train
2,052
Project-MONAI__MONAI-5877
Project-MONAI/MONAI
project-monai/monai
python
bdf5e1ec15724ecf4e3634955cf34a35843a3e3e
`RandHistogramShift` transform gives `nan` values for input when all values are 0 **Describe the bug** `RandHistogramShift` transform gives `nan` values when an input with all zeros is passed to it. **To Reproduce** ```` import monai import torch transform = monai.transforms.RandHistogramShift(prob=1) tensor = torch...
Hi @KumoLiu , Could you please help confirm and fix this question? Thanks in advance. Hi @Nic-Ma @KumoLiu I digged a bit deeper into the code and it looks like its a divide by zero error that causes this when the image has a singular value and the value is zero. I think it would also be prudent to add a t...
diff --git a/monai/transforms/intensity/array.py b/monai/transforms/intensity/array.py --- a/monai/transforms/intensity/array.py +++ b/monai/transforms/intensity/array.py @@ -1468,9 +1468,15 @@ def __call__(self, img: NdarrayOrTensor, randomize: bool = True) -> NdarrayOrTen if self.reference_control_points is ...
diff --git a/tests/test_rand_histogram_shift.py b/tests/test_rand_histogram_shift.py --- a/tests/test_rand_histogram_shift.py +++ b/tests/test_rand_histogram_shift.py @@ -44,6 +44,16 @@ ] ) +WARN_TESTS = [] +for p in TEST_NDARRAYS: + WARN_TESTS.append( + [ + {"num_control_points": 5...
["tests/test_rand_histogram_shift.py::TestRandHistogramShift::test_warn_2", "tests/test_rand_histogram_shift.py::TestRandHistogramShift::test_warn_0", "tests/test_rand_histogram_shift.py::TestRandHistogramShift::test_warn_1"]
["tests/test_rand_histogram_shift.py::TestRandHistogramShift::test_rand_histogram_shift_7", "tests/test_rand_histogram_shift.py::TestRandHistogramShift::test_rand_histogram_shift_2", "tests/test_rand_histogram_shift.py::TestRandHistogramShift::test_rand_histogram_shift_4", "tests/test_rand_histogram_shift.py::TestRandH...
null
true
2023-01-19T16:20:44Z
1
8
3
3,773
0
0.85
1
0.77
1
0.526667
89.175
555
swe_gym::train::1168
swe_gym
train
1,168
pandas-dev__pandas-47763
pandas-dev/pandas
pandas-dev/pandas
python
fc68a9a290fc314c090e037597138c74fa23ee6d
BUG: Inconsistent behavior between `None` and `pd.NA` ### 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 t...
> I'd expect there to be a single representation for missing values, so assigning x[invalid] = None would result in a conversion to pd.NA. Agree that there is a problem, but I disagree with the diagnosis & expected behaviour. I think pandas should follow the principle of "least surprise" ``` x[invalid] = None ...
diff --git a/doc/source/whatsnew/v1.4.4.rst b/doc/source/whatsnew/v1.4.4.rst index 6ee140f59e096..6bd7378e05404 100644 --- a/doc/source/whatsnew/v1.4.4.rst +++ b/doc/source/whatsnew/v1.4.4.rst @@ -15,6 +15,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ - Fixed regression in :func:`conca...
diff --git a/pandas/tests/arrays/string_/test_string.py b/pandas/tests/arrays/string_/test_string.py index a5eb6189db6f1..4376a0de37a8c 100644 --- a/pandas/tests/arrays/string_/test_string.py +++ b/pandas/tests/arrays/string_/test_string.py @@ -588,3 +588,23 @@ def test_isin(dtype, fixed_now_ts): result = s.is...
["pandas/tests/arrays/string_/test_string.py::test_setitem_scalar_with_mask_validation[python]"]
["pandas/tests/arrays/string_/test_string.py::test_comparison_methods_array[le-pyarrow]", "pandas/tests/arrays/string_/test_string.py::test_from_sequence_no_mutate[python-False]", "pandas/tests/arrays/string_/test_string.py::test_min_max[python-True-max]", "pandas/tests/arrays/string_/test_string.py::test_comparison_me...
null
true
2022-07-17T13:47:12Z
2
8
1
3,290
0
0.85
1
0.77
1
0.526667
89.175
556
swe_gym::train::1648
swe_gym
train
1,648
pandas-dev__pandas-53634
pandas-dev/pandas
pandas-dev/pandas
python
406abd95647386d136000613b6a754d40e90d0df
BUG: date_range and DatetimeIndex return different formats with a single timestamp for midnight ### 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. -...
Yes, I think this is an issue the repr of the indexes, e.g. we already get: ```python >>> first_index DatetimeIndex(['2012-01-01'], dtype='datetime64[ns]', freq='60T') >>> first[0] Timestamp('2012-01-01 00:00:00') ``` I was doing some digging and I found out the root cause of this. The line that is the ...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 839870cb18a0b..1e5918d2e5324 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -621,6 +621,7 @@ Metadata Other ^^^^^ - Bug in :class:`DataFrame` and :class:`Series` raising for data of complex dtype w...
diff --git a/pandas/tests/indexes/datetimes/test_formats.py b/pandas/tests/indexes/datetimes/test_formats.py index a927799e39783..cb3e0179bf46c 100644 --- a/pandas/tests/indexes/datetimes/test_formats.py +++ b/pandas/tests/indexes/datetimes/test_formats.py @@ -68,6 +68,36 @@ def test_dti_repr_short(self): dr =...
["pandas/tests/indexes/datetimes/test_formats.py::TestDatetimeIndexRendering::test_dti_repr_time_midnight[dates0-60T-DatetimeIndex(['2012-01-01"]
["pandas/tests/indexes/datetimes/test_formats.py::TestDatetimeIndexRendering::test_dti_representation[__repr__]", "pandas/tests/indexes/datetimes/test_formats.py::TestDatetimeIndexRendering::test_dti_repr_time_midnight[dates1-60T-DatetimeIndex(['2012-01-01", "pandas/tests/indexes/datetimes/test_formats.py::test_format_...
null
true
2023-06-13T01:25:45Z
2
8
1
4,046
0
0.85
1
0.77
1
0.526667
89.175
557
swe_gym::train::1395
swe_gym
train
1,395
pandas-dev__pandas-53419
pandas-dev/pandas
pandas-dev/pandas
python
5622a582baf4fbe962511b58c1d388c35cf5dc64
BUG: DataFrame.first has unexpected behavior when passing a DateOffset ### 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...
To elaborate on this in more detail, the changes provided [here](https://github.com/pandas-dev/pandas/blob/bb1f651536508cdfef8550f93ace7849b00046ee/pandas/core/generic.py#L8388) seem to assume the semantics of the offset are based on the user passing a string. In particular, I believe this change was enabled to handle ...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 55f396c621a99..7c7b13ab4e89d 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -264,12 +264,12 @@ Deprecations - Deprecated unused "closed" and "normalize" keywords in the :class:`DatetimeIndex` constru...
diff --git a/pandas/conftest.py b/pandas/conftest.py index 077939d2d05ce..7dab1714e0aa3 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -145,6 +145,11 @@ def pytest_collection_modifyitems(items, config) -> None: "(Series|DataFrame).bool is now deprecated and will be removed " "in f...
["pandas/tests/frame/methods/test_first_and_last.py::TestFirst::test_first_with_first_day_last_of_month[DataFrame-2010-03-31-1]", "pandas/tests/frame/methods/test_first_and_last.py::TestFirst::test_first_with_first_day_end_of_frq_n_greater_one[DataFrame]", "pandas/tests/generic/test_finalize.py::test_finalize_first[dat...
["pandas/tests/generic/test_finalize.py::test_binops[and_-(Series,Series)-left]", "pandas/tests/generic/test_finalize.py::test_datetime_property[is_month_end]", "pandas/tests/generic/test_finalize.py::test_finalize_called[asfreq',", "pandas/tests/generic/test_finalize.py::test_string_method[isupper]", "pandas/tests/gen...
null
true
2023-05-27T17:46:42Z
2
8
13
3,562
0
0.85
1
0.77
1
0.526667
89.175
558
swe_gym::train::87
swe_gym
train
87
getmoto__moto-6470
getmoto/moto
getmoto/moto
python
3e11578a7288122e7f2c2a0238c3338f56f8582f
batch.create_compute_environment() call fails against moto server When calling `create_compute_environment()` for Batch against the server version of moto, a 500 response is returned. I have pasted a script to replicate the issue below, along with the output I am seeing. To replicate, run the following... ```python #...
Hey @RealSalmon-Komodo, thanks for raising this. Looks like AWS throws an error in this scenario because the `Instance role is required` - we'll add the same validation to Moto.
diff --git a/moto/batch/models.py b/moto/batch/models.py --- a/moto/batch/models.py +++ b/moto/batch/models.py @@ -1272,6 +1272,10 @@ def _validate_compute_resources(self, cr: Dict[str, Any]) -> None: if "FARGATE" not in cr["type"]: # Most parameters are not applicable to jobs that are running on ...
diff --git a/tests/test_batch/test_batch_compute_envs.py b/tests/test_batch/test_batch_compute_envs.py --- a/tests/test_batch/test_batch_compute_envs.py +++ b/tests/test_batch/test_batch_compute_envs.py @@ -395,3 +395,47 @@ def test_create_fargate_managed_compute_environment(compute_env_type): # Should have create...
["tests/test_batch/test_batch_compute_envs.py::test_create_ec2_managed_compute_environment__without_required_params"]
["tests/test_batch/test_batch_compute_envs.py::test_update_unmanaged_compute_environment_state", "tests/test_batch/test_batch_compute_envs.py::test_delete_managed_compute_environment", "tests/test_batch/test_batch_compute_envs.py::test_describe_compute_environment", "tests/test_batch/test_batch_compute_envs.py::test_up...
null
true
2023-06-30 22:03:41
1
8
1
3,034
0
0.85
1
0.77
1
0.526667
89.175
559
swe_gym::train::2435
swe_gym
train
2,435
modin-project__modin-7200
modin-project/modin
modin-project/modin
python
177c912f65cc570734e1cbdfb7aa7e6ddb907abf
BUG: ArrowInvalid Error when Converting Concatenated Modin DataFrame to PyArrow Table ### 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. - [ ] I have confirmed this bug exists on the main branch ...
Hi @DimitarSirakov, thanks for the contribution! I can reproduce the problem. Take a look. I found out that ignore_index=True fixes the problem but I can't figure out why and why this is not the case in pandas. @DimitarSirakov iteration over the index occurs when converting; if the index is not unique, then it may ...
diff --git a/modin/pandas/series.py b/modin/pandas/series.py --- a/modin/pandas/series.py +++ b/modin/pandas/series.py @@ -517,6 +517,14 @@ def values(self): # noqa: RT01, D200 data = pd.Categorical(data, dtype=self.dtype) return data + def __arrow_array__(self, type=None): # noqa: GL08 + ...
diff --git a/modin/tests/pandas/test_series.py b/modin/tests/pandas/test_series.py --- a/modin/tests/pandas/test_series.py +++ b/modin/tests/pandas/test_series.py @@ -1387,6 +1387,30 @@ def test_constructor_arrow_extension_array(): df_equals(md_ser.dtypes, pd_ser.dtypes) +def test_pyarrow_array_retrieve(): + ...
["modin/tests/pandas/test_series.py::test_pyarrow_array_retrieve", "modin/tests/pandas/test_series.py::test___arrow_array__"]
["modin/tests/pandas/test_series.py::test_mean[False-float_nan_data]", "modin/tests/pandas/test_series.py::test_case_when[caselist35-base1]", "modin/tests/pandas/test_series.py::test_apply[str-float_nan_data]", "modin/tests/pandas/test_series.py::test_case_when[caselist121-base1]", "modin/tests/pandas/test_series.py::t...
null
true
2024-04-18T15:06:15Z
1
8
2
3,996
0
0.85
1
0.77
1
0.526667
89.175
560
swe_gym::train::1195
swe_gym
train
1,195
pandas-dev__pandas-55933
pandas-dev/pandas
pandas-dev/pandas
python
b2b27afc8a04b071661929d6247777ab8cd1bb84
BUG: pivot_table with margins=True and numeric columns is buggy #### Code Sample, a copy-pastable example if possible Setup: ```python In [1]: import pandas as pd; pd.__version__ Out[1]: '0.25.0.dev0+620.ga91da0c94e' In [2]: df = pd.DataFrame([['a', 'x', 1], ['a', 'y', 2], ...: ['b', 'y', 3], ['b...
This looks to work on master. Could use a test ``` In [9]: ...: In [2]: df = pd.DataFrame([['a', 'x', 1], ['a', 'y', 2], ...: ...: ['b', 'y', 3], ['b', 'z', 4]]) In [11]: In [5]: df.columns = [10, 20, 30] ...: ...: df.pivot_table(index=10, columns=20, values=30, ...: ...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index a33322aebab34..9ec71cbc36544 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -458,6 +458,7 @@ Reshaping - Bug in :func:`merge` returning columns in incorrect order when left and/or right is empty (:is...
diff --git a/pandas/tests/reshape/test_pivot.py b/pandas/tests/reshape/test_pivot.py index aecdf0a9c6975..331bab175ec1c 100644 --- a/pandas/tests/reshape/test_pivot.py +++ b/pandas/tests/reshape/test_pivot.py @@ -2664,3 +2664,18 @@ def test_pivot_table_handles_explicit_datetime_types(self): names=["a", "da...
["pandas/tests/reshape/test_pivot.py::TestPivot::test_pivot_table_with_margins_and_numeric_column_names"]
["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
2023-11-13T08:23:50Z
2
8
1
3,031
0
0.85
1
0.77
1
0.526667
89.175
561
swe_gym::train::1764
swe_gym
train
1,764
pandas-dev__pandas-53654
pandas-dev/pandas
pandas-dev/pandas
python
f0d3301a4193bb8f567edd7d1e10ad8ae3a16193
BUG: Cannot construct DataFrame with dict as data and numeric dictionary ArrowDtype series as 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 panda...
Yeah, looks like it should behave the same as the other dtypes. A PR would be welcome.
diff --git a/doc/source/whatsnew/v2.0.3.rst b/doc/source/whatsnew/v2.0.3.rst index 1d38072c35d6c..3e12af946e661 100644 --- a/doc/source/whatsnew/v2.0.3.rst +++ b/doc/source/whatsnew/v2.0.3.rst @@ -28,6 +28,7 @@ Bug fixes - Bug in :func:`read_csv` when defining ``dtype`` with ``bool[pyarrow]`` for the ``"c"`` and ``"py...
diff --git a/pandas/tests/frame/test_constructors.py b/pandas/tests/frame/test_constructors.py index 47e307f561cf4..06e244b93016c 100644 --- a/pandas/tests/frame/test_constructors.py +++ b/pandas/tests/frame/test_constructors.py @@ -2714,6 +2714,24 @@ def test_frame_from_dict_with_mixed_tzaware_indexes(self): ...
["pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_arrow_dictionary_target", "pandas/tests/frame/test_constructors.py::TestDataFrameConstructorIndexInference::test_dict_data_arrow_column_expansion[3-col_vals1-int8]"]
["pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_nearest_decreasing[backfill-expected1]", "pandas/tests/frame/test_constructors.py::TestDataFrameConstructors::test_dict_nocopy[Float32-M8[ns]-False]", "pandas/tests/frame/test_constructors.py::TestFromScalar::test_from_scalar_datetimelike...
null
true
2023-06-13T22:07:19Z
2
8
2
3,958
0
0.85
1
0.77
1
0.526667
89.175
562
swe_bench_verified::test::59
swe_bench_verified
test
59
django__django-11749
django/django
django/django
python
350123f38c2b6217c38d70bfbd924a9ba3df1289
call_command fails when argument of required mutually exclusive group is passed in kwargs. Description This error django.core.management.base.CommandError: Error: one of the arguments --shop-id --shop is required is raised when I run call_command('my_command', shop_id=1) the argument 'shop_id' is part of a required mu...
Thanks for this report. I attached a simple test. Reproduced at ed2d411aa84efc76baba3adf0d0f99df0e44ba57.
diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -130,11 +130,19 @@ def get_actions(parser): yield opt parser_actions = list(get_actions(parser)) + mutually_exclusive_requi...
diff --git a/tests/user_commands/management/commands/mutually_exclusive_required.py b/tests/user_commands/management/commands/mutually_exclusive_required.py new file mode 100644 --- /dev/null +++ b/tests/user_commands/management/commands/mutually_exclusive_required.py @@ -0,0 +1,12 @@ +from django.core.management.base ...
["test_mutually_exclusive_group_required_options (user_commands.tests.CommandTests)"]
["test_get_random_secret_key (user_commands.tests.UtilsTests)", "test_is_ignored_path_false (user_commands.tests.UtilsTests)", "test_is_ignored_path_true (user_commands.tests.UtilsTests)", "test_no_existent_external_program (user_commands.tests.UtilsTests)", "test_normalize_path_patterns_truncates_wildcard_base (user_c...
null
true
2019-09-05T21:47:44Z
1
10
1
1,245
0
1
1
0.7
1
0.240833
89.1725
563
swe_gym::train::1704
swe_gym
train
1,704
pandas-dev__pandas-57297
pandas-dev/pandas
pandas-dev/pandas
python
65b267a851fc3693463431308de4148999eff3d0
BUG: `sort_index` not preserving `index` when `ascending=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 confirmed this bug e...
cc: @mroeschke ~For clarity, `Out[6]:` and `Out[7]:` are incorrect, the resulting index should match `Out[8]`~ Nevermind, I realized `ignore_index=True` applies to the "columns" here
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index 2c39318fa28b3..503da28684d60 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -241,9 +241,9 @@ Styler Other ^^^^^ +- Bug in :meth:`DataFrame.sort_index` when passing ``axis="columns"`` and ``ignore_...
diff --git a/pandas/tests/frame/methods/test_sort_index.py b/pandas/tests/frame/methods/test_sort_index.py index 1a5df0778ec52..d88daaff685aa 100644 --- a/pandas/tests/frame/methods/test_sort_index.py +++ b/pandas/tests/frame/methods/test_sort_index.py @@ -1003,6 +1003,23 @@ def test_axis_columns_ignore_index(): t...
["pandas/tests/frame/methods/test_sort_index.py::test_axis_columns_ignore_index_ascending_false"]
["pandas/tests/frame/methods/test_sort_index.py::TestDataFrameSortIndex::test_sort_index_level2", "pandas/tests/frame/methods/test_sort_index.py::TestDataFrameSortIndex::test_sort_index_categorical_index", "pandas/tests/frame/methods/test_sort_index.py::TestDataFrameSortIndex::test_sort_index_level_mixed", "pandas/test...
null
true
2024-02-07T19:40:44Z
2
7
1
3,557
0
0.85
1
0.77
1
0.523333
89.165
564
swe_gym::train::139
swe_gym
train
139
getmoto__moto-5134
getmoto/moto
getmoto/moto
python
0e3ac260682f3354912fe552c61d9b3e590903b8
EventBridge rule doesn't match null value with "exists" filter ### What I expected to happen I expected moto to match null values with `{"exists": true}` as this is the way AWS behaves. ### What actually happens Moto doesn't seem to match null values with `{"exists": true}`. ### How to reproduce the issue Using `p...
Hi @henrinikku, thanks for raising this and providing such a detailed test case! Marking this as a bug.
diff --git a/moto/events/models.py b/moto/events/models.py --- a/moto/events/models.py +++ b/moto/events/models.py @@ -33,6 +33,9 @@ from .utils import PAGINATION_MODEL +# Sentinel to signal the absence of a field for `Exists` pattern matching +UNDEFINED = object() + class Rule(CloudFormationModel): Arn = ...
diff --git a/tests/test_events/test_event_pattern.py b/tests/test_events/test_event_pattern.py --- a/tests/test_events/test_event_pattern.py +++ b/tests/test_events/test_event_pattern.py @@ -23,6 +23,7 @@ def test_event_pattern_with_nested_event_filter(): def test_event_pattern_with_exists_event_filter(): foo_exi...
["tests/test_events/test_events_integration.py::test_moto_matches_none_value_with_exists_filter", "tests/test_events/test_event_pattern.py::test_event_pattern_with_exists_event_filter"]
["tests/test_events/test_event_pattern.py::test_event_pattern_with_prefix_event_filter", "tests/test_events/test_event_pattern.py::test_event_pattern_with_single_numeric_event_filter[>=-1-should_match4-should_not_match4]", "tests/test_events/test_event_pattern.py::test_event_pattern_with_single_numeric_event_filter[<-1...
null
true
2022-05-13 19:55:51
1
7
2
3,957
0
0.85
1
0.77
1
0.523333
89.165
565
swe_gym::train::1545
swe_gym
train
1,545
pandas-dev__pandas-50322
pandas-dev/pandas
pandas-dev/pandas
python
1613f26ff0ec75e30828996fd9ec3f9dd5119ca6
BUG: Dividing Int64 and float64 results in a mix of null-types - [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**: Please read [this...
Thanks @tobiasbrodd for the report. cc @jorisvandenbossche Can I take this? take @simonjayhawkins a potential solution for fixing this bug is [`_isna_array`](https://github.com/andrejsim/dev_with_pandas/blob/21d61451ca363bd4c67dbf284b29daacc30302b1/pandas/core/dtypes/missing.py#L221) to treat all arrays of numeric typ...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index cbad169fe4d56..7553895f80cc9 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -804,6 +804,7 @@ Timezones Numeric ^^^^^^^ - Bug in :meth:`DataFrame.add` cannot apply ufunc when inputs contain mixed Da...
diff --git a/pandas/tests/series/test_arithmetic.py b/pandas/tests/series/test_arithmetic.py index 3f31e355d466f..9d8cf9787ad3f 100644 --- a/pandas/tests/series/test_arithmetic.py +++ b/pandas/tests/series/test_arithmetic.py @@ -307,6 +307,25 @@ def test_arithmetic_with_duplicate_index(self): expected = Series...
["pandas/tests/series/test_arithmetic.py::TestSeriesArithmetic::test_masked_and_non_masked_propagate_na[python]", "pandas/tests/series/test_arithmetic.py::TestSeriesArithmetic::test_masked_and_non_masked_propagate_na[numexpr]", "pandas/tests/series/test_arithmetic.py::TestSeriesArithmetic::test_mask_div_propagate_na_fo...
["pandas/tests/series/test_arithmetic.py::TestNamePreservation::test_series_ops_name_retention[python-names2-rpow-True-Index]", "pandas/tests/series/test_arithmetic.py::TestNamePreservation::test_series_ops_name_retention[python-names5-rsub-False-Series]", "pandas/tests/series/test_arithmetic.py::TestNamePreservation::...
null
true
2022-12-17T17:47:40Z
2
7
4
3,090
0
0.85
1
0.77
1
0.523333
89.165
566
swe_gym::train::520
swe_gym
train
520
python__mypy-11828
python/mypy
python/mypy
python
f96446ce2f99a86210b21d39c7aec4b13a8bfc66
Crash/Regression - 0.930 no longer accepts multiline basic strings for `exclude` patterns in `pyproject.toml` **Crash Report** ``` toml # pyproject.toml [tool.mypy] exclude = """(?x)( (^|/)build/ )""" ``` Anyone using a [multiline basic string](https://toml.io/en/v1.0.0#string) to define a regex for `exclude` such ...
I'm pretty sure [this](https://github.com/python/mypy/pull/11329/files#r774194968) is the root cause. This works: ``` toml # pyproject.toml [tool.mypy] exclude = """ (^|/)build/ """ ``` That's weird, though. I would have expected that expressing multiple `exclude` entries in `pyproject.toml` would look...
diff --git a/mypy/config_parser.py b/mypy/config_parser.py --- a/mypy/config_parser.py +++ b/mypy/config_parser.py @@ -57,6 +57,12 @@ def expand_path(path: str) -> str: return os.path.expandvars(os.path.expanduser(path)) +def str_or_array_as_list(v: Union[str, Sequence[str]]) -> List[str]: + if isinstance(v...
diff --git a/test-data/unit/cmdline.pyproject.test b/test-data/unit/cmdline.pyproject.test --- a/test-data/unit/cmdline.pyproject.test +++ b/test-data/unit/cmdline.pyproject.test @@ -80,3 +80,48 @@ def g(a: int) -> int: [out] pyproject.toml: toml config file contains [[tool.mypy.overrides]] sections with conflicting ...
["mypy/test/testcmdline.py::PythonCmdlineSuite::cmdline.pyproject.test::testMultilineLiteralExcludePyprojectTOML", "mypy/test/testcmdline.py::PythonCmdlineSuite::cmdline.pyproject.test::testMultilineBasicExcludePyprojectTOML", "mypy/test/testcmdline.py::PythonCmdlineSuite::cmdline.pyproject.test::testSequenceExcludePyp...
[]
null
true
2021-12-22T23:22:22Z
1
7
3
3,649
0
0.85
1
0.77
1
0.523333
89.165
567
swe_gym::train::501
swe_gym
train
501
python__mypy-11352
python/mypy
python/mypy
python
9bd651758e8ea2494837814092af70f8d9e6f7a1
Failed `TypeVar` substitution by `asynccontextmanager` **Bug Report** Return type of `contextlib.asynccontextmanager` does not substitute `typing.TypeVar` determined from parameters. **To Reproduce** Pass the following script to `mypy`, using `mypy --config-file= main.py` or otherwise. ```py #!/usr/bin/env python3 ...
This might be a typeshed bug; relevant definitions are for `@asynccontextmanager` (https://github.com/python/typeshed/blob/master/stdlib/2and3/contextlib.pyi#L32) and `AsyncContextManager` (https://github.com/python/typeshed/blob/master/stdlib/3/typing.pyi#L415). I don't see anything obviously wrong in those stubs thou...
diff --git a/mypy/plugins/default.py b/mypy/plugins/default.py --- a/mypy/plugins/default.py +++ b/mypy/plugins/default.py @@ -15,6 +15,7 @@ from mypy.subtypes import is_subtype from mypy.typeops import make_simplified_union from mypy.checkexpr import is_literal_type_like +from mypy.checker import detach_callable ...
diff --git a/test-data/unit/check-default-plugin.test b/test-data/unit/check-default-plugin.test --- a/test-data/unit/check-default-plugin.test +++ b/test-data/unit/check-default-plugin.test @@ -24,6 +24,65 @@ f = g # E: Incompatible types in assignment (expression has type "Callable[[Any, [typing fixtures/typing-medi...
["mypy/test/testcheck.py::TypeCheckSuite::testAsyncContextManagerWithGenericFunction", "mypy/test/testcheck.py::TypeCheckSuite::testAsyncContextManagerWithGenericFunctionAndSendType", "mypy/test/testcheck.py::TypeCheckSuite::testContextManagerWithGenericFunctionAndSendType"]
["mypy/test/testcheck.py::TypeCheckSuite::testContextManagerWithUnspecifiedArguments"]
null
true
2021-10-18T12:55:42Z
1
7
3
3,863
0
0.85
1
0.77
1
0.523333
89.165
568
swe_gym::train::1644
swe_gym
train
1,644
pandas-dev__pandas-55696
pandas-dev/pandas
pandas-dev/pandas
python
c36e302c7b30bc7945119a77f255d0302307847e
BUG: Inconsistent Sorting using DataFrame.from_dict() method ### 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 exis...
Thanks for submitting the issue @themox . Can you add a description of the bug after `BUG:` in the title? I have a PR coming to fix this. > Even better would be to provide a sort argument to allow the user to sort in a certain way when they call the function. It seems to me users can sort as they like after ...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 908027158725d..113d4bd16cafd 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -437,9 +437,9 @@ Other - Bug in :func:`cut` incorrectly allowing cutting of timezone-aware datetimes with timezone-naive bi...
diff --git a/pandas/tests/frame/constructors/test_from_dict.py b/pandas/tests/frame/constructors/test_from_dict.py index d78924ff9d046..845174bbf600e 100644 --- a/pandas/tests/frame/constructors/test_from_dict.py +++ b/pandas/tests/frame/constructors/test_from_dict.py @@ -200,3 +200,24 @@ def test_from_dict_orient_inva...
["pandas/tests/frame/constructors/test_from_dict.py::TestFromDict::test_from_dict_order_with_single_column", "pandas/tests/frame/methods/test_rename.py::TestRename::test_rename", "pandas/tests/indexing/multiindex/test_setitem.py::TestMultiIndexSetItem::test_multiindex_setitem2"]
["pandas/tests/indexing/multiindex/test_setitem.py::TestMultiIndexSetItem::test_frame_setitem_multi_column", "pandas/tests/indexing/multiindex/test_setitem.py::TestMultiIndexSetItem::test_frame_getitem_setitem_multislice", "pandas/tests/frame/constructors/test_from_dict.py::TestFromDict::test_from_dict_columns_paramete...
null
true
2023-10-26T01:19:04Z
2
7
3
4,763
0
0.85
1
0.77
1
0.523333
89.165
569
swe_gym::train::1641
swe_gym
train
1,641
pandas-dev__pandas-50440
pandas-dev/pandas
pandas-dev/pandas
python
e00b75b44230049a7877f8da67dc95bd91a3a52c
BUG: Inconsistent return type for groupby-resample-count ### 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 o...
This is present on main. The result should be a series with a MultiIndex. <details> INSTALLED VERSIONS ------------------ commit : ca3e0c875fe0dd862afa88b905e8aa4a44815231 python : 3.10.6.final.0 python-bits : 64 OS : Linux OS-release : 5.15.0-25-generic Ver...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 13b60f7f05352..59a27b0969a1e 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -951,6 +951,7 @@ Groupby/resample/rolling - Bug in :meth:`.SeriesGroupBy.nth` would raise when grouper contained NA values ...
diff --git a/pandas/tests/resample/test_resampler_grouper.py b/pandas/tests/resample/test_resampler_grouper.py index 0432cf397067d..a521e24aa6022 100644 --- a/pandas/tests/resample/test_resampler_grouper.py +++ b/pandas/tests/resample/test_resampler_grouper.py @@ -515,3 +515,25 @@ def test_resample_empty_Dataframe(keys...
["pandas/tests/resample/test_resampler_grouper.py::test_groupby_resample_size_all_index_same"]
["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-12-26T17:07:53Z
2
7
1
3,371
0
0.85
1
0.77
1
0.523333
89.165
570
swe_bench_verified::test::259
swe_bench_verified
test
259
matplotlib__matplotlib-21568
matplotlib/matplotlib
matplotlib/matplotlib
python
f0632c0fc7339f68e992ed63ae4cfac76cd41aad
[Bug]: Datetime axis with usetex is unclear ### Bug summary The spacing for a datetime axis when using `usetex=True` is unclear in matplotlib version 3.4 when comparing it to 3.3. ### Code for reproduction ```python import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd np.random.s...
Can you reproduce this without Pandas? Yes. Done with the following code: ``` python from datetime import datetime, timedelta import matplotlib import matplotlib.pyplot as plt import numpy as np np.random.seed(1) matplotlib.rcParams["text.usetex"] = True dates = np.arange(datetime(2020, 1, 1), datetime(20...
diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py --- a/lib/matplotlib/dates.py +++ b/lib/matplotlib/dates.py @@ -595,8 +595,11 @@ def _wrap_in_tex(text): p = r'([a-zA-Z]+)' ret_text = re.sub(p, r'}$\1$\\mathdefault{', text) - # Braces ensure dashes are not spaced like binary operators. - ...
diff --git a/lib/matplotlib/tests/test_dates.py b/lib/matplotlib/tests/test_dates.py --- a/lib/matplotlib/tests/test_dates.py +++ b/lib/matplotlib/tests/test_dates.py @@ -6,7 +6,7 @@ import numpy as np import pytest -from matplotlib import rc_context +from matplotlib import rc_context, style import matplotlib.date...
["lib/matplotlib/tests/test_dates.py::test_date_formatter_usetex[delta2-expected2]", "lib/matplotlib/tests/test_dates.py::test_date_formatter_usetex[delta3-expected3]", "lib/matplotlib/tests/test_dates.py::test_concise_formatter_usetex[t_delta2-expected2]", "lib/matplotlib/tests/test_dates.py::test_concise_formatter_us...
["lib/matplotlib/tests/test_dates.py::test_date_numpyx", "lib/matplotlib/tests/test_dates.py::test_date_date2num_numpy[datetime64[s]-t00]", "lib/matplotlib/tests/test_dates.py::test_date_date2num_numpy[datetime64[s]-t01]", "lib/matplotlib/tests/test_dates.py::test_date_date2num_numpy[datetime64[s]-t02]", "lib/matplotli...
null
true
2021-11-08T18:41:08Z
1
7
4
1,278
0
1
1
0.7
1
0.236333
89.159
571
swe_gym::train::1322
swe_gym
train
1,322
pandas-dev__pandas-49864
pandas-dev/pandas
pandas-dev/pandas
python
d1ecf63e2040daecad6e0a8485a35e8a23393795
BUG: transform("max") replaces all entries with NaN when applied after groupby with as_index=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....
This worked in 1.4.4, but I don't think that this should work. max is a reducer and should be used with agg and not transform. cc @rhshadrach Can you weigh in? related : https://github.com/pandas-dev/pandas/issues/37093 Thanks for the report! Haven't run a git bisect but it will undoubtedly point to one of my PRs....
diff --git a/doc/source/whatsnew/v1.5.3.rst b/doc/source/whatsnew/v1.5.3.rst index d35d3bf8b89ca..d65446604a83f 100644 --- a/doc/source/whatsnew/v1.5.3.rst +++ b/doc/source/whatsnew/v1.5.3.rst @@ -14,6 +14,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ - Fixed performance regression in ...
diff --git a/pandas/tests/groupby/transform/test_transform.py b/pandas/tests/groupby/transform/test_transform.py index ad8051792266e..8cb05929e222d 100644 --- a/pandas/tests/groupby/transform/test_transform.py +++ b/pandas/tests/groupby/transform/test_transform.py @@ -360,7 +360,7 @@ def test_dispatch_transform(tsframe...
["pandas/tests/groupby/transform/test_transform.py::test_as_index_no_change[last-A]", "pandas/tests/groupby/transform/test_transform.py::test_as_index_no_change[prod-keys1]", "pandas/tests/groupby/transform/test_transform.py::test_as_index_no_change[idxmin-A]", "pandas/tests/groupby/transform/test_transform.py::test_as...
["pandas/tests/groupby/transform/test_transform.py::test_null_group_str_reducer_series[True-max]", "pandas/tests/groupby/transform/test_transform.py::test_as_index_no_change[cumprod-A]", "pandas/tests/groupby/transform/test_transform.py::test_null_group_str_transformer_series[False-ffill]", "pandas/tests/groupby/transf...
null
true
2022-11-23T13:25:58Z
2
6
42
3,226
0
0.85
1
0.77
1
0.52
89.155
572
swe_gym::train::1411
swe_gym
train
1,411
pandas-dev__pandas-53257
pandas-dev/pandas
pandas-dev/pandas
python
8894dcc125b124986764272a64f88ad20a090487
BUG: to_datetime ignores "AM" and "PM" unless format is explicitly set ### 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 @juli4nb4dillo, I am new here so apologies if I misunderstand the bug you have raised. Using the format parameter would get the desired result I recreated your code with the format parameter and returned the following: import pandas as pd df = pd.DataFrame(['4/21/2023 11:06:35 AM','4/21/2023 12:06:35 PM',...
diff --git a/doc/source/whatsnew/v2.0.2.rst b/doc/source/whatsnew/v2.0.2.rst index df7ebd8d4844f..57c305c8e21a8 100644 --- a/doc/source/whatsnew/v2.0.2.rst +++ b/doc/source/whatsnew/v2.0.2.rst @@ -29,6 +29,7 @@ Bug fixes - Bug in :func:`api.interchange.from_dataframe` was returning :class:`DataFrame`'s of incorrect si...
diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py index 0b5696116e610..92b4370e9d736 100644 --- a/pandas/tests/tools/test_to_datetime.py +++ b/pandas/tests/tools/test_to_datetime.py @@ -2942,6 +2942,9 @@ class TestDatetimeParsingWrappers: ("2005-11-09 10:15", date...
["pandas/tests/tslibs/test_parsing.py::test_guess_datetime_format_with_parseable_formats[Tue", "pandas/tests/tslibs/test_parsing.py::test_guess_datetime_format_with_parseable_formats[Tuesday"]
["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
2023-05-16T15:28:17Z
2
6
2
3,175
0
0.85
1
0.77
1
0.52
89.155
573
swe_gym::train::553
swe_gym
train
553
python__mypy-11681
python/mypy
python/mypy
python
01e6aba30c787c664ac88d849b45f7d303316951
Semantic analysis deferral crash **Crash Report** Mypy crashes with code at https://github.com/atsuoishimoto/mypy_issue. **Traceback** ``` $ mypy . ./test1.py:2: error: INTERNAL ERROR -- Please try using mypy master on Github: https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build I...
I can repro; thank you for taking the time to make a great bug report!
diff --git a/mypy/semanal.py b/mypy/semanal.py --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -4612,7 +4612,11 @@ def add_symbol_table_node(self, names = self.current_symbol_table(escape_comprehensions=escape_comprehensions) existing = names.get(name) if isinstance(symbol.node, PlaceholderNod...
diff --git a/test-data/unit/check-modules.test b/test-data/unit/check-modules.test --- a/test-data/unit/check-modules.test +++ b/test-data/unit/check-modules.test @@ -3131,4 +3131,43 @@ main:2: error: Cannot find implementation or library stub for module named "blea # flags: --ignore-missing-imports import bleach.xyz...
["mypy/test/testcheck.py::TypeCheckSuite::check-modules.test::testCyclicUndefinedImportWithStar2", "mypy/test/testcheck.py::TypeCheckSuite::check-modules.test::testCyclicUndefinedImportWithStar1"]
["mypy/test/testcheck.py::TypeCheckSuite::check-modules.test::testCyclicUndefinedImportWithStar3", "mypy/test/testcheck.py::TypeCheckSuite::check-modules.test::testCyclicUndefinedImportWithName"]
null
true
2021-12-08T08:33:19Z
1
6
2
4,868
0
0.85
1
0.77
1
0.52
89.155
574
swe_gym::train::1513
swe_gym
train
1,513
pandas-dev__pandas-54025
pandas-dev/pandas
pandas-dev/pandas
python
c92b3701efff16293bd110a3f06f458040b43d97
BUG: dot on Arrow Dataframes/Series produces a Numpy object result ### 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...
I am 1st time contributor and I would like to contribute to this. Please assign it to me. This is non trivial, I’d recommend looking into Something else. Take
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 137f2e5c12211..bcc8b1877128f 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -466,6 +466,7 @@ Numeric - Bug in :meth:`Series.mean`, :meth:`DataFrame.mean` with object-dtype values containing strings t...
diff --git a/pandas/tests/frame/methods/test_dot.py b/pandas/tests/frame/methods/test_dot.py index 555e5f0e26eaf..3509b587cb373 100644 --- a/pandas/tests/frame/methods/test_dot.py +++ b/pandas/tests/frame/methods/test_dot.py @@ -129,3 +129,19 @@ def reduced_dim_assert(cls, result, expected): """ tm.as...
["pandas/tests/frame/methods/test_dot.py::test_arrow_dtype[Int16-Int32]", "pandas/tests/frame/methods/test_dot.py::test_arrow_dtype[float[pyarrow]-double[pyarrow]]", "pandas/tests/frame/methods/test_dot.py::test_arrow_dtype[Float32-Float64]"]
["pandas/tests/frame/methods/test_dot.py::TestSeriesDot::test_dot_1d_ndarray", "pandas/tests/frame/methods/test_dot.py::TestSeriesDot::test_dot_aligns", "pandas/tests/frame/methods/test_dot.py::TestSeriesDot::test_dot_equiv_values_dot", "pandas/tests/frame/methods/test_dot.py::TestSeriesDot::test_dot_misaligned", "pand...
null
true
2023-07-06T20:40:28Z
2
6
3
4,875
0
0.85
1
0.77
1
0.52
89.155
575
swe_gym::train::563
swe_gym
train
563
python__mypy-14206
python/mypy
python/mypy
python
a82c288890e80ec85cc8d84985a65d6c4b7f9ffe
Crash with Self + Generic + dataclass **Crash Report** `Self` within `Generic` `dataclass` field crashes on master. **Traceback** Copied from local run, only the version differs in playground. ``` g.py:16: error: INTERNAL ERROR -- Please try using mypy master on GitHub: https://mypy.readthedocs.io/en/stable/common_i...
cc @ilevkivskyi for Self
diff --git a/mypy/semanal.py b/mypy/semanal.py --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -1047,7 +1047,11 @@ def setup_self_type(self) -> None: assert self.type is not None info = self.type if info.self_type is not None: - return + if has_placeholder(info.self_type....
diff --git a/test-data/unit/check-classes.test b/test-data/unit/check-classes.test --- a/test-data/unit/check-classes.test +++ b/test-data/unit/check-classes.test @@ -7679,3 +7679,18 @@ def g(b: Type[Any]) -> None: def h(b: type) -> None: class D(b): ... + +[case testNoCrashOnSelfWithForwardRefGenericClass] +fr...
["mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testNoCrashOnSelfWithForwardRefGenericDataclass", "mypy/test/testcheck.py::TypeCheckSuite::check-classes.test::testNoCrashOnSelfWithForwardRefGenericClass"]
[]
null
true
2022-11-27T20:00:54Z
1
6
2
5,346
0
0.85
1
0.77
1
0.52
89.155
576
swe_bench_verified::test::140
swe_bench_verified
test
140
django__django-14034
django/django
django/django
python
db1fc5cd3c5d36cdb5d0fe4404efd6623dd3e8fb
MultiValueField ignores a required value of a sub field Description (last modified by Takayuki Hirai) A field and a form definition: from django.forms import ( Form, CharField, MultiValueField, MultiWidget, ) class MF(MultiValueField): widget = MultiWidget def __init__(self): fields = [ CharField(require...
Why do you pass required=False in super(MF, self).__init__()? Removing that seems to resolve the issue. I tried to remove required=False, then both INPUT elements in HTML became required. <tr><th><label for="id_mf_0">Mf:</label></th><td><input type="text" name="mf_0" required id="id_mf_0" /> <input type="text" name="mf...
diff --git a/django/forms/boundfield.py b/django/forms/boundfield.py --- a/django/forms/boundfield.py +++ b/django/forms/boundfield.py @@ -2,7 +2,7 @@ from django.core.exceptions import ValidationError from django.forms.utils import flatatt, pretty_name -from django.forms.widgets import Textarea, TextInput +from dj...
diff --git a/tests/forms_tests/field_tests/test_multivaluefield.py b/tests/forms_tests/field_tests/test_multivaluefield.py --- a/tests/forms_tests/field_tests/test_multivaluefield.py +++ b/tests/forms_tests/field_tests/test_multivaluefield.py @@ -10,6 +10,20 @@ beatles = (('J', 'John'), ('P', 'Paul'), ('G', 'George'),...
["test_render_required_attributes (forms_tests.field_tests.test_multivaluefield.MultiValueFieldTest)"]
["test_bad_choice (forms_tests.field_tests.test_multivaluefield.MultiValueFieldTest)", "test_clean (forms_tests.field_tests.test_multivaluefield.MultiValueFieldTest)", "test_clean_disabled_multivalue (forms_tests.field_tests.test_multivaluefield.MultiValueFieldTest)", "test_disabled_has_changed (forms_tests.field_tests...
null
true
2021-02-22T19:32:50Z
1
14
1
1,126
0
1
1
0.7
1
0.234333
89.153
577
swe_gym::train::472
swe_gym
train
472
python__mypy-15159
python/mypy
python/mypy
python
6b1fc865902bf2b845d3c58b6b9973b5a412241f
Internal Error with recursive TypeAlias + TypeVar when in function scope **Crash Report** I declared a recursive `TypeAlias` inside a function, and bound a `TypeVar` to that `TypeAlias`. Using the `TypeVar` seems to cause the crash (if I don't reference the `TypeVar` then mypy points out "Recursive types are not allow...
diff --git a/mypy/typeanal.py b/mypy/typeanal.py --- a/mypy/typeanal.py +++ b/mypy/typeanal.py @@ -1110,7 +1110,13 @@ def visit_type_type(self, t: TypeType) -> Type: return TypeType.make_normalized(self.anal_type(t.item), line=t.line) def visit_placeholder_type(self, t: PlaceholderType) -> Type: - ...
diff --git a/test-data/unit/check-recursive-types.test b/test-data/unit/check-recursive-types.test --- a/test-data/unit/check-recursive-types.test +++ b/test-data/unit/check-recursive-types.test @@ -897,3 +897,29 @@ Example = NamedTuple("Example", [("rec", List["Example"])]) e: Example reveal_type(e) # N: Revealed t...
["mypy/test/testcheck.py::TypeCheckSuite::check-recursive-types.test::testForwardBoundFunctionScopeWorks", "mypy/test/testcheck.py::TypeCheckSuite::check-recursive-types.test::testRecursiveBoundFunctionScopeNoCrash"]
[]
null
true
2023-04-30T20:46:05Z
1
8
2
2,395
0
0.85
1
0.85
1
0.425833
89.1525
578
swe_bench_verified::test::82
swe_bench_verified
test
82
django__django-12406
django/django
django/django
python
335c9c94acf263901fb023404408880245b0c4b4
ModelForm RadioSelect widget for foreign keys should not present a blank option if blank=False on the model Description Unlike the select widget, where a blank option is idiomatic even for required fields, radioselect has an inherent unfilled state that makes the "-------" option look suspiciously like a valid choice....
A pull request is available here: ​https://github.com/django/django/pull/11199 ​PR
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -980,6 +980,7 @@ def formfield(self, *, using=None, **kwargs): 'queryset': self.remote_field.model._default_manager.using(using), ...
diff --git a/tests/model_forms/models.py b/tests/model_forms/models.py --- a/tests/model_forms/models.py +++ b/tests/model_forms/models.py @@ -393,6 +393,9 @@ class Character(models.Model): username = models.CharField(max_length=100) last_action = models.DateTimeField() + def __str__(self): + retu...
["test_non_blank_foreign_key_with_radio (model_forms.tests.ModelFormBaseTest)", "test_choices_radio_blank (model_forms.test_modelchoicefield.ModelChoiceFieldTests)", "test_clean_model_instance (model_forms.test_modelchoicefield.ModelChoiceFieldTests)"]
["test_modelform_factory_metaclass (model_forms.tests.CustomMetaclassTestCase)", "test_notrequired_overrides_notblank (model_forms.tests.ValidationTest)", "test_validates_with_replaced_field_excluded (model_forms.tests.ValidationTest)", "test_validates_with_replaced_field_not_specified (model_forms.tests.ValidationTest...
null
true
2020-02-02T16:34:05Z
2
17
3
1,064
0
1
1
0.7
1
0.234
89.152
579
swe_bench_verified::test::103
swe_bench_verified
test
103
django__django-13212
django/django
django/django
python
f4e93919e4608cfc50849a1f764fd856e0917401
Make validators include the provided value in ValidationError Description It is sometimes desirable to include the provide value in a custom error message. For example: “blah” is not a valid email. By making built-in validators provide value to ValidationError, one can override an error message and use a %(value)s pla...
​https://github.com/django/django/pull/13212 After reconsideration I have some doubts. Do you think it's really useful to include invalid values in error messages? Invalid form is redisplayed with errors in most (all?) of cases, so I'm not sure if it can be useful to display error messages containing invalid values nex...
diff --git a/django/core/validators.py b/django/core/validators.py --- a/django/core/validators.py +++ b/django/core/validators.py @@ -48,7 +48,7 @@ def __call__(self, value): regex_matches = self.regex.search(str(value)) invalid_input = regex_matches if self.inverse_match else not regex_matches ...
diff --git a/tests/forms_tests/tests/test_validators.py b/tests/forms_tests/tests/test_validators.py --- a/tests/forms_tests/tests/test_validators.py +++ b/tests/forms_tests/tests/test_validators.py @@ -1,9 +1,11 @@ import re +import types from unittest import TestCase from django import forms from django.core im...
["test_value_placeholder_with_char_field (forms_tests.tests.test_validators.ValidatorCustomMessageTests)", "test_value_placeholder_with_decimal_field (forms_tests.tests.test_validators.ValidatorCustomMessageTests)", "test_value_placeholder_with_file_field (forms_tests.tests.test_validators.ValidatorCustomMessageTests)"...
["test_all_errors_get_reported (forms_tests.tests.test_validators.TestFieldWithValidators)", "test_field_validators_can_be_any_iterable (forms_tests.tests.test_validators.TestFieldWithValidators)"]
null
true
2020-07-21T02:53:58Z
2
44
5
466
0
1
1
0.7
1
0.224333
89.123
580
swe_bench_verified::test::135
swe_bench_verified
test
135
django__django-13933
django/django
django/django
python
42e8cf47c7ee2db238bf91197ea398126c546741
ModelChoiceField does not provide value of invalid choice when raising ValidationError Description (last modified by Aaron Wiegel) Compared with ChoiceField and others, ModelChoiceField does not show the value of the invalid choice when raising a validation error. Passing in parameters with the invalid value and mo...
This message has been the same literally forever b2b6fc8e3c78671c8b6af2709358c3213c84d119. ​Given that ChoiceField passes the value when raising the error, if you set ​error_messages you should be able to get the result you want. Replying to Carlton Gibson: This message has been the same literally forever b2b6fc8e3c786...
diff --git a/django/forms/models.py b/django/forms/models.py --- a/django/forms/models.py +++ b/django/forms/models.py @@ -1284,7 +1284,11 @@ def to_python(self, value): value = getattr(value, key) value = self.queryset.get(**{key: value}) except (ValueError, TypeError, self.query...
diff --git a/tests/forms_tests/tests/test_error_messages.py b/tests/forms_tests/tests/test_error_messages.py --- a/tests/forms_tests/tests/test_error_messages.py +++ b/tests/forms_tests/tests/test_error_messages.py @@ -308,3 +308,16 @@ def test_modelchoicefield(self): self.assertFormErrors(['REQUIRED'], f.clea...
["test_modelchoicefield_value_placeholder (forms_tests.tests.test_error_messages.ModelChoiceFieldErrorMessagesTestCase)"]
["test_modelchoicefield (forms_tests.tests.test_error_messages.ModelChoiceFieldErrorMessagesTestCase)", "test_booleanfield (forms_tests.tests.test_error_messages.FormsErrorMessagesTestCase)", "test_charfield (forms_tests.tests.test_error_messages.FormsErrorMessagesTestCase)", "test_choicefield (forms_tests.tests.test_e...
null
true
2021-01-26T03:58:23Z
1
6
1
1,202
0
1
1
0.7
1
0.220333
89.111
581
swe_bench_verified::test::427
swe_bench_verified
test
427
sympy__sympy-12419
sympy/sympy
sympy/sympy
python
479939f8c65c8c2908bbedc959549a257a7c0b0b
Sum of the elements of an identity matrix is zero I think this is a bug. I created a matrix by M.T * M under an assumption that M is orthogonal. SymPy successfully recognized that the result is an identity matrix. I tested its identity-ness by element-wise, queries, and sum of the diagonal elements and received expe...
@wakita shouldn't these be 1 I would like to work on this issue ``` >>> Sum(e[0,i],(i,0,n-1)).doit() 0 >>> Sum(e[i,0],(i,0,n-1)).doit() 0 ``` Hey, I would like to try to solve this issue. Where should I look first? Interesting observation if I replace j with i in e[i, j] the answer comes as n**2 which is corr...
diff --git a/sympy/matrices/expressions/matexpr.py b/sympy/matrices/expressions/matexpr.py --- a/sympy/matrices/expressions/matexpr.py +++ b/sympy/matrices/expressions/matexpr.py @@ -2,11 +2,12 @@ from functools import wraps -from sympy.core import S, Symbol, Tuple, Integer, Basic, Expr +from sympy.core import S, ...
diff --git a/sympy/matrices/expressions/tests/test_matexpr.py b/sympy/matrices/expressions/tests/test_matexpr.py --- a/sympy/matrices/expressions/tests/test_matexpr.py +++ b/sympy/matrices/expressions/tests/test_matexpr.py @@ -65,6 +65,7 @@ def test_ZeroMatrix(): with raises(ShapeError): Z**2 + def tes...
["test_Identity"]
["test_shape", "test_matexpr", "test_subs", "test_ZeroMatrix", "test_ZeroMatrix_doit", "test_Identity_doit", "test_addition", "test_multiplication", "test_MatPow", "test_MatrixSymbol", "test_dense_conversion", "test_free_symbols", "test_zero_matmul", "test_matadd_simplify", "test_matmul_simplify", "test_invariants", "t...
null
true
2017-03-25T15:02:26Z
1
10
1
1,110
0
1
1
0.7
1
0.218333
89.105
582
swe_bench_verified::test::361
swe_bench_verified
test
361
scikit-learn__scikit-learn-13439
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
a62775e99f2a5ea3d51db7160fad783f6cd8a4c5
Pipeline should implement __len__ #### Description With the new indexing support `pipe[:len(pipe)]` raises an error. #### Steps/Code to Reproduce ```python from sklearn import svm from sklearn.datasets import samples_generator from sklearn.feature_selection import SelectKBest from sklearn.feature_selection import f_...
None should work just as well, but perhaps you're right that len should be implemented. I don't think we should implement other things from sequences such as iter, however. I think len would be good to have but I would also try to add as little as possible. +1 > I am looking at it.
diff --git a/sklearn/pipeline.py b/sklearn/pipeline.py --- a/sklearn/pipeline.py +++ b/sklearn/pipeline.py @@ -199,6 +199,12 @@ def _iter(self, with_final=True): if trans is not None and trans != 'passthrough': yield idx, name, trans + def __len__(self): + """ + Returns ...
diff --git a/sklearn/tests/test_pipeline.py b/sklearn/tests/test_pipeline.py --- a/sklearn/tests/test_pipeline.py +++ b/sklearn/tests/test_pipeline.py @@ -1069,5 +1069,6 @@ def test_make_pipeline_memory(): assert pipeline.memory is memory pipeline = make_pipeline(DummyTransf(), SVC()) assert pipeline.mem...
["sklearn/tests/test_pipeline.py::test_make_pipeline_memory"]
["sklearn/tests/test_pipeline.py::test_pipeline_init", "sklearn/tests/test_pipeline.py::test_pipeline_init_tuple", "sklearn/tests/test_pipeline.py::test_pipeline_methods_anova", "sklearn/tests/test_pipeline.py::test_pipeline_fit_params", "sklearn/tests/test_pipeline.py::test_pipeline_sample_weight_supported", "sklearn/...
null
true
2019-03-12T20:32:50Z
1
6
1
1,188
0
1
1
0.7
1
0.218
89.104
583
swe_bench_verified::test::275
swe_bench_verified
test
275
matplotlib__matplotlib-25122
matplotlib/matplotlib
matplotlib/matplotlib
python
5ec2bd279729ff534719b8bf238dbbca907b93c5
[Bug]: Windows correction is not correct in `mlab._spectral_helper` ### Bug summary Windows correction is not correct in `mlab._spectral_helper`: https://github.com/matplotlib/matplotlib/blob/3418bada1c1f44da1f73916c5603e3ae79fe58c1/lib/matplotlib/mlab.py#L423-L430 The `np.abs` is not needed, and give wrong result fo...
This is fixed by https://github.com/matplotlib/matplotlib/pull/22828 (?) although a test is required to get it merged. I'm not sure that your code for reproduction actually shows the right thing though as Matplotlib is not involved. > This is fixed by #22828 (?) although a test is required to get it merged. #228...
diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py --- a/lib/matplotlib/mlab.py +++ b/lib/matplotlib/mlab.py @@ -395,12 +395,12 @@ def _spectral_helper(x, y=None, NFFT=None, Fs=None, detrend_func=None, elif mode == 'psd': result = np.conj(result) * result elif mode == 'magnitude': - ...
diff --git a/lib/matplotlib/tests/test_mlab.py b/lib/matplotlib/tests/test_mlab.py --- a/lib/matplotlib/tests/test_mlab.py +++ b/lib/matplotlib/tests/test_mlab.py @@ -615,7 +615,7 @@ def test_psd_window_hanning(self): noverlap=0, sides=self.sides, ...
["lib/matplotlib/tests/test_mlab.py::TestSpectral::test_psd_window_flattop[Fs4-twosided-complex]", "lib/matplotlib/tests/test_mlab.py::TestSpectral::test_psd_window_flattop[Fs4-twosided-real]", "lib/matplotlib/tests/test_mlab.py::TestSpectral::test_psd_window_flattop[Fs4-onesided-complex]", "lib/matplotlib/tests/test_m...
["lib/matplotlib/tests/test_mlab.py::TestStride::test_stride_windows_invalid_input_shape[0D]", "lib/matplotlib/tests/test_mlab.py::TestStride::test_stride_windows_invalid_input_shape[2D]", "lib/matplotlib/tests/test_mlab.py::TestStride::test_stride_windows_invalid_params[n", "lib/matplotlib/tests/test_mlab.py::TestStri...
null
true
2023-02-01T03:41:00Z
1
8
12
1,029
0
1
1
0.7
1
0.198167
89.0445
584
swe_gym::train::373
swe_gym
train
373
python__mypy-15366
python/mypy
python/mypy
python
21c5439dccfc6fc21f126200b95b0552f503d5da
False-negative `type-abstract` in dictionary initialization **Bug Report** `type-abstract` is falsely missing when initializing a dictionary. **To Reproduce** ```python """False-negative `type-abstract`.""" from abc import abstractmethod class Class: @abstractmethod def method(self) -> None: pass m...
diff --git a/mypy/checkexpr.py b/mypy/checkexpr.py --- a/mypy/checkexpr.py +++ b/mypy/checkexpr.py @@ -2166,15 +2166,7 @@ def check_arg( if isinstance(caller_type, DeletedType): self.msg.deleted_as_rvalue(caller_type, context) # Only non-abstract non-protocol class can be given where Type...
diff --git a/test-data/unit/check-abstract.test b/test-data/unit/check-abstract.test --- a/test-data/unit/check-abstract.test +++ b/test-data/unit/check-abstract.test @@ -196,6 +196,24 @@ x: Type[B] f(x) # OK [out] +[case testAbstractTypeInADict] +from typing import Dict, Type +from abc import abstractmethod + +cl...
["mypy/test/testcheck.py::TypeCheckSuite::check-abstract.test::testAbstractTypeInADict"]
["mypy/test/testcheck.py::TypeCheckSuite::check-abstract.test::testInstantiationAbstractsInTypeForAliases"]
null
true
2023-06-04T07:41:59Z
1
30
1
1,728
0
0.85
1
0.85
1
0.388
89.039
585
swe_bench_verified::test::348
swe_bench_verified
test
348
pytest-dev__pytest-8399
pytest-dev/pytest
pytest-dev/pytest
python
6e7dc8bac831cd8cf7a53b08efa366bd84f0c0fe
Starting v6.2.0, unittest setUpClass fixtures are no longer "private" Minimal example: ``` import unittest class Tests(unittest.TestCase): @classmethod def setUpClass(cls): pass def test_1(self): pass ``` ``` ~$ pytest --fixtures ... unittest_setUpClass_fixture_Tests [class scope] -- ../...
This issue also seems to affect xunit style test-classes: ``` import unittest class Tests(unittest.TestCase): @classmethod def setup_class(cls): pass def test_1(self): pass ``` ``` ~$ pytest --fixtures ... xunit_setup_class_fixture_Tests [class scope] /home/ubuntu/src/...
diff --git a/src/_pytest/python.py b/src/_pytest/python.py --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -528,7 +528,7 @@ def _inject_setup_module_fixture(self) -> None: autouse=True, scope="module", # Use a unique name to speed up lookup. - name=f"xunit_se...
diff --git a/testing/test_nose.py b/testing/test_nose.py --- a/testing/test_nose.py +++ b/testing/test_nose.py @@ -211,6 +211,50 @@ def test_world(): result.stdout.fnmatch_lines(["*2 passed*"]) +def test_fixtures_nose_setup_issue8394(pytester: Pytester) -> None: + pytester.makepyfile( + """ + ...
["testing/test_unittest.py::test_fixtures_setup_setUpClass_issue8394"]
["testing/test_unittest.py::test_simple_unittest", "testing/test_unittest.py::test_runTest_method", "testing/test_unittest.py::test_isclasscheck_issue53", "testing/test_unittest.py::test_setup", "testing/test_unittest.py::test_setUpModule", "testing/test_unittest.py::test_setUpModule_failing_no_teardown", "testing/test...
null
true
2021-03-04T17:52:17Z
2
10
1
975
0
1
1
0.7
1
0.195833
89.0375
586
swe_bench_verified::test::298
swe_bench_verified
test
298
pydata__xarray-2905
pydata/xarray
pydata/xarray
python
7c4e2ac83f7b4306296ff9b7b51aaf016e5ad614
Variable.__setitem__ coercing types on objects with a values property #### Minimal example ```python import xarray as xr good_indexed, bad_indexed = xr.DataArray([None]), xr.DataArray([None]) class HasValues(object): values = 5 good_indexed.loc[{'dim_0': 0}] = set() bad_indexed.loc[{'dim_0': 0}] = HasValues() #...
Thanks for the report. We did not consider to store an object type array other than string, but it should be supported. I think we should improve this line, https://github.com/pydata/xarray/blob/39b2a37207fc8e6c5199ba9386831ba7eb06d82b/xarray/core/variable.py#L171-L172 We internally use many inhouse array-lik...
diff --git a/xarray/core/variable.py b/xarray/core/variable.py --- a/xarray/core/variable.py +++ b/xarray/core/variable.py @@ -218,7 +218,8 @@ def as_compatible_data(data, fastpath=False): data = np.timedelta64(getattr(data, "value", data), "ns") # we don't want nested self-described arrays - data = ...
diff --git a/xarray/tests/test_variable.py b/xarray/tests/test_variable.py --- a/xarray/tests/test_variable.py +++ b/xarray/tests/test_variable.py @@ -2300,6 +2300,11 @@ def __init__(self, array): class CustomIndexable(CustomArray, indexing.ExplicitlyIndexed): pass + # Type with data stor...
["xarray/tests/test_variable.py::TestAsCompatibleData::test_unsupported_type"]
["xarray/tests/test_variable.py::TestVariable::test_properties", "xarray/tests/test_variable.py::TestVariable::test_attrs", "xarray/tests/test_variable.py::TestVariable::test_getitem_dict", "xarray/tests/test_variable.py::TestVariable::test_getitem_1d", "xarray/tests/test_variable.py::TestVariable::test_getitem_1d_fanc...
null
true
2019-04-17T21:52:37Z
1
3
1
2,054
0
1
1
0.85
0.8
0.352333
89.032
587
swe_gym::train::927
swe_gym
train
927
dask__dask-9981
dask/dask
dask/dask
python
105b9469cff49b18d8de94342cedc57508cffe3a
`dask.dataframe` inconsistent in supporting `filesystem` argument The parquet handling is inconsistent between `read_parquet` and `to_parquet` in that `read_parquet` supports passing an initialized filesystem object, but `to_parquet` does not. This seems to be due to a recent partial refactor of `read_parquet` which st...
diff --git a/dask/dataframe/io/parquet/core.py b/dask/dataframe/io/parquet/core.py --- a/dask/dataframe/io/parquet/core.py +++ b/dask/dataframe/io/parquet/core.py @@ -364,10 +364,9 @@ def read_parquet( unsupported metadata files (like Spark's '_SUCCESS' and 'crc' files). It may be necessary to change ...
diff --git a/dask/dataframe/io/tests/test_parquet.py b/dask/dataframe/io/tests/test_parquet.py --- a/dask/dataframe/io/tests/test_parquet.py +++ b/dask/dataframe/io/tests/test_parquet.py @@ -4633,8 +4633,8 @@ def test_pyarrow_filesystem_option(tmp_path, fs): from pyarrow.fs import LocalFileSystem df = pd.Da...
["dask/dataframe/io/tests/test_parquet.py::test_fsspec_to_parquet_filesystem_option", "dask/dataframe/io/tests/test_parquet.py::test_pyarrow_filesystem_option[arrow]", "dask/dataframe/io/tests/test_parquet.py::test_pyarrow_filesystem_option[None]"]
["dask/dataframe/io/tests/test_parquet.py::test_blocksize[fastparquet-1MiB-True]", "dask/dataframe/io/tests/test_parquet.py::test_partitioned_column_overlap[pyarrow-write_cols0]", "dask/dataframe/io/tests/test_parquet.py::test_partitioned_preserve_index[fastparquet-pyarrow]", "dask/dataframe/io/tests/test_parquet.py::t...
null
true
2023-02-20T18:20:35Z
1
26
3
1,781
0
0.85
1
0.85
1
0.3835
89.0255
588
swe_bench_verified::test::337
swe_bench_verified
test
337
pytest-dev__pytest-5840
pytest-dev/pytest
pytest-dev/pytest
python
73c5b7f4b11a81e971f7d1bb18072e06a87060f4
5.1.2 ImportError while loading conftest (windows import folder casing issues) 5.1.1 works fine. after upgrade to 5.1.2, the path was converted to lower case ``` Installing collected packages: pytest Found existing installation: pytest 5.1.1 Uninstalling pytest-5.1.1: Successfully uninstalled pytest-5.1.1 S...
Can you show the import line that it is trying to import exactly? The cause might be https://github.com/pytest-dev/pytest/pull/5792. cc @Oberon00 Seems very likely, unfortunately. If instead of using `os.normcase`, we could find a way to get the path with correct casing (`Path.resolve`?) that would probably be a saf...
diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -30,7 +30,6 @@ from _pytest.compat import importlib_metadata from _pytest.outcomes import fail from _pytest.outcomes import Skipped -from _pytest.pathlib import un...
diff --git a/testing/test_conftest.py b/testing/test_conftest.py --- a/testing/test_conftest.py +++ b/testing/test_conftest.py @@ -1,12 +1,12 @@ -import os.path +import os import textwrap +from pathlib import Path import py import pytest from _pytest.config import PytestPluginManager from _pytest.main import E...
["testing/test_conftest.py::test_setinitial_conftest_subdirs[test]", "testing/test_conftest.py::test_setinitial_conftest_subdirs[tests]"]
["testing/test_conftest.py::TestConftestValueAccessGlobal::test_basic_init[global]", "testing/test_conftest.py::TestConftestValueAccessGlobal::test_immediate_initialiation_and_incremental_are_the_same[global]", "testing/test_conftest.py::TestConftestValueAccessGlobal::test_value_access_not_existing[global]", "testing/t...
null
true
2019-09-12T01:09:28Z
2
27
2
609
0
1
1
0.7
1
0.1915
89.0245
589
swe_bench_verified::test::281
swe_bench_verified
test
281
matplotlib__matplotlib-25960
matplotlib/matplotlib
matplotlib/matplotlib
python
1d0d255b79e84dfc9f2123c5eb85a842d342f72b
[Bug]: wspace and hspace in subfigures not working ### Bug summary `wspace` and `hspace` in `Figure.subfigures` do nothing. ### Code for reproduction ```python import matplotlib.pyplot as plt figs = plt.figure().subfigures(2, 2, wspace=0, hspace=0) for fig in figs.flat: fig.subplots().plot([1, 2]) plt.show() ``...
Thanks for the report @maurosilber. The problem is clearer if we set a facecolor for each subfigure: ```python import matplotlib.pyplot as plt for space in [0, 0.2]: figs = plt.figure().subfigures(2, 2, hspace=space, wspace=space) for fig, color in zip(figs.flat, 'cmyw'): fig.set_facecolor(co...
diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -1564,8 +1564,9 @@ def subfigures(self, nrows=1, ncols=1, squeeze=True, wspace, hspace : float, default: None The amount of width/height reserved for space between subf...
diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py --- a/lib/matplotlib/tests/test_figure.py +++ b/lib/matplotlib/tests/test_figure.py @@ -1449,6 +1449,31 @@ def test_subfigure_pdf(): fig.savefig(buffer, format='pdf') +def test_subfigures_wspace_hspace(): + sub_figs = plt...
["lib/matplotlib/tests/test_figure.py::test_subfigures_wspace_hspace"]
["lib/matplotlib/tests/test_figure.py::test_align_labels[png]", "lib/matplotlib/tests/test_figure.py::test_align_labels_stray_axes", "lib/matplotlib/tests/test_figure.py::test_figure_label", "lib/matplotlib/tests/test_figure.py::test_fignum_exists", "lib/matplotlib/tests/test_figure.py::test_clf_keyword", "lib/matplotl...
null
true
2023-05-23T21:58:53Z
1
18
1
781
0
1
1
0.7
1
0.190167
89.0205
590
swe_bench_verified::test::351
swe_bench_verified
test
351
scikit-learn__scikit-learn-10908
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
67d06b18c68ee4452768f8a1e868565dd4354abf
CountVectorizer's get_feature_names raise not NotFittedError when the vocabulary parameter is provided If you initialize a `CounterVectorizer` and try to perform a transformation without training you will get a `NotFittedError` exception. ```python In [1]: from sklearn.feature_extraction.text import CountVectorizer In...
I suppose we should support this case.​ I would like to claim this issue. @julietcl please consider finishing one of your previous claims first I'd like to take this on, if it's still available. I think so. Go ahead
diff --git a/sklearn/feature_extraction/text.py b/sklearn/feature_extraction/text.py --- a/sklearn/feature_extraction/text.py +++ b/sklearn/feature_extraction/text.py @@ -971,6 +971,9 @@ def inverse_transform(self, X): def get_feature_names(self): """Array mapping from feature integer indices to feature...
diff --git a/sklearn/feature_extraction/tests/test_text.py b/sklearn/feature_extraction/tests/test_text.py --- a/sklearn/feature_extraction/tests/test_text.py +++ b/sklearn/feature_extraction/tests/test_text.py @@ -269,7 +269,7 @@ def test_countvectorizer_custom_vocabulary_pipeline(): assert_equal(X.shape[1], len(...
["sklearn/feature_extraction/tests/test_text.py::test_feature_names"]
["sklearn/feature_extraction/tests/test_text.py::test_strip_accents", "sklearn/feature_extraction/tests/test_text.py::test_to_ascii", "sklearn/feature_extraction/tests/test_text.py::test_word_analyzer_unigrams", "sklearn/feature_extraction/tests/test_text.py::test_word_analyzer_unigrams_and_bigrams", "sklearn/feature_e...
null
true
2018-04-03T03:50:46Z
1
3
1
1,982
0
1
1
0.85
0.8
0.340333
88.996
591
swe_bench_verified::test::7
swe_bench_verified
test
7
astropy__astropy-14096
astropy/astropy
astropy/astropy
python
1a4462d72eb03f30dc83a879b1dd57aac8b2c18b
Subclassed SkyCoord gives misleading attribute access message I'm trying to subclass `SkyCoord`, and add some custom properties. This all seems to be working fine, but when I have a custom property (`prop` below) that tries to access a non-existent attribute (`random_attr`) below, the error message is misleading becaus...
This is because the property raises an `AttributeError`, which causes Python to call `__getattr__`. You can catch the `AttributeError` in the property and raise another exception with a better message. The problem is it's a nightmare for debugging at the moment. If I had a bunch of different attributes in `prop(self)`,...
diff --git a/astropy/coordinates/sky_coordinate.py b/astropy/coordinates/sky_coordinate.py --- a/astropy/coordinates/sky_coordinate.py +++ b/astropy/coordinates/sky_coordinate.py @@ -894,10 +894,8 @@ def __getattr__(self, attr): if frame_cls is not None and self.frame.is_transformable_to(frame_cls): ...
diff --git a/astropy/coordinates/tests/test_sky_coord.py b/astropy/coordinates/tests/test_sky_coord.py --- a/astropy/coordinates/tests/test_sky_coord.py +++ b/astropy/coordinates/tests/test_sky_coord.py @@ -2165,3 +2165,21 @@ def test_match_to_catalog_3d_and_sky(): npt.assert_array_equal(idx, [0, 1, 2, 3]) as...
["astropy/coordinates/tests/test_sky_coord.py::test_subclass_property_exception_error"]
["astropy/coordinates/tests/test_sky_coord.py::test_is_transformable_to_str_input", "astropy/coordinates/tests/test_sky_coord.py::test_transform_to", "astropy/coordinates/tests/test_sky_coord.py::test_round_tripping[ICRS-ICRS-None-None-None-None]", "astropy/coordinates/tests/test_sky_coord.py::test_round_tripping[ICRS-...
null
true
2022-12-04T17:06:07Z
1
6
1
955
0
1
1
0.7
1
0.179167
88.9875
592
swe_bench_verified::test::256
swe_bench_verified
test
256
matplotlib__matplotlib-20676
matplotlib/matplotlib
matplotlib/matplotlib
python
6786f437df54ca7780a047203cbcfaa1db8dc542
interactive SpanSelector incorrectly forces axes limits to include 0 ### Bug report **Bug summary** **Code for reproduction** ```python from matplotlib import pyplot as plt from matplotlib.widgets import SpanSelector fig, ax = plt.subplots() ax.plot([10, 20], [10, 20]) ss = SpanSelector(ax, print, "horizontal", int...
I can't reproduce (or I don't understand what is the issue). Can you confirm that the following gif is the expected behaviour and that you get something different? ![Peek 2021-07-19 08-46](https://user-images.githubusercontent.com/11851990/126122649-236a4125-84c7-4f35-8c95-f85e1e07a19d.gif) The point is that in th...
diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -2156,7 +2156,12 @@ def new_axes(self, ax): self.artists.append(self._rect) def _setup_edge_handle(self, props): - self._edge_handles = ToolLineHandles(self.ax...
diff --git a/lib/matplotlib/tests/test_widgets.py b/lib/matplotlib/tests/test_widgets.py --- a/lib/matplotlib/tests/test_widgets.py +++ b/lib/matplotlib/tests/test_widgets.py @@ -302,6 +302,35 @@ def test_tool_line_handle(): assert tool_line_handle.positions == positions +@pytest.mark.parametrize('direction', ...
["lib/matplotlib/tests/test_widgets.py::test_span_selector_bound[horizontal]", "lib/matplotlib/tests/test_widgets.py::test_span_selector_bound[vertical]"]
["lib/matplotlib/tests/test_widgets.py::test_rectangle_drag[True-new_center0]", "lib/matplotlib/tests/test_widgets.py::test_rectangle_drag[False-new_center1]", "lib/matplotlib/tests/test_widgets.py::test_ellipse", "lib/matplotlib/tests/test_widgets.py::test_rectangle_handles", "lib/matplotlib/tests/test_widgets.py::tes...
null
true
2021-07-19T10:10:07Z
1
7
2
911
0
1
1
0.7
1
0.175167
88.9755
593
swe_gym::train::171
swe_gym
train
171
getmoto__moto-5991
getmoto/moto
getmoto/moto
python
fd66843cf79c7b320af0caa319f6e4ecfd4b142c
KMS ListAliases silently ignores KeyID argument The KMS `ListAliases` API has an optional `KeyID` parameter. The expected behavior, when this parameter is passed a Key ID or Key ARN argument, is for the output of `ListAliases` to return _only_ the aliases associated with the specified key. > Lists only aliases that ar...
diff --git a/moto/kms/models.py b/moto/kms/models.py --- a/moto/kms/models.py +++ b/moto/kms/models.py @@ -374,7 +374,8 @@ def alias_exists(self, alias_name): return False def add_alias(self, target_key_id, alias_name): - self.key_to_aliases[target_key_id].add(alias_name) + raw_key_id = se...
diff --git a/tests/test_kms/test_kms_boto3.py b/tests/test_kms/test_kms_boto3.py --- a/tests/test_kms/test_kms_boto3.py +++ b/tests/test_kms/test_kms_boto3.py @@ -281,6 +281,45 @@ def test_list_aliases(): ) +@mock_kms +def test_list_aliases_for_key_id(): + region = "us-west-1" + client = boto3.client...
["tests/test_kms/test_kms_boto3.py::test_list_aliases_for_key_arn", "tests/test_kms/test_kms_boto3.py::test_list_aliases_for_key_id"]
["tests/test_kms/test_kms_boto3.py::test__create_alias__raises_if_alias_has_restricted_characters[alias/my-alias!]", "tests/test_kms/test_kms_boto3.py::test_update_key_description", "tests/test_kms/test_kms_boto3.py::test_verify_happy[some", "tests/test_kms/test_kms_boto3.py::test_disable_key_key_not_found", "tests/tes...
null
true
2023-02-27 06:00:27
2
14
2
1,909
0
0.85
1
0.85
1
0.364833
88.9695
594
swe_bench_verified::test::462
swe_bench_verified
test
462
sympy__sympy-17655
sympy/sympy
sympy/sympy
python
f5e965947af2410ded92cfad987aaf45262ea434
Unexpected exception when multiplying geometry.Point and number ```python from sympy import geometry as ge import sympy point1 = ge.Point(0,0) point2 = ge.Point(1,1) ``` This line works fine ```python point1 + point2 * sympy.sympify(2.0) ``` But when I write the same this way it raises an exception ```python point1 ...
You can multiply a Point on the right by a scalar but not on the left. I think this would be a matter of defining `__rmul__` for Point.
diff --git a/sympy/geometry/point.py b/sympy/geometry/point.py --- a/sympy/geometry/point.py +++ b/sympy/geometry/point.py @@ -278,6 +278,10 @@ def __mul__(self, factor): coords = [simplify(x*factor) for x in self.args] return Point(coords, evaluate=False) + def __rmul__(self, factor): + "...
diff --git a/sympy/geometry/tests/test_point.py b/sympy/geometry/tests/test_point.py --- a/sympy/geometry/tests/test_point.py +++ b/sympy/geometry/tests/test_point.py @@ -26,7 +26,6 @@ def test_point(): assert p2.y == y2 assert (p3 + p4) == p4 assert (p2 - p1) == Point(y1 - x1, y2 - x2) - assert p4*5 ...
["test_point", "test_point3D"]
["test_Point2D", "test_issue_9214", "test_issue_11617", "test_transform", "test_concyclic_doctest_bug", "test_arguments", "test_unit", "test_dot", "test__normalize_dimension"]
null
true
2019-09-25T17:04:26Z
1
4
2
1,905
0
1
1
0.85
0.8
0.330833
88.9675
595
swe_bench_verified::test::57
swe_bench_verified
test
57
django__django-11734
django/django
django/django
python
999891bd80b3d02dd916731a7a239e1036174885
OuterRef in exclude() or ~Q() uses wrong model. Description The following test (added to tests/queries/test_qs_combinators) fails when trying to exclude results using OuterRef() def test_exists_exclude(self): # filter() qs = Number.objects.annotate( foo=Exists( Item.objects.filter(tags__category_id=OuterRef('pk...
Thanks for the report. ValueError was fixed in 35431298226165986ad07e91f9d3aca721ff38ec. Provided test fails on master with django.db.utils.ProgrammingError: missing FROM-clause entry for table "V0" LINE 1: ...(U1."tag_id" = U2."id") WHERE U2."category_id" = ("V0"."id")... It looks that OuterRef resolves to "V0"."id" i...
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 @@ -2332,10 +2332,6 @@ def get_db_prep_value(self, value, connection, prepared=False): value = connection.ops.validate_autopk_value(valu...
diff --git a/tests/queries/tests.py b/tests/queries/tests.py --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -6,7 +6,7 @@ from django.core.exceptions import EmptyResultSet, FieldError from django.db import DEFAULT_DB_ALIAS, connection -from django.db.models import Count, F, Q +from django.db.models imp...
["test_subquery_exclude_outerref (queries.tests.ExcludeTests)"]
["test_ticket8597 (queries.tests.ComparisonTests)", "#13227 -- If a queryset is already evaluated, it can still be used as a query arg", "test_no_fields_cloning (queries.tests.CloneTests)", "test_no_model_options_cloning (queries.tests.CloneTests)", "test_exists (queries.tests.ExistsSql)", "test_ticket_18414 (queries.t...
null
true
2019-09-01T18:46:50Z
3
10
1
830
0
1
1
0.7
1
0.171667
88.965
596
swe_gym::train::1089
swe_gym
train
1,089
pydantic__pydantic-5706
pydantic/pydantic
pydantic/pydantic
python
70e7e99ca1861ad71520cc8fcf1a2fb913abbc10
Unexpected behavior for `Sequence[int]` in Json Schema ### Initial Checks - [X] I confirm that I'm using Pydantic V2 installed directly from the `main` branch, or equivalent ### Description - [X] Using `Sequence[int]` for json is inconsistent. - [ ] `BaseModel.validate_json` should raise if `BaseModel.model_json_sch...
diff --git a/pydantic/_internal/_generate_schema.py b/pydantic/_internal/_generate_schema.py --- a/pydantic/_internal/_generate_schema.py +++ b/pydantic/_internal/_generate_schema.py @@ -829,20 +829,23 @@ def _sequence_schema(self, sequence_type: Any) -> core_schema.CoreSchema: """ item_type = get_fir...
diff --git a/tests/test_json_schema.py b/tests/test_json_schema.py --- a/tests/test_json_schema.py +++ b/tests/test_json_schema.py @@ -20,6 +20,7 @@ NewType, Optional, Pattern, + Sequence, Set, Tuple, Type, @@ -4003,3 +4004,38 @@ class Model(BaseModel): }, 'required': ...
["tests/test_json_schema.py::test_sequences_int_json_schema[sequence_type1]", "tests/test_json_schema.py::test_sequence_schema[sequence_type1]"]
["tests/test_json_schema.py::test_ipv6network_type", "tests/test_json_schema.py::test_override_generate_json_schema", "tests/test_json_schema.py::test_secret_types[SecretStr-string]", "tests/test_json_schema.py::test_model_with_schema_extra_callable_config_class", "tests/test_json_schema.py::test_str_basic_types[field_...
null
true
2023-05-06T20:16:06Z
1
25
2
1,659
0
0.85
1
0.85
1
0.359833
88.9545
597
swe_gym::train::464
swe_gym
train
464
python__mypy-16906
python/mypy
python/mypy
python
4a9c1e95457f253f87ef5db970ad8d59209c4715
Incomplete and incorrect stub generation of a dataclass. **Bug Report** Stubs for a dataclass are incomplete and depending on the use case also incorrect. Consider the following dataclass: ```python # module.py import dataclasses @dataclasses.dataclass class A: foo: str bar: str = "default" baz: str = data...
diff --git a/mypy/plugins/dataclasses.py b/mypy/plugins/dataclasses.py --- a/mypy/plugins/dataclasses.py +++ b/mypy/plugins/dataclasses.py @@ -24,6 +24,7 @@ Context, DataclassTransformSpec, Decorator, + EllipsisExpr, Expression, FuncDef, FuncItem, @@ -149,13 +150,13 @@ def to_argument( ...
diff --git a/test-data/unit/check-dataclasses.test b/test-data/unit/check-dataclasses.test --- a/test-data/unit/check-dataclasses.test +++ b/test-data/unit/check-dataclasses.test @@ -1610,10 +1610,16 @@ B: Any @dataclass class A(B): a: int +@dataclass +class C(B): + generated_args: int + generated_kwargs: ...
["mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testDataclass_semanal", "mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testDataclassWithKwOnlyField_semanal"]
["mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testAlwaysUsePEP604Union", "mypy/test/testcheck.py::TypeCheckSuite::check-dataclasses.test::testDataclassesCallableFrozen"]
null
true
2024-02-11T16:34:48Z
2
28
2
1,568
0
0.85
1
0.85
1
0.354667
88.939
598
swe_gym::train::2373
swe_gym
train
2,373
modin-project__modin-6370
modin-project/modin
modin-project/modin
python
58f850d20bbb3aba5fc592bff4003ebfdc81b68a
BUG: Reshuffling groupby doesn't work for `groupby.size()` method ### 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 ...
diff --git a/modin/core/storage_formats/pandas/query_compiler.py b/modin/core/storage_formats/pandas/query_compiler.py --- a/modin/core/storage_formats/pandas/query_compiler.py +++ b/modin/core/storage_formats/pandas/query_compiler.py @@ -3480,7 +3480,15 @@ def _groupby_shuffle( original_agg_func = agg_func ...
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 @@ -17,13 +17,15 @@ test_data_values, df_equals, ) -from modin.config impo...
["modin/test/storage_formats/pandas/test_internals.py::test_groupby_size_shuffling[modify_config0]"]
["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::test_reorder_labels_cache[two_unbalanced_partitions-size_grow-no_reordering]", "modin/test/storage_formats/pandas/test_internals...
null
true
2023-07-07T15:37:41Z
2
22
1
1,681
0
0.85
1
0.85
1
0.3535
88.9355
599
swe_gym::train::835
swe_gym
train
835
iterative__dvc-6954
iterative/dvc
iterative/dvc
python
28dd39a1a0d710585ff21bf66199208b1b83cbde
Negative numbers from a Python file are not recognized as parameters # Bug Report ## dvc repro: does not recognize negative numbers from a Python file as parameters ## Description When trying to do ```dvc run``` or ```dvc repro``` with a stage whose parameters include a negative number in a Python file there is this...
diff --git a/dvc/utils/serialize/_py.py b/dvc/utils/serialize/_py.py --- a/dvc/utils/serialize/_py.py +++ b/dvc/utils/serialize/_py.py @@ -134,22 +134,22 @@ def _ast_assign_to_dict(assign, only_self_params=False, lineno=False): value = {} for key, val in zip(assign.value.keys, assign.value.values): ...
diff --git a/tests/unit/utils/serialize/test_python.py b/tests/unit/utils/serialize/test_python.py new file mode 100644 --- /dev/null +++ b/tests/unit/utils/serialize/test_python.py @@ -0,0 +1,45 @@ +import pytest + +from dvc.utils.serialize import parse_py + + +@pytest.mark.parametrize( + "text,result", + [ + ...
["tests/unit/utils/serialize/test_python.py::test_parse_valid_types[UNARY_OP"]
["tests/unit/utils/serialize/test_python.py::test_parse_valid_types[DICT", "tests/unit/utils/serialize/test_python.py::test_parse_invalid_types[SUM", "tests/unit/utils/serialize/test_python.py::test_parse_valid_types[SET", "tests/unit/utils/serialize/test_python.py::test_parse_invalid_types[CONSTRUCTOR", "tests/unit/ut...
null
true
2021-11-10T14:10:57Z
1
26
1
1,557
0
0.85
1
0.85
1
0.346167
88.9135