Skip to content

Commit c527ea3

Browse files
committed
Merge branch 'main' of github.com:pandas-dev/pandas into arrow-to-csv
2 parents 968b4bb + 0d853e7 commit c527ea3

File tree

252 files changed

+4203
-3068
lines changed

Some content is hidden

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

252 files changed

+4203
-3068
lines changed

.circleci/setup_env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ if pip show pandas 1>/dev/null; then
5555
fi
5656

5757
echo "Install pandas"
58-
python -m pip install --no-build-isolation -ve .
58+
python -m pip install --no-build-isolation -ve . --config-settings=setup-args="--werror"
5959

6060
echo "done"

.github/actions/build_pandas/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ runs:
2525
- name: Build Pandas
2626
run: |
2727
if [[ ${{ inputs.editable }} == "true" ]]; then
28-
pip install -e . --no-build-isolation -v --no-deps
28+
pip install -e . --no-build-isolation -v --no-deps \
29+
--config-settings=setup-args="--werror"
2930
else
30-
pip install . --no-build-isolation -v --no-deps
31+
pip install . --no-build-isolation -v --no-deps \
32+
--config-settings=setup-args="--werror"
3133
fi
3234
shell: bash -el {0}

.github/workflows/unit-tests.yml

Lines changed: 10 additions & 6 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]
29+
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml, actions-312.yaml]
3030
# Prevent the include jobs from overriding other jobs
3131
pattern: [""]
3232
include:
@@ -69,6 +69,10 @@ jobs:
6969
env_file: actions-311.yaml
7070
pattern: "not slow and not network and not single_cpu"
7171
pandas_copy_on_write: "1"
72+
- name: "Copy-on-Write 3.12"
73+
env_file: actions-312.yaml
74+
pattern: "not slow and not network and not single_cpu"
75+
pandas_copy_on_write: "1"
7276
- name: "Copy-on-Write 3.11 (warnings)"
7377
env_file: actions-311.yaml
7478
pattern: "not slow and not network and not single_cpu"
@@ -190,7 +194,7 @@ jobs:
190194
strategy:
191195
matrix:
192196
os: [macos-latest, windows-latest]
193-
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml]
197+
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml, actions-312.yaml]
194198
fail-fast: false
195199
runs-on: ${{ matrix.os }}
196200
name: ${{ format('{0} {1}', matrix.os, matrix.env_file) }}
@@ -250,7 +254,7 @@ jobs:
250254
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.2.1 meson-python==0.13.1
251255
python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"
252256
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
253-
python -m pip install --no-cache-dir --no-build-isolation -e .
257+
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
254258
python -m pip list --no-cache-dir
255259
export PANDAS_CI=1
256260
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
@@ -288,7 +292,7 @@ jobs:
288292
. ~/virtualenvs/pandas-dev/bin/activate
289293
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
290294
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
291-
python -m pip install --no-cache-dir --no-build-isolation -e .
295+
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
292296
python -m pip list --no-cache-dir
293297
294298
- name: Run Tests
@@ -321,7 +325,7 @@ jobs:
321325
# To freeze this file, uncomment out the ``if: false`` condition, and migrate the jobs
322326
# to the corresponding posix/windows-macos/sdist etc. workflows.
323327
# Feel free to modify this comment as necessary.
324-
#if: false # Uncomment this to freeze the workflow, comment it to unfreeze
328+
if: false # Uncomment this to freeze the workflow, comment it to unfreeze
325329
defaults:
326330
run:
327331
shell: bash -eou pipefail {0}
@@ -361,7 +365,7 @@ jobs:
361365
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
362366
python -m pip install versioneer[toml]
363367
python -m pip install python-dateutil pytz tzdata cython hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-cov
364-
python -m pip install -ve . --no-build-isolation --no-index --no-deps
368+
python -m pip install -ve . --no-build-isolation --no-index --no-deps --config-settings=setup-args="--werror"
365369
python -m pip list
366370
367371
- name: Run Tests

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
.mesonpy-native-file.ini
4040
MANIFEST
4141
compile_commands.json
42+
debug
4243
.debug
4344

4445
# Python files #
@@ -104,10 +105,11 @@ scikits
104105
# Generated Sources #
105106
#####################
106107
!skts.c
107-
!np_datetime.c
108-
!np_datetime_strings.c
109108
*.c
110109
*.cpp
110+
!pandas/_libs/src/**/*.c
111+
!pandas/_libs/src/**/*.h
112+
!pandas/_libs/include/**/*.h
111113

