[Python-checkins] bpo-34282: Remove deprecated enum _convert method (GH-13823)

Victor Stinner webhook-mailer at python.org
Tue Jun 4 17:03:24 EDT 2019

commit: 19a1e1eb86115db66c1faae5927f87e3a12692fc
branch: master
author: Zachary Ware <zach at python.org>
committer: Victor Stinner <vstinner at redhat.com>
date: 2019-06-04T23:03:10+02:00

bpo-34282: Remove deprecated enum _convert method (GH-13823)

A Misc/NEWS.d/next/Library/2019-06-04-15-39-14.bpo-34282.aAK54n.rst
M Lib/enum.py

diff --git a/Lib/enum.py b/Lib/enum.py
index 6ef17c7f6dc8..403f747d22a4 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -464,12 +464,6 @@ def _convert_(cls, name, module, filter, source=None):
         module_globals[name] = cls
         return cls
-    def _convert(cls, *args, **kwargs):
-        import warnings
-        warnings.warn("_convert is deprecated and will be removed in 3.9, use "
-                      "_convert_ instead.", DeprecationWarning, stacklevel=2)
-        return cls._convert_(*args, **kwargs)
     def _get_mixins_(bases):
         """Returns the type for creating enum members, and the first inherited
diff --git a/Misc/NEWS.d/next/Library/2019-06-04-15-39-14.bpo-34282.aAK54n.rst b/Misc/NEWS.d/next/Library/2019-06-04-15-39-14.bpo-34282.aAK54n.rst
new file mode 100644
index 000000000000..66c388e1d6ee
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-06-04-15-39-14.bpo-34282.aAK54n.rst
@@ -0,0 +1 @@
+Remove ``Enum._convert`` method, deprecated in 3.8.

More information about the Python-checkins mailing list