diff --git a/ci/deps/azure-36-locale_slow.yaml b/ci/deps/azure-36-locale_slow.yaml index c3c94e365c259..2bb2b00319382 100644 --- a/ci/deps/azure-36-locale_slow.yaml +++ b/ci/deps/azure-36-locale_slow.yaml @@ -18,7 +18,7 @@ dependencies: - lxml - matplotlib=2.2.2 - numpy=1.14.* - - openpyxl=2.4.8 + - openpyxl=2.5.7 - python-dateutil - python-blosc - pytz=2017.2 diff --git a/ci/deps/azure-36-minimum_versions.yaml b/ci/deps/azure-36-minimum_versions.yaml index ff1095005fa85..8bf4f70d18aec 100644 --- a/ci/deps/azure-36-minimum_versions.yaml +++ b/ci/deps/azure-36-minimum_versions.yaml @@ -11,6 +11,7 @@ dependencies: - pytest-xdist>=1.21 - hypothesis>=3.58.0 - pytest-azurepipelines + - psutil # pandas dependencies - beautifulsoup4=4.6.0 @@ -18,7 +19,7 @@ dependencies: - jinja2=2.8 - numexpr=2.6.2 - numpy=1.13.3 - - openpyxl=2.4.8 + - openpyxl=2.5.7 - pytables=3.4.2 - python-dateutil=2.6.1 - pytz=2017.2 diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index 9f3ab22496ae7..ec4c0a3c4a8e8 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -255,7 +255,7 @@ gcsfs 0.2.2 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 -openpyxl 2.4.8 Reading / writing for xlsx files +openpyxl 2.5.7 Reading / writing for xlsx files pandas-gbq 0.8.0 Google Big Query access psycopg2 PostgreSQL engine for sqlalchemy pyarrow 0.12.0 Parquet and feather reading / writing diff --git a/doc/source/whatsnew/v1.0.0.rst b/doc/source/whatsnew/v1.0.0.rst index 3e72072eae303..86347f9530c56 100644 --- a/doc/source/whatsnew/v1.0.0.rst +++ b/doc/source/whatsnew/v1.0.0.rst @@ -424,7 +424,7 @@ Optional libraries below the lowest tested version may still work, but are not c +-----------------+-----------------+---------+ | matplotlib | 2.2.2 | | +-----------------+-----------------+---------+ -| openpyxl | 2.4.8 | | +| openpyxl | 2.5.7 | X | +-----------------+-----------------+---------+ | pyarrow | 0.12.0 | X | +-----------------+-----------------+---------+ diff --git a/pandas/compat/_optional.py b/pandas/compat/_optional.py index 0be201daea425..412293f029fa5 100644 --- a/pandas/compat/_optional.py +++ b/pandas/compat/_optional.py @@ -14,7 +14,7 @@ "matplotlib": "2.2.2", "numexpr": "2.6.2", "odfpy": "1.3.0", - "openpyxl": "2.4.8", + "openpyxl": "2.5.7", "pandas_gbq": "0.8.0", "pyarrow": "0.12.0", "pytables": "3.4.2", diff --git a/pandas/tests/io/excel/conftest.py b/pandas/tests/io/excel/conftest.py index 6ec2f477a442d..4495ba9b80b67 100644 --- a/pandas/tests/io/excel/conftest.py +++ b/pandas/tests/io/excel/conftest.py @@ -1,5 +1,7 @@ import pytest +import pandas.util._test_decorators as td + import pandas.util.testing as tm from pandas.io.parsers import read_csv @@ -39,3 +41,25 @@ def read_ext(request): Valid extensions for reading Excel files. """ return request.param + + +@pytest.fixture(autouse=True) +def check_for_file_leaks(): + """ + Fixture to run around every test to ensure that we are not leaking files. + + See also + -------- + _test_decorators.check_file_leaks + """ + # GH#30162 + psutil = td.safe_import("psutil") + if not psutil: + yield + + else: + proc = psutil.Process() + flist = proc.open_files() + yield + flist2 = proc.open_files() + assert flist == flist2