Skip to content

Commit 6947e21

Browse files
Fix merge conflict
2 parents acae171 + 0bfce5f commit 6947e21

File tree

550 files changed

+7031
-8692
lines changed

Some content is hidden

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

550 files changed

+7031
-8692
lines changed

.circleci/config.yml

-4
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ jobs:
7272
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
7373
command: |
7474
pip3 install cibuildwheel==2.15.0
75-
# When this is a nightly wheel build, allow picking up NumPy 2.0 dev wheels:
76-
if [[ "$IS_SCHEDULE_DISPATCH" == "true" || "$IS_PUSH" != 'true' ]]; then
77-
export CIBW_ENVIRONMENT="PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
78-
fi
7975
cibuildwheel --prerelease-pythons --output-dir wheelhouse
8076
8177
environment:

.github/actions/run-tests/action.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
name: Run tests and report results
2-
inputs:
3-
preload:
4-
description: Preload arguments for sanitizer
5-
required: false
6-
asan_options:
7-
description: Arguments for Address Sanitizer (ASAN)
8-
required: false
92
runs:
103
using: composite
114
steps:
125
- name: Test
13-
run: ${{ inputs.asan_options }} ${{ inputs.preload }} ci/run_tests.sh
6+
run: ci/run_tests.sh
147
shell: bash -el {0}
158

169
- name: Publish test results

.github/workflows/unit-tests.yml

-14
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@ jobs:
6868
- name: "Pyarrow Nightly"
6969
env_file: actions-311-pyarrownightly.yaml
7070
pattern: "not slow and not network and not single_cpu"
71-
- name: "ASAN / UBSAN"
72-
env_file: actions-311-sanitizers.yaml
73-
pattern: "not slow and not network and not single_cpu and not skip_ubsan"
74-
asan_options: "ASAN_OPTIONS=detect_leaks=0"
75-
preload: LD_PRELOAD=$(gcc -print-file-name=libasan.so)
76-
meson_args: --config-settings=setup-args="-Db_sanitize=address,undefined"
77-
cflags_adds: -fno-sanitize-recover=all
78-
pytest_workers: -1 # disable pytest-xdist as it swallows stderr from ASAN
7971
fail-fast: false
8072
name: ${{ matrix.name || format('ubuntu-latest {0}', matrix.env_file) }}
8173
env:
@@ -161,18 +153,12 @@ jobs:
161153
- name: Test (not single_cpu)
162154
uses: ./.github/actions/run-tests
163155
if: ${{ matrix.name != 'Pypy' }}
164-
with:
165-
preload: ${{ matrix.preload }}
166-
asan_options: ${{ matrix.asan_options }}
167156
env:
168157
# Set pattern to not single_cpu if not already set
169158
PATTERN: ${{ env.PATTERN == '' && 'not single_cpu' || matrix.pattern }}
170159

171160
- name: Test (single_cpu)
172161
uses: ./.github/actions/run-tests
173-
with:
174-
preload: ${{ matrix.preload }}
175-
asan_options: ${{ matrix.asan_options }}
176162
env:
177163
PATTERN: 'single_cpu'
178164
PYTEST_WORKERS: 0

.github/workflows/wheels.yml

+1-13
Original file line numberDiff line numberDiff line change
@@ -141,25 +141,13 @@ jobs:
141141

142142
- name: Build normal wheels
143143
if: ${{ (env.IS_SCHEDULE_DISPATCH != 'true' || env.IS_PUSH == 'true') }}
144-
uses: pypa/cibuildwheel@v2.16.5
144+
uses: pypa/cibuildwheel@v2.17.0
145145
with:
146146
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
147147
env:
148148
CIBW_PRERELEASE_PYTHONS: True
149149
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
150150

151-
- name: Build nightly wheels (with NumPy pre-release)
152-
if: ${{ (env.IS_SCHEDULE_DISPATCH == 'true' && env.IS_PUSH != 'true') }}
153-
uses: pypa/[email protected]
154-
with:
155-
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
156-
env:
157-
# The nightly wheels should be build witht he NumPy 2.0 pre-releases
158-
# which requires the additional URL.
159-
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
160-
CIBW_PRERELEASE_PYTHONS: True
161-
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
162-
163151
- name: Set up Python
164152
uses: mamba-org/setup-micromamba@v1
165153
with:

