File: suppress-pytest-unraisable-exception-warning.patch

package info (click to toggle)
python-cheroot 10.0.1%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,072 kB
  • sloc: python: 6,222; makefile: 9
file content (32 lines) | stat: -rw-r--r-- 1,177 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: =?utf-8?q?Jakub_Kul=C3=ADk?= <kulikjak@gmail.com>
Date: Thu, 7 Nov 2024 12:27:42 +0100
Subject: Suppress pytest.PytestUnraisableExceptionWarning raised in test
 cleanup

This patch suppresses UnraisableException warnings that are
occasionally raised when using Python 3.13.

Origin: upstream, https://github.com/cherrypy/cheroot/pull/735
Bug: https://github.com/cherrypy/cheroot/issues/734
Bug-Debian: https://bugs.debian.org/1089026
Last-Update: 2024-12-10
---
 pytest.ini | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pytest.ini b/pytest.ini
index 8efdcfc..d570b54 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -69,6 +69,11 @@ filterwarnings =
   ignore:unclosed <socket.socket fd=:ResourceWarning
   ignore:unclosed <ssl.SSLSocket fd=:ResourceWarning
 
+  # FIXME: Python 3.13 no longer ignores IOBase errors raised by the close(),
+  # FIXME: which exposed a possible race condition in test_conn test cleanup.
+  # Ref: https://github.com/cherrypy/cheroot/issues/734
+  ignore:Exception ignored in. <function IOBase.__del__:pytest.PytestUnraisableExceptionWarning
+
 junit_duration_report = call
 junit_family = xunit2
 junit_suite_name = cheroot_test_suite