Skip to content

Commit 273363e

Browse files
committed
Merge branch 'main' into setup-freethreading-ci
2 parents 5ccc32b + 39a3bf3 commit 273363e

File tree

230 files changed

+1313
-1177
lines changed

Some content is hidden

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

230 files changed

+1313
-1177
lines changed

.circleci/config.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,9 @@ workflows:
141141
only: /^v.*/
142142
matrix:
143143
parameters:
144-
cibw-build: ["cp39-manylinux_aarch64",
145-
"cp310-manylinux_aarch64",
144+
cibw-build: ["cp310-manylinux_aarch64",
146145
"cp311-manylinux_aarch64",
147146
"cp312-manylinux_aarch64",
148-
"cp39-musllinux_aarch64",
149147
"cp310-musllinux_aarch64",
150148
"cp311-musllinux_aarch64",
151149
"cp312-musllinux_aarch64",]

.github/actions/build_pandas/action.yml

+2-9
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ inputs:
44
editable:
55
description: Whether to build pandas in editable mode (default true)
66
default: true
7-
meson_args:
8-
description: Extra flags to pass to meson
9-
required: false
10-
cflags_adds:
11-
description: Items to append to the CFLAGS variable
12-
required: false
137
runs:
148
using: composite
159
steps:
@@ -30,12 +24,11 @@ runs:
3024

3125
- name: Build Pandas
3226
run: |
33-
export CFLAGS="$CFLAGS ${{ inputs.cflags_adds }}"
3427
if [[ ${{ inputs.editable }} == "true" ]]; then
35-
pip install -e . --no-build-isolation -v --no-deps ${{ inputs.meson_args }} \
28+
pip install -e . --no-build-isolation -v --no-deps \
3629
--config-settings=setup-args="--werror"
3730
else
38-
pip install . --no-build-isolation -v --no-deps ${{ inputs.meson_args }} \
31+
pip install . --no-build-isolation -v --no-deps \
3932
--config-settings=setup-args="--werror"
4033
fi
4134
shell: bash -el {0}

.github/actions/run-tests/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ runs:
77
shell: bash -el {0}
88

99
- name: Publish test results
10-
uses: actions/upload-artifact@v3
10+
uses: actions/upload-artifact@v4
1111
with:
1212
name: Test results
1313
path: test-data.xml
1414
if: failure()
1515

1616
- name: Upload coverage to Codecov
17-
uses: codecov/codecov-action@v3
17+
uses: codecov/codecov-action@v4
1818
with:
1919
flags: unittests
2020
name: codecov-pandas

.github/workflows/package-checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
runs-on: ubuntu-22.04
5454
strategy:
5555
matrix:
56-
python-version: ['3.9', '3.10', '3.11']
56+
python-version: ['3.10', '3.11']
5757
fail-fast: false
5858
name: Test Conda Forge Recipe - Python ${{ matrix.python-version }}
5959
concurrency:

.github/workflows/unit-tests.yml

+13-14
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
timeout-minutes: 90
2727
strategy:
2828
matrix:
29-
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml, actions-312.yaml]
29+
env_file: [actions-310.yaml, actions-311.yaml, actions-312.yaml]
3030
# Prevent the include jobs from overriding other jobs
3131
pattern: [""]
3232
include:
@@ -35,7 +35,7 @@ jobs:
3535
pattern: "not slow and not network and not single_cpu"
3636
pytest_target: "pandas/tests/test_downstream.py"
3737
- name: "Minimum Versions"
38-
env_file: actions-39-minimum_versions.yaml
38+
env_file: actions-310-minimum_versions.yaml
3939
pattern: "not slow and not network and not single_cpu"
4040
- name: "Locale: it_IT"
4141
env_file: actions-311.yaml
@@ -74,9 +74,9 @@ jobs:
7474
PATTERN: ${{ matrix.pattern }}
7575
LANG: ${{ matrix.lang || 'C.UTF-8' }}
7676
LC_ALL: ${{ matrix.lc_all || '' }}
77-
PANDAS_CI: ${{ matrix.pandas_ci || '1' }}
77+
PANDAS_CI: '1'
7878
TEST_ARGS: ${{ matrix.test_args || '' }}
79-
PYTEST_WORKERS: ${{ matrix.pytest_workers || 'auto' }}
79+
PYTEST_WORKERS: 'auto'
8080
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
8181
NPY_PROMOTION_STATE: ${{ matrix.env_file == 'actions-311-numpydev.yaml' && 'weak' || 'legacy' }}
8282
# Clipboard tests
@@ -88,7 +88,7 @@ jobs:
8888

8989
services:
9090
mysql:
91-
image: mysql:8.0.33
91+
image: mysql:8
9292
env:
9393
MYSQL_ALLOW_EMPTY_PASSWORD: yes
9494
MYSQL_DATABASE: pandas
@@ -101,7 +101,7 @@ jobs:
101101
- 3306:3306
102102

