Skip to content

Commit b7d70f2

Browse files
authored
Merge branch 'main' into update-docs-data-table-representation
2 parents ce3776a + e4ca405 commit b7d70f2

File tree

217 files changed

+3119
-1119
lines changed

Some content is hidden

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

217 files changed

+3119
-1119
lines changed

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ jobs:
243243
. ~/virtualenvs/pandas-dev/bin/activate
244244
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.2.1 meson-python==0.13.1
245245
python -m pip install numpy -Csetup-args="-Dallow-noblas=true"
246-
python -m pip install --no-cache-dir versioneer[toml] cython==3.0.10 python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.116.0
246+
python -m pip install --no-cache-dir versioneer[toml] cython==3.0.10 python-dateutil pytest>=8.3.4 pytest-xdist>=3.6.1 hypothesis>=6.116.0
247247
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
248248
python -m pip list --no-cache-dir
249249
PANDAS_CI=1 python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
@@ -280,7 +280,7 @@ jobs:
280280
/opt/python/cp313-cp313/bin/python -m venv ~/virtualenvs/pandas-dev
281281
. ~/virtualenvs/pandas-dev/bin/activate
282282
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
283-
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.116.0
283+
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytest>=8.3.4 pytest-xdist>=3.6.1 hypothesis>=6.116.0
284284
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
285285
python -m pip list --no-cache-dir
286286
@@ -352,14 +352,12 @@ jobs:
352352
python --version
353353
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.2.1 meson-python==0.13.1
354354
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
355-
python -m pip install versioneer[toml] python-dateutil tzdata cython hypothesis>=6.116.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
355+
python -m pip install versioneer[toml] python-dateutil tzdata cython hypothesis>=6.116.0 pytest>=8.3.4 pytest-xdist>=3.6.1 pytest-cov
356356
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
357357
python -m pip list
358358
359359
- name: Run Tests
360360
uses: ./.github/actions/run-tests
361-
# TEMP allow this to fail until we fixed all test failures (related to chained assignment warnings)
362-
continue-on-error: true
363361

364362
# NOTE: this job must be kept in sync with the Pyodide build job in wheels.yml
365363
emscripten:

.github/workflows/wheels.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
name: Wheel builder
1414

1515
on:
16+
release:
17+
types: [published]
1618
schedule:
1719
# 3:27 UTC every day
1820
- cron: "27 3 * * *"
@@ -101,7 +103,7 @@ jobs:
101103
- [macos-14, macosx_arm64]
102104
- [windows-2022, win_amd64]
103105
- [windows-11-arm, win_arm64]
104-
python: [["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"], ["cp313t", "3.13"]]
106+
python: [["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"], ["cp313t", "3.13"], ["cp314", "3.14"], ["cp314t", "3.14"]]
105107
include:
106108
# Build Pyodide wheels and upload them to Anaconda.org
107109
# NOTE: this job is similar to the one in unit-tests.yml except for the fact
@@ -216,3 +218,41 @@ jobs:
216218
source ci/upload_wheels.sh
217219
set_upload_vars
218220
upload_wheels
221+
222+
publish:
223+
if: >
224+
github.repository == 'pandas-dev/pandas' &&
225+
github.event_name == 'release' &&
226+
startsWith(github.ref, 'refs/tags/v')
227+
228+
needs:
229+
- build_sdist
230+
- build_wheels
231+
232+
runs-on: ubuntu-latest
233+
234+
environment:
235+
name: pypi
236+
permissions:
237+
id-token: write # OIDC for Trusted Publishing
238+
contents: read
239+
240+
steps:
241+
- name: Download all artefacts
242+
uses: actions/download-artifact@v5
243+
with:
244+
path: dist # everything lands in ./dist/**
245+
246+
- name: Collect files
247+
run: |
248+
mkdir -p upload
249+
# skip any wheel that contains 'pyodide'
250+
find dist -name '*pyodide*.whl' -prune -o \
251+
-name '*.whl' -exec mv {} upload/ \;
252+
find dist -name '*.tar.gz' -exec mv {} upload/ \;
253+
254+
- name: Publish to **PyPI** (Trusted Publishing)
255+
uses: pypa/gh-action-pypi-publish@release/v1
256+
with:
257+
packages-dir: upload
258+
skip-existing: true

Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
FROM python:3.11.13
22
WORKDIR /home/pandas
33

