Skip to content

Commit dab4675

Browse files
Merge branch 'main' into add-emscripten-ci
2 parents cc233e4 + 73fd026 commit dab4675

File tree

256 files changed

+4017
-4745
lines changed

Some content is hidden

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

256 files changed

+4017
-4745
lines changed

.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

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -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

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

ci/code_checks.sh

+1,199-1,230
Large diffs are not rendered by default.

ci/deps/actions-310.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies:
2626
- beautifulsoup4>=4.11.2
2727
- blosc>=1.21.3
2828
- bottleneck>=1.3.6
29-
- fastparquet>=2023.04.0
29+
- fastparquet>=2023.10.0
3030
- fsspec>=2022.11.0
3131
- html5lib>=1.1
3232
- hypothesis>=6.46.1
@@ -57,7 +57,7 @@ dependencies:
5757
- zstandard>=0.19.0
5858

5959
- pip:
60-
- adbc-driver-postgresql>=0.8.0
60+
- adbc-driver-postgresql>=0.10.0
6161
- adbc-driver-sqlite>=0.8.0
6262
- tzdata>=2022.7
6363
- pytest-localserver>=0.7.1

ci/deps/actions-311-downstream_compat.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies:
2828
- beautifulsoup4>=4.11.2
2929
- blosc>=1.21.3
3030
- bottleneck>=1.3.6
31-
- fastparquet>=2023.04.0
31+
- fastparquet>=2023.10.0
3232
- fsspec>=2022.11.0
3333
- html5lib>=1.1
3434
- hypothesis>=6.46.1
@@ -72,6 +72,6 @@ dependencies:
7272
- pyyaml
7373
- py
7474
- pip:
75-
- adbc-driver-postgresql>=0.8.0
75+
- adbc-driver-postgresql>=0.10.0
7676
- adbc-driver-sqlite>=0.8.0
7777
- tzdata>=2022.7

ci/deps/actions-311-numpydev.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ dependencies:
1313
# test dependencies
1414
- pytest>=7.3.2
1515
- pytest-cov
16-
# Once pytest-cov > 4 comes out, unpin this
17-
# Right now, a DeprecationWarning related to rsyncdir
18-
# causes an InternalError within pytest
19-
- pytest-xdist>=2.2.0, <3
16+
- pytest-xdist>=2.2.0
2017
- hypothesis>=6.46.1
2118

2219
# pandas dependencies

ci/deps/actions-311-sanitizers.yaml

-32
This file was deleted.

ci/deps/actions-311.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies:
2626
- beautifulsoup4>=4.11.2
2727
- blosc>=1.21.3
2828
- bottleneck>=1.3.6
29-
- fastparquet>=2023.04.0
29+
- fastparquet>=2023.10.0
3030
- fsspec>=2022.11.0
3131
- html5lib>=1.1
3232
- hypothesis>=6.46.1
@@ -57,6 +57,6 @@ dependencies:
5757
- zstandard>=0.19.0
5858

5959
- pip:
60-
- adbc-driver-postgresql>=0.8.0
60+
- adbc-driver-postgresql>=0.10.0
6161
- adbc-driver-sqlite>=0.8.0
6262
- pytest-localserver>=0.7.1

ci/deps/actions-312.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ dependencies:
2626
- beautifulsoup4>=4.11.2
2727
- blosc>=1.21.3
2828
- bottleneck>=1.3.6
29-
- fastparquet>=2023.04.0
29+
- fastparquet>=2023.10.0
3030
- fsspec>=2022.11.0
3131
- html5lib>=1.1
3232
- hypothesis>=6.46.1
3333
- gcsfs>=2022.11.0
3434
- jinja2>=3.1.2
3535
- lxml>=4.9.2
3636
- matplotlib>=3.6.3
37-
# - numba>=0.56.4
37+
- numba>=0.56.4
3838
- numexpr>=2.8.4
3939
- odfpy>=1.4.1
4040
- qtpy>=2.3.0
@@ -44,7 +44,7 @@ dependencies:
4444
- pyarrow>=10.0.1
4545
- pymysql>=1.0.2
4646
- pyreadstat>=1.2.0
47-
# - pytables>=3.8.0
47+
- pytables>=3.8.0
4848
- python-calamine>=0.1.7
4949
- pyxlsb>=1.0.10
5050
- s3fs>=2022.11.0
@@ -57,7 +57,7 @@ dependencies:
5757
- zstandard>=0.19.0
5858

5959
- pip:
60-
- adbc-driver-postgresql>=0.8.0
60+
- adbc-driver-postgresql>=0.10.0
6161
- adbc-driver-sqlite>=0.8.0
6262
- tzdata>=2022.7
6363
- pytest-localserver>=0.7.1

ci/deps/actions-39-minimum_versions.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies:
2929
- beautifulsoup4=4.11.2
3030
- blosc=1.21.3
3131
- bottleneck=1.3.6
32-
- fastparquet=2023.04.0
32+
- fastparquet=2023.10.0
3333
- fsspec=2022.11.0
3434
- html5lib=1.1
3535
- hypothesis=6.46.1
@@ -60,6 +60,6 @@ dependencies:
6060
- zstandard=0.19.0
6161

6262
- pip:
63-
- adbc-driver-postgresql==0.8.0
63+
- adbc-driver-postgresql==0.10.0
6464
- adbc-driver-sqlite==0.8.0
6565
- tzdata==2022.7

