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
Ethan Furman added the comment:
Excellent bug report.
But what is an `UnexpectedString()` ?
--
___
Python tracker
<https://bugs.python.org/issue44356>
___
___
Change by Ethan Furman :
--
assignee: -> ethan.furman
nosy: +ethan.furman
versions: +Python 3.10, Python 3.11
___
Python tracker
<https://bugs.python.org/issu
Change by Ethan Furman :
--
assignee: -> ethan.furman
nosy: +ethan.furman
___
Python tracker
<https://bugs.python.org/issue44342>
___
___
Python-bugs-list mai
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
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
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
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
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
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.
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
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
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
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
Ethan Furman added the comment:
Looks good. Patches welcome. :-)
--
nosy: +ethan.furman
___
Python tracker
<https://bugs.python.org/issue44174>
___
___
Pytho
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
Change by Ethan Furman :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ethan Furman :
--
pull_requests: +24483
pull_request: https://github.com/python/cpython/pull/25793
___
Python tracker
<https://bugs.python.org/issue43
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
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>
___
___
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
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
Change by Ethan Furman :
--
pull_requests: +24360
pull_request: https://github.com/python/cpython/pull/25670
___
Python tracker
<https://bugs.python.org/issue42
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
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
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
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
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
Ethan Furman added the comment:
Pablo, did my latest patch resolved the errors?
--
___
Python tracker
<https://bugs.python.org/issue38659>
___
___
Python-bug
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
Change by Ethan Furman :
--
pull_requests: +24285
pull_request: https://github.com/python/cpython/pull/25566
___
Python tracker
<https://bugs.python.org/issue38
Ethan Furman added the comment:
My apologies, I was having hardware issues.
Checking it out now.
--
___
Python tracker
<https://bugs.python.org/issue38
Ethan Furman added the comment:
Actually, I think that fixed the refleak issue as well.
Thanks, Ammar!
--
___
Python tracker
<https://bugs.python.org/issue38
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
Ethan Furman added the comment:
`format` issue resolved, but not the refleak issue.
--
___
Python tracker
<https://bugs.python.org/issue38659>
___
___
Python-bug
Change by Ethan Furman :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Change by Ethan Furman :
--
pull_requests: +24219
pull_request: https://github.com/python/cpython/pull/25497
___
Python tracker
<https://bugs.python.org/issue38
Change by Ethan Furman :
--
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue38659>
___
___
Python-bugs-list mailing list
Unsub
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
Change by Ethan Furman :
--
Removed message: https://bugs.python.org/msg391419
___
Python tracker
<https://bugs.python.org/issue42854>
___
___
Python-bugs-list m
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
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
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
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
Change by Ethan Furman :
--
pull_requests: +24202
pull_request: https://github.com/python/cpython/pull/25476
___
Python tracker
<https://bugs.python.org/issue38
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
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/
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
Change by Ethan Furman :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
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
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
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
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
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
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
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
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
Change by Ethan Furman :
--
pull_requests: +24103
pull_request: https://github.com/python/cpython/pull/25370
___
Python tracker
<https://bugs.python.org/issue42
Change by Ethan Furman :
--
pull_requests: +24102
pull_request: https://github.com/python/cpython/pull/25369
___
Python tracker
<https://bugs.python.org/issue42
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
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
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
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
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`
Change by Ethan Furman :
--
stage: patch review -> needs patch
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue39102>
___
_
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
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
Change by Ethan Furman :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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.&
Change by Ethan Furman :
--
pull_requests: +23862
pull_request: https://github.com/python/cpython/pull/25118
___
Python tracker
<https://bugs.python.org/issue40
Change by Ethan Furman :
--
pull_requests: +23861
pull_request: https://github.com/python/cpython/pull/25116
___
Python tracker
<https://bugs.python.org/issue40
Ethan Furman added the comment:
Note that this only appears to be a problem under CI.
--
___
Python tracker
<https://bugs.python.org/issue43681>
___
___
Pytho
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
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
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
Change by Ethan Furman :
--
assignee: -> ethan.furman
___
Python tracker
<https://bugs.python.org/issue43430>
___
___
Python-bugs-list mailing list
Unsubscrib
Ethan Furman added the comment:
You're welcome. Thank you for pushing the issue! :-)
--
___
Python tracker
<https://bugs.python.org/issue43162>
___
___
Pytho
Change by Ethan Furman :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
Change by Ethan Furman :
--
assignee: -> ethan.furman
nosy: +ethan.furman
___
Python tracker
<https://bugs.python.org/issue43098>
___
___
Python-bugs-list mai
Change by Ethan Furman :
--
pull_requests: +23277
pull_request: https://github.com/python/cpython/pull/24487
___
Python tracker
<https://bugs.python.org/issue43
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__
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
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
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
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
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
Change by Ethan Furman :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Change by Ethan Furman :
--
Removed message: https://bugs.python.org/msg386099
___
Python tracker
<https://bugs.python.org/issue35815>
___
___
Python-bugs-list m
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
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
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
Change by Ethan Furman :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
201 - 300 of 1854 matches
Mail list logo