[issue44242] enum.IntFlag regression: missing values cause TypeError
Ethan Furman added the comment: New changeset eea8148b7dff5ffc7b84433859ac819b1d92a74d by Ethan Furman in branch 'main': bpo-44242: [Enum] remove missing bits test from Flag creation (GH-26586) https://github.com/python/cpython/commit/eea8148b7dff5ffc7b84433859ac819b1d92a74d -- ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44356] Abstract enum mixins not allowed
Ethan Furman added the comment: Excellent bug report. But what is an `UnexpectedString()` ? -- ___ Python tracker <https://bugs.python.org/issue44356> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44356] Abstract enum mixins not allowed
Change by Ethan Furman : -- assignee: -> ethan.furman nosy: +ethan.furman versions: +Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue44356> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44342] enum with inherited type won't pickle
Change by Ethan Furman : -- assignee: -> ethan.furman nosy: +ethan.furman ___ Python tracker <https://bugs.python.org/issue44342> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44242] enum.IntFlag regression: missing values cause TypeError
Change by Ethan Furman : -- keywords: +patch pull_requests: +25170 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26586 ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44242] enum.IntFlag regression: missing values cause TypeError
Ethan Furman added the comment: I'm very much of the practicality beats purity philosophy, so I want to support the OP's flag without making them jump through hoops. On the flip side, I also appreciate that there are folks that want the extra security... So here's my plan: remove the creation time check (which will remove the error for the OP), and then add a decorator to the enum module that does that creation time check -- just like the `unique` decorator enforces no aliases. Now I just need a good name for that decorator: - complete ? - exhaustive ? - all_named ? - check_for_unnamed ? -- assignee: -> ethan.furman ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44242] enum.IntFlag regression: missing values cause TypeError
Ethan Furman added the comment: I'll be offline for a couple hours, but I'll check back. -- ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44242] enum.IntFlag regression: missing values cause TypeError
Ethan Furman added the comment: I see your point about the str/repr. > But the class members themselves should not have that transform applied, and > raise > an error on invalid bits. But I'm not sure I understand that. Either you are agreeing with me that we should lose the creation time check (not apply the transform), or we should still have the check (raise an error on invalid bits) which would still leave us in this situation. -- ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44242] enum.IntFlag regression: missing values cause TypeError
Ethan Furman added the comment: That could be, and the user can set the boundary to whatever works best for their use-case, so long as the boundary they want to use does not conflict with the initial creation checks. Do you agree that simply removing the unnamed member check that takes place at Flag creation is a good way forward? -- ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44242] enum.IntFlag regression: missing values cause TypeError
Ethan Furman added the comment: Yes, that would be best practice. However, if the user is interfacing with other software/hardware, they may not have a choice on which bits make up the mask. -- ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44242] enum.IntFlag regression: missing values cause TypeError
Ethan Furman added the comment: For example, if the default is CONFORM or KEEP, but the user wants an error if 0x80 comes up, they would have to explicitly check for that value since the Flag would happily return it instead of raising. -- ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44242] enum.IntFlag regression: missing values cause TypeError
Ethan Furman added the comment: Those are good points -- the difficulty is knowing which behavior the user wants. And if the desired run-time behavior doesn't match the boundary flag the user is stuck. -- ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44242] enum.IntFlag regression: missing values cause TypeError
Ethan Furman added the comment: Actually, thinking about that a little bit more, KEEP was added for exactly this situation, as some stdlib flags exhibit the same behavior. So the real question is what should happen with, for example, GeodIntermediateFlag(0x80) ? The idea behind boundary is what should happen when values are created that don't have names in the Enum/Flag? The options for boundary are: STRICT -> an error is raised (default for Enum) EJECT -> the integer 0x80 is returned (not a flag) CONFORM -> unnamed bits are discarded (so the DEFAULT flag would be returned) KEEP-> an unnamed flag with value 0x80 is returned So KEEP is currently doing double-duty -- this reinforces my desire to go with option 2 and return KEEP to single-duty status. -- ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44242] enum.IntFlag regression: missing values cause TypeError
Ethan Furman added the comment: That is an intentional change. The cause is that the masks include bits that are not named in the Flag. The user-side fix is to add a `boundary=KEEP` option to the flag: class GeodIntermediateFlag(IntFlag, boundary=KEEP) The enum library fix could be one of two things: - automatically use the KEEP boundary when these conditions arise, and issue a DeprecationWarning; or - lose that particular check. I'm inclined to go with option 2, since `boundary` is designed to answer the question of what to do when Flag.A | Flag.B does not exist in Flag. -- ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44174] Unclear meaning of _Private__names in enum docs.
Ethan Furman added the comment: Looks good. Patches welcome. :-) -- nosy: +ethan.furman ___ Python tracker <https://bugs.python.org/issue44174> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44021] enum docs in 3.10: missing "New in version 3.10"
Ethan Furman added the comment: EnumMeta has been renamed to EnumType, but has been kept as an alias. -- ___ Python tracker <https://bugs.python.org/issue44021> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43957] [Enum] update __contains__ to return True for valid values
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue43957> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43989] Enum deprecation breaks SSL tests
Change by Ethan Furman : -- pull_requests: +24483 pull_request: https://github.com/python/cpython/pull/25793 ___ Python tracker <https://bugs.python.org/issue43989> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43989] Enum deprecation breaks SSL tests
Ethan Furman added the comment: New changeset 55e5c680dde39c934bf162965820787272ce95f9 by Roberto Hueso in branch 'master': bpo-43989: Add signal format specifier for unix_events (GH-25769) https://github.com/python/cpython/commit/55e5c680dde39c934bf162965820787272ce95f9 -- ___ Python tracker <https://bugs.python.org/issue43989> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43989] Enum deprecation breaks SSL tests
Ethan Furman added the comment: Traveling at the moment, I'll check it out in a few hours. -- ___ Python tracker <https://bugs.python.org/issue43989> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43957] [Enum] update __contains__ to return True for valid values
Ethan Furman added the comment: New changeset 6bd9288b805c765ec2433f66aa4d82e05767325f by Ethan Furman in branch 'master': bpo-43957: [Enum] Deprecate ``TypeError`` from containment checks. (GH-25670) https://github.com/python/cpython/commit/6bd9288b805c765ec2433f66aa4d82e05767325f -- ___ Python tracker <https://bugs.python.org/issue43957> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43957] [Enum] update __contains__ to return True for valid values
Change by Ethan Furman : -- keywords: +patch pull_requests: +24361 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25670 ___ Python tracker <https://bugs.python.org/issue43957> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42957] os.readlink produces wrong result on windows
Change by Ethan Furman : -- pull_requests: +24360 pull_request: https://github.com/python/cpython/pull/25670 ___ Python tracker <https://bugs.python.org/issue42957> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42957] os.readlink produces wrong result on windows
Change by Ethan Furman : -- nosy: +ethan.furman nosy_count: 6.0 -> 7.0 pull_requests: +24359 pull_request: https://github.com/python/cpython/pull/25670 ___ Python tracker <https://bugs.python.org/issue42957> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43957] [Enum] update __contains__ to return True for valid values
New submission from Ethan Furman : In 3.12 `__contains__` will check for both members and values: Color.RED in Color --> True 1 in Color --> True 'RED' in Color --> False Add DeprecationWarning for now. -- assignee: ethan.furman messages: 392122 nosy: ethan.furman priority: normal severity: normal stage: needs patch status: open title: [Enum] update __contains__ to return True for valid values type: behavior versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue43957> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43945] [Enum] standardize format() behavior
Ethan Furman added the comment: New changeset 5987b8c463892e0ab7a63cdae92f34b5eb79732d by Ethan Furman in branch 'master': bpo-43945: [Enum] Deprecate non-standard mixin format() behavior (GH-25649) https://github.com/python/cpython/commit/5987b8c463892e0ab7a63cdae92f34b5eb79732d -- ___ Python tracker <https://bugs.python.org/issue43945> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43945] [Enum] standardize format() behavior
Change by Ethan Furman : -- keywords: +patch pull_requests: +24340 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25649 ___ Python tracker <https://bugs.python.org/issue43945> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43945] [Enum] standardize format() behavior
New submission from Ethan Furman : Currently, an enum with a mixed-in data type, such as IntEnum, will use that data type's `__format__` -- unless the user provides their own `__str__`, in which case the `str()` of the enum member will be used in the `format()` call. This behavior will be deprecated in 3.10, and in 3.12 the default `__format__` will use the default `__str__`, which is the standard behavior for Python objects For those that were relying on, for example, class Color(IntEnum): RED = 1 f'{Color.RED}' # -> '2' They will need to add ":d" to ensure the integer output: f'{Color.RED:d}' This change does work now. -- assignee: ethan.furman messages: 391995 nosy: ethan.furman priority: normal severity: normal stage: needs patch status: open title: [Enum] standardize format() behavior type: behavior versions: Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue43945> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Ethan Furman added the comment: Pablo, did my latest patch resolved the errors? -- ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Ethan Furman added the comment: New changeset 6c681e1a4aa2dbca61be9a26c9257d7d25fa29a7 by Ethan Furman in branch 'master': bpo-38659: [Enum] do not check '_inverted_' during simple test (GH-25566) https://github.com/python/cpython/commit/6c681e1a4aa2dbca61be9a26c9257d7d25fa29a7 -- ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Change by Ethan Furman : -- pull_requests: +24285 pull_request: https://github.com/python/cpython/pull/25566 ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Ethan Furman added the comment: My apologies, I was having hardware issues. Checking it out now. -- ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Ethan Furman added the comment: Actually, I think that fixed the refleak issue as well. Thanks, Ammar! -- ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Ethan Furman added the comment: New changeset 37b173c5231b7b202859af97c17bc3d04b1e4c75 by Ammar Askar in branch 'master': bpo-38659: Properly re-intialize module variables in test_enum (GH-25516) https://github.com/python/cpython/commit/37b173c5231b7b202859af97c17bc3d04b1e4c75 -- ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Ethan Furman added the comment: `format` issue resolved, but not the refleak issue. -- ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Ethan Furman added the comment: New changeset a02cb474f9c097c83cd444a47e9fb5f99b4aaf45 by Ethan Furman in branch 'master': bpo-38659: [Enum] add _simple_enum decorator (GH-25497) https://github.com/python/cpython/commit/a02cb474f9c097c83cd444a47e9fb5f99b4aaf45 -- ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Change by Ethan Furman : -- pull_requests: +24219 pull_request: https://github.com/python/cpython/pull/25497 ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Change by Ethan Furman : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()
Ethan Furman added the comment: False alarm, sorry. Still getting used to merging, rebasing, etc. Current tests run fine. -- resolution: -> fixed status: open -> closed ___ Python tracker <https://bugs.python.org/issue42854> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()
Change by Ethan Furman : -- Removed message: https://bugs.python.org/msg391419 ___ Python tracker <https://bugs.python.org/issue42854> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43430] Exception raised when attempting to create Enum via functional API
Ethan Furman added the comment: That sounds more like the way it is intended to be used: make you base enum with all the changes you want, then use that base enum either by inheriting from it or as a function call: class MyBaseEnum(Enum, metaclass=...): ... custom stuff ... ... custom stuff ... class MyRealEnum1(MyBaseEnum): NAME = value NAME = value MyRealEnum2 = MyBaseEnum("MyRealEnum2", [('NAME', value), ('NAME', value)]) What change did you need with `__getitem__`? Maybe there is a way to accomplish that goal without subclassing EnumMeta. -- ___ Python tracker <https://bugs.python.org/issue43430> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33025] urlencode produces bad output from ssl.CERT_NONE and friends that chokes decoders
Ethan Furman added the comment: Actually, I think it uses str(). An easy fix would be to use format() for all non-bytes objects instead -- the question then becomes how many objects (besides Enums with mixed-in data types) have a different str() vs format() display? -- ___ Python tracker <https://bugs.python.org/issue33025> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33025] urlencode produces bad output from ssl.CERT_NONE and friends that chokes decoders
Ethan Furman added the comment: IIUC, the issue is that urlencode( {'cert_reqs': ssl.CERT_NONE} ) no longer produces 'cert_reqs=0' ? -- ___ Python tracker <https://bugs.python.org/issue33025> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Ethan Furman added the comment: New changeset 503cdc7c124cebbd777008bdf7bd9aa666b25f07 by Ethan Furman in branch 'master': Revert "bpo-38659: [Enum] add _simple_enum decorator (GH-25285)" (GH-25476) https://github.com/python/cpython/commit/503cdc7c124cebbd777008bdf7bd9aa666b25f07 -- ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Change by Ethan Furman : -- pull_requests: +24202 pull_request: https://github.com/python/cpython/pull/25476 ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Ethan Furman added the comment: New changeset dbac8f40e81eb0a29dc833e6409a1abf47467da6 by Ethan Furman in branch 'master': bpo-38659: [Enum] add _simple_enum decorator (GH-25285) https://github.com/python/cpython/commit/dbac8f40e81eb0a29dc833e6409a1abf47467da6 -- ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()
Ethan Furman added the comment: I'm getting this error: test test_ssl failed -- Traceback (most recent call last): File "/source/python/cpython/Lib/test/test_ssl.py", line 1061, in test_read_write_zero self.assertEqual(s.send(b""), 0) File "/source/python/cpython/Lib/ssl.py", line 1198, in send return self._sslobj.write(data) ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2484) Let me know if there's any other info I can provide (and how to get it). -- nosy: +ethan.furman ___ Python tracker <https://bugs.python.org/issue42854> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42248] Raised exception in Enum keeping user objects alive unnecessarily
Change by Ethan Furman : -- assignee: -> ethan.furman resolution: -> fixed stage: patch review -> resolved status: open -> closed type: enhancement -> behavior versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue42248> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43744] enum: Adding a member named _classname__ raises IndexError
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue43744> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43744] enum: Adding a member named _classname__ raises IndexError
Ethan Furman added the comment: New changeset ec09973f5b21d33550c834ddc89606b0e1c70ffd by Ethan Furman in branch 'master': bpo-43744: [Enum] fix ``_is_private`` (GH-25349) https://github.com/python/cpython/commit/ec09973f5b21d33550c834ddc89606b0e1c70ffd -- ___ Python tracker <https://bugs.python.org/issue43744> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members
Change by Ethan Furman : -- assignee: docs@python -> ethan.furman resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue40006> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40066] Enum: modify __repr__, __str__; update docs
Ethan Furman added the comment: Thank you for the feedback. The new str() and repr() make more sense for Flag-based enumerations, and I'm hesitant to have different formats for Enum- vs Flag-based enums. Would it be helpful to have another base Enum class to derive from that maintained the original str() and repr() formats? -- resolution: fixed -> stage: resolved -> status: closed -> open ___ Python tracker <https://bugs.python.org/issue40066> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members
Ethan Furman added the comment: `_create_pseudo_member_` was an implementation detail and has been removed. I did update the doc string which was migrated to `_missing_`. -- ___ Python tracker <https://bugs.python.org/issue40006> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members
Change by Ethan Furman : -- keywords: +patch pull_requests: +24108 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25376 ___ Python tracker <https://bugs.python.org/issue40006> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42248] Raised exception in Enum keeping user objects alive unnecessarily
Ethan Furman added the comment: New changeset 6379924ecd51e346b42b0293da0f4442a0f67707 by Ethan Furman in branch '3.9': [3.9] bpo-42248: [Enum] ensure exceptions raised in ``_missing_`` are released (GH-25350). (GH-25370) https://github.com/python/cpython/commit/6379924ecd51e346b42b0293da0f4442a0f67707 -- ___ Python tracker <https://bugs.python.org/issue42248> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows
Ethan Furman added the comment: Hey, you agree with me now, so it's not noise. ;-) -- ___ Python tracker <https://bugs.python.org/issue14243> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows
Ethan Furman added the comment: Paul, If "rescuing" (i.e. "fixing" ;) NamedTemporaryFile was arduous, complicated, or had serious backwards-compatibility issues then I would completely agree with you. However, the fix is simple, the only backwards-compatible issue is the file would still be there /while a context manager was in use/ after it had been closed (which conforms to most, if not all, users of context managers) and a file would be left on disk in the event of a hard crash (hopefully a rare occurrence). Your proposal, on the other, is a lot of work. Is the minor backwards compatibility worth all that work? -- ___ Python tracker <https://bugs.python.org/issue14243> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42248] Raised exception in Enum keeping user objects alive unnecessarily
Ethan Furman added the comment: New changeset f396a1a940f8608a4be2a9ac4ef82e37c198ecd3 by Ethan Furman in branch '3.8': [3.8] bpo-42248: [Enum] ensure exceptions raised in ``_missing_`` are released (GH-25350). (GH-25369) https://github.com/python/cpython/commit/f396a1a940f8608a4be2a9ac4ef82e37c198ecd3 -- ___ Python tracker <https://bugs.python.org/issue42248> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows
Ethan Furman added the comment: Eryk, I'm not sure if you are agreeing or disagreeing with me. :) On Windows it sounds like O_TEMPORARY buys us guaranteed file deletion, but costs us easy sharing of file resources and a difference in semantics between Windows and non-Windows. Is the automatic deletion truly that valuable? -- ___ Python tracker <https://bugs.python.org/issue14243> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42248] Raised exception in Enum keeping user objects alive unnecessarily
Change by Ethan Furman : -- pull_requests: +24103 pull_request: https://github.com/python/cpython/pull/25370 ___ Python tracker <https://bugs.python.org/issue42248> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42248] Raised exception in Enum keeping user objects alive unnecessarily
Change by Ethan Furman : -- pull_requests: +24102 pull_request: https://github.com/python/cpython/pull/25369 ___ Python tracker <https://bugs.python.org/issue42248> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42248] Raised exception in Enum keeping user objects alive unnecessarily
Ethan Furman added the comment: New changeset 8c14f5a787b21d5a1eae5d5ee981431d1c0e055f by Ethan Furman in branch 'master': bpo-42248: [Enum] ensure exceptions raised in ``_missing_`` are released (GH-25350) https://github.com/python/cpython/commit/8c14f5a787b21d5a1eae5d5ee981431d1c0e055f -- ___ Python tracker <https://bugs.python.org/issue42248> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42248] Raised exception in Enum keeping user objects alive unnecessarily
Change by Ethan Furman : -- keywords: +patch pull_requests: +24085 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25350 ___ Python tracker <https://bugs.python.org/issue42248> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43744] enum: Adding a member named _classname__ raises IndexError
Ethan Furman added the comment: It should not be an error at all, but a False result. PR created. -- assignee: -> ethan.furman ___ Python tracker <https://bugs.python.org/issue43744> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43744] enum: Adding a member named _classname__ raises IndexError
Change by Ethan Furman : -- keywords: +patch pull_requests: +24084 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25349 ___ Python tracker <https://bugs.python.org/issue43744> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows
Ethan Furman added the comment: On 4/11/2021 3:51 PM, Jason R. Coombs wrote: > Jason R. Coombs added the comment: > > At least I and Ethan and Martin have expressed a desire for the default, preferred usage work well in a portable environment. Requiring `delete_on_close=False` violates that expectation. My opinion is that no extra flags are necessary. The default of deleting on close is fine, unless a context manager is active -- in which case delete on CM exit. Note that an internal flag will be needed to track the status of being in a context manager, but nothing besides behavior in that edge case would change. -- ___ Python tracker <https://bugs.python.org/issue14243> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39102] Increase Enum performance
Change by Ethan Furman : -- stage: patch review -> needs patch versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue39102> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43430] Exception raised when attempting to create Enum via functional API
Ethan Furman added the comment: Looking at your example I see that you are using an enum as the `type` parameter -- the purpose of `type` is to provide a mixin data type, such as `int` or `str`, not another enum. What is your use-case? Typically, subclassing EnumMeta is not needed. -- ___ Python tracker <https://bugs.python.org/issue43430> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38659] enum classes cause slow startup time
Change by Ethan Furman : -- keywords: +patch pull_requests: +24021 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25285 ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40066] Enum: modify __repr__, __str__; update docs
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue40066> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows
Ethan Furman added the comment: I think the best solution, albeit slightly backwards incompatible, is to change NamedTemporaryFile such that if (and only if) it is being used as a context manager, the underlying file is not closed until the context manager ends. This should be the default behavior with no new flags. Since context managers are used for resource acquisition (`__enter__`) and cleanup (`__exit__`), having the resource disappear in the middle of the `with` block is counter-intuitive. Given that closing a file in the middle of its CM seems like a very odd thing to do (one could just leave the CM and the file would close), do we need a deprecation period or can we just make the change? -- nosy: +ethan.furman title: tempfile.NamedTemporaryFile not particularly useful on Windows -> tempfile.NamedTemporaryFile not particularly useful on Windows ___ Python tracker <https://bugs.python.org/issue14243> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?
Ethan Furman added the comment: Mark, it looks like the consensus is your proposal: "The implementation is allowed to skip any boolean test of a value, when it has *no* effect on the flow of the program and *at least one test* has already been performed on that value." Has the implementation been updated to reflect this? The beta freeze will be here soon. -- ___ Python tracker <https://bugs.python.org/issue42899> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40066] Enum: modify __repr__, __str__; update docs
Change by Ethan Furman : -- pull_requests: +23862 pull_request: https://github.com/python/cpython/pull/25118 ___ Python tracker <https://bugs.python.org/issue40066> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40066] Enum: modify __repr__, __str__; update docs
Change by Ethan Furman : -- pull_requests: +23861 pull_request: https://github.com/python/cpython/pull/25116 ___ Python tracker <https://bugs.python.org/issue40066> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43681] doctest forgets previous imports
Ethan Furman added the comment: Note that this only appears to be a problem under CI. -- ___ Python tracker <https://bugs.python.org/issue43681> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43681] doctest forgets previous imports
New submission from Ethan Furman : In the Python 3.10 Doc/library/enum.rst file was the following: .. class:: FlagBoundary *FlagBoundary* controls how out-of-range values are handled in *Flag* and its subclasses. .. attribute:: STRICT Out-of-range values cause a :exc:`ValueError` to be raised. This is the default for :class:`Flag`:: >>> from enum import STRICT >>> class StrictFlag(Flag, boundary=STRICT): ... RED = auto() ... GREEN = auto() ... BLUE = auto() >>> StrictFlag(2**2 + 2**4) Traceback (most recent call last): ... ValueError: StrictFlag: invalid value: 20 given 0b0 10100 allowed 0b0 00111 .. attribute:: CONFORM Out-of-range values have invalid values removed, leaving a valid *Flag* value:: >>> from enum import CONFORM >>> class ConformFlag(Flag, boundary=CONFORM): ... RED = auto() ... GREEN = auto() ... BLUE = auto() >>> ConformFlag(2**2 + 2**4) ConformFlag.BLUE .. attribute:: EJECT Out-of-range values lose their *Flag* membership and revert to :class:`int`. This is the default for :class:`IntFlag`:: >>> from enum import EJECT >>> class EjectFlag(Flag, boundary=EJECT): ... RED = auto() ... GREEN = auto() ... BLUE = auto() >>> EjectFlag(2**2 + 2**4) 20 .. attribute:: KEEP Out-of-range values are kept, and the *Flag* membership is kept. This is used for some stdlib flags: >>> from enum import KEEP >>> class KeepFlag(Flag, boundary=KEEP): ... RED = auto() ... GREEN = auto() ... BLUE = auto() >>> KeepFlag(2**2 + 2**4) KeepFlag.BLUE|0x10 All four tests are relying on a previous `from enum import Flag`, but only the three tests pass -- the fourth raises: Traceback (most recent call last): File "/home/runner/work/cpython/cpython/Lib/doctest.py", line 1337, in __run exec(compile(example.source, filename, "single", File "", line 1, in class KeepFlag(Flag, boundary=KEEP): NameError: name 'Flag' is not defined -- components: Library (Lib) messages: 389903 nosy: ethan.furman priority: normal severity: normal stage: test needed status: open title: doctest forgets previous imports type: behavior versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue43681> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40066] Enum: modify __repr__, __str__; update docs
Ethan Furman added the comment: New changeset b775106d940e3d77c8af7967545bb9a5b7b162df by Ethan Furman in branch 'master': bpo-40066: Enum: modify `repr()` and `str()` (GH-22392) https://github.com/python/cpython/commit/b775106d940e3d77c8af7967545bb9a5b7b162df -- ___ Python tracker <https://bugs.python.org/issue40066> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40066] Enum: modify __repr__, __str__; update docs
Change by Ethan Furman : -- components: +Library (Lib) title: Enum._convert should change __repr__ and/or __str__ to use module name instead of class name -> Enum: modify __repr__, __str__; update docs ___ Python tracker <https://bugs.python.org/issue40066> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43430] Exception raised when attempting to create Enum via functional API
Change by Ethan Furman : -- assignee: -> ethan.furman ___ Python tracker <https://bugs.python.org/issue43430> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43162] Enum regression: AttributeError when accessing class variables on instances
Ethan Furman added the comment: You're welcome. Thank you for pushing the issue! :-) -- ___ Python tracker <https://bugs.python.org/issue43162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43162] Enum regression: AttributeError when accessing class variables on instances
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue43162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43162] Enum regression: AttributeError when accessing class variables on instances
Ethan Furman added the comment: New changeset 44e580f448016b86807465a186d03d9074e2b589 by Ethan Furman in branch 'master': bpo-43162: [Enum] update docs, renable doc tests (GH-24487) https://github.com/python/cpython/commit/44e580f448016b86807465a186d03d9074e2b589 -- ___ Python tracker <https://bugs.python.org/issue43162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43162] Enum regression: AttributeError when accessing class variables on instances
Ethan Furman added the comment: DeprecationWarning will be active in 3.10 and 3.11 with removal in 3.12. -- ___ Python tracker <https://bugs.python.org/issue43162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43098] tarfile list() method does not show file type
Change by Ethan Furman : -- assignee: -> ethan.furman nosy: +ethan.furman ___ Python tracker <https://bugs.python.org/issue43098> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43162] Enum regression: AttributeError when accessing class variables on instances
Change by Ethan Furman : -- pull_requests: +23277 pull_request: https://github.com/python/cpython/pull/24487 ___ Python tracker <https://bugs.python.org/issue43162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43162] Enum regression: AttributeError when accessing class variables on instances
Ethan Furman added the comment: Dylan, it's not the `from_str()` method, but the `__str__` method that is the problem. Instead of def __str__(self): if self is self.EXITCODE: return 'exitcode' it should be def __str__(self): cls = self.__class__ if self is cls.EXITCODE: return 'exitcode' -- ___ Python tracker <https://bugs.python.org/issue43162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43162] Enum regression: AttributeError when accessing class variables on instances
Ethan Furman added the comment: New changeset d65b9033d6d092552775f6f5e41e7647100f9f2c by Ethan Furman in branch 'master': bpo-43162: [Enum] deprecate enum member.member access (GH-24486) https://github.com/python/cpython/commit/d65b9033d6d092552775f6f5e41e7647100f9f2c -- ___ Python tracker <https://bugs.python.org/issue43162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43162] Enum regression: AttributeError when accessing class variables on instances
Change by Ethan Furman : -- keywords: +patch pull_requests: +23276 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24486 ___ Python tracker <https://bugs.python.org/issue43162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43162] Enum regression: AttributeError when accessing class variables on instances
Ethan Furman added the comment: The code for that `__str__` seems very inefficient -- why doesn't it just do: return self.name ? - The issue is not being able to access class attributes, the issue is whether one enum member should be seen as an attribute of another: EnumClass.RED.BLUE and the answer is no. That wasn't possible when Enum was first introduced in 3.4, and was an unfortunate side-effect of speeding up member access in 3.5 (or 3.6). The docs have always warned against it. A deprecation warning is an easier transition, though, so I'll do that for 3.10, and in 3.11 it will become an error. Thank you for reporting! :-) -- assignee: -> ethan.furman stage: -> needs patch ___ Python tracker <https://bugs.python.org/issue43162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8264] [doc] hasattr doesn't show private (double underscore) attributes exist
Ethan Furman added the comment: New changeset 2edaf6a4fb7e20324dde1423232f07211347f092 by Ken Jin in branch 'master': bpo-8264: Document hasattr and getattr behavior for private attributes (GH-23513) https://github.com/python/cpython/commit/2edaf6a4fb7e20324dde1423232f07211347f092 -- nosy: +ethan.furman ___ Python tracker <https://bugs.python.org/issue8264> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40042] Enum Flag: psuedo-members have None for name attribute
Ethan Furman added the comment: This issue is fixed in #38250. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed superseder: -> enum.Flag should be more set-like ___ Python tracker <https://bugs.python.org/issue40042> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42727] [Enum] EnumMeta.__prepare__ needs to accept **kwds
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42727> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC
Ethan Furman added the comment: That patch was rejected in favor of updating Enum to use `__set_name__` to do the final creation of enum members. The same thing could be done for ABC, but I lack the C skills to make it happen. -- ___ Python tracker <https://bugs.python.org/issue35815> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC
Change by Ethan Furman : -- Removed message: https://bugs.python.org/msg386099 ___ Python tracker <https://bugs.python.org/issue35815> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC
Ethan Furman added the comment: That patch was reject in favor of updating Enum to use `__set_name__` to do the final creation of enum members. The same thing could be done for ABC, but I lack the C skills to make it happen. -- assignee: ethan.furman -> superseder: __init_subclass__ should be called in __init__ -> versions: +Python 3.10 -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue35815> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38250] enum.Flag should be more set-like
Ethan Furman added the comment: New changeset 01faf4542a8652adfbd3b3f897ba718e8ce43f5e by Ethan Furman in branch 'master': bpo-38250: [Enum] only include .rst test if file available (GH-24342) https://github.com/python/cpython/commit/01faf4542a8652adfbd3b3f897ba718e8ce43f5e -- ___ Python tracker <https://bugs.python.org/issue38250> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38250] enum.Flag should be more set-like
Change by Ethan Furman : -- pull_requests: +23161 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/24342 ___ Python tracker <https://bugs.python.org/issue38250> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42901] [Enum] move member creation to __set_name__ in order to support __init_subclass__
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42901> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42915] enum.Flag ~ bitwise negation is very slow and can't be defined as a Flag value
Ethan Furman added the comment: Fixed in 3.10 in issue38250. Also fixed in my 3rd-party library, aenum 3.0: (https://pypi.org/project/aenum/) -- resolution: -> wont fix stage: -> resolved status: open -> closed superseder: -> enum.Flag should be more set-like type: -> behavior ___ Python tracker <https://bugs.python.org/issue42915> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com