Skip to content

Commit 7baacd4

Browse files
committed
Merge remote-tracking branch 'upstream/main' into cow_series_copy_false_everywhere
2 parents ef64f09 + 9051aee commit 7baacd4

File tree

293 files changed

+4332
-2600
lines changed

Some content is hidden

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

293 files changed

+4332
-2600
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
jobs:
44
test-arm:
55
machine:
6-
image: ubuntu-2004:202101-01
6+
image: ubuntu-2004:2022.04.1
77
resource_class: arm.large
88
environment:
99
ENV_FILE: ci/deps/circle-38-arm64.yaml
@@ -23,7 +23,7 @@ jobs:
2323
cibw-build:
2424
type: string
2525
machine:
26-
image: ubuntu-2004:202101-01
26+
image: ubuntu-2004:2022.04.1
2727
resource_class: arm.large
2828
environment:
2929
ENV_FILE: ci/deps/circle-38-arm64.yaml
@@ -48,7 +48,7 @@ jobs:
4848
- run:
4949
name: Build aarch64 wheels
5050
command: |
51-
pip3 install cibuildwheel==2.9.0
51+
pip3 install cibuildwheel==2.12.1
5252
cibuildwheel --output-dir wheelhouse
5353
environment:
5454
CIBW_BUILD: << parameters.cibw-build >>
@@ -57,7 +57,7 @@ jobs:
5757
name: Install Anaconda Client & Upload Wheels
5858
command: |
5959
echo "Install Mambaforge"
60-
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/4.14.0-0/Mambaforge-4.14.0-0-Linux-aarch64.sh"
60+
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/23.1.0-0/Mambaforge-23.1.0-0-Linux-aarch64.sh"
6161
echo "Downloading $MAMBA_URL"
6262
wget -q $MAMBA_URL -O minimamba.sh
6363
chmod +x minimamba.sh

.circleci/setup_env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash -e
22

33
echo "Install Mambaforge"
4-
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/4.14.0-0/Mambaforge-4.14.0-0-Linux-aarch64.sh"
4+
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/23.1.0-0/Mambaforge-23.1.0-0-Linux-aarch64.sh"
55
echo "Downloading $MAMBA_URL"
66
wget -q $MAMBA_URL -O minimamba.sh
77
chmod +x minimamba.sh

.github/actions/setup-conda/action.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,9 @@ inputs:
99
extra-specs:
1010
description: Extra packages to install
1111
required: false
12-
pyarrow-version:
13-
description: If set, overrides the PyArrow version in the Conda environment to the given string.
14-
required: false
1512
runs:
1613
using: composite
1714
steps:
18-
- name: Set Arrow version in ${{ inputs.environment-file }} to ${{ inputs.pyarrow-version }}
19-
run: |
20-
grep -q ' - pyarrow' ${{ inputs.environment-file }}
21-
sed -i"" -e "s/ - pyarrow/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }}
22-
cat ${{ inputs.environment-file }}
23-
shell: bash
24-
if: ${{ inputs.pyarrow-version }}
25-
2615
- name: Install ${{ inputs.environment-file }}
2716
uses: mamba-org/provision-with-micromamba@v12
2817
with:

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
labels:
8+
- "CI"
9+
- "Dependencies"

.github/workflows/code-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
python-version: '3.9'
3636

3737
- name: Run pre-commit
38-
uses: pre-commit/action@v2.0.3
38+
uses: pre-commit/action@v3.0.0
3939
with:
4040
extra_args: --verbose --all-files
4141

@@ -93,7 +93,7 @@ jobs:
9393
if: ${{ steps.build.outcome == 'success' && always() }}
9494

9595
- name: Typing + pylint
96-
uses: pre-commit/action@v2.0.3
96+
uses: pre-commit/action@v3.0.0
9797
with:
9898
extra_args: --verbose --hook-stage manual --all-files
9999
if: ${{ steps.build.outcome == 'success' && always() }}

.github/workflows/macos-windows.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ jobs:
5252
uses: ./.github/actions/setup-conda
5353
with:
5454
environment-file: ci/deps/${{ matrix.env_file }}
55-
pyarrow-version: ${{ matrix.os == 'macos-latest' && '9' || '' }}
5655

5756
- name: Build Pandas
5857
uses: ./.github/actions/build_pandas

.github/workflows/stale-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
pull-requests: write
1414
runs-on: ubuntu-22.04
1515
steps:
16-
- uses: actions/stale@v4
16+
- uses: actions/stale@v8
1717
with:
1818
repo-token: ${{ secrets.GITHUB_TOKEN }}
1919
stale-pr-message: "This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this."

.github/workflows/ubuntu.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ jobs:
2626
strategy:
2727
matrix:
2828
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml, actions-311.yaml]
29-
pattern: ["not single_cpu", "single_cpu"]
30-
pyarrow_version: ["8", "9", "10"]
31-
pandas_ci: [1]
29+
# Prevent the include jobs from overriding other jobs
30+
pattern: [""]
3231
include:
3332
- name: "Downstream Compat"
3433
env_file: actions-38-downstream_compat.yaml
@@ -75,22 +74,12 @@ jobs:
7574
test_args: "-W error::DeprecationWarning -W error::FutureWarning"
7675
# TODO(cython3): Re-enable once next-beta(after beta 1) comes out
7776
# There are some warnings failing the build with -werror
78-
pandas_ci: 0
79-
exclude:
80-
- env_file: actions-38.yaml
81-
pyarrow_version: "8"
82-
- env_file: actions-38.yaml
83-
pyarrow_version: "9"
84-
- env_file: actions-39.yaml
85-
pyarrow_version: "8"
86-
- env_file: actions-39.yaml
87-
pyarrow_version: "9"
88-
- env_file: actions-310.yaml
89-
pyarrow_version: "8"
90-
- env_file: actions-310.yaml
91-
pyarrow_version: "9"
77+
pandas_ci: "0"
78+
- name: "Pyarrow Nightly"
79+
env_file: actions-311-pyarrownightly.yaml
80+
pattern: "not slow and not network and not single_cpu"
9281
fail-fast: false
93-
name: ${{ matrix.name || format('{0} pyarrow={1} {2}', matrix.env_file, matrix.pyarrow_version, matrix.pattern) }}
82+
name: ${{ matrix.name || matrix.env_file }}
9483
env:
9584
ENV_FILE: ci/deps/${{ matrix.env_file }}
9685
PATTERN: ${{ matrix.pattern }}
@@ -99,16 +88,16 @@ jobs:
9988
LC_ALL: ${{ matrix.lc_all || '' }}
10089
PANDAS_DATA_MANAGER: ${{ matrix.pandas_data_manager || 'block' }}
10190
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
102-
PANDAS_CI: ${{ matrix.pandas_ci }}
91+
PANDAS_CI: ${{ matrix.pandas_ci || '1' }}
10392
TEST_ARGS: ${{ matrix.test_args || '' }}
104-
PYTEST_WORKERS: ${{ contains(matrix.pattern, 'not single_cpu') && 'auto' || '1' }}
93+
PYTEST_WORKERS: 'auto'
10594
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
10695
IS_PYPY: ${{ contains(matrix.env_file, 'pypy') }}
10796
# TODO: re-enable coverage on pypy, its slow
10897
COVERAGE: ${{ !contains(matrix.env_file, 'pypy') }}
10998
concurrency:
11099
# https://github.community/t/concurrecy-not-work-for-push/183068/7
111-
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.pyarrow_version || '' }}-${{ matrix.extra_apt || '' }}-${{ matrix.pandas_data_manager || '' }}
100+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.extra_apt || '' }}-${{ matrix.pandas_data_manager || '' }}
112101
cancel-in-progress: true
113102

114103
services:
@@ -167,12 +156,24 @@ jobs:
167156
uses: ./.github/actions/setup-conda
168157
with:
169158
environment-file: ${{ env.ENV_FILE }}
170-
pyarrow-version: ${{ matrix.pyarrow_version }}
171159

