summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2021-03-03 17:54:30 (GMT)
committerGitHub <noreply@github.com>2021-03-03 17:54:30 (GMT)
commit44e580f448016b86807465a186d03d9074e2b589 (patch)
tree3fa55695ece25aac38893d2a38e05d0ff4386e98 /Lib
parent04f6fbb6969e9860783b9ab4dc24b6fe3c6dab8d (diff)
downloadcpython-44e580f448016b86807465a186d03d9074e2b589.zip
cpython-44e580f448016b86807465a186d03d9074e2b589.tar.gz
cpython-44e580f448016b86807465a186d03d9074e2b589.tar.bz2
bpo-43162: [Enum] update docs, renable doc tests (GH-24487)
* update docs, renable doc tests * make deprecation warning active for two releases
Diffstat (limited to 'Lib')
-rw-r--r--Lib/enum.py2
-rw-r--r--Lib/test/test_enum.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index 55299c5..84c7b0d 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -148,7 +148,7 @@ class property(DynamicClassAttribute):
import warnings
warnings.warn(
"accessing one member from another is not supported, "
- " and will be disabled in 3.11",
+ " and will be disabled in 3.12",
DeprecationWarning,
stacklevel=2,
)
diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py
index 3982d1d..69392e0 100644
--- a/Lib/test/test_enum.py
+++ b/Lib/test/test_enum.py
@@ -18,7 +18,7 @@ from datetime import timedelta
def load_tests(loader, tests, ignore):
tests.addTests(doctest.DocTestSuite(enum))
- if os.path.exists('../../Doc/library/enum.rst'):
+ if os.path.exists('Doc/library/enum.rst'):
tests.addTests(doctest.DocFileSuite(
'../../Doc/library/enum.rst',
optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE,
@@ -2186,7 +2186,7 @@ class TestEnum(unittest.TestCase):
self.assertEqual(Private._Private__major_, 'Hoolihan')
@unittest.skipUnless(
- sys.version_info[:2] == (3, 10),
+ sys.version_info[:2] < (3, 12),
'member-member access now raises an exception',
)
def test_warning_for_member_from_member_access(self):
@@ -2198,7 +2198,7 @@ class TestEnum(unittest.TestCase):
self.assertIs(Di.NO, nope)
@unittest.skipUnless(
- sys.version_info[:2] > (3, 10),
+ sys.version_info[:2] >= (3, 12),
'member-member access currently issues a warning',
)
def test_exception_for_member_from_member_access(self):