.pre-commit-config.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ci:
1919
skip: [pylint, pyright, mypy]
2020
repos:
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.1.13
22+
rev: v0.3.4
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
@@ -39,7 +39,7 @@ repos:
3939
- id: ruff-format
4040
exclude: ^scripts
4141
- repo: https://github.com/jendrikseipp/vulture
42-
rev: 'v2.10'
42+
rev: 'v2.11'
4343
hooks:
4444
- id: vulture
4545
entry: python scripts/run_vulture.py
@@ -78,7 +78,7 @@ repos:
7878
hooks:
7979
- id: pylint
8080
stages: [manual]
81-
args: [--load-plugins=pylint.extensions.redefined_loop_name]
81+
args: [--load-plugins=pylint.extensions.redefined_loop_name, --fail-on=I0021]
8282
- id: pylint
8383
alias: redefined-outer-name
8484
name: Redefining name from outer scope
@@ -93,11 +93,11 @@ repos:
9393
args: [--disable=all, --enable=redefined-outer-name]
9494
stages: [manual]
9595
- repo: https://github.com/PyCQA/isort
96-
rev: 5.12.0
96+
rev: 5.13.2
9797
hooks:
9898
- id: isort
9999
- repo: https://github.com/asottile/pyupgrade
100-
rev: v3.15.0
100+
rev: v3.15.2
101101
hooks:
102102
- id: pyupgrade
103103
args: [--py39-plus]
@@ -116,7 +116,7 @@ repos:
116116
hooks:
117117
- id: sphinx-lint
118118
- repo: https://github.com/pre-commit/mirrors-clang-format
119-
rev: v17.0.6
119+
rev: v18.1.2
120120
hooks:
121121
- id: clang-format
122122
files: ^pandas/_libs/src|^pandas/_libs/include

Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RUN apt-get install -y build-essential
99
RUN apt-get install -y libhdf5-dev libgles2-mesa-dev
1010

1111
RUN python -m pip install --upgrade pip
12-
RUN python -m pip install \
13-
-r https://raw.githubusercontent.com/pandas-dev/pandas/main/requirements-dev.txt
12+
COPY requirements-dev.txt /tmp
13+
RUN python -m pip install -r /tmp/requirements-dev.txt
14+
RUN git config --global --add safe.directory /home/pandas
1415
CMD ["/bin/bash"]

asv_bench/benchmarks/categoricals.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def setup(self):
8888
)
8989

9090
for col in ("int", "float", "timestamp"):
91-
self.df[col + "_as_str"] = self.df[col].astype(str)
91+
self.df[f"{col}_as_str"] = self.df[col].astype(str)
9292

9393
for col in self.df.columns:
9494
self.df[col] = self.df[col].astype("category")

asv_bench/benchmarks/indexing.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
lower-level methods directly on Index and subclasses, see index_object.py,
44
indexing_engine.py, and index_cached.py
55
"""
6+
67
from datetime import datetime
78
import warnings
89

asv_bench/benchmarks/join_merge.py

+17
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,23 @@ def time_i8merge(self, how):
328328
merge(self.left, self.right, how=how)
329329

330330

331+
class UniqueMerge:
332+
params = [4_000_000, 1_000_000]
333+
param_names = ["unique_elements"]
334+
335+
def setup(self, unique_elements):
336+
N = 1_000_000
337+
self.left = DataFrame({"a": np.random.randint(1, unique_elements, (N,))})
338+
self.right = DataFrame({"a": np.random.randint(1, unique_elements, (N,))})
339+
uniques = self.right.a.drop_duplicates()
340+
self.right["a"] = concat(
341+
[uniques, Series(np.arange(0, -(N - len(uniques)), -1))], ignore_index=True
342+
)
343+
344+
def time_unique_merge(self, unique_elements):
345+
merge(self.left, self.right, how="inner")
346+
347+
331348
class MergeDatetime:
332349
params = [
333350
[

asv_bench/benchmarks/libs.py

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
If a PR does not edit anything in _libs/, then it is unlikely that the
66
benchmarks will be affected.
77
"""
8+
89
import numpy as np
910

1011
from pandas._libs.lib import (

asv_bench/benchmarks/package.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Benchmarks for pandas at the package-level.
33
"""
4+
45
import subprocess
56
import sys
67

asv_bench/benchmarks/period.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Period benchmarks with non-tslibs dependencies. See
33
benchmarks.tslibs.period for benchmarks that rely only on tslibs.
44
"""
5+
56
from pandas import (
67
DataFrame,
78
Period,

asv_bench/benchmarks/timeseries.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def setup(self):
183183
self.dt_ts = Series(5, rng3, dtype="datetime64[ns]")
184184

185185
def time_resample(self):
186-
self.dt_ts.resample("1S").last()
186+
self.dt_ts.resample("1s").last()
187187

188188

189189
class AsOf:

asv_bench/benchmarks/tslibs/offsets.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
offsets benchmarks that rely only on tslibs. See benchmarks.offset for
33
offsets benchmarks that rely on other parts of pandas.
44
"""
5+
56
from datetime import datetime
67

78
import numpy as np

asv_bench/benchmarks/tslibs/resolution.py

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
df.loc[key] = (val.average, val.stdev)
1818
1919
"""
20+
2021
import numpy as np
2122

2223
try:

asv_bench/benchmarks/tslibs/timedelta.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Timedelta benchmarks that rely only on tslibs. See benchmarks.timedeltas for
33
Timedelta benchmarks that rely on other parts of pandas.
44
"""
5+
56
import datetime
67

78
import numpy as np

asv_bench/benchmarks/tslibs/tslib.py

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
val = %timeit -o tr.time_ints_to_pydatetime(box, size, tz)
1616
df.loc[key] = (val.average, val.stdev)
1717
"""
18+
1819
from datetime import (
1920
timedelta,
2021
timezone,

0 commit comments

Comments
 (0)