diff --git a/ci/deps/azure-27-compat.yaml b/ci/deps/azure-27-compat.yaml
index c68b51fbd6644..a7784f17d1956 100644
--- a/ci/deps/azure-27-compat.yaml
+++ b/ci/deps/azure-27-compat.yaml
@@ -18,7 +18,7 @@ dependencies:
- xlsxwriter=0.5.2
- xlwt=0.7.5
# universal
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-mock
- isort
diff --git a/ci/deps/azure-27-locale.yaml b/ci/deps/azure-27-locale.yaml
index 5679c503caddc..8636a63d02fed 100644
--- a/ci/deps/azure-27-locale.yaml
+++ b/ci/deps/azure-27-locale.yaml
@@ -20,7 +20,7 @@ dependencies:
- xlsxwriter=0.5.2
- xlwt=0.7.5
# universal
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-mock
- hypothesis>=3.58.0
diff --git a/ci/deps/azure-36-locale_slow.yaml b/ci/deps/azure-36-locale_slow.yaml
index de1f4ad0e9a76..3f788e5ddcf39 100644
--- a/ci/deps/azure-36-locale_slow.yaml
+++ b/ci/deps/azure-36-locale_slow.yaml
@@ -26,7 +26,7 @@ dependencies:
- xlsxwriter
- xlwt
# universal
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-mock
- moto
diff --git a/ci/deps/azure-37-locale.yaml b/ci/deps/azure-37-locale.yaml
index a89e63a2b7d3a..9d598cddce91a 100644
--- a/ci/deps/azure-37-locale.yaml
+++ b/ci/deps/azure-37-locale.yaml
@@ -25,7 +25,7 @@ dependencies:
- xlsxwriter
- xlwt
# universal
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-mock
- isort
diff --git a/ci/deps/azure-37-numpydev.yaml b/ci/deps/azure-37-numpydev.yaml
index 3132de891299c..e58c1f599279c 100644
--- a/ci/deps/azure-37-numpydev.yaml
+++ b/ci/deps/azure-37-numpydev.yaml
@@ -6,7 +6,7 @@ dependencies:
- pytz
- Cython>=0.28.2
# universal
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-mock
- hypothesis>=3.58.0
diff --git a/ci/deps/azure-macos-35.yaml b/ci/deps/azure-macos-35.yaml
index 9710bcb5bf43d..2326e8092cc85 100644
--- a/ci/deps/azure-macos-35.yaml
+++ b/ci/deps/azure-macos-35.yaml
@@ -21,11 +21,11 @@ dependencies:
- xlrd
- xlsxwriter
- xlwt
- # universal
- - pytest
- - pytest-xdist
- - pytest-mock
- isort
- pip:
- python-dateutil==2.5.3
+ # universal
+ - pytest>=4.0.2
+ - pytest-xdist
+ - pytest-mock
- hypothesis>=3.58.0
diff --git a/ci/deps/azure-windows-27.yaml b/ci/deps/azure-windows-27.yaml
index 093c055e69553..f40efdfca3cbd 100644
--- a/ci/deps/azure-windows-27.yaml
+++ b/ci/deps/azure-windows-27.yaml
@@ -25,7 +25,7 @@ dependencies:
- xlwt
# universal
- cython>=0.28.2
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-mock
- moto
diff --git a/ci/deps/azure-windows-36.yaml b/ci/deps/azure-windows-36.yaml
index e9db271a75d9d..8517d340f2ba8 100644
--- a/ci/deps/azure-windows-36.yaml
+++ b/ci/deps/azure-windows-36.yaml
@@ -23,7 +23,7 @@ dependencies:
- xlwt
# universal
- cython>=0.28.2
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-mock
- hypothesis>=3.58.0
diff --git a/ci/deps/travis-27.yaml b/ci/deps/travis-27.yaml
index 71b224b2c68c2..a910af36a6b10 100644
--- a/ci/deps/travis-27.yaml
+++ b/ci/deps/travis-27.yaml
@@ -39,7 +39,7 @@ dependencies:
- xlsxwriter=0.5.2
- xlwt=0.7.5
# universal
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-mock
- moto==1.3.4
diff --git a/ci/deps/travis-36-doc.yaml b/ci/deps/travis-36-doc.yaml
index 1a65d292ef085..6f33bc58a8b21 100644
--- a/ci/deps/travis-36-doc.yaml
+++ b/ci/deps/travis-36-doc.yaml
@@ -41,6 +41,6 @@ dependencies:
- xlsxwriter
- xlwt
# universal
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- isort
diff --git a/ci/deps/travis-36-locale.yaml b/ci/deps/travis-36-locale.yaml
index 36dbb8013104a..34b289e6c0c2f 100644
--- a/ci/deps/travis-36-locale.yaml
+++ b/ci/deps/travis-36-locale.yaml
@@ -28,7 +28,7 @@ dependencies:
- xlsxwriter
- xlwt
# universal
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-mock
- moto
diff --git a/ci/deps/travis-36-slow.yaml b/ci/deps/travis-36-slow.yaml
index f4b9091c4300b..46875d59411d9 100644
--- a/ci/deps/travis-36-slow.yaml
+++ b/ci/deps/travis-36-slow.yaml
@@ -25,7 +25,7 @@ dependencies:
- xlsxwriter
- xlwt
# universal
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-mock
- moto
diff --git a/ci/deps/travis-36.yaml b/ci/deps/travis-36.yaml
index e22529784b5ec..06fc0d76a3d16 100644
--- a/ci/deps/travis-36.yaml
+++ b/ci/deps/travis-36.yaml
@@ -33,7 +33,7 @@ dependencies:
- xlsxwriter
- xlwt
# universal
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-cov
- pytest-mock
diff --git a/ci/deps/travis-37.yaml b/ci/deps/travis-37.yaml
index a8a5df5894ba5..f71d29fe13378 100644
--- a/ci/deps/travis-37.yaml
+++ b/ci/deps/travis-37.yaml
@@ -12,7 +12,7 @@ dependencies:
- nomkl
- pyarrow
- pytz
- - pytest
+ - pytest>=4.0.2
- pytest-xdist
- pytest-mock
- hypothesis>=3.58.0
diff --git a/doc/source/development/contributing.rst b/doc/source/development/contributing.rst
index 511936467641e..1270bfec098e8 100644
--- a/doc/source/development/contributing.rst
+++ b/doc/source/development/contributing.rst
@@ -731,7 +731,7 @@ extensions in `numpy.testing
.. note::
- The earliest supported pytest version is 3.6.0.
+ The earliest supported pytest version is 4.0.2.
Writing tests
~~~~~~~~~~~~~
diff --git a/doc/source/install.rst b/doc/source/install.rst
index 92364fcc9ebd2..5310667c403e5 100644
--- a/doc/source/install.rst
+++ b/doc/source/install.rst
@@ -202,7 +202,7 @@ pandas is equipped with an exhaustive set of unit tests, covering about 97% of
the code base as of this writing. To run it on your machine to verify that
everything is working (and that you have all of the dependencies, soft and hard,
installed), make sure you have `pytest
-`__ >= 3.6 and `Hypothesis
+`__ >= 4.0.2 and `Hypothesis
`__ >= 3.58, then run:
::
diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst
index 170e7f14da397..23effdc0d17ee 100644
--- a/doc/source/whatsnew/v0.25.0.rst
+++ b/doc/source/whatsnew/v0.25.0.rst
@@ -63,6 +63,20 @@ is respected in indexing. (:issue:`24076`, :issue:`16785`)
df = pd.DataFrame([0], index=pd.DatetimeIndex(['2019-01-01'], tz='US/Pacific'))
df['2019-01-01 12:00:00+04:00':'2019-01-01 13:00:00+04:00']
+.. _whatsnew_0250.api_breaking.deps:
+
+Increased minimum versions for dependencies
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+We have updated our minimum supported versions of dependencies (:issue:`23519`).
+If installed, we now require:
+
++-----------------+-----------------+----------+
+| Package | Minimum Version | Required |
++=================+=================+==========+
+| pytest (dev) | 4.0.2 | |
++-----------------+-----------------+----------+
+
.. _whatsnew_0250.api.other:
Other API Changes
diff --git a/environment.yml b/environment.yml
index ce68dccca0c07..c1669c9f49017 100644
--- a/environment.yml
+++ b/environment.yml
@@ -19,7 +19,7 @@ dependencies:
- hypothesis>=3.82
- isort
- moto
- - pytest>=4.0
+ - pytest>=4.0.2
- pytest-mock
- sphinx
- numpydoc
diff --git a/pandas/util/_tester.py b/pandas/util/_tester.py
index 18e8d415459fd..19b1cc700261c 100644
--- a/pandas/util/_tester.py
+++ b/pandas/util/_tester.py
@@ -11,7 +11,7 @@ def test(extra_args=None):
try:
import pytest
except ImportError:
- raise ImportError("Need pytest>=3.0 to run tests")
+ raise ImportError("Need pytest>=4.0.2 to run tests")
try:
import hypothesis # noqa
except ImportError:
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 22c01ebcef7f0..be84c6f29fdeb 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -10,7 +10,7 @@ gitpython
hypothesis>=3.82
isort
moto
-pytest>=4.0
+pytest>=4.0.2
pytest-mock
sphinx
numpydoc
diff --git a/setup.cfg b/setup.cfg
index 956aa23839e73..84b8f69a83f16 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -57,6 +57,7 @@ split_penalty_after_opening_bracket = 1000000
split_penalty_logical_operator = 30
[tool:pytest]
+minversion = 4.0.2
testpaths = pandas
markers =
single: mark a test as single cpu only