Skip to content

Commit f965ba2

Browse files
committed
Merge branch '2.3.x' of https://github.com/pandas-dev/pandas into groupby_apply_future_warning
2 parents 67049ea + a24a653 commit f965ba2

File tree

349 files changed

+4930
-2707
lines changed

Some content is hidden

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

349 files changed

+4930
-2707
lines changed

.circleci/config.yml

Lines changed: 17 additions & 7 deletions
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

Lines changed: 4 additions & 1 deletion
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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@ 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
1517
cache-environment: true
1618
cache-downloads: true
19+
20+
- name: Uninstall pyarrow
21+
if: ${{ env.REMOVE_PYARROW == '1' }}
22+
run: |
23+
micromamba remove -y pyarrow
24+
shell: bash -el {0}

.github/workflows/code-checks.yml

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 20 additions & 9 deletions
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/**"
@@ -29,6 +29,7 @@ jobs:
2929
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: [""]
32+
pandas_future_infer_string: ["0"]
3233
include:
3334
- name: "Downstream Compat"
3435
env_file: actions-311-downstream_compat.yaml
@@ -85,6 +86,14 @@ jobs:
8586
env_file: actions-39.yaml
8687
pattern: "not slow and not network and not single_cpu"
8788
pandas_copy_on_write: "warn"
89+
- name: "Future infer strings"
90+
env_file: actions-312.yaml
91+
pandas_future_infer_string: "1"
92+
pandas_copy_on_write: "1"
93+
- name: "Future infer strings (without pyarrow)"
94+
env_file: actions-311.yaml
95+
pandas_future_infer_string: "1"
96+
pandas_copy_on_write: "1"
8897
- name: "Pypy"
8998
env_file: actions-pypy-39.yaml
9099
pattern: "not slow and not network and not single_cpu"
@@ -103,16 +112,18 @@ jobs:
103112
LANG: ${{ matrix.lang || 'C.UTF-8' }}
104113
LC_ALL: ${{ matrix.lc_all || '' }}
105114
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
106-
PANDAS_CI: ${{ matrix.pandas_ci || '1' }}
115+
PANDAS_CI: '1'
116+
PANDAS_FUTURE_INFER_STRING: ${{ matrix.pandas_future_infer_string || '0' }}
107117
TEST_ARGS: ${{ matrix.test_args || '' }}
108118
PYTEST_WORKERS: ${{ matrix.pytest_workers || 'auto' }}
109119
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
110120
NPY_PROMOTION_STATE: ${{ matrix.env_file == 'actions-311-numpydev.yaml' && 'weak' || 'legacy' }}
111121
# Clipboard tests
112122
QT_QPA_PLATFORM: offscreen
123+
REMOVE_PYARROW: ${{ matrix.name == 'Future infer strings (without pyarrow)' && '1' || '0' }}
113124
concurrency:
114125
# https://github.community/t/concurrecy-not-work-for-push/183068/7
115-
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.extra_apt || '' }}-${{ matrix.pandas_copy_on_write || '' }}
126+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.extra_apt || '' }}-${{ matrix.pandas_copy_on_write || '' }}-${{ matrix.pandas_future_infer_string }}
116127
cancel-in-progress: true
117128

118129
services:
@@ -257,7 +268,7 @@ jobs:
257268
. ~/virtualenvs/pandas-dev/bin/activate
258269
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.2.1 meson-python==0.13.1
259270
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
271+
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
261272
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
262273
python -m pip list --no-cache-dir
263274
export PANDAS_CI=1
@@ -295,7 +306,7 @@ jobs:
295306
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
296307
. ~/virtualenvs/pandas-dev/bin/activate
297308
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
309+
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
299310
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
300311
python -m pip list --no-cache-dir
301312
@@ -329,7 +340,7 @@ jobs:
329340
# To freeze this file, uncomment out the ``if: false`` condition, and migrate the jobs
330341
# to the corresponding posix/windows-macos/sdist etc. workflows.
331342
# Feel free to modify this comment as necessary.
332-
if: false # Uncomment this to freeze the workflow, comment it to unfreeze
343+
# if: false # Uncomment this to freeze the workflow, comment it to unfreeze
333344
defaults:
334345
run:
335346
shell: bash -eou pipefail {0}
@@ -361,15 +372,15 @@ jobs:
361372
- name: Set up Python Dev Version
362373
uses: actions/setup-python@v5
363374
with:
364-
python-version: '3.12-dev'
375+
python-version: '3.13-dev'
365376

366377
- name: Build Environment
367378
run: |
368379
python --version
369380
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.2.1 meson-python==0.13.1
370381
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
371382
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
383+
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
373384
python -m pip install -ve . --no-build-isolation --no-index --no-deps --config-settings=setup-args="--werror"
374385
python -m pip list
375386

.github/workflows/wheels.yml

Lines changed: 16 additions & 5 deletions
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.21.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:

.pre-commit-config.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,6 @@ repos:
274274
language: python
275275
types: [rst]
276276
files: ^doc/source/(development|reference)/
277-
- id: unwanted-patterns-bare-pytest-raises
278-
name: Check for use of bare pytest raises
279-
language: python
280-
entry: python scripts/validate_unwanted_patterns.py --validation-type="bare_pytest_raises"
281-
types: [python]
282-
files: ^pandas/tests/
283-
exclude: ^pandas/tests/extension/
284277
- id: unwanted-patterns-private-function-across-module
285278
name: Check for use of private functions across modules
286279
language: python

MANIFEST.in

Lines changed: 3 additions & 0 deletions
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

0 commit comments

Comments
 (0)