Skip to content

Commit 221ee28

Browse files
authored
Merge branch 'main' into string_dtype_tests
2 parents 27c718d + 7b8c6f6 commit 221ee28

File tree

322 files changed

+5555
-4327
lines changed

Some content is hidden

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

322 files changed

+5555
-4327
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].1
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
################

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/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

doc/source/development/maintaining.rst

+13-9
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ reading.
4444
Issue triage
4545
------------
4646

47+
Triage is an important first step in addressing issues reported by the community, and even
48+
partial contributions are a great way to help maintain pandas. Only remove the "Needs Triage"
49+
tag once all of the steps below have been completed.
4750

4851
Here's a typical workflow for triaging a newly opened issue.
4952

@@ -67,9 +70,9 @@ Here's a typical workflow for triaging a newly opened issue.
6770
3. **Is this a duplicate issue?**
6871

6972
We have many open issues. If a new issue is clearly a duplicate, label the
70-
new issue as "Duplicate" assign the milestone "No Action", and close the issue
71-
with a link to the original issue. Make sure to still thank the reporter, and
72-
encourage them to chime in on the original issue, and perhaps try to fix it.
73+
new issue as "Duplicate" and close the issue with a link to the original issue.
74+
Make sure to still thank the reporter, and encourage them to chime in on the
75+
original issue, and perhaps try to fix it.
7376

7477
If the new issue provides relevant information, such as a better or slightly
7578
different example, add it to the original issue as a comment or an edit to
@@ -90,15 +93,20 @@ Here's a typical workflow for triaging a newly opened issue.
9093
If a reproducible example is provided, but you see a simplification,
9194
edit the original post with your simpler reproducible example.
9295

96+
Ensure the issue exists on the main branch and that it has the "Needs Triage" tag
97+
until all steps have been completed. Add a comment to the issue once you have
98+
verified it exists on the main branch, so others know it has been confirmed.
99+
93100
5. **Is this a clearly defined feature request?**
94101

95102
Generally, pandas prefers to discuss and design new features in issues, before
96103
a pull request is made. Encourage the submitter to include a proposed API
97104
for the new feature. Having them write a full docstring is a good way to
98105
pin down specifics.
99106

100-
We'll need a discussion from several pandas maintainers before deciding whether
101-
the proposal is in scope for pandas.
107+
Tag new feature requests with "Needs Discussion", as we'll need a discussion
108+
from several pandas maintainers before deciding whether the proposal is in
109+
scope for pandas.
102110

103111
6. **Is this a usage question?**
104112

@@ -117,10 +125,6 @@ Here's a typical workflow for triaging a newly opened issue.
117125
If the issue is clearly defined and the fix seems relatively straightforward,
118126
label the issue as "Good first issue".
119127

120-
Typically, new issues will be assigned the "Contributions welcome" milestone,
121-
unless it's know that this issue should be addressed in a specific release (say
122-
because it's a large regression).
123-
124128
Once you have completed the above, make sure to remove the "needs triage" label.
125129

126130
.. _maintaining.regressions:

doc/source/user_guide/advanced.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ of :ref:`frequency aliases <timeseries.offset_aliases>` with datetime-like inter
976976
977977
pd.interval_range(start=pd.Timestamp("2017-01-01"), periods=4, freq="W")
978978
979-
pd.interval_range(start=pd.Timedelta("0 days"), periods=3, freq="9H")
979+
pd.interval_range(start=pd.Timedelta("0 days"), periods=3, freq="9h")
980980
981981
Additionally, the ``closed`` parameter can be used to specify which side(s) the intervals
982982
are closed on. Intervals are closed on the right side by default.

doc/source/user_guide/basics.rst

-14
Original file line numberDiff line numberDiff line change
@@ -408,20 +408,6 @@ raise a ValueError:
408408
409409
pd.Series(['foo', 'bar', 'baz']) == pd.Series(['foo'])
410410
411-
Note that this is different from the NumPy behavior where a comparison can
412-
be broadcast:
413-
414-
.. ipython:: python
415-
416-
np.array([1, 2, 3]) == np.array([2])
417-
418-
or it can return False if broadcasting can not be done:
419-
420-
.. ipython:: python
421-
:okwarning:
422-
423-
np.array([1, 2, 3]) == np.array([1, 2])
424-
425411
Combining overlapping data sets
426412
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
427413

0 commit comments

Comments
 (0)