Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [3.9] bpo-25130: Add calls of gc.collect() in tests to support PyPy ↵ | Serhiy Storchaka | 2021-08-29 | 1 | -1/+3 |
| | | | | | | (GH-28005). (GH-28028) (cherry picked from commit 2a8127cafe1d196f858a3ecabf5f1df3eebf9a12) | ||||
* | [Enum] improve pickle support (#26666) | Ethan Furman | 2021-06-11 | 1 | -0/+36 |
| | | | | search all bases for a __reduce__ style method; if a __new__ method is found first the enum will be made unpicklable | ||||
* | bpo-44356: [Enum] allow multiple data-type mixins if they are all the same ↵ | Miss Islington (bot) | 2021-06-10 | 1 | -0/+47 |
| | | | | | | | | | | | | | | | | | | | (GH-26649) (GH-26652) This enables, for example, two base Enums to both inherit from `str`, and then both be mixed into the same final Enum: class Str1Enum(str, Enum): GH- some behavior here class Str2Enum(str, Enum): GH- some more behavior here class FinalStrEnum(Str1Enum, Str2Enum): GH- this now works (cherry picked from commit 8a4f0850d75747af8c96ca0e7eef1f5c1abfba25) Co-authored-by: Ethan Furman <ethan@stoneleaf.us> Co-authored-by: Ethan Furman <ethan@stoneleaf.us> | ||||
* | [3.9] bpo-42248: [Enum] ensure exceptions raised in ``_missing_`` are ↵ | Ethan Furman | 2021-04-12 | 1 | -0/+32 |
| | | | | | | | released (GH-25350). (GH-25370) (cherry picked from commit 8c14f5a787b21d5a1eae5d5ee981431d1c0e055f) Co-authored-by: Ethan Furman <ethan@stoneleaf.us> | ||||
* | [3.9] bpo-42851: [Enum] remove brittle __init_subclass__ support (GH-24154) ↵ | Ethan Furman | 2021-01-07 | 1 | -46/+0 |
| | | | | | | (GH-24155) Solution to support calls to `__init_subclass__` with members defined is too brittle and breaks with certain mixins.. (cherry picked from commit a581a868d97f649aedf868a1d27865a10925c73a) | ||||
* | [3.9] bpo-42727: [Enum] EnumMeta.__prepare__ now accepts **kwds (GH-23917). ↵ | Ethan Furman | 2020-12-24 | 1 | -1/+11 |
| | | | | | | (GH-23926) * [3.9] [Enum] EnumMeta.__prepare__ now accepts **kwds (GH-23917). (cherry picked from commit 6ec0adefad60ec7cdec61c44baecf1dccc1461ab) | ||||
* | [3.9] bpo-42567: [Enum] call __init_subclass__ after members are added ↵ | Ethan Furman | 2020-12-15 | 1 | -1/+72 |
| | | | | | | | | (GH-23714) (GH-23772) When creating an Enum, `type.__new__` calls `__init_subclass__`, but at that point the members have not been added. This patch suppresses the initial call, then manually calls the ancestor `__init_subclass__` before returning the new Enum class. (cherry picked from commit 6bd94de168b58ac9358277ed6f200490ab26c174) | ||||
* | [3.9] bpo-42517: [Enum] deprecate private name members (GH-23722) (GH-23748) | Miss Islington (bot) | 2020-12-14 | 1 | -0/+18 |
| | | | private names will raise a DeprecationWarning; in 3.10 they will become normal attributes | ||||
* | bpo-40084: Enum - dir() includes member attributes (GH-19219) | Miss Islington (bot) | 2020-12-14 | 1 | -0/+12 |
| | | | | | (cherry picked from commit 68526fe258da8c01196fd7cf48e8e5f1280bf8fd) Co-authored-by: Angelin BOOZ <9497359+lem2clide@users.noreply.github.com> | ||||
* | bpo-41907: [Enum] fix format() behavior for IntFlag (GH-22497) (GH-23703) | Miss Islington (bot) | 2020-12-08 | 1 | -0/+14 |
| | | | (cherry picked from commit 37440eef7f9a0c27e13fc9ce0850574bb00688b0) | ||||
* | bpo-41889: [Enum] fix multiple-inheritance regression (GH-22487) (GH-23673) | Miss Islington (bot) | 2020-12-07 | 1 | -0/+26 |
| | | | (cherry picked from commit c266736ec1f9ebef38b134ceb4832df015711b38) | ||||
* | [3.9] bpo-39728: Enum: fix duplicate `ValueError` (GH-22277) (GH-22282) | Ethan Furman | 2020-09-17 | 1 | -1/+18 |
| | | | | | | | fix default `_missing_` to return `None` instead of raising a `ValueError` Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com> (cherry picked from commit c95ad7a91fbd7636f33a098d3b39964ab083bf49) Co-authored-by: Ethan Furman <ethan@stoneleaf.us> | ||||
* | _auto_called cleanup (GH-22285) | Miss Islington (bot) | 2020-09-17 | 1 | -0/+11 |
| | | | | | (cherry picked from commit fc23a9483ef0d7c98bea9f82392377d0b6ef7b18) Co-authored-by: Ethan Furman <ethan@stoneleaf.us> | ||||
* | bpo-41517: do not allow Enums to be extended (GH-22271) | Miss Islington (bot) | 2020-09-16 | 1 | -0/+3 |
| | | | | | | fix bug that let Enums be extended via multiple inheritance (cherry picked from commit 3064dbf5df1021e85b507366a7ea448c8895efe7) Co-authored-by: Ethan Furman <ethan@stoneleaf.us> | ||||
* | [3.9] bpo-41789: honor object overrides in Enum classes (GH-22250) (GH-22272) | Ethan Furman | 2020-09-16 | 1 | -1/+8 |
| | | | EnumMeta double-checks that `__repr__`, `__str__`, `__format__`, and `__reduce_ex__` are not the same as `object`'s, and replaces them if they are -- even if that replacement was intentionally done in the Enum being constructed. This patch fixes that. | ||||
* | bpo-39587: Enum - use correct mixed-in data type (GH-22263) (GH-22266) | Miss Islington (bot) | 2020-09-15 | 1 | -0/+43 |
| | | | (cherry picked from commit bff01f3a3aac0c15fe8fbe8b2f561f7927d117a1) | ||||
* | bpo-40025: Require _generate_next_value_ to be defined before members (GH-19098) | Ethan Onstott | 2020-04-28 | 1 | -0/+10 |
| | | | require `_generate_next_value_` to be defined before members | ||||
* | bpo-37685: Use singletons ALWAYS_EQ and NEVER_EQ in more tests. (GH-15167) | Serhiy Storchaka | 2019-08-08 | 1 | -5/+3 |
| | |||||
* | bpo-34443: Use __qualname__ instead of __name__ in enum exception messages. ↵ | Walter Dörwald | 2019-07-18 | 1 | -6/+7 |
| | | | | | (GH-14809) * Use __qualname__ instead of __name__ in enum exception messages. | ||||
* | bpo-37479: on Enum subclasses with mixins, __format__ uses overridden ↵ | thatneat | 2019-07-04 | 1 | -1/+52 |
| | | | | | __str__ (GH-14545) * bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__ | ||||
* | bpo-36401: Have help() show readonly properties separately (GH-12517) | Raymond Hettinger | 2019-03-25 | 1 | -1/+1 |
| | |||||
* | bpo-35899: Fix Enum handling of empty and weird strings (GH-11891) | Brennan D Baraban | 2019-03-03 | 1 | -0/+17 |
| | | | | | | | | | | Co-authored-by: Maxwell <maxwellpxt@gmail.com> Co-authored-by: Stéphane Wirtel <stephane@wirtel.be> https://bugs.python.org/issue35899 | ||||
* | bpo-35717: Fix KeyError exception raised when using enums and compile (GH-11523) | Rémi Lapeyre | 2019-01-24 | 1 | -0/+9 |
| | | | https://bugs.python.org/issue17467 | ||||
* | bpo-34536: Cleanup test_enum imports (GH-9979) | Victor Stinner | 2018-10-19 | 1 | -5/+0 |
| | | | sys and threading were imported twice. | ||||
* | bpo-34909: keep searching mixins until base class is found (GH-9737) | Ethan Furman | 2018-10-06 | 1 | -0/+21 |
| | |||||
* | bpo-29577: Enum: mixin classes don't mix well with already mixed Enums (GH-9328) | Ethan Furman | 2018-09-22 | 1 | -0/+199 |
| | | | * bpo-29577: allow multiple mixin classes | ||||
* | bpo-34536: raise error for invalid _missing_ results (GH-9147) | Ethan Furman | 2018-09-12 | 1 | -0/+33 |
| | | | * raise exception if _missing_ returns None or invalid type | ||||
* | bpo-34282: Fix Enum._convert shadowing members named _convert (GH-8568) | orlnub123 | 2018-09-12 | 1 | -2/+38 |
| | | | | | * Fix enum members getting shadowed by parent attributes * Move Enum._convert to EnumMeta._convert_ * Deprecate _convert | ||||
* | bpo-33217: Raise TypeError for non-Enum lookups in Enums (GH-6651) | Rahul Jha | 2018-09-10 | 1 | -3/+52 |
| | | | * bpo-33217: Raise TypeError for non-Enum lookups in Enums | ||||
* | bpo-31801: Enum: add _ignore_ as class option (#5237) | Ethan Furman | 2018-01-22 | 1 | -0/+33 |
| | | | | | | | | | | | | | | | | * 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_ | ||||
* | bpo-31370: Remove support for threads-less builds (#3385) | Antoine Pitrou | 2017-09-07 | 1 | -6/+1 |
| | | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility. | ||||
* | bpo-30616: Functional API of enum allows to create empty enums. (#2304) | Dong-hee Na | 2017-06-21 | 1 | -0/+20 |
| | | | | | | | | * bpo-30616: Functional API of enum allows to create empty enums. * Update NEWS move addition to avoid conflict | ||||
* | issue29167: fix race condition in (Int)Flag | Ethan Furman | 2017-01-24 | 1 | -2/+88 |
|\ | |||||
| * | closes issue29167: fix race condition in (Int)Flag | Ethan Furman | 2017-01-24 | 1 | -2/+88 |
| | | |||||
* | | Issue #29338: Fix test_enum. | Serhiy Storchaka | 2017-01-24 | 1 | -0/+4 |
|/ | |||||
* | close issue28172: Change all example enum member names to uppercase, per ↵ | Ethan Furman | 2016-11-21 | 1 | -3/+3 |
| | | | | Guido; patch by Chris Angelico. | ||||
* | issue23591: fix flag decomposition and repr | Ethan Furman | 2016-09-18 | 1 | -28/+77 |
| | |||||
* | issue23591: add auto() for auto-generating Enum member values | Ethan Furman | 2016-09-11 | 1 | -2/+75 |
| | |||||
* | issue23591: more docs; slight change to repr | Ethan Furman | 2016-09-04 | 1 | -6/+6 |
| | |||||
* | issue23591: bool(empty_flags) == False; more docs & tests | Ethan Furman | 2016-09-02 | 1 | -0/+16 |
| | |||||
* | issue23591: add docs; code cleanup; more tests | Ethan Furman | 2016-09-02 | 1 | -17/+71 |
| | |||||
* | issue23591: add Flags, IntFlags, and tests | Ethan Furman | 2016-08-31 | 1 | -1/+451 |
| | |||||
* | issue26981: add _order_ compatibility shim to enum.Enum | Ethan Furman | 2016-08-20 | 1 | -0/+62 |
| | |||||
* | Issue26988: remove AutoEnum | Ethan Furman | 2016-08-20 | 1 | -323/+1 |
| | |||||
* | Add AutoEnum: automatically provides next value if missing. Issue 26988. | Ethan Furman | 2016-08-05 | 1 | -1/+323 |
| | |||||
* | Issue #27626: Merge spelling fixes from 3.5 | Martin Panter | 2016-07-28 | 1 | -10/+10 |
|\ | |||||
| * | Issue #27626: Spelling fixes in docs, comments and internal names | Martin Panter | 2016-07-28 | 1 | -10/+10 |
| | | | | | | | | Based on patch by Ville Skyttä. | ||||
* | | signal, socket, and ssl module IntEnum constant name lookups now return a | Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 2016-06-03 | 1 | -0/+36 |
| | | | | | | | | | | | | | | | | consistent name for values having multiple names. Ex: signal.Signals(6) now refers to itself as signal.SIGALRM rather than flipping between that and signal.SIGIOT based on the interpreter's hash randomization seed. This helps finish issue27167. | ||||
* | | Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses. | Serhiy Storchaka | 2016-05-12 | 1 | -0/+12 |
|\ \ | |/ | |||||
| * | Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses. | Serhiy Storchaka | 2016-05-12 | 1 | -0/+12 |
| | |