4+
# https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope
5+
ARG TARGETPLATFORM
6+
47
RUN apt-get update && \
58
apt-get --no-install-recommends -y upgrade && \
69
apt-get --no-install-recommends -y install \
@@ -13,7 +16,14 @@ RUN apt-get update && \
1316
rm -rf /var/lib/apt/lists/*
1417

1518
COPY requirements-dev.txt /tmp
16-
RUN python -m pip install --no-cache-dir --upgrade pip && \
19+
20+
RUN case "$TARGETPLATFORM" in \
21+
linux/arm*) \
22+
# Drop PyQt5 for ARM GH#61037
23+
sed -i "/^pyqt5/Id" /tmp/requirements-dev.txt \
24+
;; \
25+
esac && \
26+
python -m pip install --no-cache-dir --upgrade pip && \
1727
python -m pip install --no-cache-dir -r /tmp/requirements-dev.txt
1828
RUN git config --global --add safe.directory /home/pandas
1929

asv_bench/benchmarks/algorithms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ class SortIntegerArray:
199199
params = [10**3, 10**5]
200200

201201
def setup(self, N):
202-
data = np.arange(N, dtype=float)
203-
data[40] = np.nan
202+
data = np.arange(N, dtype=float).astype(object)
203+
data[40] = pd.NA
204204
self.array = pd.array(data, dtype="Int64")
205205

206206
def time_argsort(self, N):

asv_bench/benchmarks/frame_methods.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import numpy as np
55

66
from pandas import (
7+
NA,
78
DataFrame,
89
Index,
910
MultiIndex,
@@ -445,6 +446,8 @@ def setup(self, inplace, dtype):
445446
values[::2] = np.nan
446447
if dtype == "Int64":
447448
values = values.round()
449+
values = values.astype(object)
450+
values[::2] = NA
448451
self.df = DataFrame(values, dtype=dtype)
449452
self.fill_values = self.df.iloc[self.df.first_valid_index()].to_dict()
450453

asv_bench/benchmarks/groupby.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,10 @@ def setup(self, dtype, method, with_nans):
689689
null_vals = vals.astype(float, copy=True)
690690
null_vals[::2, :] = np.nan
691691
null_vals[::3, :] = np.nan
692+
if dtype in ["Int64", "Float64"]:
693+
null_vals = null_vals.astype(object)
694+
null_vals[::2, :] = NA
695+
null_vals[::3, :] = NA
692696
df = DataFrame(null_vals, columns=list("abcde"), dtype=dtype)
693697
df["key"] = keys
694698
self.df = df

ci/deps/actions-311-minimum_versions.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ dependencies:
1313
- meson-python=0.13.1
1414

1515
# test dependencies
16-
- pytest>=7.3.2
16+
- pytest>=8.3.4
1717
- pytest-cov
18-
- pytest-xdist>=3.4.0
19-
- pytest-localserver>=0.8.1
18+
- pytest-xdist>=3.6.1
19+
- pytest-localserver>=0.9.0
2020
- pytest-qt>=4.4.0
2121
- boto3=1.37.3
2222

ci/deps/actions-311.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ dependencies:
1111
- meson-python=0.13.1
1212

1313
# test dependencies
14-
- pytest>=7.3.2
14+
- pytest>=8.3.4
1515
- pytest-cov
16-
- pytest-xdist>=3.4.0
17-
- pytest-localserver>=0.8.1
16+
- pytest-xdist>=3.6.1
17+
- pytest-localserver>=0.9.0
1818
- pytest-qt>=4.4.0
1919
- boto3=1.37.3
2020

ci/deps/actions-312.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ dependencies:
1111
- meson-python=0.13.1
1212

1313
# test dependencies
14-
- pytest>=7.3.2
14+
- pytest>=8.3.4
1515
- pytest-cov
16-
- pytest-xdist>=3.4.0
17-
- pytest-localserver>=0.8.1
16+
- pytest-xdist>=3.6.1
17+
- pytest-localserver>=0.9.0
1818
- pytest-qt>=4.4.0
1919
- boto3=1.37.3
2020

ci/deps/actions-313-downstream_compat.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ dependencies:
1212
- meson-python=0.13.1
1313

1414
# test dependencies
15-
- pytest>=7.3.2
15+
- pytest>=8.3.4
1616
- pytest-cov
17-
- pytest-xdist>=3.4.0
18-
- pytest-localserver>=0.8.1
17+
- pytest-xdist>=3.6.1
18+
- pytest-localserver>=0.9.0
1919
- pytest-qt>=4.4.0
2020
- boto3=1.37.3
2121

0 commit comments

Comments
 (0)