Skip to content

Commit 51ad07d

Browse files
committed
Merge remote-tracking branch 'upstream/2.3.x' into remove-read_json-datetime-deprecation-warning
2 parents da98c45 + 6e5ccd8 commit 51ad07d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+411
-336
lines changed

.circleci/config.yml

+17-7
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
steps:
1515
- checkout
1616
- run: .circleci/setup_env.sh
17-
- run: >
18-
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
19-
LD_PRELOAD=$HOME/miniconda3/envs/pandas-dev/lib/libgomp.so.1:$LD_PRELOAD
17+
- run: |
2018
sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
19+
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH \
20+
LD_PRELOAD=$HOME/miniconda3/envs/pandas-dev/lib/libgomp.so.1:$LD_PRELOAD \
2121
ci/run_tests.sh
2222
linux-musl:
2323
docker:
@@ -35,7 +35,7 @@ jobs:
3535
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
3636
. ~/virtualenvs/pandas-dev/bin/activate
3737
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
38-
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
38+
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil "pytz<2024.2" pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
3939
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
4040
python -m pip list --no-cache-dir
4141
- run: |
@@ -72,8 +72,14 @@ jobs:
7272
name: Build aarch64 wheels
7373
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
7474
command: |
75-
pip3 install cibuildwheel==2.15.0
76-
cibuildwheel --prerelease-pythons --output-dir wheelhouse
75+
pip3 install cibuildwheel==2.20.0
76+
if [[ $CIBW_BUILD == cp313t* ]]; then
77+
# TODO: temporarily run 3.13 free threaded builds without build isolation
78+
# since we need pre-release cython
79+
CIBW_BUILD_FRONTEND="pip; args: --no-build-isolation" cibuildwheel --prerelease-pythons --output-dir wheelhouse
80+
else
81+
cibuildwheel --prerelease-pythons --output-dir wheelhouse
82+
fi
7783
7884
environment:
7985
CIBW_BUILD: << parameters.cibw-build >>
@@ -128,7 +134,11 @@ workflows:
128134
"cp310-manylinux_aarch64",
129135
"cp311-manylinux_aarch64",
130136
"cp312-manylinux_aarch64",
137+
"cp313-manylinux_aarch64",
138+
"cp313t-manylinux_aarch64",
131139
"cp39-musllinux_aarch64",
132140
"cp310-musllinux_aarch64",
133141
"cp311-musllinux_aarch64",
134-
"cp312-musllinux_aarch64",]
142+
"cp312-musllinux_aarch64",
143+
"cp313-musllinux_aarch64",
144+
"cp313t-musllinux_aarch64"]

.gitattributes

