diff --git a/.travis.yml b/.travis.yml
index b016cf386098e..2e98cf47aea3e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -45,7 +45,7 @@ matrix:
- JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard)"
- env:
- - JOB="3.6, locale" ENV_FILE="ci/deps/travis-36-locale.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8" SQL="1"
+ - JOB="3.7, locale" ENV_FILE="ci/deps/travis-37-locale.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8" SQL="1"
services:
- mysql
- postgresql
@@ -54,7 +54,7 @@ matrix:
# Enabling Deprecations when running tests
# PANDAS_TESTING_MODE="deprecate" causes DeprecationWarning messages to be displayed in the logs
# See pandas/_testing.py for more details.
- - JOB="3.6, coverage" ENV_FILE="ci/deps/travis-36-cov.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" PANDAS_TESTING_MODE="deprecate" COVERAGE=true SQL="1"
+ - JOB="3.7, coverage" ENV_FILE="ci/deps/travis-37-cov.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" PANDAS_TESTING_MODE="deprecate" COVERAGE=true SQL="1"
services:
- mysql
- postgresql
diff --git a/asv_bench/benchmarks/package.py b/asv_bench/benchmarks/package.py
index 8ca33db361fa0..34fe4929a752b 100644
--- a/asv_bench/benchmarks/package.py
+++ b/asv_bench/benchmarks/package.py
@@ -4,22 +4,16 @@
import subprocess
import sys
-from pandas.compat import PY37
-
class TimeImport:
def time_import(self):
- if PY37:
- # on py37+ we the "-X importtime" usage gives us a more precise
- # measurement of the import time we actually care about,
- # without the subprocess or interpreter overhead
- cmd = [sys.executable, "-X", "importtime", "-c", "import pandas as pd"]
- p = subprocess.run(cmd, stderr=subprocess.PIPE)
-
- line = p.stderr.splitlines()[-1]
- field = line.split(b"|")[-2].strip()
- total = int(field) # microseconds
- return total
+ # on py37+ we the "-X importtime" usage gives us a more precise
+ # measurement of the import time we actually care about,
+ # without the subprocess or interpreter overhead
+ cmd = [sys.executable, "-X", "importtime", "-c", "import pandas as pd"]
+ p = subprocess.run(cmd, stderr=subprocess.PIPE)
- cmd = [sys.executable, "-c", "import pandas as pd"]
- subprocess.run(cmd, stderr=subprocess.PIPE)
+ line = p.stderr.splitlines()[-1]
+ field = line.split(b"|")[-2].strip()
+ total = int(field) # microseconds
+ return total
diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml
index f716974f6add1..9f8174b4fa678 100644
--- a/ci/azure/posix.yml
+++ b/ci/azure/posix.yml
@@ -9,20 +9,20 @@ jobs:
strategy:
matrix:
${{ if eq(parameters.name, 'macOS') }}:
- py36_macos:
- ENV_FILE: ci/deps/azure-macos-36.yaml
- CONDA_PY: "36"
+ py37_macos:
+ ENV_FILE: ci/deps/azure-macos-37.yaml
+ CONDA_PY: "37"
PATTERN: "not slow and not network"
${{ if eq(parameters.name, 'Linux') }}:
- py36_minimum_versions:
- ENV_FILE: ci/deps/azure-36-minimum_versions.yaml
- CONDA_PY: "36"
+ py37_minimum_versions:
+ ENV_FILE: ci/deps/azure-37-minimum_versions.yaml
+ CONDA_PY: "37"
PATTERN: "not slow and not network and not clipboard"
- py36_locale_slow_old_np:
- ENV_FILE: ci/deps/azure-36-locale_slow.yaml
- CONDA_PY: "36"
+ py37_locale_slow:
+ ENV_FILE: ci/deps/azure-37-locale_slow.yaml
+ CONDA_PY: "37"
PATTERN: "slow"
# pandas does not use the language (zh_CN), but should support different encodings (utf8)
# we should test with encodings different than utf8, but doesn't seem like Ubuntu supports any
@@ -30,36 +30,36 @@ jobs:
LC_ALL: "zh_CN.utf8"
EXTRA_APT: "language-pack-zh-hans"
- py36_slow:
- ENV_FILE: ci/deps/azure-36-slow.yaml
- CONDA_PY: "36"
+ py37_slow:
+ ENV_FILE: ci/deps/azure-37-slow.yaml
+ CONDA_PY: "37"
PATTERN: "slow"
- py36_locale:
- ENV_FILE: ci/deps/azure-36-locale.yaml
- CONDA_PY: "36"
+ py37_locale:
+ ENV_FILE: ci/deps/azure-37-locale.yaml
+ CONDA_PY: "37"
PATTERN: "not slow and not network"
LANG: "it_IT.utf8"
LC_ALL: "it_IT.utf8"
EXTRA_APT: "language-pack-it xsel"
- #py36_32bit:
- # ENV_FILE: ci/deps/azure-36-32bit.yaml
- # CONDA_PY: "36"
- # PATTERN: "not slow and not network and not clipboard"
- # BITS32: "yes"
+# py37_32bit:
+# ENV_FILE: ci/deps/azure-37-32bit.yaml
+# CONDA_PY: "37"
+# PATTERN: "not slow and not network and not clipboard"
+# BITS32: "yes"
- py37_locale:
- ENV_FILE: ci/deps/azure-37-locale.yaml
- CONDA_PY: "37"
+ py38_locale:
+ ENV_FILE: ci/deps/azure-38-locale.yaml
+ CONDA_PY: "38"
PATTERN: "not slow and not network"
LANG: "zh_CN.utf8"
LC_ALL: "zh_CN.utf8"
EXTRA_APT: "language-pack-zh-hans xsel"
- py37_np_dev:
- ENV_FILE: ci/deps/azure-37-numpydev.yaml
- CONDA_PY: "37"
+ py38_np_dev:
+ ENV_FILE: ci/deps/azure-38-numpydev.yaml
+ CONDA_PY: "38"
PATTERN: "not slow and not network"
TEST_ARGS: "-W error"
PANDAS_TESTING_MODE: "deprecate"
diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml
index 87f1bfd2adb79..5938ba1fd69f5 100644
--- a/ci/azure/windows.yml
+++ b/ci/azure/windows.yml
@@ -8,16 +8,16 @@ jobs:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
- py36_np15:
- ENV_FILE: ci/deps/azure-windows-36.yaml
- CONDA_PY: "36"
- PATTERN: "not slow and not network"
-
- py37_np18:
+ py37_np16:
ENV_FILE: ci/deps/azure-windows-37.yaml
CONDA_PY: "37"
PATTERN: "not slow and not network"
+ py38_np18:
+ ENV_FILE: ci/deps/azure-windows-38.yaml
+ CONDA_PY: "38"
+ PATTERN: "not slow and not network"
+
steps:
- powershell: |
Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
diff --git a/ci/deps/azure-36-32bit.yaml b/ci/deps/azure-37-32bit.yaml
similarity index 76%
rename from ci/deps/azure-36-32bit.yaml
rename to ci/deps/azure-37-32bit.yaml
index 15704cf0d5427..8e0cd73a9536d 100644
--- a/ci/deps/azure-36-32bit.yaml
+++ b/ci/deps/azure-37-32bit.yaml
@@ -3,10 +3,10 @@ channels:
- defaults
- conda-forge
dependencies:
- - python=3.6.*
+ - python=3.7.*
# tools
- ### Cython 0.29.13 and pytest 5.0.1 for 32 bits are not available with conda, installing below with pip instead
+ ### Cython 0.29.16 and pytest 5.0.1 for 32 bits are not available with conda, installing below with pip instead
- pytest-xdist>=1.21
- hypothesis>=3.58.0
- pytest-azurepipelines
@@ -15,12 +15,12 @@ dependencies:
- attrs=19.1.0
- gcc_linux-32
- gxx_linux-32
- - numpy=1.14.*
- python-dateutil
- - pytz=2017.2
+ - pytz=2017.3
# see comment above
- pip
- pip:
- cython>=0.29.16
+ - numpy>=1.16.5
- pytest>=5.0.1
diff --git a/ci/deps/azure-37-locale.yaml b/ci/deps/azure-37-locale.yaml
index 6f64c81f299d1..a6552aa096a22 100644
--- a/ci/deps/azure-37-locale.yaml
+++ b/ci/deps/azure-37-locale.yaml
@@ -1,5 +1,6 @@
name: pandas-dev
channels:
+ - defaults
- conda-forge
dependencies:
- python=3.7.*
@@ -22,7 +23,7 @@ dependencies:
- moto
- nomkl
- numexpr
- - numpy
+ - numpy=1.16.*
- openpyxl
- pytables
- python-dateutil
@@ -32,7 +33,4 @@ dependencies:
- xlrd
- xlsxwriter
- xlwt
- - pyarrow>=0.15
- - pip
- - pip:
- - pyxlsb
+ - moto
diff --git a/ci/deps/azure-36-locale_slow.yaml b/ci/deps/azure-37-locale_slow.yaml
similarity index 67%
rename from ci/deps/azure-36-locale_slow.yaml
rename to ci/deps/azure-37-locale_slow.yaml
index c086b3651afc3..3ccb66e09fe7e 100644
--- a/ci/deps/azure-36-locale_slow.yaml
+++ b/ci/deps/azure-37-locale_slow.yaml
@@ -3,7 +3,7 @@ channels:
- defaults
- conda-forge
dependencies:
- - python=3.6.*
+ - python=3.7.*
# tools
- cython>=0.29.16
@@ -16,17 +16,15 @@ dependencies:
- beautifulsoup4=4.6.0
- bottleneck=1.2.*
- lxml
- - matplotlib=2.2.2
- - numpy=1.14.*
+ - matplotlib=3.0.0
+ - numpy=1.16.*
- openpyxl=2.5.7
- python-dateutil
- python-blosc
- - pytz=2017.2
+ - pytz=2017.3
- scipy
- - sqlalchemy=1.1.4
+ - sqlalchemy=1.2.8
- xlrd=1.1.0
- - xlsxwriter=0.9.8
- - xlwt=1.2.0
- - pip
- - pip:
- - html5lib==1.0b2
+ - xlsxwriter=1.0.2
+ - xlwt=1.3.0
+ - html5lib=1.0.1
diff --git a/ci/deps/azure-36-minimum_versions.yaml b/ci/deps/azure-37-minimum_versions.yaml
similarity index 70%
rename from ci/deps/azure-36-minimum_versions.yaml
rename to ci/deps/azure-37-minimum_versions.yaml
index f5af7bcf36189..94cc5812bcc10 100644
--- a/ci/deps/azure-36-minimum_versions.yaml
+++ b/ci/deps/azure-37-minimum_versions.yaml
@@ -2,7 +2,7 @@ name: pandas-dev
channels:
- conda-forge
dependencies:
- - python=3.6.1
+ - python=3.7.1
# tools
- cython=0.29.16
@@ -15,16 +15,17 @@ dependencies:
# pandas dependencies
- beautifulsoup4=4.6.0
- bottleneck=1.2.1
- - jinja2=2.8
+ - jinja2=2.10
- numba=0.46.0
- - numexpr=2.6.2
- - numpy=1.15.4
+ - numexpr=2.6.8
+ - numpy=1.16.5
- openpyxl=2.5.7
- - pytables=3.4.3
+ - pytables=3.4.4
- python-dateutil=2.7.3
- - pytz=2017.2
+ - pytz=2017.3
+ - pyarrow=0.15
- scipy=1.2
- xlrd=1.1.0
- - xlsxwriter=0.9.8
- - xlwt=1.2.0
+ - xlsxwriter=1.0.2
+ - xlwt=1.3.0
- html5lib=1.0.1
diff --git a/ci/deps/azure-36-slow.yaml b/ci/deps/azure-37-slow.yaml
similarity index 96%
rename from ci/deps/azure-36-slow.yaml
rename to ci/deps/azure-37-slow.yaml
index 87bad59fa4873..e8ffd3d74ca5e 100644
--- a/ci/deps/azure-36-slow.yaml
+++ b/ci/deps/azure-37-slow.yaml
@@ -3,7 +3,7 @@ channels:
- defaults
- conda-forge
dependencies:
- - python=3.6.*
+ - python=3.7.*
# tools
- cython>=0.29.16
diff --git a/ci/deps/azure-36-locale.yaml b/ci/deps/azure-38-locale.yaml
similarity index 69%
rename from ci/deps/azure-36-locale.yaml
rename to ci/deps/azure-38-locale.yaml
index 3034ed3dc43af..c466a5929ea29 100644
--- a/ci/deps/azure-36-locale.yaml
+++ b/ci/deps/azure-38-locale.yaml
@@ -1,9 +1,8 @@
name: pandas-dev
channels:
- - defaults
- conda-forge
dependencies:
- - python=3.6.*
+ - python=3.8.*
# tools
- cython>=0.29.16
@@ -19,14 +18,12 @@ dependencies:
- ipython
- jinja2
- lxml
- - matplotlib=3.0.*
+ - matplotlib <3.3.0
+ - moto
- nomkl
- numexpr
- - numpy=1.15.*
+ - numpy
- openpyxl
- # lowest supported version of pyarrow (putting it here instead of in
- # azure-36-minimum_versions because it needs numpy >= 1.14)
- - pyarrow=0.13
- pytables
- python-dateutil
- pytz
@@ -35,4 +32,7 @@ dependencies:
- xlrd
- xlsxwriter
- xlwt
- - moto
+ - pyarrow>=0.15
+ - pip
+ - pip:
+ - pyxlsb
diff --git a/ci/deps/azure-37-numpydev.yaml b/ci/deps/azure-38-numpydev.yaml
similarity index 96%
rename from ci/deps/azure-37-numpydev.yaml
rename to ci/deps/azure-38-numpydev.yaml
index 5cb58756a6ac1..37592086d49e3 100644
--- a/ci/deps/azure-37-numpydev.yaml
+++ b/ci/deps/azure-38-numpydev.yaml
@@ -2,7 +2,7 @@ name: pandas-dev
channels:
- defaults
dependencies:
- - python=3.7.*
+ - python=3.8.*
# tools
- pytest>=5.0.1
diff --git a/ci/deps/azure-macos-36.yaml b/ci/deps/azure-macos-37.yaml
similarity index 89%
rename from ci/deps/azure-macos-36.yaml
rename to ci/deps/azure-macos-37.yaml
index eeea249a19ca1..a5a69b9a59576 100644
--- a/ci/deps/azure-macos-36.yaml
+++ b/ci/deps/azure-macos-37.yaml
@@ -2,7 +2,7 @@ name: pandas-dev
channels:
- defaults
dependencies:
- - python=3.6.*
+ - python=3.7.*
# tools
- pytest>=5.0.1
@@ -19,9 +19,9 @@ dependencies:
- matplotlib=2.2.3
- nomkl
- numexpr
- - numpy=1.15.4
+ - numpy=1.16.5
- openpyxl
- - pyarrow>=0.13.0
+ - pyarrow>=0.15.0
- pytables
- python-dateutil==2.7.3
- pytz
diff --git a/ci/deps/azure-windows-37.yaml b/ci/deps/azure-windows-37.yaml
index 5bbd0e2795d7e..4d745454afcab 100644
--- a/ci/deps/azure-windows-37.yaml
+++ b/ci/deps/azure-windows-37.yaml
@@ -23,9 +23,9 @@ dependencies:
- matplotlib=2.2.*
- moto
- numexpr
- - numpy=1.18.*
+ - numpy=1.16.*
- openpyxl
- - pyarrow=0.14
+ - pyarrow=0.15
- pytables
- python-dateutil
- pytz
diff --git a/ci/deps/azure-windows-36.yaml b/ci/deps/azure-windows-38.yaml
similarity index 84%
rename from ci/deps/azure-windows-36.yaml
rename to ci/deps/azure-windows-38.yaml
index 548660cabaa67..f428a6dadfaa2 100644
--- a/ci/deps/azure-windows-36.yaml
+++ b/ci/deps/azure-windows-38.yaml
@@ -3,7 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- - python=3.6.*
+ - python=3.8.*
# tools
- cython>=0.29.16
@@ -16,13 +16,13 @@ dependencies:
- blosc
- bottleneck
- fastparquet>=0.3.2
- - matplotlib=3.0.2
+ - matplotlib=3.1.3
- numba
- numexpr
- - numpy=1.15.*
+ - numpy=1.18.*
- openpyxl
- jinja2
- - pyarrow>=0.13.0
+ - pyarrow>=0.15.0
- pytables
- python-dateutil
- pytz
diff --git a/ci/deps/travis-36-cov.yaml b/ci/deps/travis-37-cov.yaml
similarity index 93%
rename from ci/deps/travis-36-cov.yaml
rename to ci/deps/travis-37-cov.yaml
index 177e0d3f4c0af..3a0827a16f97a 100644
--- a/ci/deps/travis-36-cov.yaml
+++ b/ci/deps/travis-37-cov.yaml
@@ -3,7 +3,7 @@ channels:
- defaults
- conda-forge
dependencies:
- - python=3.6.*
+ - python=3.7.*
# tools
- cython>=0.29.16
@@ -26,12 +26,12 @@ dependencies:
- moto
- nomkl
- numexpr
- - numpy=1.15.*
+ - numpy=1.16.*
- odfpy
- openpyxl
- pandas-gbq
- psycopg2
- - pyarrow>=0.13.0
+ - pyarrow>=0.15.0
- pymysql
- pytables
- python-snappy
diff --git a/ci/deps/travis-36-locale.yaml b/ci/deps/travis-37-locale.yaml
similarity index 85%
rename from ci/deps/travis-36-locale.yaml
rename to ci/deps/travis-37-locale.yaml
index 03a1e751b6a86..4427c1d940bf2 100644
--- a/ci/deps/travis-36-locale.yaml
+++ b/ci/deps/travis-37-locale.yaml
@@ -3,7 +3,7 @@ channels:
- defaults
- conda-forge
dependencies:
- - python=3.6.*
+ - python=3.7.*
# tools
- cython>=0.29.16
@@ -19,7 +19,7 @@ dependencies:
- html5lib
- ipython
- jinja2
- - lxml=3.8.0
+ - lxml=4.3.0
- matplotlib=3.0.*
- moto
- nomkl
@@ -27,14 +27,14 @@ dependencies:
- numpy
- openpyxl
- pandas-gbq=0.12.0
- - psycopg2=2.6.2
+ - psycopg2=2.7
- pymysql=0.7.11
- pytables
- python-dateutil
- pytz
- scipy
- - sqlalchemy=1.1.4
- - xarray=0.10
+ - sqlalchemy=1.3.0
+ - xarray=0.12.0
- xlrd
- xlsxwriter
- xlwt
diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst
index b79a9cd872c47..7ab150394bf51 100644
--- a/doc/source/getting_started/install.rst
+++ b/doc/source/getting_started/install.rst
@@ -18,7 +18,7 @@ Instructions for installing from source,
Python version support
----------------------
-Officially Python 3.6.1 and above, 3.7, and 3.8.
+Officially Python 3.7.1 and above, and 3.8.
Installing pandas
-----------------
@@ -220,9 +220,9 @@ Dependencies
Package Minimum supported version
================================================================ ==========================
`setuptools `__ 24.2.0
-`NumPy `__ 1.15.4
+`NumPy `__ 1.16.5
`python-dateutil `__ 2.7.3
-`pytz `__ 2017.2
+`pytz `__ 2017.3
================================================================ ==========================
.. _install.recommended_dependencies:
@@ -232,7 +232,7 @@ Recommended dependencies
* `numexpr `__: for accelerating certain numerical operations.
``numexpr`` uses multiple cores as well as smart chunking and caching to achieve large speedups.
- If installed, must be Version 2.6.2 or higher.
+ If installed, must be Version 2.6.8 or higher.
* `bottleneck `__: for accelerating certain types of ``nan``
evaluations. ``bottleneck`` uses specialized cython routines to achieve large speedups. If installed,
@@ -259,36 +259,36 @@ the method requiring that dependency is called.
Dependency Minimum Version Notes
========================= ================== =============================================================
BeautifulSoup4 4.6.0 HTML parser for read_html (see :ref:`note `)
-Jinja2 Conditional formatting with DataFrame.style
+Jinja2 2.10 Conditional formatting with DataFrame.style
PyQt4 Clipboard I/O
PyQt5 Clipboard I/O
-PyTables 3.4.3 HDF5-based reading / writing
-SQLAlchemy 1.1.4 SQL support for databases other than sqlite
-SciPy 0.19.0 Miscellaneous statistical functions
-XLsxWriter 0.9.8 Excel writing
-blosc Compression for HDF5
+PyTables 3.4.4 HDF5-based reading / writing
+SQLAlchemy 1.2.8 SQL support for databases other than sqlite
+SciPy 1.12.0 Miscellaneous statistical functions
+xlsxwriter 1.0.2 Excel writing
+blosc 1.14.3 Compression for HDF5
fsspec 0.7.4 Handling files aside from local and HTTP
fastparquet 0.3.2 Parquet reading / writing
gcsfs 0.6.0 Google Cloud Storage access
-html5lib HTML parser for read_html (see :ref:`note `)
-lxml 3.8.0 HTML parser for read_html (see :ref:`note `)
-matplotlib 2.2.2 Visualization
+html5lib 1.0.1 HTML parser for read_html (see :ref:`note `)
+lxml 4.3.0 HTML parser for read_html (see :ref:`note `)
+matplotlib 2.2.3 Visualization
numba 0.46.0 Alternative execution engine for rolling operations
openpyxl 2.5.7 Reading / writing for xlsx files
pandas-gbq 0.12.0 Google Big Query access
-psycopg2 PostgreSQL engine for sqlalchemy
-pyarrow 0.12.0 Parquet, ORC (requires 0.13.0), and feather reading / writing
+psycopg2 2.7 PostgreSQL engine for sqlalchemy
+pyarrow 0.15.0 Parquet, ORC, and feather reading / writing
pymysql 0.7.11 MySQL engine for sqlalchemy
pyreadstat SPSS files (.sav) reading
-pytables 3.4.3 HDF5 reading / writing
+pytables 3.4.4 HDF5 reading / writing
pyxlsb 1.0.6 Reading for xlsb files
qtpy Clipboard I/O
s3fs 0.4.0 Amazon S3 access
tabulate 0.8.3 Printing in Markdown-friendly format (see `tabulate`_)
-xarray 0.8.2 pandas-like API for N-dimensional data
+xarray 0.12.0 pandas-like API for N-dimensional data
xclip Clipboard I/O on linux
xlrd 1.1.0 Excel reading
-xlwt 1.2.0 Excel writing
+xlwt 1.3.0 Excel writing
xsel Clipboard I/O on linux
zlib Compression for HDF5
========================= ================== =============================================================
diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 94bb265c32e4c..184431ea6f2f6 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -54,6 +54,84 @@ Other enhancements
-
-
+.. _whatsnew_120.api_breaking.python:
+
+Increased minimum version for Python
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Pandas 1.2.0 supports Python 3.7.1 and higher (:issue:`35214`).
+
+.. _whatsnew_120.api_breaking.deps:
+
+Increased minimum versions for dependencies
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Some minimum supported versions of dependencies were updated (:issue:`35214`).
+If installed, we now require:
+
++-----------------+-----------------+----------+---------+
+| Package | Minimum Version | Required | Changed |
++=================+=================+==========+=========+
+| numpy | 1.16.5 | X | X |
++-----------------+-----------------+----------+---------+
+| pytz | 2017.3 | X | X |
++-----------------+-----------------+----------+---------+
+| python-dateutil | 2.7.3 | X | |
++-----------------+-----------------+----------+---------+
+| bottleneck | 1.2.1 | | |
++-----------------+-----------------+----------+---------+
+| numexpr | 2.6.8 | | X |
++-----------------+-----------------+----------+---------+
+| pytest (dev) | 5.0.1 | | X |
++-----------------+-----------------+----------+---------+
+
+For `optional libraries `_ the general recommendation is to use the latest version.
+The following table lists the lowest version per library that is currently being tested throughout the development of pandas.
+Optional libraries below the lowest tested version may still work, but are not considered supported.
+
++-----------------+-----------------+---------+
+| Package | Minimum Version | Changed |
++=================+=================+=========+
+| beautifulsoup4 | 4.6.0 | |
++-----------------+-----------------+---------+
+| fastparquet | 0.3.2 | |
++-----------------+-----------------+---------+
+| fsspec | 0.7.4 | |
++-----------------+-----------------+---------+
+| gcsfs | 0.6.0 | |
++-----------------+-----------------+---------+
+| lxml | 4.3.0 | X |
++-----------------+-----------------+---------+
+| matplotlib | 2.2.3 | X |
++-----------------+-----------------+---------+
+| numba | 0.46.0 | |
++-----------------+-----------------+---------+
+| openpyxl | 2.5.7 | |
++-----------------+-----------------+---------+
+| pyarrow | 0.15.0 | X |
++-----------------+-----------------+---------+
+| pymysql | 0.7.11 | X |
++-----------------+-----------------+---------+
+| pytables | 3.4.4 | X |
++-----------------+-----------------+---------+
+| s3fs | 0.4.0 | |
++-----------------+-----------------+---------+
+| scipy | 1.2.0 | |
++-----------------+-----------------+---------+
+| sqlalchemy | 1.2.8 | X |
++-----------------+-----------------+---------+
+| xarray | 0.12.0 | X |
++-----------------+-----------------+---------+
+| xlrd | 1.1.0 | |
++-----------------+-----------------+---------+
+| xlsxwriter | 1.0.2 | X |
++-----------------+-----------------+---------+
+| xlwt | 1.3.0 | X |
++-----------------+-----------------+---------+
+| pandas-gbq | 0.12.0 | |
++-----------------+-----------------+---------+
+
+See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for more.
.. ---------------------------------------------------------------------------
diff --git a/environment.yml b/environment.yml
index ed9762e5b8893..1e51470d43d36 100644
--- a/environment.yml
+++ b/environment.yml
@@ -4,7 +4,7 @@ channels:
dependencies:
# required
# Pin numpy<1.19 until MPL 3.3.0 is released.
- - numpy>=1.15,<1.19.0
+ - numpy>=1.16.5,<1.19.0
- python=3
- python-dateutil>=2.7.3
- pytz
@@ -93,11 +93,11 @@ dependencies:
- odfpy
- fastparquet>=0.3.2 # pandas.read_parquet, DataFrame.to_parquet
- - pyarrow>=0.13.1 # pandas.read_parquet, DataFrame.to_parquet, pandas.read_feather, DataFrame.to_feather
+ - pyarrow>=0.15.0 # pandas.read_parquet, DataFrame.to_parquet, pandas.read_feather, DataFrame.to_feather
- python-snappy # required by pyarrow
- pyqt>=5.9.2 # pandas.read_clipboard
- - pytables>=3.4.3 # pandas.read_hdf, DataFrame.to_hdf
+ - pytables>=3.4.4 # pandas.read_hdf, DataFrame.to_hdf
- s3fs>=0.4.0 # file IO when using 's3://...' path
- fsspec>=0.7.4 # for generic remote file operations
- gcsfs>=0.6.0 # file IO when using 'gcs://...' path
diff --git a/pandas/__init__.py b/pandas/__init__.py
index d6584bf4f1c4f..36576da74c75d 100644
--- a/pandas/__init__.py
+++ b/pandas/__init__.py
@@ -20,7 +20,6 @@
# numpy compat
from pandas.compat.numpy import (
- _np_version_under1p16,
_np_version_under1p17,
_np_version_under1p18,
_is_numpy_dev,
@@ -185,181 +184,76 @@
__git_version__ = v.get("full-revisionid")
del get_versions, v
+
# GH 27101
# TODO: remove Panel compat in 1.0
-if pandas.compat.PY37:
-
- def __getattr__(name):
- import warnings
-
- if name == "Panel":
-
- warnings.warn(
- "The Panel class is removed from pandas. Accessing it "
- "from the top-level namespace will also be removed in the next version",
- FutureWarning,
- stacklevel=2,
- )
-
- class Panel:
- pass
-
- return Panel
-
- elif name == "datetime":
- warnings.warn(
- "The pandas.datetime class is deprecated "
- "and will be removed from pandas in a future version. "
- "Import from datetime module instead.",
- FutureWarning,
- stacklevel=2,
- )
-
- from datetime import datetime as dt
-
- return dt
-
- elif name == "np":
-
- warnings.warn(
- "The pandas.np module is deprecated "
- "and will be removed from pandas in a future version. "
- "Import numpy directly instead",
- FutureWarning,
- stacklevel=2,
- )
- import numpy as np
-
- return np
-
- elif name in {"SparseSeries", "SparseDataFrame"}:
- warnings.warn(
- f"The {name} class is removed from pandas. Accessing it from "
- "the top-level namespace will also be removed in the next version",
- FutureWarning,
- stacklevel=2,
- )
-
- return type(name, (), {})
-
- elif name == "SparseArray":
-
- warnings.warn(
- "The pandas.SparseArray class is deprecated "
- "and will be removed from pandas in a future version. "
- "Use pandas.arrays.SparseArray instead.",
- FutureWarning,
- stacklevel=2,
- )
- from pandas.core.arrays.sparse import SparseArray as _SparseArray
+def __getattr__(name):
+ import warnings
- return _SparseArray
+ if name == "Panel":
- raise AttributeError(f"module 'pandas' has no attribute '{name}'")
+ warnings.warn(
+ "The Panel class is removed from pandas. Accessing it "
+ "from the top-level namespace will also be removed in the next version",
+ FutureWarning,
+ stacklevel=2,
+ )
+ class Panel:
+ pass
-else:
+ return Panel
- class Panel:
- pass
-
- class SparseDataFrame:
- pass
-
- class SparseSeries:
- pass
-
- class __numpy:
- def __init__(self):
- import numpy as np
- import warnings
-
- self.np = np
- self.warnings = warnings
-
- def __getattr__(self, item):
- self.warnings.warn(
- "The pandas.np module is deprecated "
- "and will be removed from pandas in a future version. "
- "Import numpy directly instead",
- FutureWarning,
- stacklevel=2,
- )
-
- try:
- return getattr(self.np, item)
- except AttributeError as err:
- raise AttributeError(f"module numpy has no attribute {item}") from err
-
- np = __numpy()
-
- class __Datetime(type):
+ elif name == "datetime":
+ warnings.warn(
+ "The pandas.datetime class is deprecated "
+ "and will be removed from pandas in a future version. "
+ "Import from datetime module instead.",
+ FutureWarning,
+ stacklevel=2,
+ )
from datetime import datetime as dt
- datetime = dt
-
- def __getattr__(cls, item):
- cls.emit_warning()
-
- try:
- return getattr(cls.datetime, item)
- except AttributeError as err:
- raise AttributeError(
- f"module datetime has no attribute {item}"
- ) from err
-
- def __instancecheck__(cls, other):
- return isinstance(other, cls.datetime)
-
- class __DatetimeSub(metaclass=__Datetime):
- def emit_warning(dummy=0):
- import warnings
-
- warnings.warn(
- "The pandas.datetime class is deprecated "
- "and will be removed from pandas in a future version. "
- "Import from datetime instead.",
- FutureWarning,
- stacklevel=3,
- )
-
- def __new__(cls, *args, **kwargs):
- cls.emit_warning()
- from datetime import datetime as dt
-
- return dt(*args, **kwargs)
-
- datetime = __DatetimeSub
+ return dt
- class __SparseArray(type):
+ elif name == "np":
- from pandas.core.arrays.sparse import SparseArray as sa
+ warnings.warn(
+ "The pandas.np module is deprecated "
+ "and will be removed from pandas in a future version. "
+ "Import numpy directly instead",
+ FutureWarning,
+ stacklevel=2,
+ )
+ import numpy as np
- SparseArray = sa
+ return np
- def __instancecheck__(cls, other):
- return isinstance(other, cls.SparseArray)
+ elif name in {"SparseSeries", "SparseDataFrame"}:
+ warnings.warn(
+ f"The {name} class is removed from pandas. Accessing it from "
+ "the top-level namespace will also be removed in the next version",
+ FutureWarning,
+ stacklevel=2,
+ )
- class __SparseArraySub(metaclass=__SparseArray):
- def emit_warning(dummy=0):
- import warnings
+ return type(name, (), {})
- warnings.warn(
- "The pandas.SparseArray class is deprecated "
- "and will be removed from pandas in a future version. "
- "Use pandas.arrays.SparseArray instead.",
- FutureWarning,
- stacklevel=3,
- )
+ elif name == "SparseArray":
- def __new__(cls, *args, **kwargs):
- cls.emit_warning()
- from pandas.core.arrays.sparse import SparseArray as sa
+ warnings.warn(
+ "The pandas.SparseArray class is deprecated "
+ "and will be removed from pandas in a future version. "
+ "Use pandas.arrays.SparseArray instead.",
+ FutureWarning,
+ stacklevel=2,
+ )
+ from pandas.core.arrays.sparse import SparseArray as _SparseArray
- return sa(*args, **kwargs)
+ return _SparseArray
- SparseArray = __SparseArraySub
+ raise AttributeError(f"module 'pandas' has no attribute '{name}'")
# module level doc-string
diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py
index b5a1dc2b2fb94..ab2835932c95d 100644
--- a/pandas/compat/__init__.py
+++ b/pandas/compat/__init__.py
@@ -14,7 +14,6 @@
from pandas._typing import F
-PY37 = sys.version_info >= (3, 7)
PY38 = sys.version_info >= (3, 8)
PY39 = sys.version_info >= (3, 9)
PYPY = platform.python_implementation() == "PyPy"
diff --git a/pandas/compat/numpy/__init__.py b/pandas/compat/numpy/__init__.py
index 789a4668b6fee..08d06da93bb45 100644
--- a/pandas/compat/numpy/__init__.py
+++ b/pandas/compat/numpy/__init__.py
@@ -8,19 +8,19 @@
# numpy versioning
_np_version = np.__version__
_nlv = LooseVersion(_np_version)
-_np_version_under1p16 = _nlv < LooseVersion("1.16")
_np_version_under1p17 = _nlv < LooseVersion("1.17")
_np_version_under1p18 = _nlv < LooseVersion("1.18")
_np_version_under1p19 = _nlv < LooseVersion("1.19")
_np_version_under1p20 = _nlv < LooseVersion("1.20")
_is_numpy_dev = ".dev" in str(_nlv)
+_min_numpy_ver = "1.16.5"
-if _nlv < "1.15.4":
+if _nlv < _min_numpy_ver:
raise ImportError(
- "this version of pandas is incompatible with numpy < 1.15.4\n"
+ f"this version of pandas is incompatible with numpy < {_min_numpy_ver}\n"
f"your numpy version is {_np_version}.\n"
- "Please upgrade numpy to >= 1.15.4 to use this pandas version"
+ f"Please upgrade numpy to >= {_min_numpy_ver} to use this pandas version"
)
@@ -65,7 +65,6 @@ def np_array_datetime64_compat(arr, *args, **kwargs):
__all__ = [
"np",
"_np_version",
- "_np_version_under1p16",
"_np_version_under1p17",
"_is_numpy_dev",
]
diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index 9d0751fcce460..547d86f221b5f 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -58,7 +58,6 @@
StorageOptions,
ValueKeyFunc,
)
-from pandas.compat import PY37
from pandas.compat._optional import import_optional_dependency
from pandas.compat.numpy import function as nv
from pandas.util._decorators import (
@@ -1088,9 +1087,7 @@ def itertuples(self, index=True, name="Pandas"):
# use integer indexing because of possible duplicate column names
arrays.extend(self.iloc[:, k] for k in range(len(self.columns)))
- # Python versions before 3.7 support at most 255 arguments to constructors
- can_return_named_tuples = PY37 or len(self.columns) + index < 255
- if name is not None and can_return_named_tuples:
+ if name is not None:
itertuple = collections.namedtuple(name, fields, rename=True)
return map(itertuple._make, zip(*arrays))
diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py
index aeb7b3e044794..2abc570a04de3 100644
--- a/pandas/io/pytables.py
+++ b/pandas/io/pytables.py
@@ -320,6 +320,10 @@ def read_hdf(
mode : {'r', 'r+', 'a'}, default 'r'
Mode to use when opening the file. Ignored if path_or_buf is a
:class:`pandas.HDFStore`. Default is 'r'.
+ errors : str, default 'strict'
+ Specifies how encoding and decoding errors are to be handled.
+ See the errors argument for :func:`open` for a full list
+ of options.
where : list, optional
A list of Term (or convertible) objects.
start : int, optional
@@ -332,10 +336,6 @@ def read_hdf(
Return an iterator object.
chunksize : int, optional
Number of rows to include in an iteration when using an iterator.
- errors : str, default 'strict'
- Specifies how encoding and decoding errors are to be handled.
- See the errors argument for :func:`open` for a full list
- of options.
**kwargs
Additional keyword arguments passed to HDFStore.
diff --git a/pandas/tests/api/test_api.py b/pandas/tests/api/test_api.py
index caa348d3a1fb9..1d25336cd3b70 100644
--- a/pandas/tests/api/test_api.py
+++ b/pandas/tests/api/test_api.py
@@ -5,7 +5,7 @@
import pytest
import pandas as pd
-from pandas import api, compat
+from pandas import api
import pandas._testing as tm
@@ -100,11 +100,6 @@ class TestPDApi(Base):
# these should be deprecated in the future
deprecated_classes_in_future: List[str] = ["SparseArray"]
- if not compat.PY37:
- classes.extend(["Panel", "SparseSeries", "SparseDataFrame"])
- # deprecated_modules.extend(["np", "datetime"])
- # deprecated_classes_in_future.extend(["SparseArray"])
-
# external modules exposed in pandas namespace
modules: List[str] = []
@@ -193,7 +188,6 @@ class TestPDApi(Base):
"_hashtable",
"_lib",
"_libs",
- "_np_version_under1p16",
"_np_version_under1p17",
"_np_version_under1p18",
"_is_numpy_dev",
@@ -217,14 +211,6 @@ def test_api(self):
+ self.funcs_to
+ self.private_modules
)
- if not compat.PY37:
- checkthese.extend(
- self.deprecated_modules
- + self.deprecated_classes
- + self.deprecated_classes_in_future
- + self.deprecated_funcs_in_future
- + self.deprecated_funcs
- )
self.check(pd, checkthese, self.ignored)
def test_depr(self):
@@ -237,14 +223,7 @@ def test_depr(self):
)
for depr in deprecated_list:
with tm.assert_produces_warning(FutureWarning):
- deprecated = getattr(pd, depr)
- if not compat.PY37:
- if depr == "datetime":
- deprecated.__getattr__(dir(pd.datetime.datetime)[-1])
- elif depr == "SparseArray":
- deprecated([])
- else:
- deprecated.__getattr__(dir(deprecated)[-1])
+ _ = getattr(pd, depr)
def test_datetime():
diff --git a/pandas/tests/arrays/categorical/test_constructors.py b/pandas/tests/arrays/categorical/test_constructors.py
index ca942c9288898..89fbfbd5b8324 100644
--- a/pandas/tests/arrays/categorical/test_constructors.py
+++ b/pandas/tests/arrays/categorical/test_constructors.py
@@ -3,8 +3,6 @@
import numpy as np
import pytest
-from pandas.compat.numpy import _np_version_under1p16
-
from pandas.core.dtypes.common import is_float_dtype, is_integer_dtype
from pandas.core.dtypes.dtypes import CategoricalDtype
@@ -637,7 +635,6 @@ def test_constructor_imaginary(self):
tm.assert_index_equal(c1.categories, Index(values))
tm.assert_numpy_array_equal(np.array(c1), np.array(values))
- @pytest.mark.skipif(_np_version_under1p16, reason="Skipping for NumPy <1.16")
def test_constructor_string_and_tuples(self):
# GH 21416
c = pd.Categorical(np.array(["c", ("a", "b"), ("b", "a"), "c"], dtype=object))
diff --git a/pandas/tests/extension/arrow/test_bool.py b/pandas/tests/extension/arrow/test_bool.py
index 7841360e568ed..12426a0c92c55 100644
--- a/pandas/tests/extension/arrow/test_bool.py
+++ b/pandas/tests/extension/arrow/test_bool.py
@@ -1,8 +1,6 @@
import numpy as np
import pytest
-from pandas.compat import PY37
-
import pandas as pd
import pandas._testing as tm
from pandas.tests.extension import base
@@ -62,13 +60,11 @@ def test_from_dtype(self, data):
def test_from_sequence_from_cls(self, data):
super().test_from_sequence_from_cls(data)
- @pytest.mark.skipif(not PY37, reason="timeout on Linux py36_locale")
@pytest.mark.xfail(reason="pa.NULL is not recognised as scalar, GH-33899")
def test_series_constructor_no_data_with_index(self, dtype, na_value):
# pyarrow.lib.ArrowInvalid: only handle 1-dimensional arrays
super().test_series_constructor_no_data_with_index(dtype, na_value)
- @pytest.mark.skipif(not PY37, reason="timeout on Linux py36_locale")
@pytest.mark.xfail(reason="pa.NULL is not recognised as scalar, GH-33899")
def test_series_constructor_scalar_na_with_index(self, dtype, na_value):
# pyarrow.lib.ArrowInvalid: only handle 1-dimensional arrays
diff --git a/pandas/tests/extension/test_numpy.py b/pandas/tests/extension/test_numpy.py
index 78000c0252375..b9219f9f833de 100644
--- a/pandas/tests/extension/test_numpy.py
+++ b/pandas/tests/extension/test_numpy.py
@@ -1,8 +1,6 @@
import numpy as np
import pytest
-from pandas.compat.numpy import _np_version_under1p16
-
import pandas as pd
import pandas._testing as tm
from pandas.core.arrays.numpy_ import PandasArray, PandasDtype
@@ -46,11 +44,7 @@ def data(allow_in_pandas, dtype):
@pytest.fixture
def data_missing(allow_in_pandas, dtype):
- # For NumPy <1.16, np.array([np.nan, (1,)]) raises
- # ValueError: setting an array element with a sequence.
if dtype.numpy_dtype == "object":
- if _np_version_under1p16:
- raise pytest.skip("Skipping for NumPy <1.16")
return PandasArray(np.array([np.nan, (1,)], dtype=object))
return PandasArray(np.array([np.nan, 1.0]))
diff --git a/pandas/tests/frame/test_api.py b/pandas/tests/frame/test_api.py
index cc57a3970d18b..2fb1f7f911a9c 100644
--- a/pandas/tests/frame/test_api.py
+++ b/pandas/tests/frame/test_api.py
@@ -6,7 +6,6 @@
import numpy as np
import pytest
-from pandas.compat import PY37
from pandas.util._test_decorators import async_mark, skip_if_no
import pandas as pd
@@ -274,10 +273,7 @@ def test_itertuples(self, float_frame):
# will raise SyntaxError if trying to create namedtuple
tup3 = next(df3.itertuples())
assert isinstance(tup3, tuple)
- if PY37:
- assert hasattr(tup3, "_fields")
- else:
- assert not hasattr(tup3, "_fields")
+ assert hasattr(tup3, "_fields")
# GH 28282
df_254_columns = DataFrame([{f"foo_{i}": f"bar_{i}" for i in range(254)}])
@@ -288,12 +284,7 @@ def test_itertuples(self, float_frame):
df_255_columns = DataFrame([{f"foo_{i}": f"bar_{i}" for i in range(255)}])
result_255_columns = next(df_255_columns.itertuples(index=False))
assert isinstance(result_255_columns, tuple)
-
- # Dataframes with >=255 columns will fallback to regular tuples on python < 3.7
- if PY37:
- assert hasattr(result_255_columns, "_fields")
- else:
- assert not hasattr(result_255_columns, "_fields")
+ assert hasattr(result_255_columns, "_fields")
def test_sequence_like_with_categorical(self):
diff --git a/pandas/tests/frame/test_constructors.py b/pandas/tests/frame/test_constructors.py
index d0f774344a33d..c8f5b2b0f6364 100644
--- a/pandas/tests/frame/test_constructors.py
+++ b/pandas/tests/frame/test_constructors.py
@@ -10,7 +10,7 @@
import pytest
import pytz
-from pandas.compat import PY37, is_platform_little_endian
+from pandas.compat import is_platform_little_endian
from pandas.compat.numpy import _np_version_under1p19
from pandas.core.dtypes.common import is_integer_dtype
@@ -1418,7 +1418,6 @@ def test_constructor_list_of_namedtuples(self):
result = DataFrame(tuples, columns=["y", "z"])
tm.assert_frame_equal(result, expected)
- @pytest.mark.skipif(not PY37, reason="Requires Python >= 3.7")
def test_constructor_list_of_dataclasses(self):
# GH21910
from dataclasses import make_dataclass
@@ -1430,7 +1429,6 @@ def test_constructor_list_of_dataclasses(self):
result = DataFrame(datas)
tm.assert_frame_equal(result, expected)
- @pytest.mark.skipif(not PY37, reason="Requires Python >= 3.7")
def test_constructor_list_of_dataclasses_with_varying_types(self):
# GH21910
from dataclasses import make_dataclass
@@ -1447,7 +1445,6 @@ def test_constructor_list_of_dataclasses_with_varying_types(self):
result = DataFrame(datas)
tm.assert_frame_equal(result, expected)
- @pytest.mark.skipif(not PY37, reason="Requires Python >= 3.7")
def test_constructor_list_of_dataclasses_error_thrown(self):
# GH21910
from dataclasses import make_dataclass
diff --git a/pandas/tests/groupby/test_categorical.py b/pandas/tests/groupby/test_categorical.py
index c74c1529eb537..13a32e285e70a 100644
--- a/pandas/tests/groupby/test_categorical.py
+++ b/pandas/tests/groupby/test_categorical.py
@@ -3,8 +3,6 @@
import numpy as np
import pytest
-from pandas.compat import PY37, is_platform_windows
-
import pandas as pd
from pandas import (
Categorical,
@@ -13,7 +11,6 @@
Index,
MultiIndex,
Series,
- _np_version_under1p17,
qcut,
)
import pandas._testing as tm
@@ -244,12 +241,6 @@ def test_level_get_group(observed):
tm.assert_frame_equal(result, expected)
-# GH#21636 flaky on py37; may be related to older numpy, see discussion
-# https://github.com/MacPython/pandas-wheels/pull/64
-@pytest.mark.xfail(
- PY37 and _np_version_under1p17 and not is_platform_windows(),
- reason="Flaky, GH-27902",
-)
@pytest.mark.parametrize("ordered", [True, False])
def test_apply(ordered):
# GH 10138
diff --git a/pandas/tests/io/json/test_json_table_schema.py b/pandas/tests/io/json/test_json_table_schema.py
index 22b4ec189a0f1..8f1ed193b100f 100644
--- a/pandas/tests/io/json/test_json_table_schema.py
+++ b/pandas/tests/io/json/test_json_table_schema.py
@@ -256,6 +256,9 @@ def test_read_json_from_to_json_results(self):
tm.assert_frame_equal(result1, df)
tm.assert_frame_equal(result2, df)
+ @pytest.mark.filterwarnings(
+ "ignore:an integer is required (got type float)*:DeprecationWarning"
+ )
def test_to_json(self):
df = self.df.copy()
df.index.name = "idx"
@@ -432,6 +435,9 @@ def test_to_json_categorical_index(self):
assert result == expected
+ @pytest.mark.filterwarnings(
+ "ignore:an integer is required (got type float)*:DeprecationWarning"
+ )
def test_date_format_raises(self):
with pytest.raises(ValueError):
self.df.to_json(orient="table", date_format="epoch")
diff --git a/pandas/tests/io/json/test_pandas.py b/pandas/tests/io/json/test_pandas.py
index c4db0170ecc90..1280d0fd434d5 100644
--- a/pandas/tests/io/json/test_pandas.py
+++ b/pandas/tests/io/json/test_pandas.py
@@ -35,6 +35,9 @@ def assert_json_roundtrip_equal(result, expected, orient):
tm.assert_frame_equal(result, expected)
+@pytest.mark.filterwarnings(
+ "ignore:an integer is required (got type float)*:DeprecationWarning"
+)
@pytest.mark.filterwarnings("ignore:the 'numpy' keyword is deprecated:FutureWarning")
class TestPandasContainer:
@pytest.fixture(autouse=True)
diff --git a/pandas/tests/io/parser/test_common.py b/pandas/tests/io/parser/test_common.py
index 5154a9ba6fdf0..c84c0048cc838 100644
--- a/pandas/tests/io/parser/test_common.py
+++ b/pandas/tests/io/parser/test_common.py
@@ -1138,6 +1138,7 @@ def test_parse_integers_above_fp_precision(all_parsers):
tm.assert_frame_equal(result, expected)
+@pytest.mark.skip("unreliable test #35214")
def test_chunks_have_consistent_numerical_type(all_parsers):
parser = all_parsers
integers = [str(i) for i in range(499999)]
@@ -1151,6 +1152,7 @@ def test_chunks_have_consistent_numerical_type(all_parsers):
assert result.a.dtype == float
+@pytest.mark.skip("unreliable test #35214")
def test_warn_if_chunks_have_mismatched_type(all_parsers):
warning_type = None
parser = all_parsers
diff --git a/pandas/tests/scalar/test_nat.py b/pandas/tests/scalar/test_nat.py
index 03830019affa1..09d5d9c1677d0 100644
--- a/pandas/tests/scalar/test_nat.py
+++ b/pandas/tests/scalar/test_nat.py
@@ -308,10 +308,6 @@ def test_overlap_public_nat_methods(klass, expected):
# In case when Timestamp, Timedelta, and NaT are overlap, the overlap
# is considered to be with Timestamp and NaT, not Timedelta.
- # "fromisoformat" was introduced in 3.7
- if klass is Timestamp and not compat.PY37:
- expected.remove("fromisoformat")
-
# "fromisocalendar" was introduced in 3.8
if klass is Timestamp and not compat.PY38:
expected.remove("fromisocalendar")
diff --git a/pandas/tests/tseries/offsets/test_offsets.py b/pandas/tests/tseries/offsets/test_offsets.py
index 8c51908c547f4..d1ab797056ece 100644
--- a/pandas/tests/tseries/offsets/test_offsets.py
+++ b/pandas/tests/tseries/offsets/test_offsets.py
@@ -14,7 +14,6 @@
import pandas._libs.tslibs.offsets as liboffsets
from pandas._libs.tslibs.offsets import ApplyTypeError, _get_offset, _offset_map
from pandas._libs.tslibs.period import INVALID_FREQ_ERR_MSG
-import pandas.compat as compat
from pandas.compat.numpy import np_datetime64_compat
from pandas.errors import PerformanceWarning
@@ -744,10 +743,7 @@ def test_repr(self):
assert repr(self.offset) == ""
assert repr(self.offset2) == "<2 * BusinessDays>"
- if compat.PY37:
- expected = ""
- else:
- expected = ""
+ expected = ""
assert repr(self.offset + timedelta(1)) == expected
def test_with_offset(self):
@@ -2636,10 +2632,7 @@ def test_repr(self):
assert repr(self.offset) == ""
assert repr(self.offset2) == "<2 * CustomBusinessDays>"
- if compat.PY37:
- expected = ""
- else:
- expected = ""
+ expected = ""
assert repr(self.offset + timedelta(1)) == expected
def test_with_offset(self):
diff --git a/pandas/util/__init__.py b/pandas/util/__init__.py
index b5271dbc0443e..9f2bf156b7e37 100644
--- a/pandas/util/__init__.py
+++ b/pandas/util/__init__.py
@@ -1,30 +1,12 @@
from pandas.util._decorators import Appender, Substitution, cache_readonly # noqa
-from pandas import compat
from pandas.core.util.hashing import hash_array, hash_pandas_object # noqa
-# compatibility for import pandas; pandas.util.testing
-if compat.PY37:
+def __getattr__(name):
+ if name == "testing":
+ import pandas.util.testing
- def __getattr__(name):
- if name == "testing":
- import pandas.util.testing
-
- return pandas.util.testing
- else:
- raise AttributeError(f"module 'pandas.util' has no attribute '{name}'")
-
-
-else:
-
- class _testing:
- def __getattr__(self, item):
- import pandas.util.testing
-
- return getattr(pandas.util.testing, item)
-
- testing = _testing()
-
-
-del compat
+ return pandas.util.testing
+ else:
+ raise AttributeError(f"module 'pandas.util' has no attribute '{name}'")
diff --git a/pyproject.toml b/pyproject.toml
index f282f2a085000..f6f8081b6c464 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,16 +5,14 @@ requires = [
"setuptools",
"wheel",
"Cython>=0.29.16,<3", # Note: sync with setup.py
- "numpy==1.15.4; python_version=='3.6' and platform_system!='AIX'",
- "numpy==1.15.4; python_version=='3.7' and platform_system!='AIX'",
+ "numpy==1.16.5; python_version=='3.7' and platform_system!='AIX'",
"numpy==1.17.3; python_version>='3.8' and platform_system!='AIX'",
- "numpy==1.16.0; python_version=='3.6' and platform_system=='AIX'",
- "numpy==1.16.0; python_version=='3.7' and platform_system=='AIX'",
+ "numpy==1.16.5; python_version=='3.7' and platform_system=='AIX'",
"numpy==1.17.3; python_version>='3.8' and platform_system=='AIX'",
]
[tool.black]
-target-version = ['py36', 'py37', 'py38']
+target-version = ['py37', 'py38']
exclude = '''
(
asv_bench/env
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 6a87b0a99a4f8..66e72641cd5bb 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,7 +1,7 @@
# This file is auto-generated from environment.yml, do not modify.
# See that file for comments about the need/usage of each dependency.
-numpy>=1.15,<1.19.0
+numpy>=1.16.5,<1.19.0
python-dateutil>=2.7.3
pytz
asv
@@ -60,10 +60,10 @@ xlsxwriter
xlwt
odfpy
fastparquet>=0.3.2
-pyarrow>=0.13.1
+pyarrow>=0.15.0
python-snappy
pyqt5>=5.9.2
-tables>=3.4.3
+tables>=3.4.4
s3fs>=0.4.0
fsspec>=0.7.4
gcsfs>=0.6.0
diff --git a/setup.py b/setup.py
index aebbdbf4d1e96..43d19d525876b 100755
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,7 @@ def is_platform_mac():
return sys.platform == "darwin"
-min_numpy_ver = "1.15.4"
+min_numpy_ver = "1.16.5"
min_cython_ver = "0.29.16" # note: sync with pyproject.toml
try:
@@ -197,7 +197,6 @@ def build_extensions(self):
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Cython",
@@ -742,7 +741,7 @@ def setup_package():
setuptools_kwargs = {
"install_requires": [
"python-dateutil >= 2.7.3",
- "pytz >= 2017.2",
+ "pytz >= 2017.3",
f"numpy >= {min_numpy_ver}",
],
"setup_requires": [f"numpy >= {min_numpy_ver}"],
@@ -766,11 +765,11 @@ def setup_package():
long_description=LONG_DESCRIPTION,
classifiers=CLASSIFIERS,
platforms="any",
- python_requires=">=3.6.1",
+ python_requires=">=3.7.1",
extras_require={
"test": [
# sync with setup.cfg minversion & install.rst
- "pytest>=4.0.2",
+ "pytest>=5.0.1",
"pytest-xdist",
"hypothesis>=3.58",
]