projects
/
mercurial.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2868411
)
_tests__silence_asyncore_smtpd_deprecation_warnings
author
Debian Python Team
<team+python@tracker.debian.org>
Thu, 21 Apr 2022 22:42:37 +0000
(23:42 +0100)
committer
Peter Michael Green
<plugwash@raspbian.org>
Thu, 21 Apr 2022 22:42:37 +0000
(23:42 +0100)
# HG changeset patch
# User Julien Cristau <jcristau@debian.org>
# Date
1649671433
-7200
# Mon Apr 11 12:03:53 2022 +0200
# Node ID
d3df32e12246208fc8bb9507ff921099348c6783
# Parent
5005928cac60a43d98d88523713983efdc204d50
tests: silence asyncore/smtpd deprecation warnings
Gbp-Pq: Topic py310
Gbp-Pq: Name 9_tests__silence_asyncore_smtpd_deprecation_warnings.patch
tests/dummysmtpd.py
patch
|
blob
|
history
diff --git
a/tests/dummysmtpd.py
b/tests/dummysmtpd.py
index 7808a0d8f6da162fafb11c776d78843f93a67b46..a863bfb188e7fb3105f9844d67fa19f34d51483a 100755
(executable)
--- a/
tests/dummysmtpd.py
+++ b/
tests/dummysmtpd.py
@@
-4,12
+4,16
@@
from __future__ import absolute_import
-import asyncore
import optparse
-import smtpd
import ssl
import sys
import traceback
+import warnings
+
+with warnings.catch_warnings():
+ warnings.filterwarnings('ignore', 'The (asyncore|smtpd) module is deprecated', DeprecationWarning)
+ import asyncore
+ import smtpd
from mercurial import (
pycompat,