Skip to content

Commit cbad73a

Browse files
authored
CI/TST: Error on PytestUnraisableExceptionWarning instead of using psutil to check open resources (#51443)
1 parent 09c6351 commit cbad73a

25 files changed

+47
-156
lines changed

ci/deps/actions-310.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ dependencies:
1212
- pytest>=7.0.0
1313
- pytest-cov
1414
- pytest-xdist>=2.2.0
15-
- psutil
1615
- pytest-asyncio>=0.17
1716
- boto3
1817

ci/deps/actions-311.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ dependencies:
1212
- pytest>=7.0
1313
- pytest-cov
1414
- pytest-xdist>=2.2.0
15-
- psutil
1615
- pytest-asyncio>=0.17
1716
- boto3
1817

ci/deps/actions-38-downstream_compat.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dependencies:
1313
- pytest>=7.0.0
1414
- pytest-cov
1515
- pytest-xdist>=2.2.0
16-
- psutil
1716
- pytest-asyncio>=0.17
1817
- boto3
1918

ci/deps/actions-38-minimum_versions.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dependencies:
1414
- pytest>=7.0.0
1515
- pytest-cov
1616
- pytest-xdist>=2.2.0
17-
- psutil
1817
- pytest-asyncio>=0.17
1918
- boto3
2019

ci/deps/actions-38.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ dependencies:
1212
- pytest>=7.0.0
1313
- pytest-cov
1414
- pytest-xdist>=2.2.0
15-
- psutil
1615
- pytest-asyncio>=0.17
1716
- boto3
1817

ci/deps/actions-39.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ dependencies:
1212
- pytest>=7.0.0
1313
- pytest-cov
1414
- pytest-xdist>=2.2.0
15-
- psutil
1615
- pytest-asyncio>=0.17
1716
- boto3
1817

ci/deps/circle-38-arm64.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ dependencies:
1212
- pytest>=7.0.0
1313
- pytest-cov
1414
- pytest-xdist>=2.2.0
15-
- psutil
1615
- pytest-asyncio>=0.17
1716
- boto3
1817

doc/source/whatsnew/v2.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,7 @@ I/O
13411341
- Bug in :meth:`DataFrame.to_html` with ``na_rep`` set when the :class:`DataFrame` contains non-scalar data (:issue:`47103`)
13421342
- Bug in :func:`read_xml` where file-like objects failed when iterparse is used (:issue:`50641`)
13431343
- Bug in :func:`read_xml` ignored repeated elements when iterparse is used (:issue:`51183`)
1344+
- Bug in :class:`ExcelWriter` leaving file handles open if an exception occurred during instantiation (:issue:`51443`)
13441345

13451346
Period
13461347
^^^^^^

environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dependencies:
1414
- pytest>=7.0.0
1515
- pytest-cov
1616
- pytest-xdist>=2.2.0
17-
- psutil
1817
- pytest-asyncio>=0.17
1918
- coverage
2019

pandas/_testing/_warnings.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
nullcontext,
66
)
77
import re
8-
import sys
98
from typing import (
109
Generator,
1110
Literal,
@@ -164,22 +163,6 @@ def _assert_caught_no_extra_warnings(
164163

165164
for actual_warning in caught_warnings:
166165
if _is_unexpected_warning(actual_warning, expected_warning):
167-
# GH#38630 pytest.filterwarnings does not suppress these.
168-
if actual_warning.category == ResourceWarning:
169-
# GH 44732: Don't make the CI flaky by filtering SSL-related
170-
# ResourceWarning from dependencies
171-
unclosed_ssl = (
172-
"unclosed transport <asyncio.sslproto._SSLProtocolTransport",
173-
"unclosed <ssl.SSLSocket",
174-
)
175-
if any(msg in str(actual_warning.message) for msg in unclosed_ssl):
176-
continue
177-
# GH 44844: Matplotlib leaves font files open during the entire process
178-
# upon import. Don't make CI flaky if ResourceWarning raised
179-
# due to these open files.
180-
if any("matplotlib" in mod for mod in sys.modules):
181-
continue
182-
183166
extra_warnings.append(
184167
(
185168
actual_warning.category.__name__,

0 commit comments

Comments
 (0)