Skip to content

CI: Xfails on Python 3.10 #41595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
94bf7f9
Update python-dev.yml
lithomas1 May 20, 2021
b7966cb
Update python-dev.yml
lithomas1 May 21, 2021
c1500c9
Revert changes
lithomas1 May 21, 2021
9bbebf7
Update test_algos.py
lithomas1 May 22, 2021
e09628c
Update test_dtype.py
lithomas1 May 22, 2021
321a5d0
Typo
lithomas1 May 22, 2021
c599e0c
update tests
lithomas1 May 22, 2021
0faac56
Xfail more
lithomas1 May 22, 2021
07517c5
Update test_to_records.py
lithomas1 May 22, 2021
209a956
Typo
lithomas1 May 23, 2021
7d6dd36
Update test_sparse.py
lithomas1 May 25, 2021
55844b0
Formatting
lithomas1 May 25, 2021
cc2eaf8
Properly xfail sparse tests
lithomas1 May 25, 2021
915862a
Xfail less
lithomas1 May 26, 2021
773fa84
Maybe fix?
lithomas1 May 26, 2021
39d3949
Handle Flaky Tests
lithomas1 May 27, 2021
2ed2c56
Merge branch 'master' into patch-1
lithomas1 May 31, 2021
795320b
fix a little more
lithomas1 Jun 1, 2021
e458355
fix more
lithomas1 Jun 2, 2021
6505898
maybe fix?
lithomas1 Jun 3, 2021
b365d76
Maybe fix?
lithomas1 Jun 4, 2021
6fc1de2
Update test_sparse.py
lithomas1 Jun 4, 2021
dc5c1e0
Update test_base.py
lithomas1 Jun 6, 2021
46a9d91
Merge branch 'master' of https://github.com/pandas-dev/pandas into pa…
lithomas1 Jun 6, 2021
b640084
Xfail all
lithomas1 Jun 6, 2021
c9267a5
Fix typo
lithomas1 Jun 6, 2021
81f7852
Typo
lithomas1 Jun 6, 2021
628fdd9
Add issue reference
lithomas1 Jun 11, 2021
3a7314b
Update test_get_dummies.py
lithomas1 Jun 11, 2021
437d956
Merge branch 'master' of https://github.com/pandas-dev/pandas into pa…
lithomas1 Jun 16, 2021
e76902f
try using run_tests
lithomas1 Jun 16, 2021
5e43a2a
Merge branch 'patch-1' of github-other.com:lithomas1/pandas into patch-1
lithomas1 Jun 16, 2021
6b7ab01
Update python-dev.yml
lithomas1 Jun 16, 2021
9179654
Update python-dev.yml
lithomas1 Jun 16, 2021
6fa6488
Merge branch 'master' of https://github.com/pandas-dev/pandas into pa…
lithomas1 Jun 18, 2021
e5271fe
debug
lithomas1 Jun 18, 2021
e002ce4
Merge branch 'patch-1' of github-other.com:lithomas1/pandas into patch-1
lithomas1 Jun 18, 2021
2d050b6
Update python-dev.yml
lithomas1 Jun 20, 2021
c765f4a
Update python-dev.yml
lithomas1 Jun 20, 2021
955494e
Un-xfail some tests
lithomas1 Jun 24, 2021
af9fff8
Merge branch 'master' of https://github.com/pandas-dev/pandas into pa…
lithomas1 Jun 24, 2021
c215f28
Merge branch 'patch-1' of github-other.com:lithomas1/pandas into patch-1
lithomas1 Jun 24, 2021
50536fe
More debugging
lithomas1 Jun 24, 2021
10259f0
debug more
lithomas1 Jun 25, 2021
3e13b16
Un xfail some tests
lithomas1 Jun 26, 2021
f84a976
Remove accidental changes
lithomas1 Jun 26, 2021
a87edcd
Update python-dev.yml
lithomas1 Jun 27, 2021
03eb6e7
Fix coverage
lithomas1 Jun 27, 2021
d28e328
Actually fix coverage
lithomas1 Jun 27, 2021
64ed1f0
Disable coverage for now
lithomas1 Jun 27, 2021
1094138
Update python-dev.yml
lithomas1 Jun 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/python-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
- name: Test with pytest
run: |
coverage run -m pytest -m 'not slow and not network and not clipboard' pandas
continue-on-error: true

