Skip to content

Commit d6785dd

Browse files
committed
Add more meaningful comments about Python deprecations
Thanks to Bruno Alla (@browniebroke)
1 parent 2b1ecbc commit d6785dd

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Diff for: src/future/moves/_dummy_thread.py

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from future.utils import PY3
33

44
if PY3:
5+
# _dummy_thread and dummy_threading modules were both deprecated in
6+
# Python 3.7 and removed in Python 3.9
57
try:
68
from _dummy_thread import *
79
except ImportError:

Diff for: tests/test_future/test_builtins.py

+3
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,9 @@ def test_pow(self):
13071307
if sys.version_info[:2] < (3, 8):
13081308
self.assertRaises((TypeError, ValueError), pow, -1, -2, 3)
13091309
else:
1310+
# Changed in version 3.8: For int operands, the three-argument form
1311+
# of pow now allows the second argument to be negative, permitting
1312+
# computation of modular inverses.
13101313
self.assertEqual(pow(-1, -2, 3), 1)
13111314
self.assertRaises(ValueError, pow, 1, 2, 0)
13121315

0 commit comments

Comments
 (0)