summaryrefslogtreecommitdiffstats
path: root/Lib/socket.py
diff options
context:
space:
mode:
authororlnub123 <orlnub123@gmail.com>2018-09-12 17:28:53 (GMT)
committerEthan Furman <ethan@stoneleaf.us>2018-09-12 17:28:53 (GMT)
commit0fb9fadd3b3e9e3698647e0b92d49b0b7aacd979 (patch)
tree0a53251ce3c6655e1a291d2c668e74bbb1318ea7 /Lib/socket.py
parentf52237400b9960d434c5d0676a3479b8c1e8c869 (diff)
downloadcpython-0fb9fadd3b3e9e3698647e0b92d49b0b7aacd979.zip
cpython-0fb9fadd3b3e9e3698647e0b92d49b0b7aacd979.tar.gz
cpython-0fb9fadd3b3e9e3698647e0b92d49b0b7aacd979.tar.bz2
bpo-34282: Fix Enum._convert shadowing members named _convert (GH-8568)
* Fix enum members getting shadowed by parent attributes * Move Enum._convert to EnumMeta._convert_ * Deprecate _convert
Diffstat (limited to 'Lib/socket.py')
-rw-r--r--Lib/socket.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/socket.py b/Lib/socket.py
index cfa605a..385844b 100644
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -70,22 +70,22 @@ __all__.extend(os._get_exports_list(_socket))
# in this module understands the enums and translates them back from integers
# where needed (e.g. .family property of a socket object).
-IntEnum._convert(
+IntEnum._convert_(
'AddressFamily',
__name__,
lambda C: C.isupper() and C.startswith('AF_'))
-IntEnum._convert(
+IntEnum._convert_(
'SocketKind',
__name__,
lambda C: C.isupper() and C.startswith('SOCK_'))
-IntFlag._convert(
+IntFlag._convert_(
'MsgFlag',
__name__,
lambda C: C.isupper() and C.startswith('MSG_'))
-IntFlag._convert(
+IntFlag._convert_(
'AddressInfo',
__name__,
lambda C: C.isupper() and C.startswith('AI_'))