[issue21705] cgi.py: Multipart with more than one file is misparsed

2019-09-16 Thread Ethan Furman
Ethan Furman added the comment: The last status was "test-needed" -- has anyone verified that a test exists for this scenario? -- ___ Python tracker <https://bugs.python.o

[issue38215] Do not import modules in star-import when __all__ is not defined.

2019-09-18 Thread Ethan Furman
Ethan Furman added the comment: I don't think this is worth the code breakage. The advice already given is not to use `import *` unless: - the module was designed for that usage; or - you know what you are doing. -- nosy: +ethan.furman ___ P

[issue38215] Do not import modules in star-import when __all__ is not defined.

2019-09-18 Thread Ethan Furman
Ethan Furman added the comment: It's the casual users' code that will break. -- ___ Python tracker <https://bugs.python.org/issue38215> ___ ___

[issue21705] cgi.py: Multipart with more than one file is misparsed

2019-09-25 Thread Ethan Furman
Ethan Furman added the comment: Excellent, thanks for checking! -- ___ Python tracker <https://bugs.python.org/issue21705> ___ ___ Python-bugs-list mailin

[issue38375] Enum lookup fails for callable values

2019-10-07 Thread Ethan Furman
Ethan Furman added the comment: This is the intended, and documented, behavior. -- assignee: -> ethan.furman resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python

[issue38659] enum classes cause slow startup time

2019-11-01 Thread Ethan Furman
Ethan Furman added the comment: I was just looking at this problem, and creating a bare-bones, no safety belts version for use in the stdlib (no patch yet) which decreases Enum creation from 14x slower to only 6x slower. (Comparing to a class with simple attributes.) Not sure if that&#

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2019-11-04 Thread Ethan Furman
Ethan Furman added the comment: I came across this /32 issue today trying to iterate over the hosts in 127.0.0.1/32. I think it's fair to say that any /32 network has precisely one host, and that host should by returned by IPv4Network().hosts(). -- nosy: +ethan.f

[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

[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/b775106d940e3d77c8af7967545bb9

[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

[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

[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

[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

[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."

[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

[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

[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

[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

[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> ___ _

[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`

[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

[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

[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

[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/8c14f5a787b21d5a1eae5d5ee98143

[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
Change by Ethan Furman : -- pull_requests: +24103 pull_request: https://github.com/python/cpython/pull/25370 ___ Python tracker <https://bugs.python.org/issue42

[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. I

[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/cpyt

[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

[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> ___ ___ Pytho

[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/cpyt

[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

[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

[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 maint

[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

[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/ec09973f5b21d33550c834ddc89606

[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

[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

[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/py

[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/dbac8f40e81eb0a29dc833e6409a1a

[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 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/503cdc7c124cebbd7770

[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://bug

[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

[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

[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

[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

[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

[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
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/a02cb474f9c097c83cd444a47e9fb5

[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: `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
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/37b173c5231b7b202859af97c17bc3

[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-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-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: 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/6c681e1a4aa2dbca61be

[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

[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 wi

[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
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/5987b8c463892e0ab7a63cdae92f34

[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 me

[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

[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

[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

[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/6bd9288b805c765ec2433f66aa4d82

[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> ___ ___

[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/55e5c680dde39c934bf16296582078

[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

[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

[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

[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

[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 be

[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: 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 &

[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: 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: 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: 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

[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> ___ ___

[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 pl

[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

[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

[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

[issue44356] Abstract enum mixins not allowed

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

[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/eea8148b7dff5ffc7b84433859ac81

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

2021-06-09 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +25221 pull_request: https://github.com/python/cpython/pull/26635 ___ Python tracker <https://bugs.python.org/issue44

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

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 749648609de89f14581190ea34b9c0968787a701 by Ethan Furman in branch '3.10': [3.10] bpo-44242: [Enum] remove missing bits test from Flag creation (GH-26586) (GH-26635) https://github.com/python/cpyt

[issue44356] Abstract enum mixins not allowed

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: Since I like puzzles, here is a working LenientStrEnum: class LenientStrEnum(str, Enum): # def __init__(self, *args): self._valid = True # @classmethod def _missing_(cls, value): logger.warning

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread Ethan Furman
Change by Ethan Furman : -- keywords: +patch pull_requests: +25235 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26649 ___ Python tracker <https://bugs.python.org/issu

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread Ethan Furman
Change by Ethan Furman : -- title: Abstract enum mixins not allowed -> Multiple enum mixins not allowed even when they have the same datatype ___ Python tracker <https://bugs.python.org/issu

[issue44342] enum with inherited type won't pickle

2021-06-10 Thread Ethan Furman
Change by Ethan Furman : -- priority: normal -> high versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue44342> ___ ___ Python-bugs-lis

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 8a4f0850d75747af8c96ca0e7eef1f5c1abfba25 by Ethan Furman in branch 'main': bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649) https://github.com/python/cpython/commit/8a4f0850d75747af8c96ca0e7eef1f

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

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: Thank you everyone for your help. -- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 ___ Python tracker <https://

[issue44342] enum with inherited type won't pickle

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: Looking into this I think the root of the problem is the way `reduce` is handled -- currently, Enum's `__reduce_ex__` works by returning the class, and the value to use to lookup the member. Because that lookup can fail with complex enums, EnumType

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 01286017c3345e2b8a0af2bd48f6eb2087693a82 by Miss Islington (bot) in branch '3.10': bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649) (GH-26653) https://github.com/python/cpyt

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 304ec53b53021ceddf62a38e66a06aed37e2ac41 by Miss Islington (bot) in branch '3.9': bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649) (GH-26652) https://github.com/python/cpyt

[issue44342] enum with inherited type won't pickle

2021-06-10 Thread Ethan Furman
Change by Ethan Furman : -- keywords: +patch pull_requests: +25244 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26658 ___ Python tracker <https://bugs.python.org/issu

[issue44342] enum with inherited type won't pickle

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 62f1d2b3d7dda99598d053e10b785c463fdcf591 by Ethan Furman in branch 'main': bpo-44342: [Enum] changed pickling from by-value to by-name (GH-26658) https://github.com/python/cpython/commit/62f1d2b3d7dda99598d053e10b785c

[issue44342] enum with inherited type won't pickle

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset b613132861839b6d05b67138842b579e1af29f9c by Miss Islington (bot) in branch '3.10': bpo-44342: [Enum] changed pickling from by-value to by-name (GH-26658) (GH-26660) https://github.com/python/cpyt

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