Skip to content

Commit

Permalink
Add more meaningful comments about Python deprecations
Browse files Browse the repository at this point in the history
Thanks to Bruno Alla (@browniebroke)
  • Loading branch information
edschofield committed Feb 21, 2024
1 parent 2b1ecbc commit d6785dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/future/moves/_dummy_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from future.utils import PY3

if PY3:
# _dummy_thread and dummy_threading modules were both deprecated in
# Python 3.7 and removed in Python 3.9
try:
from _dummy_thread import *
except ImportError:
Expand Down
3 changes: 3 additions & 0 deletions tests/test_future/test_builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,9 @@ def test_pow(self):
if sys.version_info[:2] < (3, 8):
self.assertRaises((TypeError, ValueError), pow, -1, -2, 3)
else:
# Changed in version 3.8: For int operands, the three-argument form
# of pow now allows the second argument to be negative, permitting
# computation of modular inverses.
self.assertEqual(pow(-1, -2, 3), 1)
self.assertRaises(ValueError, pow, 1, 2, 0)

Expand Down

0 comments on commit d6785dd

Please sign in to comment.