diff options
author | orlnub123 <orlnub123@gmail.com> | 2018-09-12 20:28:53 +0300 |
---|---|---|
committer | Ethan Furman <ethan@stoneleaf.us> | 2018-09-12 10:28:53 -0700 |
commit | 0fb9fadd3b3e9e3698647e0b92d49b0b7aacd979 (patch) | |
tree | 0a53251ce3c6655e1a291d2c668e74bbb1318ea7 /Lib/signal.py | |
parent | bpo-33437: add __new__ vs __init__ example (GH-9145) (diff) | |
download | cpython-0fb9fadd3b3e9e3698647e0b92d49b0b7aacd979.tar.gz cpython-0fb9fadd3b3e9e3698647e0b92d49b0b7aacd979.tar.bz2 cpython-0fb9fadd3b3e9e3698647e0b92d49b0b7aacd979.zip |
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/signal.py')
-rw-r--r-- | Lib/signal.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/signal.py b/Lib/signal.py index 826b62cf596..d4a6d6fe2ad 100644 --- a/Lib/signal.py +++ b/Lib/signal.py @@ -5,19 +5,19 @@ from enum import IntEnum as _IntEnum _globals = globals() -_IntEnum._convert( +_IntEnum._convert_( 'Signals', __name__, lambda name: name.isupper() and (name.startswith('SIG') and not name.startswith('SIG_')) or name.startswith('CTRL_')) -_IntEnum._convert( +_IntEnum._convert_( 'Handlers', __name__, lambda name: name in ('SIG_DFL', 'SIG_IGN')) if 'pthread_sigmask' in _globals: - _IntEnum._convert( + _IntEnum._convert_( 'Sigmasks', __name__, lambda name: name in ('SIG_BLOCK', 'SIG_UNBLOCK', 'SIG_SETMASK')) |