172160
- name: Build Pandas
161+
id: build
173162
uses: ./.github/actions/build_pandas
174163

175-
- name: Test
164+
- name: Test (not single_cpu)
165+
uses: ./.github/actions/run-tests
166+
# TODO: Don't continue on error for PyPy
167+
continue-on-error: ${{ env.IS_PYPY == 'true' }}
168+
env:
169+
# Set pattern to not single_cpu if not already set
170+
PATTERN: ${{ env.PATTERN == '' && 'not single_cpu' || matrix.pattern }}
171+
172+
- name: Test (single_cpu)
176173
uses: ./.github/actions/run-tests
177174
# TODO: Don't continue on error for PyPy
178175
continue-on-error: ${{ env.IS_PYPY == 'true' }}
176+
env:
177+
PATTERN: 'single_cpu'
178+
PYTEST_WORKERS: 1
179+
if: ${{ matrix.pattern == '' && (always() && steps.build.outcome == 'success')}}

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
fetch-depth: 0
7272

7373
- name: Build wheels
74-
uses: pypa/cibuildwheel@v2.9.0
74+
uses: pypa/cibuildwheel@v2.12.1
7575
env:
7676
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
7777

.pre-commit-config.yaml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
types_or: [python, pyi]
2929
additional_dependencies: [black==23.1.0]
3030
- repo: https://github.com/charliermarsh/ruff-pre-commit
31-
rev: v0.0.255
31+
rev: v0.0.259
3232
hooks:
3333
- id: ruff
3434
args: [--exit-non-zero-on-fix]
@@ -392,14 +392,6 @@ repos:
392392
files: ^pandas/
393393
exclude: ^(pandas/_libs/|pandas/tests/|pandas/errors/__init__.py$|pandas/_version.py)
394394
types: [python]
395-
- id: flake8-pyi
396-
name: flake8-pyi
397-
entry: flake8 --extend-ignore=E301,E302,E305,E701,E704
398-
types: [pyi]
399-
language: python
400-
additional_dependencies:
401-
- flake8==5.0.4
402-
- flake8-pyi==22.8.1
403395
- id: future-annotations
404396
name: import annotations from __future__
405397
entry: 'from __future__ import annotations'
@@ -421,8 +413,8 @@ repos:
421413
language: python
422414
stages: [manual]
423415
additional_dependencies:
424-
- autotyping==22.9.0
425-
- libcst==0.4.7
416+
- autotyping==23.3.0
417+
- libcst==0.4.9
426418
- id: check-test-naming
427419
name: check that test names start with 'test'
428420
entry: python -m scripts.check_test_naming

asv_bench/benchmarks/arithmetic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,14 @@ def setup(self, tz):
266266
self.ts = self.s[halfway]
267267

268268
self.s2 = Series(date_range("20010101", periods=N, freq="s", tz=tz))
269+
self.ts_different_reso = Timestamp("2001-01-02", tz=tz)
269270

270271
def time_series_timestamp_compare(self, tz):
271272
self.s <= self.ts
272273

274+
def time_series_timestamp_different_reso_compare(self, tz):
275+
self.s <= self.ts_different_reso
276+
273277
def time_timestamp_series_compare(self, tz):
274278
self.ts >= self.s
275279

asv_bench/benchmarks/strings.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def setup(self, dtype):
3434

3535
# GH37371. Testing construction of string series/frames from ExtensionArrays
3636
self.series_cat_arr = Categorical(self.series_arr)
37-
self.frame_cat_arr = Categorical(self.frame_arr)
3837

3938
def time_series_construction(self, dtype):
4039
Series(self.series_arr, dtype=dtype)
@@ -54,12 +53,6 @@ def time_cat_series_construction(self, dtype):
5453
def peakmem_cat_series_construction(self, dtype):
5554
Series(self.series_cat_arr, dtype=dtype)
5655

