Skip to content

Commit cb43fd5

Browse files
author
Sylvain MARIE
committed
Merge branch 'main' of https://github.com/pandas-dev/pandas into feature/46319_locale_strftime_period
� Conflicts: � .github/workflows/ubuntu.yml
2 parents 7b414a9 + a72340a commit cb43fd5

File tree

556 files changed

+13672
-5806
lines changed

Some content is hidden

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

556 files changed

+13672
-5806
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
test-arm:
55
machine:
66
image: ubuntu-2004:202101-01
7-
resource_class: arm.medium
7+
resource_class: arm.large
88
environment:
99
ENV_FILE: ci/deps/circle-38-arm64.yaml
1010
PYTEST_WORKERS: auto

.circleci/setup_env.sh

+12-54
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,16 @@
11
#!/bin/bash -e
22

3-
# edit the locale file if needed
4-
if [[ "$(uname)" == "Linux" && -n "$LC_ALL" ]]; then
5-
echo "Adding locale to the first line of pandas/__init__.py"
6-
rm -f pandas/__init__.pyc
7-
SEDC="3iimport locale\nlocale.setlocale(locale.LC_ALL, '$LC_ALL')\n"
8-
sed -i "$SEDC" pandas/__init__.py
9-
10-
echo "[head -4 pandas/__init__.py]"
11-
head -4 pandas/__init__.py
12-
echo
13-
fi
3+
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"
5+
echo "Downloading $MAMBA_URL"
6+
wget -q $MAMBA_URL -O minimamba.sh
7+
chmod +x minimamba.sh
148

9+
MAMBA_DIR="$HOME/miniconda3"
10+
rm -rf $MAMBA_DIR
11+
./minimamba.sh -b -p $MAMBA_DIR
1512

16-
MINICONDA_DIR=/usr/local/miniconda
17-
if [ -e $MINICONDA_DIR ] && [ "$BITS32" != yes ]; then
18-
echo "Found Miniconda installation at $MINICONDA_DIR"
19-
else
20-
echo "Install Miniconda"
21-
DEFAULT_CONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest"
22-
if [[ "$(uname -m)" == 'aarch64' ]]; then
23-
CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.10.1-4/Miniforge3-4.10.1-4-Linux-aarch64.sh"
24-
elif [[ "$(uname)" == 'Linux' ]]; then
25-
if [[ "$BITS32" == "yes" ]]; then
26-
CONDA_URL="$DEFAULT_CONDA_URL-Linux-x86.sh"
27-
else
28-
CONDA_URL="$DEFAULT_CONDA_URL-Linux-x86_64.sh"
29-
fi
30-
elif [[ "$(uname)" == 'Darwin' ]]; then
31-
CONDA_URL="$DEFAULT_CONDA_URL-MacOSX-x86_64.sh"
32-
else
33-
echo "OS $(uname) not supported"
34-
exit 1
35-
fi
36-
echo "Downloading $CONDA_URL"
37-
wget -q $CONDA_URL -O miniconda.sh
38-
chmod +x miniconda.sh
39-
40-
MINICONDA_DIR="$HOME/miniconda3"
41-
rm -rf $MINICONDA_DIR
42-
./miniconda.sh -b -p $MINICONDA_DIR
43-
fi
44-
export PATH=$MINICONDA_DIR/bin:$PATH
13+
export PATH=$MAMBA_DIR/bin:$PATH
4514

4615
echo
4716
echo "which conda"
@@ -51,7 +20,7 @@ echo
5120
echo "update conda"
5221
conda config --set ssl_verify false
5322
conda config --set quiet true --set always_yes true --set changeps1 false
54-
conda install -y -c conda-forge -n base 'mamba>=0.21.2' pip setuptools
23+
mamba install -y -c conda-forge -n base pip setuptools
5524

5625
echo "conda info -a"
5726
conda info -a
@@ -70,11 +39,6 @@ time mamba env update -n pandas-dev --file="${ENV_FILE}"
7039
echo "conda list -n pandas-dev"
7140
conda list -n pandas-dev
7241

73-
if [[ "$BITS32" == "yes" ]]; then
74-
# activate 32-bit compiler
75-
export CONDA_BUILD=1
76-
fi
77-
7842
echo "activate pandas-dev"
7943
source activate pandas-dev
8044

@@ -90,15 +54,9 @@ if pip list | grep -q ^pandas; then
9054
pip uninstall -y pandas || true
9155
fi
9256

