[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-06-09 Thread Ethan Furman
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

[issue44356] Abstract enum mixins not allowed

2021-06-09 Thread Ethan Furman
Ethan Furman added the comment: Excellent bug report. But what is an `UnexpectedString()` ? -- ___ Python tracker <https://bugs.python.org/issue44356> ___ ___

[issue44356] Abstract enum mixins not allowed

2021-06-08 Thread Ethan Furman
Change by Ethan Furman : -- assignee: -> ethan.furman nosy: +ethan.furman versions: +Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issu

[issue44342] enum with inherited type won't pickle

2021-06-07 Thread Ethan Furman
Change by Ethan Furman : -- assignee: -> ethan.furman nosy: +ethan.furman ___ Python tracker <https://bugs.python.org/issue44342> ___ ___ Python-bugs-list mai

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-06-07 Thread Ethan Furman
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/issu

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-27 Thread Ethan Furman
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

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman
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> ___ ___ Pytho

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman
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 crea

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman
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

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman
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.

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman
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

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman
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 <ht

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman
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

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-05-26 Thread Ethan Furman
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

[issue44174] Unclear meaning of _Private__names in enum docs.

2021-05-19 Thread Ethan Furman
Ethan Furman added the comment: Looks good. Patches welcome. :-) -- nosy: +ethan.furman ___ Python tracker <https://bugs.python.org/issue44174> ___ ___ Pytho

[issue44021] enum docs in 3.10: missing "New in version 3.10"

2021-05-03 Thread Ethan Furman
Ethan Furman added the comment: EnumMeta has been renamed to EnumType, but has been kept as an alias. -- ___ Python tracker <https://bugs.python.org/issue44

[issue43957] [Enum] update __contains__ to return True for valid values

2021-05-01 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43989] Enum deprecation breaks SSL tests

2021-05-01 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +24483 pull_request: https://github.com/python/cpython/pull/25793 ___ Python tracker <https://bugs.python.org/issue43

[issue43989] Enum deprecation breaks SSL tests

2021-05-01 Thread Ethan Furman
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

[issue43989] Enum deprecation breaks SSL tests

2021-04-30 Thread Ethan Furman
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> ___ ___

[issue43957] [Enum] update __contains__ to return True for valid values

2021-04-27 Thread Ethan Furman
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

[issue43957] [Enum] update __contains__ to return True for valid values

2021-04-27 Thread Ethan Furman
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/issu

[issue42957] os.readlink produces wrong result on windows

2021-04-27 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +24360 pull_request: https://github.com/python/cpython/pull/25670 ___ Python tracker <https://bugs.python.org/issue42

[issue42957] os.readlink produces wrong result on windows

2021-04-27 Thread Ethan Furman
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/issu

[issue43957] [Enum] update __contains__ to return True for valid values

2021-04-27 Thread Ethan Furman
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: 39

[issue43945] [Enum] standardize format() behavior

2021-04-26 Thread Ethan Furman
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

[issue43945] [Enum] standardize format() behavior

2021-04-26 Thread Ethan Furman
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/issu

[issue43945] [Enum] standardize format() behavior

2021-04-26 Thread Ethan Furman
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

[issue38659] enum classes cause slow startup time

2021-04-24 Thread Ethan Furman
Ethan Furman added the comment: Pablo, did my latest patch resolved the errors? -- ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bug

[issue38659] enum classes cause slow startup time

2021-04-23 Thread Ethan Furman
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

[issue38659] enum classes cause slow startup time

2021-04-23 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +24285 pull_request: https://github.com/python/cpython/pull/25566 ___ Python tracker <https://bugs.python.org/issue38

[issue38659] enum classes cause slow startup time