57-
def time_cat_frame_construction(self, dtype):
58-
DataFrame(self.frame_cat_arr, dtype=dtype)
59-
60-
def peakmem_cat_frame_construction(self, dtype):
61-
DataFrame(self.frame_cat_arr, dtype=dtype)
62-
6356

6457
class Methods(Dtypes):
6558
def time_center(self, dtype):

ci/code_checks.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8686
MSG='Partially validate docstrings (EX01)' ; echo $MSG
8787
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX01 --ignore_functions \
8888
pandas.Series.index \
89-
pandas.Series.hasnans \
90-
pandas.Series.to_list \
9189
pandas.Series.__iter__ \
9290
pandas.Series.keys \
9391
pandas.Series.item \
@@ -309,7 +307,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
309307
pandas_object \
310308
pandas.api.interchange.from_dataframe \
311309
pandas.Index.values \
312-
pandas.Index.hasnans \
313310
pandas.Index.dtype \
314311
pandas.Index.inferred_type \
315312
pandas.Index.shape \

ci/deps/actions-310.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dependencies:
4141
- psycopg2>=2.8.6
4242
- pymysql>=1.0.2
4343
- pytables>=3.6.1
44-
- pyarrow
44+
- pyarrow>=7.0.0
4545
- pyreadstat>=1.1.2
4646
- python-snappy>=0.6.0
4747
- pyxlsb>=1.0.8
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: pandas-dev
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.11
6+
7+
# build dependencies
8+
- versioneer[toml]
9+
- cython>=0.29.33
10+
11+
# test dependencies
12+
- pytest>=7.0.0
13+
- pytest-cov
14+
- pytest-xdist>=2.2.0
15+
- hypothesis>=6.34.2
16+
- pytest-asyncio>=0.17.0
17+
18+
# required dependencies
19+
- python-dateutil
20+
- numpy
21+
- pytz
22+
- pip
23+
24+
- pip:
25+
- "tzdata>=2022.1"
26+
- "--extra-index-url https://pypi.fury.io/arrow-nightlies/"
27+
- "--prefer-binary"
28+
- "--pre"
29+
- "pyarrow"

ci/deps/actions-311.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dependencies:
4141
- psycopg2>=2.8.6
4242
- pymysql>=1.0.2
4343
# - pytables>=3.8.0 # first version that supports 3.11
44-
- pyarrow
44+
- pyarrow>=7.0.0
4545
- pyreadstat>=1.1.2
4646
- python-snappy>=0.6.0
4747
- pyxlsb>=1.0.8

ci/deps/actions-38-downstream_compat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies:
3939
- openpyxl<3.1.1, >=3.0.7
4040
- odfpy>=1.4.1
4141
- psycopg2>=2.8.6
42-
- pyarrow
42+
- pyarrow>=7.0.0
4343
- pymysql>=1.0.2
4444
- pyreadstat>=1.1.2
4545
- pytables>=3.6.1

ci/deps/actions-38.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies:
3939
- odfpy>=1.4.1
4040
- pandas-gbq>=0.15.0
4141
- psycopg2>=2.8.6
42-
- pyarrow
42+
- pyarrow>=7.0.0
4343
- pymysql>=1.0.2
4444
- pyreadstat>=1.1.2
4545
- pytables>=3.6.1

ci/deps/actions-39.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies:
4040
- pandas-gbq>=0.15.0
4141
- psycopg2>=2.8.6
4242
- pymysql>=1.0.2
43-
- pyarrow
43+
- pyarrow>=7.0.0
4444
- pyreadstat>=1.1.2
4545
- pytables>=3.6.1
4646
- python-snappy>=0.6.0

ci/deps/circle-38-arm64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies:
3939
- odfpy>=1.4.1
4040
- pandas-gbq>=0.15.0
4141
- psycopg2>=2.8.6
42-
- pyarrow
42+
- pyarrow>=7.0.0
4343
- pymysql>=1.0.2
4444
# Not provided on ARM
4545
#- pyreadstat

0 commit comments

Comments
 (0)