- name: Publish test results
uses: actions/upload-artifact@master
Expand Down
9 changes: 8 additions & 1 deletion pandas/tests/arrays/sparse/test_dtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import numpy as np
import pytest

from pandas.compat import PY310

import pandas as pd
from pandas.core.arrays.sparse import SparseDtype

Expand Down Expand Up @@ -128,7 +130,12 @@ def test_construct_from_string(string, expected):
[
(SparseDtype(float, 0.0), SparseDtype(np.dtype("float"), 0.0), True),
(SparseDtype(int, 0), SparseDtype(int, 0), True),
(SparseDtype(float, float("nan")), SparseDtype(float, np.nan), True),
pytest.param(
SparseDtype(float, float("nan")),
SparseDtype(float, np.nan),
True,
marks=pytest.mark.xfail(PY310, reason="Failing on Python 3.10"),
),
(SparseDtype(float, 0), SparseDtype(float, np.nan), False),
(SparseDtype(int, 0.0), SparseDtype(float, 0.0), False),
],
Expand Down
3 changes: 3 additions & 0 deletions pandas/tests/frame/methods/test_reindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import numpy as np
import pytest

from pandas.compat import PY310

import pandas as pd
from pandas import (
Categorical,
Expand Down Expand Up @@ -458,6 +460,7 @@ def test_reindex(self, float_frame):
tm.assert_frame_equal(result, float_frame)
assert result is not float_frame

@pytest.mark.xfail(PY310, reason="Failing on Python 3.10")
def test_reindex_nan(self):
df = DataFrame(
[[1, 2], [3, 5], [7, 11], [9, 23]],
Expand Down
28 changes: 18 additions & 10 deletions pandas/tests/frame/methods/test_to_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import numpy as np
import pytest

from pandas.compat import PY310

from pandas import (
CategoricalDtype,
DataFrame,
Expand Down Expand Up @@ -172,19 +174,25 @@ def test_to_records_with_categorical(self):
),
# Pass in a type instance.
(
{"column_dtypes": str},
np.rec.array(
[("0", "1", "0.2", "a"), ("1", "2", "1.5", "bc")],
dtype=[("index", "<i8"), ("A", "<U"), ("B", "<U"), ("C", "<U")],
),
pytest.param(
{"column_dtypes": str},
np.rec.array(
[("0", "1", "0.2", "a"), ("1", "2", "1.5", "bc")],
dtype=[("index", "<i8"), ("A", "<U"), ("B", "<U"), ("C", "<U")],
),
marks=pytest.mark.xfail(PY310, reason="Failing on Python 3.10"),
)
),
# Pass in a dtype instance.
(
{"column_dtypes": np.dtype("unicode")},
np.rec.array(
[("0", "1", "0.2", "a"), ("1", "2", "1.5", "bc")],
dtype=[("index", "<i8"), ("A", "<U"), ("B", "<U"), ("C", "<U")],
),
pytest.param(
{"column_dtypes": np.dtype("unicode")},
np.rec.array(
[("0", "1", "0.2", "a"), ("1", "2", "1.5", "bc")],
dtype=[("index", "<i8"), ("A", "<U"), ("B", "<U"), ("C", "<U")],
),
marks=pytest.mark.xfail(PY310, reason="Failing on Python 3.10"),
)
),
# Pass in a dictionary (name-only).
(
Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/indexes/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from pandas.compat import (
IS64,
PY310,
np_datetime64_compat,
)
from pandas.util._test_decorators import async_mark
Expand Down Expand Up @@ -992,6 +993,7 @@ def test_isin(self, values, index, expected):
result = index.isin(values)
tm.assert_numpy_array_equal(result, expected)

@pytest.mark.xfail(PY310, reason="Failing on Python 3.10")
def test_isin_nan_common_object(self, nulls_fixture, nulls_fixture2):
# Test cartesian product of null fixtures and ensure that we don't
# mangle the various types (save a corner case with PyPy)
Expand Down
15 changes: 14 additions & 1 deletion pandas/tests/io/json/test_ujson.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import pandas._libs.json as ujson
from pandas.compat import (
IS64,
PY310,
is_platform_windows,
)

Expand Down Expand Up @@ -248,7 +249,19 @@ def test_double_precision(self):
assert rounded_input == json.loads(output)
assert rounded_input == ujson.decode(output)

@pytest.mark.parametrize("invalid_val", [20, -1, "9", None])
@pytest.mark.parametrize(
"invalid_val",
[
20,
-1,
pytest.param(
"9", marks=pytest.mark.xfail(PY310, reason="Failing on Python 3.10")
),
pytest.param(
None, marks=pytest.mark.xfail(PY310, reason="Failing on Python 3.10")
),
],
)
def test_invalid_double_precision(self, invalid_val):
double_input = 30.12345678901234567890
expected_exception = ValueError if isinstance(invalid_val, int) else TypeError
Expand Down
3 changes: 3 additions & 0 deletions pandas/tests/reshape/test_get_dummies.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import numpy as np
import pytest

from pandas.compat import PY310

from pandas.core.dtypes.common import is_integer_dtype

import pandas as pd
Expand Down Expand Up @@ -427,6 +429,7 @@ def test_dataframe_dummies_unicode(self, get_dummies_kwargs, expected):
result = get_dummies(**get_dummies_kwargs)
tm.assert_frame_equal(result, expected)

@pytest.mark.xfail(PY310, reason="Failing on Python 3.10")
def test_get_dummies_basic_drop_first(self, sparse):
# GH12402 Add a new parameter `drop_first` to avoid collinearity
# Basic case
Expand Down
3 changes: 3 additions & 0 deletions pandas/tests/series/methods/test_reindex.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import numpy as np
import pytest

from pandas.compat import PY310

from pandas import (
Categorical,
Index,
Expand Down Expand Up @@ -54,6 +56,7 @@ def test_reindex(datetime_series, string_series):
assert not (result is datetime_series)


@pytest.mark.xfail(PY310, reason="Failing on Python 3.10")
def test_reindex_nan():
ts = Series([2, 3, 5, 7], index=[1, 4, np.nan, 8])

Expand Down
8 changes: 7 additions & 1 deletion pandas/tests/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
algos as libalgos,
hashtable as ht,
)
from pandas.compat import np_array_datetime64_compat
from pandas.compat import (
PY310,
np_array_datetime64_compat,
)
import pandas.util._test_decorators as td

from pandas.core.dtypes.common import (
Expand Down Expand Up @@ -783,6 +786,7 @@ def test_different_nans(self):
expected = np.array([np.nan])
tm.assert_numpy_array_equal(result, expected)

@pytest.mark.xfail(PY310, reason="Failing on Python 3.10")
def test_first_nan_kept(self):
# GH 22295
# create different nans from bit-patterns:
Expand Down Expand Up @@ -988,6 +992,7 @@ def __hash__(self):
# different objects -> False
tm.assert_numpy_array_equal(algos.isin([a], [b]), np.array([False]))

@pytest.mark.xfail(PY310, reason="Failing on Python 3.10")
def test_different_nans(self):
# GH 22160
# all nans are handled as equivalent
Expand Down Expand Up @@ -1030,6 +1035,7 @@ def test_empty(self, empty):
result = algos.isin(vals, empty)
tm.assert_numpy_array_equal(expected, result)

@pytest.mark.xfail(PY310, reason="Failing on Python 3.10")
def test_different_nan_objects(self):
# GH 22119
comps = np.array(["nan", np.nan * 1j, float("nan")], dtype=object)
Expand Down