Skip to content

Commit 64ea6b1

Browse files
committed
Merge remote-tracking branch 'upstream/main' into tst/ref/test_sql
2 parents 15a2d0c + b5b8be0 commit 64ea6b1

File tree

372 files changed

+6866
-4582
lines changed

Some content is hidden

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

372 files changed

+6866
-4582
lines changed

.github/actions/build_pandas/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ runs:
2525
- name: Build Pandas
2626
run: |
2727
if [[ ${{ inputs.editable }} == "true" ]]; then
28-
pip install -e . --no-build-isolation -v
28+
pip install -e . --no-build-isolation -v --no-deps
2929
else
30-
pip install . --no-build-isolation -v
30+
pip install . --no-build-isolation -v --no-deps
3131
fi
3232
shell: bash -el {0}

.github/workflows/code-checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
run: |
125125
cd asv_bench
126126
asv machine --yes
127-
asv run --quick --dry-run --durations=30 --python=same
127+
asv run --quick --dry-run --durations=30 --python=same --show-stderr
128128
129129
build_docker_dev_environment:
130130
name: Build Docker Dev Environment

.github/workflows/docbuild-and-upload.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
run: cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/
6868

6969
- name: Upload web
70-
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' web/build/ web@${{ secrets.server_ip }}:/var/www/html
70+
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' --exclude='benchmarks' web/build/ web@${{ secrets.server_ip }}:/var/www/html
7171
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
7272

7373
- name: Upload dev docs

.github/workflows/unit-tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ jobs:
236236
. ~/virtualenvs/pandas-dev/bin/activate
237237
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.2.1 meson-python==0.13.1
238238
python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"
239-
python -m pip install --no-cache-dir versioneer[toml] cython python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-asyncio>=0.17 hypothesis>=6.46.1
239+
python -m pip install --no-cache-dir versioneer[toml] "cython<3.0.3" python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-asyncio>=0.17 hypothesis>=6.46.1
240240
python -m pip install --no-cache-dir --no-build-isolation -e .
241241
python -m pip list --no-cache-dir
242242
export PANDAS_CI=1
@@ -274,7 +274,7 @@ jobs:
274274
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
275275
. ~/virtualenvs/pandas-dev/bin/activate
276276
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
277-
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-asyncio>=0.17 hypothesis>=6.46.1
277+
python -m pip install --no-cache-dir versioneer[toml] "cython<3.0.3" numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-asyncio>=0.17 hypothesis>=6.46.1
278278
python -m pip install --no-cache-dir --no-build-isolation -e .
279279
python -m pip list --no-cache-dir
280280
@@ -347,8 +347,8 @@ jobs:
347347
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.2.1 meson-python==0.13.1
348348
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
349349
python -m pip install versioneer[toml]
350-
python -m pip install python-dateutil pytz tzdata cython hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-cov pytest-asyncio>=0.17
351-
python -m pip install -ve . --no-build-isolation --no-index
350+
python -m pip install python-dateutil pytz tzdata "cython<3.0.3" hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytest-cov pytest-asyncio>=0.17
351+
python -m pip install -ve . --no-build-isolation --no-index --no-deps
352352
python -m pip list
353353
354354
- name: Run Tests

.github/workflows/wheels.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
139139

140140
- name: Build wheels
141-
uses: pypa/[email protected].0
141+
uses: pypa/[email protected].2
142142
with:
143143
package-dir: ./dist/${{ matrix.buildplat[1] == 'macosx_*' && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
144144
env:

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
.mesonpy-native-file.ini
4040
MANIFEST
4141
compile_commands.json
42-
debug
42+
.debug
4343

4444
# Python files #
4545
################

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ repos:
8484
'--filter=-readability/casting,-runtime/int,-build/include_subdir,-readability/fn_size'
8585
]
8686
- repo: https://github.com/pylint-dev/pylint
87-
rev: v3.0.0a7
87+
rev: v3.0.0b0
8888
hooks:
8989
- id: pylint
9090
stages: [manual]

asv_bench/benchmarks/algorithms.py

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from importlib import import_module
22

33
import numpy as np
4+
import pyarrow as pa
45

56
import pandas as pd
67

@@ -72,7 +73,16 @@ class Duplicated:
7273
params = [
7374
[True, False],
7475
["first", "last", False],
75-
["int", "uint", "float", "string", "datetime64[ns]", "datetime64[ns, tz]"],
76+
[
77+
"int",
78+
"uint",
79+
"float",
80+
"string",
81+
"datetime64[ns]",
82+
"datetime64[ns, tz]",
83+
"timestamp[ms][pyarrow]",
84+
"duration[s][pyarrow]",
85+
],
7686
]
7787
param_names = ["unique", "keep", "dtype"]
7888

@@ -87,6 +97,12 @@ def setup(self, unique, keep, dtype):
8797
"datetime64[ns, tz]": pd.date_range(
8898
"2011-01-01", freq="H", periods=N, tz="Asia/Tokyo"
8999
),
100+
"timestamp[ms][pyarrow]": pd.Index(
101+
np.arange(N), dtype=pd.ArrowDtype(pa.timestamp("ms"))
102+
),
103+
"duration[s][pyarrow]": pd.Index(
104+
np.arange(N), dtype=pd.ArrowDtype(pa.duration("s"))
105+
),
90106
}[dtype]
91107
if not unique:
92108
data = data.repeat(5)

