[issue45110] argparse repeats itself when formatting help metavars

2021-09-11 Thread Lewis Gaul
Lewis Gaul added the comment: Big +1 from me for at least supporting a way to get the more concise output. I've never understood the verbosity of python's argparse where the metavar is repeated. -- nosy: +LewisGaul ___ Python track

[issue43080] pprint for dataclass instances

2021-03-16 Thread Lewis Gaul
Lewis Gaul added the comment: > FWIW, we've not had a feature request for this ever, nor has there been a > request for pprint to support attrs, nor any other hand-rolled class that > implements methods similar to those generated by dataclasses. I wouldn't expect core

[issue19073] Inability to specific __qualname__ as a property on a class instance.

2021-02-20 Thread Lewis Gaul
Lewis Gaul added the comment: This would also be useful for me - I just hit this same problem. If someone could give some guidance on how to make this change I'd be happy to put up a PR. -- nosy: +LewisGaul ___ Python tracker &

[issue43080] pprint for dataclass instances

2021-01-31 Thread Lewis Gaul
Lewis Gaul added the comment: @Serhiy - Yes, I noted that problem in the PR. Thanks for pointing me to that issue, I agree it would be good to make pprint properly extensible (my current solution is to maintain a fork of the pprint module with dataclass support added). Eric's sugge

[issue43080] pprint for dataclass instances

2021-01-31 Thread Lewis Gaul
Lewis Gaul added the comment: > a dataclass can do anything a regular class can do Agreed, but isn't that also true of any subclasses of currently supported types? In particular 'UserDict', 'UserList' and 'UserString', which all have explicit support

[issue43080] pprint for dataclass instances

2021-01-30 Thread Lewis Gaul
Change by Lewis Gaul : -- keywords: +patch pull_requests: +23204 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24389 ___ Python tracker <https://bugs.python.org/issu

[issue43080] pprint for dataclass instances

2021-01-30 Thread Lewis Gaul
New submission from Lewis Gaul : Currently the pprint module does not have support for dataclasses. I have implemented support for this and will link the PR once I have the issue number! See also issue37376 for SimpleNamespace support. -- components: Library (Lib) messages: 386002

[issue38865] [subinterpreters] Can Py_Finalize() be called if the current interpreter is not the main interpreter?

2020-10-25 Thread Lewis Gaul
Change by Lewis Gaul : -- pull_requests: +21889 pull_request: https://github.com/python/cpython/pull/17575 ___ Python tracker <https://bugs.python.org/issue38

[issue37776] [subinterpreters] Test Py_Finalize() from a subinterpreter

2020-10-25 Thread Lewis Gaul
Change by Lewis Gaul : -- keywords: +patch pull_requests: +21890 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17575 ___ Python tracker <https://bugs.python.org/issu

[issue38865] [subinterpreters] Can Py_Finalize() be called if the current interpreter is not the main interpreter?

2020-10-22 Thread Lewis Gaul
Change by Lewis Gaul : -- pull_requests: -21778 ___ Python tracker <https://bugs.python.org/issue38865> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38865] [subinterpreters] Can Py_Finalize() be called if the current interpreter is not the main interpreter?

2020-10-20 Thread Lewis Gaul
Change by Lewis Gaul : -- nosy: +LewisGaul nosy_count: 4.0 -> 5.0 pull_requests: +21778 pull_request: https://github.com/python/cpython/pull/17575 ___ Python tracker <https://bugs.python.org/issu

[issue38379] finalizer resurrection in gc

2020-08-16 Thread Lewis Gaul
Lewis Gaul added the comment: You're right that's how I had interpreted it, thanks for clarifying. I was wondering if this could be related to an issue I've hit with gc.collect() getting slower and slower in a test suite, but that now seems unlikely, so I won'

[issue38379] finalizer resurrection in gc

2020-08-16 Thread Lewis Gaul
Lewis Gaul added the comment: I noticed this bug is mentioned in the 3.9 release notes with a note similar to the title of the 4th PR: "garbage collection does not block on resurrected objects". I can't see any mention of a blocking issue here on the issue: > The bu

[issue37776] Test Py_Finalize() from a subinterpreter

2019-12-13 Thread Lewis Gaul
Lewis Gaul added the comment: It seems that test_audit_subinterpreter() in _testembed.c was (unintentionally?) doing this already. After fixing #36225 I found this testcase causes a segfault, but works fine when switching back to the main threadstate before calling Py_Finalize(). So it

[issue39030] Ctypes unions with bitfield members that do not share memory

2019-12-12 Thread Lewis Gaul
Change by Lewis Gaul : -- nosy: +LewisGaul, belopolsky ___ Python tracker <https://bugs.python.org/issue39030> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-12-11 Thread Lewis Gaul
Change by Lewis Gaul : -- pull_requests: +17048 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17575 ___ Python tracker <https://bugs.python.org/issu