2021-04-23 Thread Ethan Furman
Ethan Furman added the comment: My apologies, I was having hardware issues. Checking it out now. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Ethan Furman
Ethan Furman added the comment: Actually, I think that fixed the refleak issue as well. Thanks, Ammar! -- ___ Python tracker <https://bugs.python.org/issue38

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Ethan Furman
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

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Ethan Furman
Ethan Furman added the comment: `format` issue resolved, but not the refleak issue. -- ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bug

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Ethan Furman
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

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +24219 pull_request: https://github.com/python/cpython/pull/25497 ___ Python tracker <https://bugs.python.org/issue38

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Ethan Furman
Change by Ethan Furman : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue38659> ___ ___ Python-bugs-list mailing list Unsub

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-04-21 Thread Ethan Furman
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/i

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-04-21 Thread Ethan Furman
Change by Ethan Furman : -- Removed message: https://bugs.python.org/msg391419 ___ Python tracker <https://bugs.python.org/issue42854> ___ ___ Python-bugs-list m

[issue43430] Exception raised when attempting to create Enum via functional API

2021-04-21 Thread Ethan Furman
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

[issue33025] urlencode produces bad output from ssl.CERT_NONE and friends that chokes decoders

2021-04-20 Thread Ethan Furman
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

[issue33025] urlencode produces bad output from ssl.CERT_NONE and friends that chokes decoders

2021-04-20 Thread Ethan Furman
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/issue33

[issue38659] enum classes cause slow startup time

2021-04-19 Thread Ethan Furman
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/503cdc7c124cebbd777008bdf7bd9a

[issue38659] enum classes cause slow startup time

2021-04-19 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +24202 pull_request: https://github.com/python/cpython/pull/25476 ___ Python tracker <https://bugs.python.org/issue38

[issue38659] enum classes cause slow startup time

2021-04-19 Thread Ethan Furman
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

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-04-19 Thread Ethan Furman
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/

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-04-15 Thread Ethan Furman
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

[issue43744] enum: Adding a member named _classname__ raises IndexError

2021-04-15 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43744] enum: Adding a member named _classname__ raises IndexError

2021-04-15 Thread Ethan Furman
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