93-
if [ "$(conda list -f qt --json)" != [] ]; then
94-
echo
95-
echo "remove qt"
96-
echo "causes problems with the clipboard, we use xsel for that"
97-
conda remove qt -y --force || true
98-
fi
99-
10057
echo "Build extensions"
101-
python setup.py build_ext -q -j3
58+
# GH 47305: Parallel build can causes flaky ImportError from pandas/_libs/tslibs
59+
python setup.py build_ext -q -j1
10260

10361
echo "Install pandas"
10462
python -m pip install --no-build-isolation --no-use-pep517 -e .

.github/workflows/32-bit-linux.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
89
pull_request:
910
branches:
1011
- main
12+
- 1.5.x
1113
- 1.4.x
1214
paths-ignore:
1315
- "doc/**"
@@ -39,8 +41,9 @@ jobs:
3941
. ~/virtualenvs/pandas-dev/bin/activate && \
4042
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \
4143
pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \
42-
python setup.py build_ext -q -j2 && \
44+
python setup.py build_ext -q -j1 && \
4345
python -m pip install --no-build-isolation --no-use-pep517 -e . && \
46+
python -m pip list && \
4447
export PANDAS_CI=1 && \
4548
pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml"
4649

.github/workflows/code-checks.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
89
pull_request:
910
branches:
1011
- main
12+
- 1.5.x
1113
- 1.4.x
1214

1315
env:

.github/workflows/codeql.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CodeQL
2+
on:
3+
schedule:
4+
# every day at midnight
5+
- cron: "0 0 * * *"
6+
7+
concurrency:
8+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
analyze:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
actions: read
16+
contents: read
17+
security-events: write
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
language:
23+
- python
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: github/codeql-action/init@v2
28+
with:
29+
languages: ${{ matrix.language }}
30+
- uses: github/codeql-action/autobuild@v2
31+
- uses: github/codeql-action/analyze@v2

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

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
9+
tags:
10+
- '*'
811
pull_request:
912
branches:
1013
- main
14+
- 1.5.x
1115
- 1.4.x
1216

1317
env:
@@ -49,6 +53,9 @@ jobs:
4953
- name: Build documentation
5054
run: doc/make.py --warnings-are-errors
5155

56+
- name: Build documentation zip
57+
run: doc/make.py zip_html
58+
5259
- name: Build the interactive terminal
5360
run: |
5461
cd web/interactive_terminal
@@ -60,7 +67,7 @@ jobs:
6067
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
6168
chmod 600 ~/.ssh/id_rsa
6269
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
63-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
70+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
6471

6572
- name: Copy cheatsheets into site directory
6673
run: cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/
@@ -73,6 +80,10 @@ jobs:
7380
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
7481
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
7582

83+
- name: Upload prod docs
84+
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/version/${GITHUB_REF_NAME}
85+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
86+
7687
- name: Move docs into site directory
7788
run: mv doc/build/html web/build/docs
7889

.github/workflows/macos-windows.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
89
pull_request:
910
branches:
1011
- main
12+
- 1.5.x
1113
- 1.4.x
1214
paths-ignore:
1315
- "doc/**"

.github/workflows/python-dev.yml

+31-17
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
# This file is purposely frozen(does not run). DO NOT DELETE IT
2-
# Unfreeze(by commentingthe if: false() condition) once the
3-
# next Python Dev version has released beta 1 and both Cython and numpy support it
4-
# After that Python has released, migrate the workflows to the
5-
# posix GHA workflows and "freeze" this file by
6-
# uncommenting the if: false() condition
1+
# This workflow may or may not run depending on the state of the next
2+
# unreleased Python version. DO NOT DELETE IT.
3+
#
4+
# In general, this file will remain frozen(present, but not running) until:
5+
# - The next unreleased Python version has released beta 1
6+
# - This version should be available on Github Actions.
7+
# - Our required build/runtime dependencies(numpy, pytz, Cython, python-dateutil)
8+
# support that unreleased Python version.
9+
# To unfreeze, comment out the ``if: false`` condition, and make sure you update
10+
# the name of the workflow and Python version in actions/setup-python to: '3.12-dev'
11+
#
12+
# After it has been unfrozen, this file should remain unfrozen(present, and running) until:
13+
# - The next Python version has been officially released.
14+
# OR
15+
# - Most/All of our optional dependencies support Python 3.11 AND
16+
# - The next Python version has released a rc(we are guaranteed a stable ABI).
17+
# To freeze this file, uncomment out the ``if: false`` condition, and migrate the jobs
18+
# to the corresponding posix/windows-macos/sdist etc. workflows.
719
# Feel free to modify this comment as necessary.
820

921
name: Python Dev
@@ -12,10 +24,12 @@ on:
1224
push:
1325
branches:
1426
- main
27+
- 1.5.x
1528
- 1.4.x
1629
pull_request:
1730
branches:
1831
- main
32+
- 1.5.x
1933
- 1.4.x
2034
paths-ignore:
2135
- "doc/**"
@@ -32,7 +46,7 @@ permissions:
3246