+4-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ci export-ignore
6868
doc export-ignore
6969
gitpod export-ignore
7070
MANIFEST.in export-ignore
71-
scripts export-ignore
71+
scripts/** export-ignore
7272
typings export-ignore
7373
web export-ignore
7474
CITATION.cff export-ignore
@@ -82,3 +82,6 @@ setup.py export-ignore
8282
# csv_dir_path fixture checks the existence of the directory
8383
# exclude the whole directory to avoid running related tests in sdist
8484
pandas/tests/io/parser/data export-ignore
85+
86+
# Include cibw script in sdist since it's needed for building wheels
87+
scripts/cibw_before_build.sh -export-ignore

.github/actions/setup-conda/action.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ runs:
99
- name: Install ${{ inputs.environment-file }}
1010
uses: mamba-org/setup-micromamba@v1
1111
with:
12+
# Pinning to avoid 2.0 failures
13+
micromamba-version: '1.5.10-0'
1214
environment-file: ${{ inputs.environment-file }}
1315
environment-name: test
1416
condarc-file: ci/.condarc

.github/workflows/code-checks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.2.x
7+
- 2.3.x
88
pull_request:
99
branches:
1010
- main
11-
- 2.2.x
11+
- 2.3.x
1212

1313
env:
1414
ENV_FILE: environment.yml

.github/workflows/docbuild-and-upload.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.2.x
7+
- 2.3.x
88
tags:
99
- '*'
1010
pull_request:
1111
branches:
1212
- main
13-
- 2.2.x
13+
- 2.3.x
1414

1515
env:
1616
ENV_FILE: environment.yml

.github/workflows/package-checks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.2.x
7+
- 2.3.x
88
pull_request:
99
branches:
1010
- main
11-
- 2.2.x
11+
- 2.3.x
1212
types: [ labeled, opened, synchronize, reopened ]
1313

1414
permissions:

.github/workflows/unit-tests.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.2.x
7+
- 2.3.x
88
pull_request:
99
branches:
1010
- main
11-
- 2.2.x
11+
- 2.3.x
1212
paths-ignore:
1313
- "doc/**"
1414
- "web/**"
@@ -257,7 +257,7 @@ jobs:
257257
. ~/virtualenvs/pandas-dev/bin/activate
258258
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.2.1 meson-python==0.13.1
259259
python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"
260-
python -m pip install --no-cache-dir versioneer[toml] cython python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
260+
python -m pip install --no-cache-dir versioneer[toml] cython python-dateutil "pytz<2024.2" pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
261261
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
262262
python -m pip list --no-cache-dir
263263
export PANDAS_CI=1
@@ -295,7 +295,7 @@ jobs:
295295
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
296296
. ~/virtualenvs/pandas-dev/bin/activate
297297
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
298-
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
298+
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil "pytz<2024.2" pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
299299
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
300300
python -m pip list --no-cache-dir
301301
@@ -329,7 +329,7 @@ jobs:
329329
# To freeze this file, uncomment out the ``if: false`` condition, and migrate the jobs
330330
# to the corresponding posix/windows-macos/sdist etc. workflows.
331331
# Feel free to modify this comment as necessary.
332-
if: false # Uncomment this to freeze the workflow, comment it to unfreeze
332+
# if: false # Uncomment this to freeze the workflow, comment it to unfreeze
333333
defaults:
334334
run:
335335
shell: bash -eou pipefail {0}
@@ -361,15 +361,15 @@ jobs:
361361
- name: Set up Python Dev Version
362362
uses: actions/setup-python@v5
363363
with:
364-
python-version: '3.12-dev'
364+
python-version: '3.13-dev'
365365

366366
- name: Build Environment
367367
run: |
368368
python --version
369369
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.2.1 meson-python==0.13.1
370370
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
371371
python -m pip install versioneer[toml]
372-
python -m pip install python-dateutil pytz tzdata cython hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-cov
372+
python -m pip install python-dateutil "pytz<2024.2" tzdata cython hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-cov
373373
python -m pip install -ve . --no-build-isolation --no-index --no-deps --config-settings=setup-args="--werror"
374374
python -m pip list
375375

.github/workflows/wheels.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,17 @@ jobs:
9999
- [macos-14, macosx_arm64]
100100
- [windows-2022, win_amd64]
101101
# TODO: support PyPy?
102-
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]]
102+
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"], ["cp313t", "3.13"]]
103+
include:
104+
# TODO: Remove this plus installing build deps in cibw_before_build.sh
105+
# after pandas can be built with a released NumPy/Cython
106+
- python: ["cp313t", "3.13"]
107+
cibw_build_frontend: 'pip; args: --no-build-isolation'
108+
# TODO: Build free-threaded wheels for Windows
109+
exclude:
110+
- buildplat: [windows-2022, win_amd64]
111+
python: ["cp313t", "3.13"]
112+
103113
env:
104114
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
105115
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
@@ -140,12 +150,13 @@ jobs:
140150
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
141151

142152
- name: Build wheels
143-
uses: pypa/cibuildwheel@v2.17.0
153+
uses: pypa/cibuildwheel@v2.20.0
144154
with:
145155
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
146156
env:
147157
CIBW_PRERELEASE_PYTHONS: True
148158
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
159+
CIBW_BUILD_FRONTEND: ${{ matrix.cibw_build_frontend || 'pip' }}
149160

150161
- name: Set up Python
151162
uses: mamba-org/setup-micromamba@v1
@@ -170,13 +181,13 @@ jobs:
170181
shell: pwsh
171182
run: |
172183
$TST_CMD = @"
173-
python -m pip install hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0;
184+
python -m pip install hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytz<2024.2;
174185
python -m pip install `$(Get-Item pandas\wheelhouse\*.whl);
175186
python -c `'import pandas as pd; pd.test(extra_args=[`\"--no-strict-data-files`\", `\"-m not clipboard and not single_cpu and not slow and not network and not db`\"])`';
176187
"@
177188
# add rc to the end of the image name if the Python version is unreleased
178-
docker pull python:${{ matrix.python[1] == '3.12' && '3.12-rc' || format('{0}-windowsservercore', matrix.python[1]) }}
179-
docker run --env PANDAS_CI='1' -v ${PWD}:C:\pandas python:${{ matrix.python[1] == '3.12' && '3.12-rc' || format('{0}-windowsservercore', matrix.python[1]) }} powershell -Command $TST_CMD
189+
docker pull python:${{ matrix.python[1] == '3.13' && '3.13-rc' || format('{0}-windowsservercore', matrix.python[1]) }}
190+
docker run --env PANDAS_CI='1' -v ${PWD}:C:\pandas python:${{ matrix.python[1] == '3.13' && '3.13-rc' || format('{0}-windowsservercore', matrix.python[1]) }} powershell -Command $TST_CMD
180191
181192
- uses: actions/upload-artifact@v4
182193
with:

MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ prune pandas/tests/io/parser/data
6262
# Selectively re-add *.cxx files that were excluded above
6363
graft pandas/_libs/src
6464
graft pandas/_libs/include
65+
66+
# Include cibw script in sdist since it's needed for building wheels
67+
include scripts/cibw_before_build.sh

ci/deps/actions-310.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ dependencies:
2020
# required dependencies
2121
- python-dateutil
2222
- numpy
23-
- pytz
23+
# pytz 2024.2 timezones cause wrong results
24+
- pytz<2024.2
2425

2526
# optional dependencies
2627
- beautifulsoup4>=4.11.2
27-
# https://github.com/conda-forge/pytables-feedstock/issues/97
28-
- c-blosc2=2.13.2
2928
- blosc>=1.21.3
3029
- bottleneck>=1.3.6
3130
- fastparquet>=2022.12.0

ci/deps/actions-311-downstream_compat.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@ dependencies:
2222
# required dependencies
2323
- python-dateutil
2424
- numpy
25-
- pytz
25+
# pytz 2024.2 timezones cause wrong results
26+
- pytz<2024.2
2627

2728
# optional dependencies
2829
- beautifulsoup4>=4.11.2
29-
# https://github.com/conda-forge/pytables-feedstock/issues/97
30-
- c-blosc2=2.13.2
3130
- blosc>=1.21.3
3231
- bottleneck>=1.3.6
3332
- fastparquet>=2022.12.0

ci/deps/actions-311-numpydev.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ dependencies:
2121

2222
# pandas dependencies
2323
- python-dateutil
24-
- pytz
24+
# pytz 2024.2 timezones cause wrong results
25+
- pytz<2024.2
2526
- pip
2627

2728
- pip:

ci/deps/actions-311-pyarrownightly.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ dependencies:
1919
# required dependencies
2020
- python-dateutil
2121
- numpy<2
22-
- pytz
22+
# pytz 2024.2 timezones cause wrong results
23+
- pytz<2024.2
2324
- pip
2425

2526
- pip:

ci/deps/actions-311.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ dependencies:
2020
# required dependencies
2121
- python-dateutil
2222
- numpy
23-
- pytz
23+
# pytz 2024.2 timezones cause wrong results
24+
- pytz<2024.2
2425

2526
# optional dependencies
2627
- beautifulsoup4>=4.11.2
27-
# https://github.com/conda-forge/pytables-feedstock/issues/97
28-
- c-blosc2=2.13.2
2928
- blosc>=1.21.3
3029
- bottleneck>=1.3.6
3130
- fastparquet>=2022.12.0

ci/deps/actions-312.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ dependencies:
2020
# required dependencies
2121
- python-dateutil
2222
- numpy
23-
- pytz
23+
# pytz 2024.2 timezones cause wrong results
24+
- pytz<2024.2
2425

2526
# optional dependencies
2627
- beautifulsoup4>=4.11.2
27-
# https://github.com/conda-forge/pytables-feedstock/issues/97
28-
- c-blosc2=2.13.2
2928
- blosc>=1.21.3
3029
- bottleneck>=1.3.6
3130
- fastparquet>=2022.12.0

ci/deps/actions-39-minimum_versions.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ dependencies:
2727

2828
# optional dependencies
2929
- beautifulsoup4=4.11.2
30-
# https://github.com/conda-forge/pytables-feedstock/issues/97
31-
- c-blosc2=2.13.2
3230
- blosc=1.21.3
3331
- bottleneck=1.3.6
3432
- fastparquet=2022.12.0

ci/deps/actions-39.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ dependencies:
2020
# required dependencies
2121
- python-dateutil
2222
- numpy
23-
- pytz
23+
# pytz 2024.2 timezones cause wrong results
24+
- pytz<2024.2
2425

2526
# optional dependencies
2627
- beautifulsoup4>=4.11.2
27-
# https://github.com/conda-forge/pytables-feedstock/issues/97
28-
- c-blosc2=2.13.2
2928
- blosc>=1.21.3
3029
- bottleneck>=1.3.6
3130
- fastparquet>=2022.12.0

ci/deps/actions-pypy-39.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies:
2222
# required
2323
- numpy
2424
- python-dateutil
25+
# pytz 2024.2 timezones cause wrong results
2526
- pytz
2627
- pip:
2728
- tzdata>=2022.7

ci/deps/circle-310-arm64.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ dependencies:
2121
# required dependencies
2222
- python-dateutil
2323
- numpy
24-
- pytz
24+
# pytz 2024.2 timezones cause wrong results
25+
- pytz < 2024.2
2526

2627
# optional dependencies
2728
- beautifulsoup4>=4.11.2
28-
# https://github.com/conda-forge/pytables-feedstock/issues/97
29-
- c-blosc2=2.13.2
3029
- blosc>=1.21.3
3130
- bottleneck>=1.3.6
3231
- fastparquet>=2022.12.0

doc/source/conf.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@
254254
"json_url": "https://pandas.pydata.org/versions.json",
255255
"version_match": switcher_version,
256256
},
257-
"show_version_warning_banner": True,
257+
# This shows a warning for patch releases since the
258+
# patch version doesn't compare as equal (e.g. 2.2.1 != 2.2.0 but it should be)
259+
"show_version_warning_banner": False,
258260
"icon_links": [
259261
{
260262
"name": "Mastodon",

doc/source/user_guide/basics.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,10 @@ Here is a sample (using 100 column x 100,000 row ``DataFrames``):
160160
.. csv-table::
161161
:header: "Operation", "0.11.0 (ms)", "Prior Version (ms)", "Ratio to Prior"
162162
:widths: 25, 25, 25, 25
163-
:delim: ;
164163

165-
``df1 > df2``; 13.32; 125.35; 0.1063
166-
``df1 * df2``; 21.71; 36.63; 0.5928
167-
``df1 + df2``; 22.04; 36.50; 0.6039
164+
``df1 > df2``, 13.32, 125.35, 0.1063
165+
``df1 * df2``, 21.71, 36.63, 0.5928
166+
``df1 + df2``, 22.04, 36.50, 0.6039
168167

169168
You are highly encouraged to install both libraries. See the section
170169
:ref:`Recommended Dependencies <install.recommended_dependencies>` for more installation info.

0 commit comments

Comments
 (0)