[issue46269] '__new__' is never shown in `dir(SomeEnum)`

2022-01-14 Thread Nikita Sobolev
Change by Nikita Sobolev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46269] '__new__' is never shown in `dir(SomeEnum)`

2022-01-05 Thread Ethan Furman
Ethan Furman added the comment: New changeset 817a6bc9f7b802511c4d42273a621c556a48870b by Nikita Sobolev in branch 'main': bpo-46269: [Enum] remove special-casing of `__new__` in `EnumType.__dir__` (GH-30421) https://github.com/python/cpython/commit/817a6bc9f7b802511c4d42273a621c556a48870b

[issue46269] '__new__' is never shown in `dir(SomeEnum)`

2022-01-05 Thread Alex Waygood
Alex Waygood added the comment: Thanks, Nikita! My bad for not adding tests for __new__ in PR 29316. To confirm: yes, my idea in PR 29316 was that "__new__" (along with most enum dunders) should not show up in the output of dir(Enum), but should show up in dir(EnumSubclass) if and only if

[issue46269] '__new__' is never shown in `dir(SomeEnum)`

2022-01-05 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28625 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30421 ___ Python tracker ___

[issue46269] '__new__' is never shown in `dir(SomeEnum)`

2022-01-05 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now `__new__` is marked to be special-cased in `Enum.__dir__`. It is generally ignored: But, (I think that was the original idea), when `__new__` is overridden, it should be added to the output. But, this line is problematic: