Skip to content

Commit 65723ab

Browse files
lithomas1phoflpre-commit-ci[bot]
authored
Backport PR #56174: CI: Add 3.12 builds (#56333)
* Backport PR #56174: CI: Add 3.12 builds * Update test_arrow.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Patrick Hoefler <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 99ab008 commit 65723ab

File tree

5 files changed

+99
-7
lines changed

5 files changed

+99
-7
lines changed

.github/workflows/unit-tests.yml

+19-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
timeout-minutes: 180
2727
strategy:
2828
matrix:
29-
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml]
29+
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml, actions-312.yaml]
3030
# Prevent the include jobs from overriding other jobs
3131
pattern: [""]
3232
include:
@@ -69,6 +69,22 @@ jobs:
6969
env_file: actions-311.yaml
7070
pattern: "not slow and not network and not single_cpu"
7171
pandas_copy_on_write: "1"
72+
- name: "Copy-on-Write 3.12"
73+
env_file: actions-312.yaml
74+
pattern: "not slow and not network and not single_cpu"
75+
pandas_copy_on_write: "1"
76+
- name: "Copy-on-Write 3.11 (warnings)"
77+
env_file: actions-311.yaml
78+
pattern: "not slow and not network and not single_cpu"
79+
pandas_copy_on_write: "warn"
80+
- name: "Copy-on-Write 3.10 (warnings)"
81+
env_file: actions-310.yaml
82+
pattern: "not slow and not network and not single_cpu"
83+
pandas_copy_on_write: "warn"
84+
- name: "Copy-on-Write 3.9 (warnings)"
85+
env_file: actions-39.yaml
86+
pattern: "not slow and not network and not single_cpu"
87+
pandas_copy_on_write: "warn"
7288
- name: "Pypy"
7389
env_file: actions-pypy-39.yaml
7490
pattern: "not slow and not network and not single_cpu"
@@ -177,7 +193,7 @@ jobs:
177193
strategy:
178194
matrix:
179195
os: [macos-latest, windows-latest]
180-
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml]
196+
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml, actions-312.yaml]
181197
fail-fast: false
182198
runs-on: ${{ matrix.os }}
183199
name: ${{ format('{0} {1}', matrix.os, matrix.env_file) }}
@@ -308,7 +324,7 @@ jobs:
308324
# To freeze this file, uncomment out the ``if: false`` condition, and migrate the jobs
309325
# to the corresponding posix/windows-macos/sdist etc. workflows.
310326
# Feel free to modify this comment as necessary.
311-
#if: false # Uncomment this to freeze the workflow, comment it to unfreeze
327+
if: false # Uncomment this to freeze the workflow, comment it to unfreeze
312328
defaults:
313329
run:
314330
shell: bash -eou pipefail {0}

ci/deps/actions-312.yaml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: pandas-dev-312
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.12
6+
7+
# build dependencies
8+
- versioneer[toml]
9+
- cython>=0.29.33
10+
- meson[ninja]=1.2.1
11+
- meson-python=0.13.1
12+
13+
# test dependencies
14+
- pytest>=7.3.2
15+
- pytest-cov
16+
- pytest-xdist>=2.2.0
17+
- pytest-localserver>=0.7.1
18+
- pytest-qt>=4.2.0
19+
- boto3
20+
21+
# required dependencies
22+
- python-dateutil
23+
- numpy<2
24+
- pytz
25+
26+
# optional dependencies
27+
- beautifulsoup4>=4.11.1
28+
- blosc>=1.21.3
29+
- bottleneck>=1.3.4
30+
- fastparquet>=0.8.1
31+
- fsspec>=2022.05.0
32+
- html5lib>=1.1
33+
- hypothesis>=6.46.1
34+
- gcsfs>=2022.05.0
35+
- jinja2>=3.1.2
36+
- lxml>=4.8.0
37+
- matplotlib>=3.6.1
38+
# - numba>=0.56.4
39+
- numexpr>=2.8.0
40+
- odfpy>=1.4.1
41+
- qtpy>=2.2.0
42+
- pyqt>=5.15.9
43+
- openpyxl>=3.0.10
44+
- psycopg2>=2.9.3
45+
- pyarrow>=7.0.0
46+
- pymysql>=1.0.2
47+
- pyreadstat>=1.1.5
48+
# - pytables>=3.8.0
49+
# - python-calamine>=0.1.6
50+
- pyxlsb>=1.0.9
51+
- s3fs>=2022.05.0
52+
- scipy>=1.8.1
53+
- sqlalchemy>=1.4.36
54+
- tabulate>=0.8.10
55+
- xarray>=2022.03.0
56+
- xlrd>=2.0.1
57+
- xlsxwriter>=3.0.3
58+
- zstandard>=0.17.0
59+
60+
- pip:
61+
- adbc-driver-postgresql>=0.8.0
62+
- adbc-driver-sqlite>=0.8.0
63+
- tzdata>=2022.7

pandas/tests/computation/test_eval.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,9 @@ def test_series_pos(self, lhs, engine, parser):
542542

543543
def test_scalar_unary(self, engine, parser):
544544
msg = "bad operand type for unary ~: 'float'"
545+
warn = None
546+
if PY312 and not (engine == "numexpr" and parser == "pandas"):
547+
warn = DeprecationWarning
545548
with pytest.raises(TypeError, match=msg):
546549
pd.eval("~1.0", engine=engine, parser=parser)
547550

@@ -550,8 +553,14 @@ def test_scalar_unary(self, engine, parser):
550553
assert pd.eval("~1", parser=parser, engine=engine) == ~1
551554
assert pd.eval("-1", parser=parser, engine=engine) == -1
552555
assert pd.eval("+1", parser=parser, engine=engine) == +1
553-
assert pd.eval("~True", parser=parser, engine=engine) == ~True
554-
assert pd.eval("~False", parser=parser, engine=engine) == ~False
556+
with tm.assert_produces_warning(
557+
warn, match="Bitwise inversion", check_stacklevel=False
558+
):
559+
assert pd.eval("~True", parser=parser, engine=engine) == ~True
560+
with tm.assert_produces_warning(
561+
warn, match="Bitwise inversion", check_stacklevel=False
562+
):
563+
assert pd.eval("~False", parser=parser, engine=engine) == ~False
555564
assert pd.eval("-True", parser=parser, engine=engine) == -True
556565
assert pd.eval("-False", parser=parser, engine=engine) == -False
557566
assert pd.eval("+True", parser=parser, engine=engine) == +True

pandas/tests/io/excel/test_readers.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,9 @@ def test_deprecate_bytes_input(self, engine, read_ext):
14461446
"byte string, wrap it in a `BytesIO` object."
14471447
)
14481448

1449-
with tm.assert_produces_warning(FutureWarning, match=msg):
1449+
with tm.assert_produces_warning(
1450+
FutureWarning, match=msg, raise_on_extra_warnings=False
1451+
):
14501452
with open("test1" + read_ext, "rb") as f:
14511453
pd.read_excel(f.read(), engine=engine)
14521454

pandas/tests/io/excel/test_writers.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ def test_read_excel_parse_dates(self, ext):
271271

272272
date_parser = lambda x: datetime.strptime(x, "%m/%d/%Y")
273273
with tm.assert_produces_warning(
274-
FutureWarning, match="use 'date_format' instead"
274+
FutureWarning,
275+
match="use 'date_format' instead",
276+
raise_on_extra_warnings=False,
275277
):
276278
res = pd.read_excel(
277279
pth,

0 commit comments

Comments
 (0)