103103
postgres:
104-
image: postgres:13
104+
image: postgres:16
105105
env:
106106
PGUSER: postgres
107107
POSTGRES_USER: postgres
@@ -116,7 +116,7 @@ jobs:
116116
- 5432:5432
117117

118118
moto:
119-
image: motoserver/moto:4.1.13
119+
image: motoserver/moto:5.0.0
120120
env:
121121
AWS_ACCESS_KEY_ID: foobar_key
122122
AWS_SECRET_ACCESS_KEY: foobar_secret
@@ -146,9 +146,8 @@ jobs:
146146
- name: Build Pandas
147147
id: build
148148
uses: ./.github/actions/build_pandas
149-
with:
150-
meson_args: ${{ matrix.meson_args }}
151-
cflags_adds: ${{ matrix.cflags_adds }}
149+
# TODO: Re-enable once Pypy has Pypy 3.10 on conda-forge
150+
if: ${{ matrix.name != 'Pypy' }}
152151

153152
- name: Test (not single_cpu)
154153
uses: ./.github/actions/run-tests
@@ -170,7 +169,7 @@ jobs:
170169
matrix:
171170
# Note: Don't use macOS latest since macos 14 appears to be arm64 only
172171
os: [macos-13, macos-14, windows-latest]
173-
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml, actions-312.yaml]
172+
env_file: [actions-310.yaml, actions-311.yaml, actions-312.yaml]
174173
fail-fast: false
175174
runs-on: ${{ matrix.os }}
176175
name: ${{ format('{0} {1}', matrix.os, matrix.env_file) }}
@@ -300,7 +299,7 @@ jobs:
300299
# To freeze this file, uncomment out the ``if: false`` condition, and migrate the jobs
301300
# to the corresponding posix/windows-macos/sdist etc. workflows.
302301
# Feel free to modify this comment as necessary.
303-
if: false # Uncomment this to freeze the workflow, comment it to unfreeze
302+
# if: false # Uncomment this to freeze the workflow, comment it to unfreeze
304303
defaults:
305304
run:
306305
shell: bash -eou pipefail {0}
@@ -315,7 +314,7 @@ jobs:
315314

316315
concurrency:
317316
# https://github.community/t/concurrecy-not-work-for-push/183068/7
318-
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.os }}-${{ matrix.pytest_target }}-dev
317+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.os }}-python-dev
319318
cancel-in-progress: true
320319

321320
env:
@@ -332,7 +331,7 @@ jobs:
332331
- name: Set up Python Dev Version
333332
uses: actions/setup-python@v5
334333
with:
335-
python-version: '3.12-dev'
334+
python-version: '3.13-dev'
336335

337336
- name: Build Environment
338337
run: |

.github/workflows/wheels.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ 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: [["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]]
103103
env:
104104
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
105105
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
@@ -140,7 +140,7 @@ jobs:
140140
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
141141

142142
- name: Build wheels
143-
uses: pypa/cibuildwheel@v2.18.1
143+
uses: pypa/cibuildwheel@v2.19.1
144144
with:
145145
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
146146
env:

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ repos:
7575
rev: v3.15.2
7676
hooks:
7777
- id: pyupgrade
78-
args: [--py39-plus]
78+
args: [--py310-plus]
7979
- repo: https://github.com/pre-commit/pygrep-hooks
8080
rev: v1.10.0
8181
hooks:

asv_bench/benchmarks/tslibs/timestamp.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
from datetime import datetime
1+
from datetime import (
2+
datetime,
3+
timezone,
4+
)
5+
import zoneinfo
26

37
import numpy as np
4-
import pytz
58

69
from pandas import Timestamp
710

@@ -12,7 +15,7 @@ class TimestampConstruction:
1215
def setup(self):
1316
self.npdatetime64 = np.datetime64("2020-01-01 00:00:00")
1417
self.dttime_unaware = datetime(2020, 1, 1, 0, 0, 0)
15-
self.dttime_aware = datetime(2020, 1, 1, 0, 0, 0, 0, pytz.UTC)
18+
self.dttime_aware = datetime(2020, 1, 1, 0, 0, 0, 0, timezone.utc)
1619
self.ts = Timestamp("2020-01-01 00:00:00")
1720

1821
def time_parse_iso8601_no_tz(self):
@@ -113,7 +116,7 @@ def setup(self, tz):
113116
self.ts = Timestamp("2017-08-25 08:16:14", tz=tz)
114117

115118
def time_replace_tz(self, tz):
116-
self.ts.replace(tzinfo=pytz.timezone("US/Eastern"))
119+
self.ts.replace(tzinfo=zoneinfo.ZoneInfo("US/Eastern"))
117120

118121
def time_replace_None(self, tz):
119122
self.ts.replace(tzinfo=None)
@@ -144,8 +147,8 @@ def time_ceil(self, tz):
144147

145148
class TimestampAcrossDst:
146149
def setup(self):
147-
dt = datetime(2016, 3, 27, 1)
148-
self.tzinfo = pytz.timezone("CET").localize(dt, is_dst=False).tzinfo
150+
dt = datetime(2016, 3, 27, 1, fold=0)
151+
self.tzinfo = dt.astimezone(zoneinfo.ZoneInfo("Europe/Berlin")).tzinfo
149152
self.ts2 = Timestamp(dt)
150153

151154
def time_replace_across_dst(self):

asv_bench/benchmarks/tslibs/tslib.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
timedelta,
2121
timezone,
2222
)
23+
import zoneinfo
2324

2425
from dateutil.tz import (
2526
gettz,
2627
tzlocal,
2728
)
2829
import numpy as np
29-
import pytz
3030

3131
try:
3232
from pandas._libs.tslibs import ints_to_pydatetime
@@ -38,7 +38,7 @@
3838
None,
3939
timezone.utc,
4040
timezone(timedelta(minutes=60)),
41-
pytz.timezone("US/Pacific"),
41+
zoneinfo.ZoneInfo("US/Pacific"),
4242
gettz("Asia/Tokyo"),
4343
tzlocal_obj,
4444
]