3347
jobs:
3448
build:
35-
if: false # Comment this line out to "unfreeze"
49+
# if: false # Uncomment this to freeze the workflow, comment it to unfreeze
3650
runs-on: ${{ matrix.os }}
3751
strategy:
3852
fail-fast: false
@@ -53,27 +67,27 @@ jobs:
5367
fetch-depth: 0
5468

5569
- name: Set up Python Dev Version
56-
uses: actions/setup-python@v3
70+
uses: actions/setup-python@v4
5771
with:
5872
python-version: '3.11-dev'
5973

6074
- name: Install dependencies
61-
shell: bash -el {0}
6275
run: |
63-
python3 -m pip install --upgrade pip setuptools wheel
64-
python3 -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
65-
python3 -m pip install git+https://github.com/nedbat/coveragepy.git
66-
python3 -m pip install cython python-dateutil pytz hypothesis pytest>=6.2.5 pytest-xdist pytest-cov pytest-asyncio>=0.17
67-
python3 -m pip list
76+
python --version
77+
python -m pip install --upgrade pip setuptools wheel
78+
python -m pip install git+https://github.com/numpy/numpy.git
79+
python -m pip install git+https://github.com/nedbat/coveragepy.git
80+
python -m pip install python-dateutil pytz cython hypothesis==6.52.1 pytest>=6.2.5 pytest-xdist pytest-cov pytest-asyncio>=0.17
81+
python -m pip list
6882
6983
- name: Build Pandas
7084
run: |
71-
python3 setup.py build_ext -q -j2
72-
python3 -m pip install -e . --no-build-isolation --no-use-pep517
85+
python setup.py build_ext -q -j2
86+
python -m pip install -e . --no-build-isolation --no-use-pep517
7387
7488
- name: Build Version
7589
run: |
76-
python3 -c "import pandas; pandas.show_versions();"
90+
python -c "import pandas; pandas.show_versions();"
7791
7892
- name: Test
7993
uses: ./.github/actions/run-tests

.github/workflows/sdist.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
89
pull_request:
910
branches:
1011
- main
12+
- 1.5.x
1113
- 1.4.x
1214
types: [labeled, opened, synchronize, reopened]
1315
paths-ignore:
@@ -79,9 +81,9 @@ jobs:
7981
run: |
8082
case "${{matrix.python-version}}" in
8183
3.8)
82-
pip install numpy==1.19.5 ;;
84+
pip install numpy==1.20.3 ;;
8385
3.9)
84-
pip install numpy==1.19.5 ;;
86+
pip install numpy==1.20.3 ;;
8587
3.10)
8688
pip install numpy==1.21.2 ;;
8789
esac

.github/workflows/ubuntu.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
89
pull_request:
910
branches:
1011
- main
12+
- 1.5.x
1113
- 1.4.x
1214
paths-ignore:
1315
- "doc/**"
@@ -60,6 +62,10 @@ jobs:
6062
# Also install zh_CN (its encoding is gb2312) but do not activate it.
6163
# It will be temporarily activated during tests with locale.setlocale
6264
extra_loc: "zh_CN"
65+
- name: "Copy-on-Write"
66+
env_file: actions-310.yaml
67+
pattern: "not slow and not network and not single_cpu"
68+
pandas_copy_on_write: "1"
6369
- name: "Data Manager"
6470
env_file: actions-38.yaml
6571
pattern: "not slow and not network and not single_cpu"
@@ -72,7 +78,7 @@ jobs:
7278
env_file: actions-310-numpydev.yaml
7379
pattern: "not slow and not network and not single_cpu"
7480
pandas_testing_mode: "deprecate"
75-
test_args: "-W error::DeprecationWarning:numpy"
81+
test_args: "-W error::DeprecationWarning:numpy -W error::FutureWarning:numpy"
7682
exclude:
7783
- env_file: actions-39.yaml
7884
pyarrow_version: "6"
@@ -92,6 +98,7 @@ jobs:
9298
LC_ALL: ${{ matrix.lc_all || '' }}
9399
PANDAS_TESTING_MODE: ${{ matrix.pandas_testing_mode || '' }}
94100
PANDAS_DATA_MANAGER: ${{ matrix.pandas_data_manager || 'block' }}
101+
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
95102
TEST_ARGS: ${{ matrix.test_args || '' }}
96103
PYTEST_WORKERS: ${{ contains(matrix.pattern, 'not single_cpu') && 'auto' || '1' }}
97104
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}

0 commit comments

Comments
 (0)