[issue34282] Enum._convert shadows members named _convert

2018-07-30 Thread orlnub123
New submission from orlnub123 : If an enum has a member named _convert it gets shadowed by the _convert method as shown below. >>> import enum >>> >>> class Test(enum.Enum): ... _convert = enum.auto() ... >>> Test._convert > I've came up with

[issue34282] Enum._convert shadows members named _convert

2018-07-30 Thread orlnub123
Change by orlnub123 : -- keywords: +patch pull_requests: +8080 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34282> ___ ___ Python-

[issue34443] enum repr should use __qualname__

2018-08-31 Thread orlnub123
orlnub123 added the comment: After some thinking I've come to the conclusion that making the __str__s use the fully qualified name was a bad idea. I've closed my PR. -- ___ Python tracker <https://bugs.python.org/issue34

[issue34282] Enum._convert shadows members named _convert

2018-09-01 Thread orlnub123
orlnub123 added the comment: > For versions 3.6 and 3.7 the solution is to modify the shadow check at line > 236 so only DynamicClassAttributes are /not/ shadowed (meaning the _convert > method would be shadowed by an _convert member). Doing that might not be backwards-compatible

[issue34282] Enum._convert shadows members named _convert

2018-09-01 Thread orlnub123
orlnub123 added the comment: > Fixing bugs is often not backwards-compatible. ;) I think the number > of affected people here will be low, though, because anybody who had an > _convert member should have noticed that they couldn't use it. I think we had a misunderstanding, my

[issue34443] enum repr should use __qualname__

2018-08-30 Thread orlnub123
orlnub123 added the comment: I've created a separate PR that also changes the __str__s. -- nosy: +orlnub123 ___ Python tracker <https://bugs.python.org/issue34

[issue34443] enum repr should use __qualname__

2018-08-30 Thread orlnub123
Change by orlnub123 : -- pull_requests: +8481 ___ Python tracker <https://bugs.python.org/issue34443> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34282] Enum._convert shadows members named _convert

2018-09-02 Thread orlnub123
Change by orlnub123 : -- pull_requests: +8496 ___ Python tracker <https://bugs.python.org/issue34282> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34282] Enum._convert shadows members named _convert

2018-10-21 Thread orlnub123
Change by orlnub123 : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35101] inspect.findsource breaks on class frame objects

2018-10-28 Thread orlnub123
New submission from orlnub123 : If you pass a frame object belonging to a class into findsource, it'll incorrectly give you the starting line number of the first function above it or 0 if no functions are defined. Here's some code to reproduce the issue: import inspect def test_func

[issue35101] inspect.findsource breaks on class frame objects

2018-10-28 Thread orlnub123
Change by orlnub123 : -- keywords: +patch pull_requests: +9527 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35101> ___ ___ Python-

[issue35105] Document that CPython accepts "invalid" identifiers

2018-10-31 Thread orlnub123
orlnub123 added the comment: I'd argue that it's an implementation detail. Documenting it might be nice as some projects such as pytest do use it but I don't think it would make sense in setattr() or getattr() since all they do (at least in this case) is assign/retrieve from the __dict__

[issue35105] Document that CPython accepts "invalid" identifiers

2018-10-31 Thread orlnub123
orlnub123 added the comment: The customizing attribute access section of the data model might be a suitable place. -- ___ Python tracker <https://bugs.python.org/issue35

[issue35101] inspect.findsource breaks on class frame objects

2018-10-31 Thread orlnub123
orlnub123 added the comment: Added the requested test cases. They aren't an exact match but they should serve the same purpose. -- ___ Python tracker <https://bugs.python.org/issue35

[issue35105] Document that CPython accepts "invalid" identifiers

2018-11-05 Thread orlnub123
orlnub123 added the comment: I take back my previous suggestion, I agree that documenting it in setattr() (and **kwargs) is the way to go. It's obvious that you can assign anything to the __dict__, since it represents a dict, but setattr() is more ambiguous. 'Anything' was the key word

[issue34819] Executor.map and as_completed timeouts are able to deviate

2018-09-27 Thread orlnub123
orlnub123 added the comment: Happy to help! I'm surprised it got merged so quickly, amazing response times all-around. -- ___ Python tracker <https://bugs.python.org/issue34

[issue34819] Executor.map and as_completed timeouts are able to deviate

2018-09-27 Thread orlnub123
New submission from orlnub123 : The map and as_completed functions can randomly timeout earlier or later due to NTP stepping the clock or something changing the time and/or date. Here's some code to reproduce the issue for map: import concurrent.futures import time

[issue34819] Executor.map and as_completed timeouts are able to deviate

2018-09-27 Thread orlnub123
Change by orlnub123 : -- keywords: +patch pull_requests: +8996 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34819> ___ ___ Python-

[issue36827] Overriding __new__ method with itself changes behaviour of the class

2019-06-05 Thread orlnub123
orlnub123 added the comment: The comments in object's source explain the rationale behind this: /* You may wonder why object.__new__() only complains about arguments when object.__init__() is not overridden, and vice versa. Consider the use cases: 1. When neither is overridden, we