Skip to content

Commit d95e084

Browse files
authored
Merge branch 'master' into master
2 parents d226ae5 + 87d7855 commit d95e084

File tree

206 files changed

+4232
-2617
lines changed

Some content is hidden

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

206 files changed

+4232
-2617
lines changed

.github/workflows/ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
pull_request:
88
branches:
99
- master
10-
- 1.2.x
1110
- 1.3.x
1211

1312
env:

.github/workflows/database.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
pull_request:
88
branches:
99
- master
10-
- 1.2.x
1110
- 1.3.x
1211
paths-ignore:
1312
- "doc/**"
@@ -19,15 +18,15 @@ env:
1918
COVERAGE: true
2019

2120
jobs:
22-
Linux_py37_IO:
21+
Linux_py38_IO:
2322
runs-on: ubuntu-latest
2423
defaults:
2524
run:
2625
shell: bash -l {0}
2726

2827
strategy:
2928
matrix:
30-
ENV_FILE: [ci/deps/actions-37-db-min.yaml, ci/deps/actions-37-db.yaml]
29+
ENV_FILE: [ci/deps/actions-38-db-min.yaml, ci/deps/actions-38-db.yaml]
3130
fail-fast: false
3231

3332
concurrency:

.github/workflows/posix.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
pull_request:
88
branches:
99
- master
10-
- 1.2.x
1110
- 1.3.x
1211
paths-ignore:
1312
- "doc/**"
@@ -25,14 +24,13 @@ jobs:
2524
strategy:
2625
matrix:
2726
settings: [
28-
[actions-37-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
29-
[actions-37.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
30-
[actions-37-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
31-
[actions-37-slow.yaml, "slow", "", "", "", "", ""],
27+
[actions-38-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
28+
[actions-38-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
3229
[actions-38.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
3330
[actions-38-slow.yaml, "slow", "", "", "", "", ""],
3431
[actions-38-locale.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""],
35-
[actions-38-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"],
32+
[actions-39-slow.yaml, "slow", "", "", "", "", ""],
33+
[actions-39-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"],
3634
[actions-39.yaml, "not slow and not network and not clipboard", "", "", "", "", ""]
3735
]
3836
fail-fast: false

.github/workflows/python-dev.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@ on:
44
push:
55
branches:
66
- master
7+
- 1.3.x
78
pull_request:
89
branches:
910
- master
1011
paths-ignore:
1112
- "doc/**"
1213

14+
env:
15+
PYTEST_WORKERS: "auto"
16+
PANDAS_CI: 1
17+
PATTERN: "not slow and not network and not clipboard"
18+
COVERAGE: true
19+
1320
jobs:
1421
build:
1522
runs-on: ubuntu-latest
@@ -36,7 +43,7 @@ jobs:
3643
pip install git+https://github.com/numpy/numpy.git
3744
pip install git+https://github.com/pytest-dev/pytest.git
3845
pip install git+https://github.com/nedbat/coveragepy.git
39-
pip install cython python-dateutil pytz hypothesis pytest-xdist
46+
pip install cython python-dateutil pytz hypothesis pytest-xdist pytest-cov
4047
pip list
4148
4249
- name: Build Pandas
@@ -50,7 +57,8 @@ jobs:
5057
5158
- name: Test with pytest
5259
run: |
53-
coverage run -m pytest -m 'not slow and not network and not clipboard' pandas
60+
ci/run_tests.sh
61+
# GH 41935
5462
continue-on-error: true
5563

5664
- name: Publish test results

.github/workflows/sdist.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
pull_request:
88
branches:
99
- master
10-
- 1.2.x
1110
- 1.3.x
1211
paths-ignore:
1312
- "doc/**"
@@ -23,7 +22,7 @@ jobs:
2322
strategy:
2423
fail-fast: false
2524
matrix:
26-
python-version: ["3.7", "3.8", "3.9"]
25+
python-version: ["3.8", "3.9"]
2726

2827
steps:
2928
- uses: actions/checkout@v2

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ repos:
5353
types: [text]
5454
args: [--append-config=flake8/cython-template.cfg]
5555
- repo: https://github.com/PyCQA/isort
56-
rev: 5.9.0
56+
rev: 5.9.1
5757
hooks:
5858
- id: isort
5959
- repo: https://github.com/asottile/pyupgrade
60-
rev: v2.19.4
60+
rev: v2.20.0
6161
hooks:
6262
- id: pyupgrade
63-
args: [--py37-plus]
63+
args: [--py38-plus]
6464
- repo: https://github.com/pre-commit/pygrep-hooks
6565
rev: v1.9.0
6666
hooks:

asv_bench/benchmarks/algos/isin.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import numpy as np
22

3-
from pandas.compat.numpy import np_version_under1p20
3+
try:
4+
from pandas.compat import np_version_under1p20
5+
except ImportError:
6+
from pandas.compat.numpy import _np_version_under1p20 as np_version_under1p20
47

58
from pandas import (
69
Categorical,

asv_bench/benchmarks/groupby.py

+14
Original file line numberDiff line numberDiff line change
@@ -832,4 +832,18 @@ def function(values):
832832
self.grouper.agg(function, engine="cython")
833833

834834

835+
class Sample:
836+
def setup(self):
837+
N = 10 ** 3
838+
self.df = DataFrame({"a": np.zeros(N)})
839+
self.groups = np.arange(0, N)
840+
self.weights = np.ones(N)
841+
842+
def time_sample(self):
843+
self.df.groupby(self.groups).sample(n=1)
844+
845+
def time_sample_weights(self):
846+
self.df.groupby(self.groups).sample(n=1, weights=self.weights)
847+
848+
835849
from .pandas_vb_common import setup # noqa: F401 isort:skip

asv_bench/benchmarks/rolling.py

+3
Original file line numberDiff line numberDiff line change
@@ -296,5 +296,8 @@ def time_apply(self, method):
296296
table_method_func, raw=True, engine="numba"
297297
)
298298

299+
def time_ewm_mean(self, method):
300+
self.df.ewm(1, method=method).mean(engine="numba")
301+
299302

300303
from .pandas_vb_common import setup # noqa: F401 isort:skip

azure-pipelines.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ trigger:
33
branches:
44
include:
55
- master
6-
- 1.2.x
76
- 1.3.x
87
paths:
98
exclude:
@@ -22,14 +21,14 @@ jobs:
2221
- template: ci/azure/posix.yml
2322
parameters:
2423
name: macOS
25-
vmImage: macOS-10.14
24+
vmImage: macOS-10.15
2625

2726
- template: ci/azure/windows.yml
2827
parameters:
2928
name: Windows
30-
vmImage: vs2017-win2016
29+
vmImage: windows-2019
3130

32-
- job: py37_32bit
31+
- job: py38_32bit
3332
pool:
3433
vmImage: ubuntu-18.04
3534

@@ -38,7 +37,7 @@ jobs:
3837
docker pull quay.io/pypa/manylinux2014_i686
3938
docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \
4039
/bin/bash -xc "cd pandas && \
41-
/opt/python/cp37-cp37m/bin/python -m venv ~/virtualenvs/pandas-dev && \
40+
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
4241
. ~/virtualenvs/pandas-dev/bin/activate && \
4342
python -m pip install --no-deps -U pip wheel setuptools && \
4443
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \
@@ -52,4 +51,4 @@ jobs:
5251
inputs:
5352
testResultsFiles: '**/test-*.xml'
5453
failTaskOnFailedTests: true
55-
testRunTitle: 'Publish test results for Python 3.7-32 bit full Linux'
54+
testRunTitle: 'Publish test results for Python 3.8-32 bit full Linux'

ci/azure/posix.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
strategy:
1010
matrix:
1111
${{ if eq(parameters.name, 'macOS') }}:
12-
py37_macos:
13-
ENV_FILE: ci/deps/azure-macos-37.yaml
14-
CONDA_PY: "37"
12+
py38_macos:
13+
ENV_FILE: ci/deps/azure-macos-38.yaml
14+
CONDA_PY: "38"
1515
PATTERN: "not slow and not network"
1616

1717
steps:

ci/azure/windows.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,39 @@ jobs:
88
vmImage: ${{ parameters.vmImage }}
99
strategy:
1010
matrix:
11-
py37_np17:
12-
ENV_FILE: ci/deps/azure-windows-37.yaml
13-
CONDA_PY: "37"
14-
PATTERN: "not slow and not network"
15-
1611
py38_np18:
1712
ENV_FILE: ci/deps/azure-windows-38.yaml
1813
CONDA_PY: "38"
14+
PATTERN: "not slow and not network"
15+
PYTEST_WORKERS: 2 # GH-42236
16+
17+
py39:
18+
ENV_FILE: ci/deps/azure-windows-39.yaml
19+
CONDA_PY: "39"
1920
PATTERN: "not slow and not network and not high_memory"
21+
PYTEST_WORKERS: 2 # GH-42236
2022

2123
steps:
2224
- powershell: |
2325
Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
2426
Write-Host "##vso[task.prependpath]$HOME/miniconda3/bin"
2527
displayName: 'Add conda to PATH'
26-
2728
- script: conda update -q -n base conda
2829
displayName: 'Update conda'
2930

3031
- bash: |
3132
conda env create -q --file ci\\deps\\azure-windows-$(CONDA_PY).yaml
3233
displayName: 'Create anaconda environment'
33-
3434
- bash: |
3535
source activate pandas-dev
3636
conda list
3737
python setup.py build_ext -q -j 4
3838
python -m pip install --no-build-isolation -e .
3939
displayName: 'Build'
40-
4140
- bash: |
4241
source activate pandas-dev
4342
ci/run_tests.sh
4443
displayName: 'Test'
45-
4644
- task: PublishTestResults@2
4745
condition: succeededOrFailed()
4846
inputs:

ci/deps/actions-37-locale_slow.yaml

-30
This file was deleted.

ci/deps/actions-37-minimum_versions.yaml

-31
This file was deleted.

ci/deps/actions-37.yaml

-28
This file was deleted.

0 commit comments

Comments
 (0)