Skip to content

Commit 08215e8

Browse files
committed
Merge remote-tracking branch 'upstream/master' into mpl-convert-cache
2 parents 9c00578 + be6c369 commit 08215e8

Some content is hidden

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

71 files changed

+1748
-1605
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
custom: https://pandas.pydata.org/donate.html
2+
tidelift: pypi/pandas

.github/SECURITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
To report a security vulnerability to pandas, please go to https://tidelift.com/security and see the instructions there.

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121

2222
git:
2323
# for cloning
24-
depth: 2000
24+
depth: false
2525

2626
matrix:
2727
fast_finish: true
@@ -63,7 +63,7 @@ before_install:
6363
- pwd
6464
- uname -a
6565
- git --version
66-
- git tag
66+
- ./ci/check_git_tags.sh
6767
# Because travis runs on Google Cloud and has a /etc/boto.cfg,
6868
# it breaks moto import, see:
6969
# https://github.com/spulec/moto/issues/1771

asv_bench/benchmarks/index_object.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import gc
12
import numpy as np
23
import pandas.util.testing as tm
34
from pandas import (
@@ -225,4 +226,21 @@ def time_intersection_both_duplicate(self, N):
225226
self.intv.intersection(self.intv2)
226227

227228

229+
class GC:
230+
params = [1, 2, 5]
231+
232+
def create_use_drop(self):
233+
idx = Index(list(range(1000 * 1000)))
234+
idx._engine
235+
236+
def peakmem_gc_instances(self, N):
237+
try:
238+
gc.disable()
239+
240+
for _ in range(N):
241+
self.create_use_drop()
242+
finally:
243+
gc.enable()
244+
245+
228246
from .pandas_vb_common import setup # noqa: F401

azure-pipelines.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,80 +22,67 @@ jobs:
2222
timeoutInMinutes: 90
2323
steps:
2424
- script: |
25-
# XXX next command should avoid redefining the path in every step, but
26-
# made the process crash as it couldn't find deactivate
27-
#echo '##vso[task.prependpath]$HOME/miniconda3/bin'
25+
echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'
2826
echo '##vso[task.setvariable variable=ENV_FILE]environment.yml'
2927
echo '##vso[task.setvariable variable=AZURE]true'
3028
displayName: 'Setting environment variables'
3129
3230
# Do not require a conda environment
33-
- script: |
34-
export PATH=$HOME/miniconda3/bin:$PATH
35-
ci/code_checks.sh patterns
31+
- script: ci/code_checks.sh patterns
3632
displayName: 'Looking for unwanted patterns'
3733
condition: true
3834

3935
- script: |
40-
export PATH=$HOME/miniconda3/bin:$PATH
4136
sudo apt-get install -y libc6-dev-i386
4237
ci/setup_env.sh
4338
displayName: 'Setup environment and build pandas'
4439
condition: true
4540
4641
# Do not require pandas
4742
- script: |
48-
export PATH=$HOME/miniconda3/bin:$PATH
4943
source activate pandas-dev
5044
ci/code_checks.sh lint
5145
displayName: 'Linting'
5246
condition: true
5347
5448
- script: |
55-
export PATH=$HOME/miniconda3/bin:$PATH
5649
source activate pandas-dev
5750
ci/code_checks.sh dependencies
5851
displayName: 'Dependencies consistency'
5952
condition: true
6053
6154
# Require pandas
6255
- script: |
63-
export PATH=$HOME/miniconda3/bin:$PATH
6456
source activate pandas-dev
6557
ci/code_checks.sh code
6658
displayName: 'Checks on imported code'
6759
condition: true
6860
6961
- script: |
70-
export PATH=$HOME/miniconda3/bin:$PATH
7162
source activate pandas-dev
7263
ci/code_checks.sh doctests
7364
displayName: 'Running doctests'
7465
condition: true
7566
7667
- script: |
77-
export PATH=$HOME/miniconda3/bin:$PATH
7868
source activate pandas-dev
7969
ci/code_checks.sh docstrings
8070
displayName: 'Docstring validation'
8171
condition: true
8272
8373
- script: |
84-
export PATH=$HOME/miniconda3/bin:$PATH
8574
source activate pandas-dev
8675
ci/code_checks.sh typing
8776
displayName: 'Typing validation'
8877
condition: true
8978
9079
- script: |
91-
export PATH=$HOME/miniconda3/bin:$PATH
9280
source activate pandas-dev
9381
pytest --capture=no --strict scripts
94-
displayName: 'Testing docstring validaton script'
82+
displayName: 'Testing docstring validation script'
9583
condition: true
9684
9785
- script: |
98-
export PATH=$HOME/miniconda3/bin:$PATH
9986
source activate pandas-dev
10087
cd asv_bench
10188
asv check -E existing
@@ -124,16 +111,15 @@ jobs:
124111
steps:
125112
- script: |
126113
echo '##vso[task.setvariable variable=ENV_FILE]environment.yml'
114+
echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'
127115
displayName: 'Setting environment variables'
128116
129117
- script: |
130-
export PATH=$HOME/miniconda3/bin:$PATH
131118
sudo apt-get install -y libc6-dev-i386
132119
ci/setup_env.sh
133120
displayName: 'Setup environment and build pandas'
134121
135122
- script: |
136-
export PATH=$HOME/miniconda3/bin:$PATH
137123
source activate pandas-dev
138124
# Next we should simply have `doc/make.py --warnings-are-errors`, everything else is required because the ipython directive doesn't fail the build on errors (https://github.com/ipython/ipython/issues/11547)
139125
doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]}

