Skip to content

Commit fc3d2c2

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pandas-devgh-27081
2 parents 860013f + 493363e commit fc3d2c2

File tree

683 files changed

+9946
-7310
lines changed

Some content is hidden

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

683 files changed

+9946
-7310
lines changed

.pre-commit-config.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,15 @@ repos:
1616
- id: isort
1717
language: python_venv
1818
exclude: ^pandas/__init__\.py$|^pandas/core/api\.py$
19+
- repo: https://github.com/pre-commit/mirrors-mypy
20+
rev: v0.730
21+
hooks:
22+
- id: mypy
23+
# We run mypy over all files because of:
24+
# * changes in type definitions may affect non-touched files.
25+
# * Running it with `mypy pandas` and the filenames will lead to
26+
# spurious duplicate module errors,
27+
# see also https://github.com/pre-commit/mirrors-mypy/issues/5
28+
pass_filenames: false
29+
args:
30+
- pandas

RELEASE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ Release Notes
22
=============
33

44
The list of changes to Pandas between each release can be found
5-
[here](http://pandas.pydata.org/pandas-docs/stable/whatsnew.html). For full
5+
[here](https://pandas.pydata.org/pandas-docs/stable/whatsnew/index.html). For full
66
details, see the commit logs at http://github.com/pandas-dev/pandas.

asv_bench/asv.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"project": "pandas",
88

99
// The project's homepage
10-
"project_url": "http://pandas.pydata.org/",
10+
"project_url": "https://pandas.pydata.org/",
1111

1212
// The URL of the source code repository for the project being
1313
// benchmarked

asv_bench/benchmarks/algorithms.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
from pandas._libs import lib
66

77
import pandas as pd
8-
from pandas.util import testing as tm
8+
9+
from .pandas_vb_common import tm
910

1011
for imp in ["pandas.util", "pandas.tools.hashing"]:
1112
try:

asv_bench/benchmarks/categoricals.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import numpy as np
44

55
import pandas as pd
6-
import pandas.util.testing as tm
6+
7+
from .pandas_vb_common import tm
78

89
try:
910
from pandas.api.types import union_categoricals

asv_bench/benchmarks/ctors.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import numpy as np
22

33
from pandas import DatetimeIndex, Index, MultiIndex, Series, Timestamp
4-
import pandas.util.testing as tm
4+
5+
from .pandas_vb_common import tm
56

67

78
def no_change(arr):

asv_bench/benchmarks/frame_ctor.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import numpy as np
22

33
from pandas import DataFrame, MultiIndex, Series, Timestamp, date_range
4-
import pandas.util.testing as tm
4+
5+
from .pandas_vb_common import tm
56

67
try:
78
from pandas.tseries.offsets import Nano, Hour

asv_bench/benchmarks/frame_methods.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
import numpy as np
55

66
from pandas import DataFrame, MultiIndex, NaT, Series, date_range, isnull, period_range
7-
import pandas.util.testing as tm
7+
8+
from .pandas_vb_common import tm
89

910

1011
class GetNumericData:

asv_bench/benchmarks/gil.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
from pandas import DataFrame, Series, date_range, factorize, read_csv
44
from pandas.core.algorithms import take_1d
5-
import pandas.util.testing as tm
5+
6+
from .pandas_vb_common import tm
67

78
try:
89
from pandas import (
@@ -24,7 +25,7 @@
2425
except ImportError:
2526
from pandas import algos
2627
try:
27-
from pandas.util.testing import test_parallel
28+
from pandas._testing import test_parallel
2829

2930
have_real_test_parallel = True
3031
except ImportError:

asv_bench/benchmarks/groupby.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
date_range,
1414
period_range,
1515
)
16-
import pandas.util.testing as tm
16+
17+
from .pandas_vb_common import tm
1718

1819
method_blacklist = {
1920
"object": {

asv_bench/benchmarks/index_object.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
Series,
1313
date_range,
1414
)
15-
import pandas.util.testing as tm
15+
16+
from .pandas_vb_common import tm
1617

1718

1819
class SetOperations:

asv_bench/benchmarks/indexing.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
option_context,
1818
period_range,
1919
)
20-
import pandas.util.testing as tm
20+
21+
from .pandas_vb_common import tm
2122

2223

2324
class NumericSeriesIndexing:

asv_bench/benchmarks/inference.py

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

33
from pandas import DataFrame, Series, to_numeric
4-
import pandas.util.testing as tm
54

6-
from .pandas_vb_common import lib, numeric_dtypes
5+
from .pandas_vb_common import lib, numeric_dtypes, tm
76

87

98
class NumericInferOps:

asv_bench/benchmarks/io/csv.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
import numpy as np
66

77
from pandas import Categorical, DataFrame, date_range, read_csv, to_datetime
8-
import pandas.util.testing as tm
98

10-
from ..pandas_vb_common import BaseIO
9+
from ..pandas_vb_common import BaseIO, tm
1110

1211

1312
class ToCSV(BaseIO):

asv_bench/benchmarks/io/excel.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
from odf.text import P
77

88
from pandas import DataFrame, ExcelWriter, date_range, read_excel
9-
import pandas.util.testing as tm
9+
10+
from ..pandas_vb_common import tm
1011

1112

1213
def _generate_dataframe():

asv_bench/benchmarks/io/hdf.py

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

33
from pandas import DataFrame, HDFStore, date_range, read_hdf
4-
import pandas.util.testing as tm
54

6-
from ..pandas_vb_common import BaseIO
5+
from ..pandas_vb_common import BaseIO, tm
76

87

98
class HDFStoreDataFrame(BaseIO):

asv_bench/benchmarks/io/json.py

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

33
from pandas import DataFrame, concat, date_range, read_json, timedelta_range
4-
import pandas.util.testing as tm
54

6-
from ..pandas_vb_common import BaseIO
5+
from ..pandas_vb_common import BaseIO, tm
76

87

98
class ReadJSON(BaseIO):

asv_bench/benchmarks/io/pickle.py

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

33
from pandas import DataFrame, date_range, read_pickle
4-
import pandas.util.testing as tm
54

6-
from ..pandas_vb_common import BaseIO
5+
from ..pandas_vb_common import BaseIO, tm
76

87

98
class Pickle(BaseIO):

asv_bench/benchmarks/io/sql.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
from sqlalchemy import create_engine
55

66
from pandas import DataFrame, date_range, read_sql_query, read_sql_table
7-
import pandas.util.testing as tm
7+
8+
from ..pandas_vb_common import tm
89

910

1011
class SQL:

asv_bench/benchmarks/io/stata.py

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

33
from pandas import DataFrame, date_range, read_stata
4-
import pandas.util.testing as tm
54

6-
from ..pandas_vb_common import BaseIO
5+
from ..pandas_vb_common import BaseIO, tm
76

87

98
class Stata(BaseIO):

asv_bench/benchmarks/join_merge.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import numpy as np
44

55
from pandas import DataFrame, MultiIndex, Series, concat, date_range, merge, merge_asof
6-
import pandas.util.testing as tm
6+
7+
from .pandas_vb_common import tm
78

89
try:
910
from pandas import merge_ordered

asv_bench/benchmarks/multiindex_object.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import numpy as np
44

55
from pandas import DataFrame, MultiIndex, RangeIndex, date_range
6-
import pandas.util.testing as tm
6+
7+
from .pandas_vb_common import tm
78

89

910
class GetLoc:

asv_bench/benchmarks/pandas_vb_common.py

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
except (ImportError, TypeError, ValueError):
1414
pass
1515

16+
# Compatibility import for the testing module
17+
try:
18+
import pandas._testing as tm # noqa
19+
except ImportError:
20+
import pandas.util.testing as tm # noqa
21+
22+
1623
numeric_dtypes = [
1724
np.int64,
1825
np.int32,

asv_bench/benchmarks/reindex.py

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

33
from pandas import DataFrame, Index, MultiIndex, Series, date_range, period_range
4-
import pandas.util.testing as tm
54

6-
from .pandas_vb_common import lib
5+
from .pandas_vb_common import lib, tm
76

87

98
class Reindex:

asv_bench/benchmarks/series_methods.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import numpy as np
44

55
from pandas import NaT, Series, date_range
6-
import pandas.util.testing as tm
6+
7+
from .pandas_vb_common import tm
78

89

910
class SeriesConstructor:

asv_bench/benchmarks/strings.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import numpy as np
44

55
from pandas import DataFrame, Series
6-
import pandas.util.testing as tm
6+
7+
from .pandas_vb_common import tm
78

89

910
class Methods:

ci/code_checks.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
139139
RET=$(($RET + $?)) ; echo $MSG "DONE"
140140

141141
# Checks for test suite
142-
# Check for imports from pandas.util.testing instead of `import pandas.util.testing as tm`
143-
invgrep -R --include="*.py*" -E "from pandas.util.testing import" pandas/tests
142+
# Check for imports from pandas._testing instead of `import pandas._testing as tm`
143+
invgrep -R --include="*.py*" -E "from pandas._testing import" pandas/tests
144144
RET=$(($RET + $?)) ; echo $MSG "DONE"
145145
invgrep -R --include="*.py*" -E "from pandas.util import testing as tm" pandas/tests
146146
RET=$(($RET + $?)) ; echo $MSG "DONE"
@@ -298,8 +298,11 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
298298
-k"-from_arrays -from_breaks -from_intervals -from_tuples -set_closed -to_tuples -interval_range"
299299
RET=$(($RET + $?)) ; echo $MSG "DONE"
300300

301-
MSG='Doctests arrays/string_.py' ; echo $MSG
302-
pytest -q --doctest-modules pandas/core/arrays/string_.py
301+
MSG='Doctests arrays'; echo $MSG
302+
pytest -q --doctest-modules \
303+
pandas/core/arrays/string_.py \
304+
pandas/core/arrays/integer.py \
305+
pandas/core/arrays/boolean.py
303306
RET=$(($RET + $?)) ; echo $MSG "DONE"
304307

305308
MSG='Doctests arrays/boolean.py' ; echo $MSG

ci/deps/azure-36-locale.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- cython>=0.29.13
1010
- pytest>=5.0.1
1111
- pytest-xdist>=1.21
12+
- pytest-asyncio
1213
- hypothesis>=3.58.0
1314
- pytest-azurepipelines
1415

@@ -26,7 +27,7 @@ dependencies:
2627
- openpyxl
2728
# lowest supported version of pyarrow (putting it here instead of in
2829
# azure-36-minimum_versions because it needs numpy >= 1.14)
29-
- pyarrow=0.12
30+
- pyarrow=0.13
3031
- pytables
3132
- python-dateutil
3233
- pytz

ci/deps/azure-37-locale.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies:
88
- cython>=0.29.13
99
- pytest>=5.0.1
1010
- pytest-xdist>=1.21
11+
- pytest-asyncio
1112
- hypothesis>=3.58.0
1213
- pytest-azurepipelines
1314

ci/deps/azure-macos-36.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- numexpr
2323
- numpy=1.14
2424
- openpyxl
25-
- pyarrow>=0.12.0
25+
- pyarrow>=0.13.0
2626
- pytables
2727
- python-dateutil==2.6.1
2828
- pytz

ci/deps/azure-windows-36.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- numpy=1.15.*
2323
- openpyxl
2424
- jinja2
25-
- pyarrow>=0.12.0
25+
- pyarrow>=0.13.0
2626
- pytables
2727
- python-dateutil
2828
- pytz

ci/deps/azure-windows-37.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ dependencies:
2424
- numexpr
2525
- numpy=1.14.*
2626
- openpyxl
27+
- pyarrow=0.14
2728
- pytables
2829
- python-dateutil
2930
- pytz

ci/deps/travis-36-cov.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies:
3131
# https://github.com/pandas-dev/pandas/pull/30009 openpyxl 3.0.2 broke
3232
- pandas-gbq
3333
- psycopg2
34-
- pyarrow>=0.12.0
34+
- pyarrow>=0.13.0
3535
- pymysql
3636
- pytables
3737
- python-snappy

conda.recipe/meta.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ test:
3636

3737

3838
about:
39-
home: http://pandas.pydata.org
39+
home: https://pandas.pydata.org
4040
license: BSD

0 commit comments

Comments
 (0)