Skip to content

Commit c72c1d2

Browse files
authored
Merge branch 'main' into test-out-of-bounds-datetime-to-feather
2 parents 14dc724 + 4b04a2f commit c72c1d2

File tree

673 files changed

+14444
-7217
lines changed

Some content is hidden

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

673 files changed

+14444
-7217
lines changed

.circleci/config.yml

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,26 @@ jobs:
1515
- checkout
1616
- run:
1717
name: Install Environment and Run Tests
18-
shell: /bin/bash -exuo pipefail
18+
shell: /bin/bash -exo pipefail
19+
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
1920
command: |
20-
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Mambaforge-24.3.0-0-Linux-aarch64.sh"
21-
wget -q $MAMBA_URL -O minimamba.sh
22-
chmod +x minimamba.sh
23-
MAMBA_DIR="$HOME/miniconda3"
24-
rm -rf $MAMBA_DIR
25-
./minimamba.sh -b -p $MAMBA_DIR
26-
export PATH=$MAMBA_DIR/bin:$PATH
21+
MINI_URL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-24.3.0-0-Linux-aarch64.sh"
22+
wget -q $MINI_URL -O Miniforge3.sh
23+
chmod +x Miniforge3.sh
24+
MINI_DIR="$HOME/miniconda3"
25+
rm -rf $MINI_DIR
26+
./Miniforge3.sh -b -p $MINI_DIR
27+
export PATH=$MINI_DIR/bin:$PATH
2728
conda info -a
2829
conda env create -q -n pandas-dev -f $ENV_FILE
2930
conda list -n pandas-dev
3031
source activate pandas-dev
3132
if pip show pandas 1>/dev/null; then
3233
pip uninstall -y pandas
3334
fi
34-
python -m pip install --no-build-isolation -ve . --config-settings=setup-args="--werror"
35+
python -m pip install --no-build-isolation -ve . -Csetup-args="--werror"
3536
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
37+
sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
3638
ci/run_tests.sh
3739
test-linux-musl:
3840
docker:
@@ -54,8 +56,8 @@ jobs:
5456
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
5557
. ~/virtualenvs/pandas-dev/bin/activate
5658
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
57-
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
58-
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
59+
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
60+
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
5961
python -m pip list --no-cache-dir
6062
export PANDAS_CI=1
6163
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
@@ -89,29 +91,30 @@ jobs:
8991
name: Build aarch64 wheels
9092
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
9193
command: |
92-
pip3 install cibuildwheel==2.18.1
93-
cibuildwheel --prerelease-pythons --output-dir wheelhouse
94+
pip3 install cibuildwheel==2.20.0
95+
if [[ $CIBW_BUILD == cp313t* ]]; then
96+
# TODO: temporarily run 3.13 free threaded builds without build isolation
97+
# since we need pre-release cython
98+
CIBW_BUILD_FRONTEND="pip; args: --no-build-isolation" cibuildwheel --output-dir wheelhouse
99+
else
100+
cibuildwheel --output-dir wheelhouse
101+
fi
94102
95103
environment:
96104
CIBW_BUILD: << parameters.cibw-build >>
97105

98106
- run:
99107
name: Install Anaconda Client & Upload Wheels
108+
shell: /bin/bash -exo pipefail
100109
command: |
101-
echo "Install Mambaforge"
102-
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Mambaforge-24.3.0-0-Linux-aarch64.sh"
103-
echo "Downloading $MAMBA_URL"
104-
wget -q $MAMBA_URL -O minimamba.sh
105-
chmod +x minimamba.sh
106-
107-
MAMBA_DIR="$HOME/miniconda3"
108-
rm -rf $MAMBA_DIR
109-
./minimamba.sh -b -p $MAMBA_DIR
110-
111-
export PATH=$MAMBA_DIR/bin:$PATH
112-
113-
mamba install -y -c conda-forge anaconda-client
114-
110+
MINI_URL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-24.3.0-0-Linux-aarch64.sh"
111+
wget -q $MINI_URL -O Miniforge3.sh
112+
chmod +x Miniforge3.sh
113+
MINI_DIR="$HOME/miniconda3"
114+
rm -rf $MINI_DIR
115+
./Miniforge3.sh -b -p $MINI_DIR
116+
export PATH=$MINI_DIR/bin:$PATH
117+
conda install -y -c conda-forge anaconda-client
115118
source ci/upload_wheels.sh
116119
set_upload_vars
117120
upload_wheels
@@ -144,6 +147,10 @@ workflows:
144147
cibw-build: ["cp310-manylinux_aarch64",
145148
"cp311-manylinux_aarch64",
146149
"cp312-manylinux_aarch64",
150+
"cp313-manylinux_aarch64",
151+
"cp313t-manylinux_aarch64",
147152
"cp310-musllinux_aarch64",
148153
"cp311-musllinux_aarch64",
149-
"cp312-musllinux_aarch64",]
154+
"cp312-musllinux_aarch64",
155+
"cp313-musllinux_aarch64",
156+
"cp313t-musllinux_aarch64"]

.devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// Use 'settings' to set *default* container specific settings.json values on container create.
99
// You can edit these settings after create using File > Preferences > Settings > Remote.
1010
"settings": {
11-
"terminal.integrated.shell.linux": "/bin/bash",
1211
"python.pythonPath": "/usr/local/bin/python",
1312
"python.formatting.provider": "black",
1413
"python.linting.enabled": true,

.gitattributes

Lines changed: 5 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,7 @@ 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
88+
scripts/cibw_before_test.sh -export-ignore

.github/actions/build_pandas/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ runs:
2626
run: |
2727
if [[ ${{ inputs.editable }} == "true" ]]; then
2828
pip install -e . --no-build-isolation -v --no-deps \
29-
--config-settings=setup-args="--werror"
29+
-Csetup-args="--werror"
3030
else
3131
pip install . --no-build-isolation -v --no-deps \
32-
--config-settings=setup-args="--werror"
32+
-Csetup-args="--werror"
3333
fi
3434
shell: bash -el {0}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ runs:
1414
condarc-file: ci/.condarc
1515
cache-environment: true
1616
cache-downloads: true
17+
18+
- name: Uninstall pyarrow
19+
if: ${{ env.REMOVE_PYARROW == '1' }}
20+
run: |
21+
micromamba remove -y pyarrow
22+
shell: bash -el {0}

.github/workflows/code-checks.yml

Lines changed: 7 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
@@ -51,6 +51,11 @@ jobs:
5151
# TODO: The doctests have to be run first right now, since the Cython doctests only work
5252
# with pandas installed in non-editable mode
5353
# This can be removed once pytest-cython doesn't require C extensions to be installed inplace
54+
55+
- name: Extra installs
56+
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
57+
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
58+
5459
- name: Run doctests
5560
run: cd ci && ./code_checks.sh doctests
5661
if: ${{ steps.build.outcome == 'success' && always() }}

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

Lines changed: 6 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
@@ -46,6 +46,10 @@ jobs:
4646
- name: Build Pandas
4747
uses: ./.github/actions/build_pandas
4848

49+
- name: Extra installs
50+
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
51+
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
52+
4953
- name: Test website
5054
run: python -m pytest web/
5155

.github/workflows/package-checks.yml

Lines changed: 3 additions & 3 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:
@@ -67,7 +67,7 @@ jobs:
6767
fetch-depth: 0
6868

6969
- name: Set up Python
70-
uses: mamba-org/setup-micromamba@v1
70+
uses: mamba-org/setup-micromamba@v2
7171
with:
7272
environment-name: recipe-test
7373
create-args: >-

.github/workflows/unit-tests.yml

Lines changed: 26 additions & 19 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-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
@@ -57,6 +58,12 @@ jobs:
5758
# Also install zh_CN (its encoding is gb2312) but do not activate it.
5859
# It will be temporarily activated during tests with locale.setlocale
5960
extra_loc: "zh_CN"
61+
- name: "Future infer strings"
62+
env_file: actions-312.yaml
63+
pandas_future_infer_string: "1"
64+
- name: "Future infer strings (without pyarrow)"
65+
env_file: actions-311.yaml
66+
pandas_future_infer_string: "1"
6067
- name: "Pypy"
6168
env_file: actions-pypy-39.yaml
6269
pattern: "not slow and not network and not single_cpu"
@@ -75,15 +82,16 @@ jobs:
7582
LANG: ${{ matrix.lang || 'C.UTF-8' }}
7683
LC_ALL: ${{ matrix.lc_all || '' }}
7784
PANDAS_CI: '1'
85+
PANDAS_FUTURE_INFER_STRING: ${{ matrix.pandas_future_infer_string || '0' }}
7886
TEST_ARGS: ${{ matrix.test_args || '' }}
7987
PYTEST_WORKERS: 'auto'
8088
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
81-
NPY_PROMOTION_STATE: ${{ matrix.env_file == 'actions-311-numpydev.yaml' && 'weak' || 'legacy' }}
8289
# Clipboard tests
8390
QT_QPA_PLATFORM: offscreen
91+
REMOVE_PYARROW: ${{ matrix.name == 'Future infer strings (without pyarrow)' && '1' || '0' }}
8492
concurrency:
8593
# https://github.community/t/concurrecy-not-work-for-push/183068/7
86-
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.extra_apt || '' }}}
94+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.extra_apt || '' }}-${{ matrix.pandas_future_infer_string }}
8795
cancel-in-progress: true
8896

