File doctest_depr_warning.patch of Package python.43089
---
Lib/test/test_doctest.py | 7 +++++++
1 file changed, 7 insertions(+)
Index: Python-2.7.18/Lib/test/test_doctest.py
===================================================================
--- Python-2.7.18.orig/Lib/test/test_doctest.py 2026-03-07 22:29:14.089537717 +0100
+++ Python-2.7.18/Lib/test/test_doctest.py 2026-03-07 22:35:33.873173244 +0100
@@ -2779,6 +2779,13 @@
if sys.py3kwarning:
deprecations += [("backquote not supported", SyntaxWarning),
("execfile.. not supported", DeprecationWarning)]
+ # When running tests with -3 (py3k warnings), some tested code can
+ # trigger this warning under Python 2.7.
+ if __debug__ and sys.py3kwarning:
+ deprecations.append((
+ "Overriding __eq__ blocks inheritance of __hash__ in 3.x",
+ DeprecationWarning,
+ ))
with test_support.check_warnings(*deprecations):
# Check the doctest cases defined here:
test_support.run_doctest(test_doctest, verbosity=True)