Skip to content

Commit 63dabc5

Browse files
Merge branch 'main' into periodindex-to_datetime_inconsistent_with_its_docstring
2 parents ea089e7 + fae3e80 commit 63dabc5

File tree

297 files changed

+3941
-2255
lines changed

Some content is hidden

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

297 files changed

+3941
-2255
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,5 @@ pandas/tests/io/parser/data export-ignore
8585

8686
# Include cibw script in sdist since it's needed for building wheels
8787
scripts/cibw_before_build.sh -export-ignore
88-
scripts/cibw_before_test.sh -export-ignore
88+
scripts/cibw_before_build_windows.sh -export-ignore
89+
scripts/cibw_before_test_windows.sh -export-ignore

.github/actions/build_pandas/action.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ runs:
2222
fi
2323
shell: bash -el {0}
2424

25-
- name: Uninstall nomkl
26-
run: |
27-
if conda list nomkl | grep nomkl 1>/dev/null; then
28-
conda remove nomkl -y
29-
fi
30-
shell: bash -el {0}
31-
3225
- name: Build Pandas
3326
run: |
3427
if [[ ${{ inputs.editable }} == "true" ]]; then

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ 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'
1412
environment-file: ${{ inputs.environment-file }}
1513
environment-name: test
1614
condarc-file: ci/.condarc

.github/workflows/package-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ jobs:
8686
TEST_ARGS: ${{ matrix.test_args || '' }}
8787
PYTEST_WORKERS: 'auto'
8888
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
89-
NPY_PROMOTION_STATE: ${{ matrix.env_file == 'actions-311-numpydev.yaml' && 'weak' || 'legacy' }}
9089
# Clipboard tests
9190
QT_QPA_PLATFORM: offscreen
9291
REMOVE_PYARROW: ${{ matrix.name == 'Future infer strings (without pyarrow)' && '1' || '0' }}
@@ -388,8 +387,8 @@ jobs:
388387
- name: Build Environment
389388
run: |
390389
python --version
391-
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.2.1 meson-python==0.13.1
392-
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython
390+
python -m pip install --upgrade pip setuptools wheel numpy meson[ninja]==1.2.1 meson-python==0.13.1
391+
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython
393392
python -m pip install versioneer[toml]
394393
python -m pip install python-dateutil pytz tzdata hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
395394
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"

.github/workflows/wheels.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ jobs:
111111
- buildplat: [ubuntu-22.04, pyodide_wasm32]
112112
python: ["cp312", "3.12"]
113113
cibw_build_frontend: 'build'
114-
# TODO: Build free-threaded wheels for Windows
115-
exclude:
116-
- buildplat: [windows-2022, win_amd64]
117-
python: ["cp313t", "3.13"]
118114

119115
env:
120116
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
@@ -156,7 +152,7 @@ jobs:
156152
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
157153

158154
- name: Build wheels
159-
uses: pypa/cibuildwheel@v2.20.0
155+
uses: pypa/cibuildwheel@v2.21.3
160156
with:
161157
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
162158
env:
@@ -165,7 +161,7 @@ jobs:
165161
CIBW_PLATFORM: ${{ matrix.buildplat[1] == 'pyodide_wasm32' && 'pyodide' || 'auto' }}
166162

167163
- name: Set up Python
168-
uses: mamba-org/setup-micromamba@v1
164+
uses: mamba-org/setup-micromamba@v2
169165
with:
170166
environment-name: wheel-env
171167
# Use a fixed Python, since we might have an unreleased Python not
@@ -181,20 +177,6 @@ jobs:
181177
shell: bash -el {0}
182178
run: for whl in $(ls wheelhouse); do wheel unpack wheelhouse/$whl -d /tmp; done
183179

184-
# Testing on windowsservercore instead of GHA runner to fail on missing DLLs
185-
- name: Test Windows Wheels
186-
if: ${{ matrix.buildplat[1] == 'win_amd64' }}
187-
shell: pwsh
188-
run: |
189-
$TST_CMD = @"
190-
python -m pip install hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0;
191-
python -m pip install `$(Get-Item pandas\wheelhouse\*.whl);
192-
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`\"])`';
193-
"@
194-
# add rc to the end of the image name if the Python version is unreleased
195-
docker pull python:${{ matrix.python[1] == '3.13' && '3.13-rc' || format('{0}-windowsservercore', matrix.python[1]) }}
196-
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
197-
198180
- uses: actions/upload-artifact@v4
199181
with:
200182
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}