8997
services:
@@ -130,8 +138,8 @@ jobs:
130138
fetch-depth: 0
131139

132140
- name: Extra installs
133-
run: sudo apt-get update && sudo apt-get install -y ${{ matrix.extra_apt }}
134-
if: ${{ matrix.extra_apt }}
141+
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
142+
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0 ${{ matrix.extra_apt || ''}}
135143

136144
- name: Generate extra locales
137145
# These extra locales will be available for locale.setlocale() calls in tests
@@ -226,9 +234,9 @@ jobs:
226234
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
227235
. ~/virtualenvs/pandas-dev/bin/activate
228236
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.2.1 meson-python==0.13.1
229-
python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"
230-
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
231-
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
237+
python -m pip install numpy -Csetup-args="-Dallow-noblas=true"
238+
python -m pip install --no-cache-dir versioneer[toml] cython python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
239+
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
232240
python -m pip list --no-cache-dir
233241
export PANDAS_CI=1
234242
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
@@ -265,8 +273,8 @@ jobs:
265273
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
266274
. ~/virtualenvs/pandas-dev/bin/activate
267275
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
268-
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
269-
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
276+
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
277+
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
270278
python -m pip list --no-cache-dir
271279
272280
- name: Run Tests
@@ -286,7 +294,7 @@ jobs:
286294
# In general, this will remain frozen(present, but not running) until:
287295
# - The next unreleased Python version has released beta 1
288296
# - This version should be available on GitHub Actions.
289-
# - Our required build/runtime dependencies(numpy, pytz, Cython, python-dateutil)
297+
# - Our required build/runtime dependencies(numpy, Cython, python-dateutil)
290298
# support that unreleased Python version.
291299
# To unfreeze, comment out the ``if: false`` condition, and make sure you update
292300
# the name of the workflow and Python version in actions/setup-python ``python-version:``
@@ -339,8 +347,8 @@ jobs:
339347
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.2.1 meson-python==0.13.1
340348
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
341349
python -m pip install versioneer[toml]
342-
python -m pip install python-dateutil pytz tzdata cython hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-cov
343-
python -m pip install -ve . --no-build-isolation --no-index --no-deps --config-settings=setup-args="--werror"
350+
python -m pip install python-dateutil tzdata cython hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
351+
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
344352
python -m pip list
345353
346354
- name: Run Tests
@@ -371,7 +379,7 @@ jobs:
371379
fetch-depth: 0
372380

373381
- name: Set up Python Free-threading Version
374-
uses: deadsnakes/action@v3.1.0
382+
uses: deadsnakes/action@v3.2.0
375383
with:
376384
python-version: 3.13-dev
377385
nogil: true
@@ -382,15 +390,14 @@ jobs:
382390
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.2.1 meson-python==0.13.1
383391
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython
384392
python -m pip install versioneer[toml]
385-
python -m pip install python-dateutil pytz tzdata hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-cov
386-
python -m pip install -ve . --no-build-isolation --no-index --no-deps --config-settings=setup-args="--werror"
393+
python -m pip install python-dateutil pytz tzdata hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
394+
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
387395
python -m pip list
388396
389397
- name: Run Tests
390398
uses: ./.github/actions/run-tests
391-
env:
392-
PYTHON_GIL: 0
393399

400+
# NOTE: this job must be kept in sync with the Pyodide build job in wheels.yml
394401
emscripten:
395402
# Note: the Python version, Emscripten toolchain version are determined
396403
# by the Pyodide version. The appropriate versions can be found in the

0 commit comments

Comments
 (0)