[issue38860] GenericPyCData_new does not invoke new or init

2019-12-11 Thread Lewis Gaul
Change by Lewis Gaul : -- nosy: +LewisGaul, aeros ___ Python tracker <https://bugs.python.org/issue38860> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37292] _xxsubinterpreters: Can't unpickle objects defined in __main__

2019-11-24 Thread Lewis Gaul
Lewis Gaul added the comment: The relevant code for the multiprocessing example seems to be in Lib/multiprocessing/spawn.py. I think I get what it's doing, but I'm not sure whether we actually need something similar for subinterpreters. Any thoughts

[issue37292] _xxsubinterpreters: Can't unpickle objects defined in __main__

2019-11-24 Thread Lewis Gaul
Lewis Gaul added the comment: Just to move the conversation from the subinterpreters project repo to here... I'm going to take a look at how this is done by subprocess using the example provided by Guido: import os from concurrent.futures import ProcessPoolExecutor from multiproce

[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-11-21 Thread Lewis Gaul
Lewis Gaul added the comment: I've put together a test along the lines of what Nick suggested, see the attached patch. Running this hits the Fatal 'remaining subinterpreters' error as expected: ``` > ./Programs/_testembed test_bpo36225 --- Pass 0 --- interp 0 <0x1

[issue38880] Subinterpreters: List interpreters associated with a channel end

2019-11-21 Thread Lewis Gaul
Change by Lewis Gaul : -- keywords: +patch pull_requests: +16810 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17323 ___ Python tracker <https://bugs.python.org/issu

[issue38880] Subinterpreters: List interpreters associated with a channel end

2019-11-21 Thread Lewis Gaul
New submission from Lewis Gaul : The public interpreters API being implemented for PEP 554 requires the ability to list interpreters associated with channel ends. This functionality needs adding in the internal subinterpreters module. See https://github.com/ericsnowcurrently/multi-core

[issue16142] ArgumentParser inconsistent with parse_known_args

2019-11-12 Thread Lewis Gaul
Change by Lewis Gaul : -- nosy: +aeros ___ Python tracker <https://bugs.python.org/issue16142> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27994] In the argparse help(argparse) prints weird comments instead of good docstrings

2019-11-04 Thread Lewis Gaul
Change by Lewis Gaul : -- nosy: +aeros ___ Python tracker <https://bugs.python.org/issue27994> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27994] In the argparse help(argparse) prints weird comments instead of good docstrings

2019-11-04 Thread Lewis Gaul
Lewis Gaul added the comment: This doesn't seem to be the case [anymore] to me, should this be closed? -- nosy: +Lewis Gaul ___ Python tracker <https://bugs.python.org/is

[issue38475] Break Statement

2019-11-04 Thread Lewis Gaul
Lewis Gaul added the comment: Should this issue be closed? -- nosy: +Lewis Gaul ___ Python tracker <https://bugs.python.org/issue38475> ___ ___ Python-bug

[issue23692] Undocumented feature prevents re module from finding certain matches

2019-10-29 Thread Lewis Gaul
Lewis Gaul added the comment: Thanks for the explanation Matthew, I'll take a further look at some point in the coming weeks. -- ___ Python tracker <https://bugs.python.org/is

[issue22491] Support Unicode line boundaries in regular expression

2019-10-27 Thread Lewis Gaul
Lewis Gaul added the comment: Hi there, I'm running 'EnHackathon' in a couple of weeks, and was wondering if this could be a good issue for a small team of first-time contributors with experience in C to work on. Would anyone be able to offer any guidance for where to s

[issue23692] Undocumented feature prevents re module from finding certain matches

2019-10-27 Thread Lewis Gaul
Lewis Gaul added the comment: Hi there, if anyone's able to provide any guidance on this issue I'd be happy to take a look into it. Is this a behaviour that is feasible to fix, or should this just be documented in some way as suggested by Evgeny? -- nosy: +

[issue21002] _sre.SRE_Scanner object should have a fullmatch() method

2019-10-27 Thread Lewis Gaul
Lewis Gaul added the comment: Scanner is not documented in CPython's own re documentation: https://docs.python.org/3/library/re.html#regular-expression-objects, so I'd say there's no obligation to maintain consistency with public APIs. Is anyone able to make a call on whe

[issue38351] Modernize email example from %-formatting to f-string

2019-10-27 Thread Lewis Gaul
Lewis Gaul added the comment: Hi all, I'm a newcomer interested in making this small fix, but it looks like this has become a bit of a contentious issue. Are there any advances on whether this is a desirable fix? -- nosy: +Lewis Gaul ___ P