Ethan Onstott
d9a43e20fa
bpo-40025: Require _generate_next_value_ to be defined before members (GH-19098)
...
require `_generate_next_value_` to be defined before members
2020-04-28 10:20:55 -07:00
HongWeipeng
0b41a922f9
bpo-38045: Improve the performance of _decompose() in enum.py (GH-16483)
...
* Improve the performance of _decompose() in enum.py
Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com >
2019-11-26 14:36:02 -08:00
Pablo Galindo
293dd23477
Remove binding of captured exceptions when not used to reduce the chances of creating cycles (GH-17246)
...
Capturing exceptions into names can lead to reference cycles though the __traceback__ attribute of the exceptions in some obscure cases that have been reported previously and fixed individually. As these variables are not used anyway, we can remove the binding to reduce the chances of creating reference cycles.
See for example GH-13135
2019-11-19 21:34:03 +00:00
HongWeipeng
bb16fb2cb8
Doc: Fix spelling errors of 'initial' in enum.py (GH-16314)
2019-09-21 07:22:54 +02:00
Walter Dörwald
323842c279
bpo-34443: Use __qualname__ instead of __name__ in enum exception messages. (GH-14809)
...
* Use __qualname__ instead of __name__ in enum exception messages.
2019-07-18 11:37:13 -07:00
thatneat
2f19e82fbe
bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__ (GH-14545)
...
* bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__
2019-07-04 11:28:37 -07:00
Zachary Ware
19a1e1eb86
bpo-34282: Remove deprecated enum _convert method (GH-13823)
2019-06-04 23:03:10 +02:00
Brennan D Baraban
8b914d2767
bpo-35899: Fix Enum handling of empty and weird strings (GH-11891)
...
Co-authored-by: Maxwell <maxwellpxt@gmail.com >
Co-authored-by: Stéphane Wirtel <stephane@wirtel.be >
https://bugs.python.org/issue35899
2019-03-03 14:09:11 -08:00
Rémi Lapeyre
1fd06f1eca
bpo-35717: Fix KeyError exception raised when using enums and compile (GH-11523)
...
https://bugs.python.org/issue17467
2019-01-24 11:43:13 -08:00
Andrew Svetlov
34ae04f74d
Speed-up building enums by value, e.g. http.HTTPStatus(200) ( #11318 )
...
bpo-35585: Speed up enum by-value lookup
2018-12-26 10:45:33 -08:00
Ethan Furman
cd45385ffa
bpo-34909: keep searching mixins until base class is found (GH-9737)
2018-10-05 23:29:36 -07:00
Ethan Furman
5bdab641da
bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328)
...
* bpo-29577: allow multiple mixin classes
2018-09-21 19:03:09 -07:00
Ethan Furman
019f0a0cb8
bpo-34536: raise error for invalid _missing_ results (GH-9147)
...
* raise exception if _missing_ returns None or invalid type
2018-09-12 11:43:34 -07:00
orlnub123
0fb9fadd3b
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
2018-09-12 10:28:53 -07:00
Rahul Jha
9430652535
bpo-33217: Raise TypeError for non-Enum lookups in Enums (GH-6651)
...
* bpo-33217: Raise TypeError for non-Enum lookups in Enums
2018-09-10 11:21:04 -07:00
INADA Naoki
e57f91a0f0
bpo-33866: enum: Stop using OrderedDict (GH-7698)
2018-06-19 01:14:26 +09:00
anentropic
b8e21f1289
bpo-31947: remove None default for names param in Enum._create_ (GH-4288)
2018-04-15 20:40:35 -07:00
Ethan Furman
a4b1bb4801
bpo-31801: Enum: add _ignore_ as class option ( #5237 )
...
* bpo-31801: Enum: add _ignore_ as class option
_ignore_ is a list, or white-space seperated str, of names that will not
be candidates for members; these names, and _ignore_ itself, are removed
from the final class.
* bpo-31801: Enum: add documentation for _ignore_
* bpo-31801: Enum: remove trailing whitespace
* bpo-31801: Enum: fix bulleted list format
* bpo-31801: add version added for _ignore_
2018-01-22 07:56:37 -08:00
Serhiy Storchaka
81108375d9
bpo-30152: Reduce the number of imports for argparse. ( #1269 )
2017-09-26 00:55:55 +03:00
Ville Skyttä
49b2734bf1
Spelling fixes ( #2902 )
2017-08-03 09:00:59 +03:00
Dong-hee Na
dcc8ce44c7
bpo-30616: Functional API of enum allows to create empty enums. ( #2304 )
...
* bpo-30616: Functional API of enum allows to create empty enums.
* Update NEWS
move addition to avoid conflict
2017-06-21 09:52:32 -07:00
Ethan Furman
28cf663ff0
closes issue29167: fix race condition in (Int)Flag
2017-01-24 12:12:06 -08:00
Raymond Hettinger
381dc6c22f
Issue #29103 : Remove unused import. Noticed by Jean-Sebastien Bevilacqua.
2016-12-29 23:57:12 -07:00
Ethan Furman
23bb6f48ea
close issue28172: Change all example enum member names to uppercase, per Guido; patch by Chris Angelico.
2016-11-21 09:22:05 -08:00
Ethan Furman
3515dcce80
issue23591: fix flag decomposition and repr
2016-09-18 13:15:41 -07:00