asv_bench/benchmarks/series_methods.py

-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ def time_constructor_dict(self):
2828
def time_constructor_no_data(self):
2929
Series(data=None, index=self.idx)
3030

31-
def time_constructor_fastpath(self):
32-
Series(self.array, index=self.idx2, name="name", fastpath=True)
33-
3431

3532
class ToFrame:
3633
params = [["int64", "datetime64[ns]", "category", "Int64"], [None, "foo"]]

asv_bench/benchmarks/tslibs/period.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def time_now(self, freq):
7272
self.per.now(freq)
7373

7474
def time_asfreq(self, freq):
75-
self.per.asfreq("A")
75+
self.per.asfreq("Y")
7676

7777
def time_str(self, freq):
7878
str(self.per)

ci/code_checks.sh

-10
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
6363

6464
MSG='Partially validate docstrings (EX03)' ; echo $MSG
6565
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX03 --ignore_functions \
66-
pandas.Series.loc \
67-
pandas.Series.iloc \
68-
pandas.Series.pop \
69-
pandas.Series.describe \
70-
pandas.Series.skew \
71-
pandas.Series.var \
72-
pandas.Series.last \
73-
pandas.Series.tz_convert \
74-
pandas.Series.tz_localize \
75-
pandas.Series.dt.month_name \
7666
pandas.Series.dt.day_name \
7767
pandas.Series.str.len \
7868
pandas.Series.cat.set_categories \

ci/deps/actions-310.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# build dependencies
88
- versioneer[toml]
9-
- cython>=0.29.33
9+
- cython>=0.29.33, <3.0.3
1010
- meson[ninja]=1.2.1
1111
- meson-python=0.13.1
1212

@@ -20,7 +20,7 @@ dependencies:
2020

2121
# required dependencies
2222
- python-dateutil
23-
- numpy
23+
- numpy<2
2424
- pytz
2525

2626
# optional dependencies

ci/deps/actions-311-downstream_compat.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77

88
# build dependencies
99
- versioneer[toml]
10-
- cython>=0.29.33
10+
- cython>=0.29.33, <3.0.3
1111
- meson[ninja]=1.2.1
1212
- meson-python=0.13.1
1313

@@ -21,7 +21,7 @@ dependencies:
2121

2222
# required dependencies
2323
- python-dateutil
24-
- numpy
24+
- numpy<2
2525
- pytz
2626

2727
# optional dependencies

ci/deps/actions-311-numpydev.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies:
88
- versioneer[toml]
99
- meson[ninja]=1.2.1
1010
- meson-python=0.13.1
11-
- cython>=0.29.33
11+
- cython>=0.29.33, <3.0.3
1212

1313
# test dependencies
1414
- pytest>=7.3.2

ci/deps/actions-311-pyarrownightly.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77
# build dependencies
88
- versioneer[toml]
99
- meson[ninja]=1.2.1
10-
- cython>=0.29.33
10+
- cython>=0.29.33, <3.0.3
1111
- meson-python=0.13.1
1212

1313
# test dependencies
@@ -19,7 +19,7 @@ dependencies:
1919

2020
# required dependencies
2121
- python-dateutil
22-
- numpy
22+
- numpy<2
2323
- pytz
2424
- pip
2525

ci/deps/actions-311.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# build dependencies
88
- versioneer[toml]
9-
- cython>=0.29.33
9+
- cython>=0.29.33, <3.0.3
1010
- meson[ninja]=1.2.1
1111
- meson-python=0.13.1
1212

@@ -20,7 +20,7 @@ dependencies:
2020

2121
# required dependencies
2222
- python-dateutil
23-
- numpy
23+
- numpy<2
2424
- pytz
2525

2626
# optional dependencies

ci/deps/actions-39-minimum_versions.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies:
88

99
# build dependencies
1010
- versioneer[toml]
11-
- cython>=0.29.33
11+
- cython>=0.29.33, <3.0.3
1212
- meson[ninja]=1.2.1
1313
- meson-python=0.13.1
1414

@@ -22,7 +22,7 @@ dependencies:
2222

2323
# required dependencies
2424
- python-dateutil=2.8.2
25-
- numpy=1.22.4
25+
- numpy=1.22.4, <2
2626
- pytz=2020.1
2727

2828
# optional dependencies

ci/deps/actions-39.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# build dependencies
88
- versioneer[toml]
9-
- cython>=0.29.33
9+
- cython>=0.29.33, <3.0.3
1010
- meson[ninja]=1.2.1
1111
- meson-python=0.13.1
1212

@@ -20,7 +20,7 @@ dependencies:
2020

