Skip to content

Commit 10672f7

Browse files
committed
resolve conflicts
2 parents a29cd9a + 69fe98d commit 10672f7

File tree

261 files changed

+1899
-1841
lines changed

Some content is hidden

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

261 files changed

+1899
-1841
lines changed

.circleci/config.yml

Lines changed: 1 addition & 3 deletions
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

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

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

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

Lines changed: 58 additions & 14 deletions
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: |
@@ -347,6 +346,51 @@ jobs:
347346
- name: Run Tests
348347
uses: ./.github/actions/run-tests
349348

349+
python-freethreading:
350+
defaults:
351+
run:
352+
shell: bash -eou pipefail {0}
353+
runs-on: ubuntu-22.04
354+
355+
timeout-minutes: 90
356+
357+
concurrency:
358+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
359+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.os }}-python-freethreading-dev
360+
cancel-in-progress: true
361+
362+
env:
363+
PYTEST_WORKERS: "auto"
364+
PANDAS_CI: 1
365+
PATTERN: "not slow and not network and not clipboard and not single_cpu"
366+
PYTEST_TARGET: pandas
367+
368+
steps:
369+
- uses: actions/checkout@v4
370+
with:
371+
fetch-depth: 0
372+
373+
- name: Set up Python Free-threading Version
374+
uses: deadsnakes/[email protected]
375+
with:
376+
python-version: 3.13-dev
377+
nogil: true
378+
379+
- name: Build Environment
380+
run: |
381+
python --version
382+
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.2.1 meson-python==0.13.1
383+
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython
384+
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"
387+
python -m pip list
388+
389+
- name: Run Tests
390+
uses: ./.github/actions/run-tests
391+
env:
392+
PYTHON_GIL: 0
393+
350394
emscripten:
351395
# Note: the Python version, Emscripten toolchain version are determined
352396
# by the Pyodide version. The appropriate versions can be found in the

.github/workflows/wheels.yml

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ci:
1919
skip: [pyright, mypy]
2020
repos:
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.4.7
22+
rev: v0.5.0
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
@@ -67,15 +67,16 @@ repos:
6767
- id: fix-encoding-pragma
6868
args: [--remove]
6969
- id: trailing-whitespace
70+
args: [--markdown-linebreak-ext=md]
7071
- repo: https://github.com/PyCQA/isort
7172
rev: 5.13.2
7273
hooks:
7374
- id: isort
7475
- repo: https://github.com/asottile/pyupgrade
75-
rev: v3.15.2
76+
rev: v3.16.0
7677
hooks:
7778
- id: pyupgrade
78-
args: [--py39-plus]
79+
args: [--py310-plus]
7980
- repo: https://github.com/pre-commit/pygrep-hooks
8081
rev: v1.10.0
8182
hooks:
@@ -92,7 +93,7 @@ repos:
9293
- id: sphinx-lint
9394
args: ["--enable", "all", "--disable", "line-too-long"]
9495
- repo: https://github.com/pre-commit/mirrors-clang-format
95-
rev: v18.1.5
96+
rev: v18.1.8
9697
hooks:
9798
- id: clang-format
9899
files: ^pandas/_libs/src|^pandas/_libs/include

asv_bench/benchmarks/tslibs/timedelta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def time_from_int(self):
2020
Timedelta(123456789)
2121

2222
def time_from_unit(self):
23-
Timedelta(1, unit="d")
23+
Timedelta(1, unit="D")
2424

2525
def time_from_components(self):
2626
Timedelta(

asv_bench/benchmarks/tslibs/timestamp.py

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

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

0 commit comments

Comments
 (0)