asv_bench/benchmarks/tslibs/tz_convert.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
from datetime import timezone
2+
13
import numpy as np
2-
from pytz import UTC
34

45
from pandas._libs.tslibs.tzconversion import tz_localize_to_utc
56

@@ -41,7 +42,7 @@ def time_tz_convert_from_utc(self, size, tz):
4142
# dti = DatetimeIndex(self.i8data, tz=tz)
4243
# dti.tz_localize(None)
4344
if old_sig:
44-
tz_convert_from_utc(self.i8data, UTC, tz)
45+
tz_convert_from_utc(self.i8data, timezone.utc, tz)
4546
else:
4647
tz_convert_from_utc(self.i8data, tz)
4748

ci/code_checks.sh

-6
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
9191
-i "pandas.MultiIndex.to_frame RT03" \
9292
-i "pandas.NA SA01" \
9393
-i "pandas.NaT SA01" \
94-
-i "pandas.NamedAgg SA01" \
9594
-i "pandas.Period.asfreq SA01" \
9695
-i "pandas.Period.freq GL08" \
9796
-i "pandas.Period.freqstr SA01" \
@@ -155,7 +154,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
155154
-i "pandas.Series.dt.tz_convert PR01,PR02" \
156155
-i "pandas.Series.dt.tz_localize PR01,PR02" \
157156
-i "pandas.Series.dt.unit GL08" \
158-
-i "pandas.Series.ge SA01" \
159157
-i "pandas.Series.gt SA01" \
160158
-i "pandas.Series.list.__getitem__ SA01" \
161159
-i "pandas.Series.list.flatten SA01" \
@@ -211,11 +209,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
211209
-i "pandas.Series.to_frame SA01" \
212210
-i "pandas.Series.to_markdown SA01" \
213211
-i "pandas.Series.update PR07,SA01" \
214-
-i "pandas.Timedelta.as_unit SA01" \
215212
-i "pandas.Timedelta.asm8 SA01" \
216213
-i "pandas.Timedelta.ceil SA01" \
217214
-i "pandas.Timedelta.components SA01" \
218-
-i "pandas.Timedelta.days SA01" \
219215
-i "pandas.Timedelta.floor SA01" \
220216
-i "pandas.Timedelta.max PR02" \
221217
-i "pandas.Timedelta.min PR02" \
@@ -235,7 +231,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
235231
-i "pandas.Timestamp.ctime SA01" \
236232
-i "pandas.Timestamp.date SA01" \
237233
-i "pandas.Timestamp.day GL08" \
238-
-i "pandas.Timestamp.floor SA01" \
239234
-i "pandas.Timestamp.fold GL08" \
240235
-i "pandas.Timestamp.fromordinal SA01" \
241236
-i "pandas.Timestamp.fromtimestamp PR01,SA01" \
@@ -464,7 +459,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
464459
-i "pandas.io.stata.StataReader.variable_labels RT03,SA01" \
465460
-i "pandas.io.stata.StataWriter.write_file SA01" \
466461
-i "pandas.json_normalize RT03,SA01" \
467-
-i "pandas.merge_asof PR07,RT03" \
468462
-i "pandas.period_range RT03,SA01" \
469463
-i "pandas.plotting.andrews_curves RT03,SA01" \
470464
-i "pandas.plotting.lag_plot RT03,SA01" \

ci/deps/actions-39-minimum_versions.yaml renamed to ci/deps/actions-310-minimum_versions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: pandas-dev
44
channels:
55
- conda-forge
66
dependencies:
7-
- python=3.9
7+
- python=3.10
88

99
# build dependencies
1010
- versioneer[toml]

ci/deps/actions-311-pyarrownightly.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies:
1818

1919
# required dependencies
2020
- python-dateutil
21-
- numpy
21+
- numpy<2
2222
- pytz
2323
- pip
2424

0 commit comments

Comments
 (0)