ci/deps/actions-39.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies:
2626
- beautifulsoup4>=4.11.2
2727
- blosc>=1.21.3
2828
- bottleneck>=1.3.6
29-
- fastparquet>=2023.04.0
29+
- fastparquet>=2023.10.0
3030
- fsspec>=2022.11.0
3131
- html5lib>=1.1
3232
- hypothesis>=6.46.1
@@ -57,7 +57,7 @@ dependencies:
5757
- zstandard>=0.19.0
5858

5959
- pip:
60-
- adbc-driver-postgresql>=0.8.0
60+
- adbc-driver-postgresql>=0.10.0
6161
- adbc-driver-sqlite>=0.8.0
6262
- tzdata>=2022.7
6363
- pytest-localserver>=0.7.1

ci/deps/circle-310-arm64.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
- beautifulsoup4>=4.11.2
2828
- blosc>=1.21.3
2929
- bottleneck>=1.3.6
30-
- fastparquet>=2023.04.0
30+
- fastparquet>=2023.10.0
3131
- fsspec>=2022.11.0
3232
- html5lib>=1.1
3333
- hypothesis>=6.46.1

ci/run_tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ echo PYTHONHASHSEED=$PYTHONHASHSEED
1010

1111
COVERAGE="-s --cov=pandas --cov-report=xml --cov-append --cov-config=pyproject.toml"
1212

13-
PYTEST_CMD="MESONPY_EDITABLE_VERBOSE=1 PYTHONDEVMODE=1 PYTHONWARNDEFAULTENCODING=1 pytest -r fE -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET"
13+
PYTEST_CMD="MESONPY_EDITABLE_VERBOSE=1 PYTHONDEVMODE=1 PYTHONWARNDEFAULTENCODING=1 pytest -r fE -n $PYTEST_WORKERS --dist=worksteal $TEST_ARGS $COVERAGE $PYTEST_TARGET"
1414

1515
if [[ "$PATTERN" ]]; then
1616
PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\""

doc/source/_static/css/getting_started.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ ul.task-bullet > li > p:first-child {
248248
}
249249

250250
.tutorial-card .card-header {
251+
--bs-card-cap-color: var(--pst-color-text-base);
251252
cursor: pointer;
252253
background-color: var(--pst-color-surface);
253254
border: 1px solid var(--pst-color-border)
@@ -269,7 +270,7 @@ ul.task-bullet > li > p:first-child {
269270

270271

271272
.tutorial-card .gs-badge-link a {
272-
color: var(--pst-color-text-base);
273+
color: var(--pst-color-primary-text);
273274
text-decoration: none;
274275
}
275276

doc/source/development/contributing_docstring.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ Finally, docstrings can also be appended to with the ``doc`` decorator.
940940

941941
In this example, we'll create a parent docstring normally (this is like
942942
``pandas.core.generic.NDFrame``). Then we'll have two children (like
943-
``pandas.core.series.Series`` and ``pandas.core.frame.DataFrame``). We'll
943+
``pandas.core.series.Series`` and ``pandas.DataFrame``). We'll
944944
substitute the class names in this docstring.
945945

946946
.. code-block:: python

doc/source/development/maintaining.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ and then run::
151151
git bisect start
152152
git bisect good v1.4.0
153153
git bisect bad v1.5.0
154-
git bisect run bash -c "python setup.py build_ext -j 4; python t.py"
154+
git bisect run bash -c "python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true; python t.py"
155155

156156
This finds the first commit that changed the behavior. The C extensions have to be
157157
rebuilt at every step, so the search can take a while.
158158

159159
Exit bisect and rebuild the current version::
160160

161161
git bisect reset
162-
python setup.py build_ext -j 4
162+
python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
163163

164164
Report your findings under the corresponding issue and ping the commit author to get
165165
their input.

doc/source/getting_started/install.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ SQLAlchemy 2.0.0 postgresql, SQL support for dat
346346
sql-other
347347
psycopg2 2.9.6 postgresql PostgreSQL engine for sqlalchemy
348348
pymysql 1.0.2 mysql MySQL engine for sqlalchemy
349-
adbc-driver-postgresql 0.8.0 postgresql ADBC Driver for PostgreSQL
349+
adbc-driver-postgresql 0.10.0 postgresql ADBC Driver for PostgreSQL
350350
adbc-driver-sqlite 0.8.0 sql-other ADBC Driver for SQLite
351351
========================= ================== =============== =============================================================
352352

@@ -361,7 +361,7 @@ Dependency Minimum Version pip extra Notes
361361
PyTables 3.8.0 hdf5 HDF5-based reading / writing
362362
blosc 1.21.3 hdf5 Compression for HDF5; only available on ``conda``
363363
zlib hdf5 Compression for HDF5
364-
fastparquet 2023.04.0 - Parquet reading / writing (pyarrow is default)
364+
fastparquet 2023.10.0 - Parquet reading / writing (pyarrow is default)
365365
pyarrow 10.0.1 parquet, feather Parquet, ORC, and feather reading / writing
366366
pyreadstat 1.2.0 spss SPSS files (.sav) reading
367367
odfpy 1.4.1 excel Open document format (.odf, .ods, .odt) reading / writing

0 commit comments

Comments
 (0)