ci/azure/posix.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,15 @@ jobs:
5656
steps:
5757
- script: |
5858
if [ "$(uname)" == "Linux" ]; then sudo apt-get install -y libc6-dev-i386 $EXTRA_APT; fi
59+
echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'
5960
echo "Creating Environment"
6061
ci/setup_env.sh
6162
displayName: 'Setup environment and build pandas'
6263
- script: |
63-
export PATH=$HOME/miniconda3/bin:$PATH
6464
source activate pandas-dev
6565
ci/run_tests.sh
6666
displayName: 'Test'
67-
- script: |
68-
export PATH=$HOME/miniconda3/bin:$PATH
69-
source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
67+
- script: source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
7068
- task: PublishTestResults@2
7169
inputs:
7270
testResultsFiles: 'test-data-*.xml'
@@ -97,7 +95,6 @@ jobs:
9795
}
9896
displayName: 'Check for test failures'
9997
- script: |
100-
export PATH=$HOME/miniconda3/bin:$PATH
10198
source activate pandas-dev
10299
python ci/print_skipped.py
103100
displayName: 'Print skipped tests'

ci/azure/windows.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717
CONDA_PY: "37"
1818

1919
steps:
20-
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
20+
- powershell: |
21+
Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
22+
Write-Host "##vso[task.prependpath]$HOME/miniconda3/bin"
2123
displayName: 'Add conda to PATH'
2224
- script: conda update -q -n base conda
2325
displayName: Update conda
@@ -52,7 +54,6 @@ jobs:
5254
}
5355
displayName: 'Check for test failures'
5456
- script: |
55-
export PATH=$HOME/miniconda3/bin:$PATH
5657
source activate pandas-dev
5758
python ci/print_skipped.py
5859
displayName: 'Print skipped tests'

ci/check_git_tags.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
set -e
2+
3+
if [[ ! $(git tag) ]]; then
4+
echo "No git tags in clone, please sync your git tags with upstream using:"
5+
echo " git fetch --tags upstream"
6+
echo " git push --tags origin"
7+
echo ""
8+
echo "If the issue persists, the clone depth needs to be increased in .travis.yml"
9+
exit 1
10+
fi
11+
12+
# This will error if there are no tags and we omit --always
13+
DESCRIPTION=$(git describe --long --tags)
14+
echo "$DESCRIPTION"
15+
16+
if [[ "$DESCRIPTION" == *"untagged"* ]]; then
17+
echo "Unable to determine most recent tag, aborting build"
18+
exit 1
19+
else
20+
if [[ "$DESCRIPTION" != *"g"* ]]; then
21+
# A good description will have the hash prefixed by g, a bad one will be
22+
# just the hash
23+
echo "Unable to determine most recent tag, aborting build"
24+
exit 1
25+
else
26+
echo "$(git tag)"
27+
fi
28+
fi

ci/code_checks.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ fi
263263
### DOCSTRINGS ###
264264
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
265265

266-
MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA05)' ; echo $MSG
267-
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL04,GL05,GL06,GL07,GL09,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA05
266+
MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA05)' ; echo $MSG
267+
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA05
268268
RET=$(($RET + $?)) ; echo $MSG "DONE"
269269

270270
fi

ci/deps/azure-36-locale.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ dependencies:
2020
- xlsxwriter=0.9.8
2121
- xlwt=1.2.0
2222
# universal
23-
- pytest>=4.0.2,<5.0.0
24-
- pytest-xdist
23+
- pytest>=5.0.0
24+
- pytest-xdist>=1.29.0
2525
- pytest-mock
2626
- pytest-azurepipelines
2727
- hypothesis>=3.58.0

0 commit comments

Comments
 (0)