2121
# required dependencies
2222
- python-dateutil
23-
- numpy
23+
- numpy<2
2424
- pytz
2525

2626
# optional dependencies

ci/deps/actions-pypy-39.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dependencies:
99

1010
# build dependencies
1111
- versioneer[toml]
12-
- cython>=0.29.33
12+
- cython>=0.29.33, <3.0.3
1313
- meson[ninja]=1.2.1
1414
- meson-python=0.13.1
1515

@@ -21,7 +21,7 @@ dependencies:
2121
- hypothesis>=6.46.1
2222

2323
# required
24-
- numpy
24+
- numpy<2
2525
- python-dateutil
2626
- pytz
2727
- pip:

ci/deps/circle-310-arm64.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# build dependencies
88
- versioneer[toml]
9-
- cython>=0.29.33
9+
- cython>=0.29.33, <3.0.3
1010
- meson[ninja]=1.2.1
1111
- meson-python=0.13.1
1212

@@ -20,7 +20,7 @@ dependencies:
2020

2121
# required dependencies
2222
- python-dateutil
23-
- numpy
23+
- numpy<2
2424
- pytz
2525

2626
# optional dependencies

doc/redirects.csv

-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ generated/pandas.api.types.is_number,../reference/api/pandas.api.types.is_number
127127
generated/pandas.api.types.is_numeric_dtype,../reference/api/pandas.api.types.is_numeric_dtype
128128
generated/pandas.api.types.is_object_dtype,../reference/api/pandas.api.types.is_object_dtype
129129
generated/pandas.api.types.is_period_dtype,../reference/api/pandas.api.types.is_period_dtype
130-
generated/pandas.api.types.is_period,../reference/api/pandas.api.types.is_period
131130
generated/pandas.api.types.is_re_compilable,../reference/api/pandas.api.types.is_re_compilable
132131
generated/pandas.api.types.is_re,../reference/api/pandas.api.types.is_re
133132
generated/pandas.api.types.is_scalar,../reference/api/pandas.api.types.is_scalar

doc/source/development/contributing_codebase.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ If a test is known to fail but the manner in which it fails
528528
is not meant to be captured, use ``pytest.mark.xfail`` It is common to use this method for a test that
529529
exhibits buggy behavior or a non-implemented feature. If
530530
the failing test has flaky behavior, use the argument ``strict=False``. This
531-
will make it so pytest does not fail if the test happens to pass.
531+
will make it so pytest does not fail if the test happens to pass. Using ``strict=False`` is highly undesirable, please use it only as a last resort.
532532

533533
Prefer the decorator ``@pytest.mark.xfail`` and the argument ``pytest.param``
534534
over usage within a test so that the test is appropriately marked during the

doc/source/development/debugging_extensions.rst

+28-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ For Python developers with limited or no C/C++ experience this can seem a daunti
1414
2. `Fundamental Python Debugging Part 2 - Python Extensions <https://willayd.com/fundamental-python-debugging-part-2-python-extensions.html>`_
1515
3. `Fundamental Python Debugging Part 3 - Cython Extensions <https://willayd.com/fundamental-python-debugging-part-3-cython-extensions.html>`_
1616

17-
Generating debug builds
18-
-----------------------
17+
Debugging locally
18+
-----------------
1919

2020
By default building pandas from source will generate a release build. To generate a development build you can type::
2121

@@ -27,6 +27,32 @@ By default building pandas from source will generate a release build. To generat
2727

2828
By specifying ``builddir="debug"`` all of the targets will be built and placed in the debug directory relative to the project root. This helps to keep your debug and release artifacts separate; you are of course able to choose a different directory name or omit altogether if you do not care to separate build types.
2929

30+
Using Docker
31+
------------
32+
33+
To simplify the debugging process, pandas has created a Docker image with a debug build of Python and the gdb/Cython debuggers pre-installed. You may either ``docker pull pandas/pandas-debug`` to get access to this image or build it from the ``tooling/debug`` folder locallly.
34+
35+
You can then mount your pandas repository into this image via:
36+
37+
.. code-block:: sh
38+
39+
docker run --rm -it -w /data -v ${PWD}:/data pandas/pandas-debug
40+
41+
Inside the image, you can use meson to build/install pandas and place the build artifacts into a ``debug`` folder using a command as follows:
42+
43+
.. code-block:: sh
44+
45+
python -m pip install -ve . --no-build-isolation --config-settings=builddir="debug" --config-settings=setup-args="-Dbuildtype=debug"
46+
47+
If planning to use cygdb, the files required by that application are placed within the build folder. So you have to first ``cd`` to the build folder, then start that application.
48+
49+
.. code-block:: sh
50+
51+
cd debug
52+
cygdb
53+
54+
Within the debugger you can use `cygdb commands <https://docs.cython.org/en/latest/src/userguide/debugging.html#using-the-debugger>`_ to navigate cython extensions.
55+
3056
Editor support
3157
--------------
3258

0 commit comments

Comments
 (0)