]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
issue23673
authorEthan Furman <ethan@stoneleaf.us>
Thu, 19 Mar 2015 01:19:30 +0000 (18:19 -0700)
committerEthan Furman <ethan@stoneleaf.us>
Thu, 19 Mar 2015 01:19:30 +0000 (18:19 -0700)
commit482fe0477e5923f0b8fff16c59052650cf7247cf
tree0b2ee2281894cda0a745373a8a5df9569a33ec55
parentd833779ceaebeb29352488ffddabf5fc2f070364
issue23673
add private method to enum to support replacing global constants with Enum members:
- search for candidate constants via supplied filter
- create new enum class and members
- insert enum class and replace constants with members via supplied module name
- replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle
modify IntEnum classes to use new method
Lib/enum.py
Lib/socket.py
Lib/test/test_enum.py
Lib/test/test_socket.py