112114
# Unit / Performance Testing #
113115
##############################

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ ci:
2020
repos:
2121
- repo: https://github.com/hauntsaninja/black-pre-commit-mirror
2222
# black compiled with mypyc
23-
rev: 23.10.1
23+
rev: 23.11.0
2424
hooks:
2525
- id: black
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.1.4
27+
rev: v0.1.6
2828
hooks:
2929
- id: ruff
3030
args: [--exit-non-zero-on-fix]
@@ -47,7 +47,7 @@ repos:
4747
types_or: [python, rst, markdown, cython, c]
4848
additional_dependencies: [tomli]
4949
- repo: https://github.com/MarcoGorelli/cython-lint
50-
rev: v0.15.0
50+
rev: v0.16.0
5151
hooks:
5252
- id: cython-lint
5353
- id: double-quote-cython-strings
@@ -111,11 +111,11 @@ repos:
111111
types: [text] # overwrite types: [rst]
112112
types_or: [python, rst]
113113
- repo: https://github.com/sphinx-contrib/sphinx-lint
114-
rev: v0.8.1
114+
rev: v0.9.0
115115
hooks:
116116
- id: sphinx-lint
117117
- repo: https://github.com/pre-commit/mirrors-clang-format
118-
rev: v17.0.4
118+
rev: v17.0.6
119119
hooks:
120120
- id: clang-format
121121
files: ^pandas/_libs/src|^pandas/_libs/include

asv_bench/benchmarks/arithmetic.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
import pandas as pd
77
from pandas import (
88
DataFrame,
9+
Index,
910
Series,
1011
Timestamp,
1112
date_range,
1213
to_timedelta,
1314
)
14-
import pandas._testing as tm
1515
from pandas.core.algorithms import checked_add_with_arr
1616

1717
from .pandas_vb_common import numeric_dtypes
@@ -323,8 +323,10 @@ class IndexArithmetic:
323323

324324
def setup(self, dtype):
325325
N = 10**6
326-
indexes = {"int": "makeIntIndex", "float": "makeFloatIndex"}
327-
self.index = getattr(tm, indexes[dtype])(N)
326+
if dtype == "float":
327+
self.index = Index(np.arange(N), dtype=np.float64)
328+
elif dtype == "int":
329+
self.index = Index(np.arange(N), dtype=np.int64)
328330

329331
def time_add(self, dtype):
330332
self.index + 2

ci/deps/actions-310.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ dependencies:
4646
- pyqt>=5.15.9
4747
- pyreadstat>=1.2.0
4848
- pytables>=3.8.0
49-
- python-calamine>=0.1.6
49+
- python-calamine>=0.1.7
5050
- pyxlsb>=1.0.10
5151
- s3fs>=2022.11.0
5252
- scipy>=1.10.0

ci/deps/actions-311-downstream_compat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies:
4747
- pyqt>=5.15.9
4848
- pyreadstat>=1.2.0
4949
- pytables>=3.8.0
50-
- python-calamine>=0.1.6
50+
- python-calamine>=0.1.7
5151
- pyxlsb>=1.0.10
5252
- s3fs>=2022.11.0
5353
- scipy>=1.10.0

ci/deps/actions-311.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ dependencies:
4646
- pymysql>=1.0.2
4747
- pyreadstat>=1.2.0
4848
- pytables>=3.8.0
49-
- python-calamine>=0.1.6
49+
- python-calamine>=0.1.7
5050
- pyxlsb>=1.0.10
5151
- s3fs>=2022.11.0
5252
- scipy>=1.10.0

ci/deps/actions-312.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: pandas-dev-312
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.12
6+
7+
# build dependencies
8+
- versioneer[toml]
9+
- cython>=0.29.33
10+
- meson[ninja]=1.2.1
11+
- meson-python=0.13.1
12+
13+
# test dependencies
14+
- pytest>=7.3.2
15+
- pytest-cov
16+
- pytest-xdist>=2.2.0
17+
- pytest-localserver>=0.7.1
18+
- pytest-qt>=4.2.0
19+
- boto3
20+
21+
# required dependencies
22+
- python-dateutil
23+
- numpy<2
24+
- pytz
25+
26+
# optional dependencies
27+
- beautifulsoup4>=4.11.2
28+
- blosc>=1.21.3
29+
- bottleneck>=1.3.6
30+
- fastparquet>=2022.12.0
31+
- fsspec>=2022.11.0
32+
- html5lib>=1.1
33+
- hypothesis>=6.46.1
34+
- gcsfs>=2022.11.0
35+
- jinja2>=3.1.2
36+
- lxml>=4.9.2
37+
- matplotlib>=3.6.3
38+
# - numba>=0.56.4
39+
- numexpr>=2.8.4
40+
- odfpy>=1.4.1
41+
- qtpy>=2.3.0
42+
- pyqt>=5.15.9
43+
- openpyxl>=3.1.0
44+
- psycopg2>=2.9.6
45+
- pyarrow>=10.0.1
46+
- pymysql>=1.0.2
47+
- pyreadstat>=1.2.0
48+
# - pytables>=3.8.0
49+
- python-calamine>=0.1.7
50+
- pyxlsb>=1.0.10
51+
- s3fs>=2022.11.0
52+
- scipy>=1.10.0
53+
- sqlalchemy>=2.0.0
54+
- tabulate>=0.9.0
55+
- xarray>=2022.12.0
56+
- xlrd>=2.0.1
57+
- xlsxwriter>=3.0.5
58+
- zstandard>=0.19.0
59+
60+
- pip:
61+
- adbc-driver-postgresql>=0.8.0
62+
- adbc-driver-sqlite>=0.8.0
63+
- tzdata>=2022.7

0 commit comments

Comments
 (0)