[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members

2021-04-15 Thread Ethan Furman
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

[issue40066] Enum: modify __repr__, __str__; update docs

2021-04-13 Thread Ethan Furman
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

[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members

2021-04-12 Thread Ethan Furman
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/issue40

[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members

2021-04-12 Thread Ethan Furman
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/issu

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-04-12 Thread Ethan Furman
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

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-12 Thread Ethan Furman
Ethan Furman added the comment: Hey, you agree with me now, so it's not noise. ;-) -- ___ Python tracker <https://bugs.python.org/issue14243> ___ ___ Python-bug

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-12 Thread Ethan Furman
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

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-04-12 Thread Ethan Furman
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

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-12 Thread Ethan Furman
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

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-04-12 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +24103 pull_request: https://github.com/python/cpython/pull/25370 ___ Python tracker <https://bugs.python.org/issue42

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-04-12 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +24102 pull_request: https://github.com/python/cpython/pull/25369 ___ Python tracker <https://bugs.python.org/issue42

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-04-12 Thread Ethan Furman
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

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-04-11 Thread Ethan Furman
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/issu

[issue43744] enum: Adding a member named _classname__ raises IndexError

2021-04-11 Thread Ethan Furman
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/issu

[issue43744] enum: Adding a member named _classname__ raises IndexError

2021-04-11 Thread Ethan Furman
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/issu

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-11 Thread Ethan Furman
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`

[issue39102] Increase Enum performance

2021-04-11 Thread Ethan Furman
Change by Ethan Furman : -- stage: patch review -> needs patch versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue39102> ___ _

[issue43430] Exception raised when attempting to create Enum via functional API

2021-04-11 Thread Ethan Furman
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

[issue38659] enum classes cause slow startup time

2021-04-08 Thread Ethan Furman
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/issu

[issue40066] Enum: modify __repr__, __str__; update docs

2021-04-08 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-07 Thread Ethan Furman
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

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-04-07 Thread Ethan Furman
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.&

[issue40066] Enum: modify __repr__, __str__; update docs

2021-03-31 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +23862 pull_request: https://github.com/python/cpython/pull/25118 ___ Python tracker <https://bugs.python.org/issue40

[issue40066] Enum: modify __repr__, __str__; update docs

2021-03-31 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +23861 pull_request: https://github.com/python/cpython/pull/25116 ___ Python tracker <https://bugs.python.org/issue40

[issue43681] doctest forgets previous imports

2021-03-31 Thread Ethan Furman
Ethan Furman added the comment: Note that this only appears to be a problem under CI. -- ___ Python tracker <https://bugs.python.org/issue43681> ___ ___ Pytho

[issue43681] doctest forgets previous imports

2021-03-31 Thread Ethan Furman
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

[issue40066] Enum: modify __repr__, __str__; update docs

2021-03-30 Thread Ethan Furman
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

[issue40066] Enum: modify __repr__, __str__; update docs

2021-03-25 Thread Ethan Furman
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.pyth

[issue43430] Exception raised when attempting to create Enum via functional API

2021-03-07 Thread Ethan Furman
Change by Ethan Furman : -- assignee: -> ethan.furman ___ Python tracker <https://bugs.python.org/issue43430> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43162] Enum regression: AttributeError when accessing class variables on instances

2021-03-03 Thread Ethan Furman
Ethan Furman added the comment: You're welcome. Thank you for pushing the issue! :-) -- ___ Python tracker <https://bugs.python.org/issue43162> ___ ___ Pytho

[issue43162] Enum regression: AttributeError when accessing class variables on instances

2021-03-03 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43162] Enum regression: AttributeError when accessing class variables on instances

2021-03-03 Thread Ethan Furman
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

[issue43162] Enum regression: AttributeError when accessing class variables on instances

2021-03-02 Thread Ethan Furman
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/issue43

[issue43098] tarfile list() method does not show file type

2021-02-23 Thread Ethan Furman
Change by Ethan Furman : -- assignee: -> ethan.furman nosy: +ethan.furman ___ Python tracker <https://bugs.python.org/issue43098> ___ ___ Python-bugs-list mai

[issue43162] Enum regression: AttributeError when accessing class variables on instances

2021-02-08 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +23277 pull_request: https://github.com/python/cpython/pull/24487 ___ Python tracker <https://bugs.python.org/issue43

[issue43162] Enum regression: AttributeError when accessing class variables on instances

2021-02-08 Thread Ethan Furman
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__

[issue43162] Enum regression: AttributeError when accessing class variables on instances

2021-02-08 Thread Ethan Furman
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

[issue43162] Enum regression: AttributeError when accessing class variables on instances

2021-02-08 Thread Ethan Furman
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/issu

[issue43162] Enum regression: AttributeError when accessing class variables on instances

2021-02-08 Thread Ethan Furman
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

[issue8264] [doc] hasattr doesn't show private (double underscore) attributes exist

2021-02-02 Thread Ethan Furman
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

[issue40042] Enum Flag: psuedo-members have None for name attribute

2021-02-01 Thread Ethan Furman
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

[issue42727] [Enum] EnumMeta.__prepare__ needs to accept **kwds

2021-02-01 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC

2021-02-01 Thread Ethan Furman
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

[issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC

2021-02-01 Thread Ethan Furman
Change by Ethan Furman : -- Removed message: https://bugs.python.org/msg386099 ___ Python tracker <https://bugs.python.org/issue35815> ___ ___ Python-bugs-list m

[issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC

2021-02-01 Thread Ethan Furman
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 -> superse

[issue38250] enum.Flag should be more set-like

2021-01-26 Thread Ethan Furman
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

[issue38250] enum.Flag should be more set-like

2021-01-26 Thread Ethan Furman
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/issu

[issue42901] [Enum] move member creation to __set_name__ in order to support __init_subclass__

2021-01-25 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42915] enum.Flag ~ bitwise negation is very slow and can't be defined as a Flag value

2021-01-25 Thread Ethan Furman
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 s

<    1   2   3   4   5   6   7   8   9   10   >