.pre-commit-config.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ minimum_pre_commit_version: 2.15.0
22
exclude: ^LICENSES/|\.(html|csv|svg)$
33
# reserve "manual" for relatively slow hooks which we still want to run in CI
44
default_stages: [
5-
commit,
6-
merge-commit,
7-
push,
5+
pre-commit,
6+
pre-merge-commit,
7+
pre-push,
88
prepare-commit-msg,
99
commit-msg,
1010
post-checkout,
@@ -19,7 +19,7 @@ ci:
1919
skip: [pyright, mypy]
2020
repos:
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.5.0
22+
rev: v0.7.2
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
@@ -34,7 +34,7 @@ repos:
3434
- id: ruff-format
3535
exclude: ^scripts|^pandas/tests/frame/test_query_eval.py
3636
- repo: https://github.com/jendrikseipp/vulture
37-
rev: 'v2.11'
37+
rev: 'v2.13'
3838
hooks:
3939
- id: vulture
4040
entry: python scripts/run_vulture.py
@@ -52,7 +52,7 @@ repos:
5252
- id: cython-lint
5353
- id: double-quote-cython-strings
5454
- repo: https://github.com/pre-commit/pre-commit-hooks
55-
rev: v4.6.0
55+
rev: v5.0.0
5656
hooks:
5757
- id: check-case-conflict
5858
- id: check-toml
@@ -74,7 +74,7 @@ repos:
7474
hooks:
7575
- id: isort
7676
- repo: https://github.com/asottile/pyupgrade
77-
rev: v3.16.0
77+
rev: v3.19.0
7878
hooks:
7979
- id: pyupgrade
8080
args: [--py310-plus]
@@ -90,12 +90,12 @@ repos:
9090
types: [text] # overwrite types: [rst]
9191
types_or: [python, rst]
9292
- repo: https://github.com/sphinx-contrib/sphinx-lint
93-
rev: v0.9.1
93+
rev: v1.0.0
9494
hooks:
9595
- id: sphinx-lint
9696
args: ["--enable", "all", "--disable", "line-too-long"]
9797
- repo: https://github.com/pre-commit/mirrors-clang-format
98-
rev: v18.1.8
98+
rev: v19.1.3
9999
hooks:
100100
- id: clang-format
101101
files: ^pandas/_libs/src|^pandas/_libs/include
@@ -112,7 +112,7 @@ repos:
112112
types: [python]
113113
stages: [manual]
114114
additional_dependencies: &pyright_dependencies
115-
115+
116116
- id: pyright
117117
# note: assumes python env is setup and activated
118118
name: pyright reportGeneralTypeIssues

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,5 @@ graft pandas/_libs/include
6565

6666
# Include cibw script in sdist since it's needed for building wheels
6767
include scripts/cibw_before_build.sh
68+
include scripts/cibw_before_build_windows.sh
69+
include scripts/cibw_before_test_windows.sh

ci/code_checks.sh

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -73,123 +73,66 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7373
-i "pandas.Period.freq GL08" \
7474
-i "pandas.Period.ordinal GL08" \
7575
-i "pandas.RangeIndex.from_range PR01,SA01" \
76-
-i "pandas.Series.cat.add_categories PR01,PR02" \
77-
-i "pandas.Series.cat.as_ordered PR01" \
78-
-i "pandas.Series.cat.as_unordered PR01" \
79-
-i "pandas.Series.cat.remove_categories PR01,PR02" \
80-
-i "pandas.Series.cat.remove_unused_categories PR01" \
81-
-i "pandas.Series.cat.rename_categories PR01,PR02" \
82-
-i "pandas.Series.cat.reorder_categories PR01,PR02" \
83-
-i "pandas.Series.cat.set_categories PR01,PR02" \
84-
-i "pandas.Series.dt.as_unit PR01,PR02" \
85-
-i "pandas.Series.dt.ceil PR01,PR02" \
86-
-i "pandas.Series.dt.day_name PR01,PR02" \
87-
-i "pandas.Series.dt.floor PR01,PR02" \
8876
-i "pandas.Series.dt.freq GL08" \
89-
-i "pandas.Series.dt.month_name PR01,PR02" \
90-
-i "pandas.Series.dt.normalize PR01" \
91-
-i "pandas.Series.dt.round PR01,PR02" \
92-
-i "pandas.Series.dt.strftime PR01,PR02" \
93-
-i "pandas.Series.dt.to_period PR01,PR02" \
94-
-i "pandas.Series.dt.total_seconds PR01" \
95-
-i "pandas.Series.dt.tz_convert PR01,PR02" \
96-
-i "pandas.Series.dt.tz_localize PR01,PR02" \
9777
-i "pandas.Series.dt.unit GL08" \
9878
-i "pandas.Series.pad PR01,SA01" \
99-
-i "pandas.Series.sparse.from_coo PR07,SA01" \
10079
-i "pandas.Timedelta.max PR02" \
10180
-i "pandas.Timedelta.min PR02" \
10281
-i "pandas.Timedelta.resolution PR02" \
10382
-i "pandas.Timestamp.max PR02" \
10483
-i "pandas.Timestamp.min PR02" \
105-
-i "pandas.Timestamp.nanosecond GL08" \
10684
-i "pandas.Timestamp.resolution PR02" \
10785
-i "pandas.Timestamp.tzinfo GL08" \
108-
-i "pandas.Timestamp.year GL08" \
109-
-i "pandas.api.types.is_float PR01,SA01" \
110-
-i "pandas.api.types.is_integer PR01,SA01" \
111-
-i "pandas.api.types.is_iterator PR07,SA01" \
11286
-i "pandas.api.types.is_re_compilable PR07,SA01" \
113-
-i "pandas.api.types.pandas_dtype PR07,RT03,SA01" \
11487
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
115-
-i "pandas.arrays.DatetimeArray SA01" \
11688
-i "pandas.arrays.IntegerArray SA01" \
117-
-i "pandas.arrays.IntervalArray.left SA01" \
11889
-i "pandas.arrays.IntervalArray.length SA01" \
119-
-i "pandas.arrays.IntervalArray.right SA01" \
12090
-i "pandas.arrays.NumpyExtensionArray SA01" \
121-
-i "pandas.arrays.SparseArray PR07,SA01" \
12291
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
123-
-i "pandas.core.groupby.DataFrameGroupBy.__iter__ RT03,SA01" \
12492
-i "pandas.core.groupby.DataFrameGroupBy.boxplot PR07,RT03,SA01" \
12593
-i "pandas.core.groupby.DataFrameGroupBy.get_group RT03,SA01" \
126-
-i "pandas.core.groupby.DataFrameGroupBy.groups SA01" \
12794
-i "pandas.core.groupby.DataFrameGroupBy.indices SA01" \
12895
-i "pandas.core.groupby.DataFrameGroupBy.nth PR02" \
12996
-i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
130-
-i "pandas.core.groupby.DataFrameGroupBy.ohlc SA01" \
13197
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
13298
-i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
133-
-i "pandas.core.groupby.SeriesGroupBy.__iter__ RT03,SA01" \
13499
-i "pandas.core.groupby.SeriesGroupBy.get_group RT03,SA01" \
135-
-i "pandas.core.groupby.SeriesGroupBy.groups SA01" \
136100
-i "pandas.core.groupby.SeriesGroupBy.indices SA01" \
137101
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_decreasing SA01" \
138102
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_increasing SA01" \
139103
-i "pandas.core.groupby.SeriesGroupBy.nth PR02" \
140-
-i "pandas.core.groupby.SeriesGroupBy.ohlc SA01" \
141104
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
142105
-i "pandas.core.groupby.SeriesGroupBy.sem SA01" \
143-
-i "pandas.core.resample.Resampler.__iter__ RT03,SA01" \
144106
-i "pandas.core.resample.Resampler.get_group RT03,SA01" \
145-
-i "pandas.core.resample.Resampler.groups SA01" \
146107
-i "pandas.core.resample.Resampler.indices SA01" \
147108
-i "pandas.core.resample.Resampler.max PR01,RT03,SA01" \
148109
-i "pandas.core.resample.Resampler.mean SA01" \
149110
-i "pandas.core.resample.Resampler.min PR01,RT03,SA01" \
150-
-i "pandas.core.resample.Resampler.ohlc SA01" \
151111
-i "pandas.core.resample.Resampler.prod SA01" \
152112
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \
153113
-i "pandas.core.resample.Resampler.sem SA01" \
154114
-i "pandas.core.resample.Resampler.std SA01" \
155-
-i "pandas.core.resample.Resampler.sum SA01" \
156115
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
157116
-i "pandas.core.resample.Resampler.var SA01" \
158117
-i "pandas.errors.AttributeConflictWarning SA01" \
159-
-i "pandas.errors.CSSWarning SA01" \
160-
-i "pandas.errors.CategoricalConversionWarning SA01" \
161118
-i "pandas.errors.ChainedAssignmentError SA01" \
162-
-i "pandas.errors.DataError SA01" \
163119
-i "pandas.errors.DuplicateLabelError SA01" \
164120
-i "pandas.errors.IntCastingNaNError SA01" \
165121
-i "pandas.errors.InvalidIndexError SA01" \
166-
-i "pandas.errors.InvalidVersion SA01" \
167122
-i "pandas.errors.NullFrequencyError SA01" \
168123
-i "pandas.errors.NumExprClobberingError SA01" \
169124
-i "pandas.errors.NumbaUtilError SA01" \
170-
-i "pandas.errors.OptionError SA01" \
171125
-i "pandas.errors.OutOfBoundsTimedelta SA01" \
172126
-i "pandas.errors.PerformanceWarning SA01" \
173127
-i "pandas.errors.PossibleDataLossError SA01" \
174-
-i "pandas.errors.PossiblePrecisionLoss SA01" \
175-
-i "pandas.errors.SpecificationError SA01" \
176128
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
177129
-i "pandas.errors.UnsortedIndexError SA01" \
178-
-i "pandas.errors.UnsupportedFunctionCall SA01" \
179130
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
180131
-i "pandas.infer_freq SA01" \
181132
-i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
182-
-i "pandas.io.stata.StataReader.data_label SA01" \
183-
-i "pandas.io.stata.StataReader.value_labels RT03,SA01" \
184-
-i "pandas.io.stata.StataReader.variable_labels RT03,SA01" \
185133
-i "pandas.io.stata.StataWriter.write_file SA01" \
186-
-i "pandas.json_normalize RT03,SA01" \
187-
-i "pandas.period_range RT03,SA01" \
188134
-i "pandas.plotting.andrews_curves RT03,SA01" \
189-
-i "pandas.plotting.lag_plot RT03,SA01" \
190135
-i "pandas.plotting.scatter_matrix PR07,SA01" \
191-
-i "pandas.set_eng_float_format RT03,SA01" \
192-
-i "pandas.testing.assert_extension_array_equal SA01" \
193136
-i "pandas.tseries.offsets.BDay PR02,SA01" \
194137
-i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \
195138
-i "pandas.tseries.offsets.BQuarterBegin.n GL08" \
@@ -335,7 +278,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
335278
-i "pandas.tseries.offsets.Second.is_on_offset GL08" \
336279
-i "pandas.tseries.offsets.Second.n GL08" \
337280
-i "pandas.tseries.offsets.Second.normalize GL08" \
338-
-i "pandas.tseries.offsets.SemiMonthBegin SA01" \
339281
-i "pandas.tseries.offsets.SemiMonthBegin.day_of_month GL08" \
340282
-i "pandas.tseries.offsets.SemiMonthBegin.is_on_offset GL08" \
341283
-i "pandas.tseries.offsets.SemiMonthBegin.n GL08" \

ci/deps/actions-310-minimum_versions.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ dependencies:
77
- python=3.10
88

99
# build dependencies
10-
- versioneer[toml]
10+
- versioneer
1111
- cython>=0.29.33
12-
- meson[ninja]=1.2.1
12+
- meson=1.2.1
1313
- meson-python=0.13.1
1414

1515
# test dependencies

0 commit comments

Comments
 (0)