[issue46781] Tracing: c_return doesn't report the result

2022-02-17 Thread Matthias Urlichs
Matthias Urlichs added the comment: Added a github PR. Unfortunately it breaks the cprofile testcase, which apparently relies on the old argument value (for no good reason IMHO). I don't know how the profiler works internally. If somebody who does could have a look at it and/or its testcase

[issue46781] Tracing: c_return doesn't report the result

2022-02-17 Thread Matthias Urlichs
Change by Matthias Urlichs : -- keywords: +patch pull_requests: +29537 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31393 ___ Python tracker <https://bugs.python.org/issu

[issue46781] Tracing: c_return doesn't report the result

2022-02-17 Thread Matthias Urlichs
Matthias Urlichs added the comment: Likewise for c_exception, which should report the exception thruple -- and even has an XXX comment reminding us to fix that (ceval.c 4542). -- ___ Python tracker <https://bugs.python.org/issue46

[issue46781] Tracing: c_return doesn't report the result

2022-02-17 Thread Matthias Urlichs
New submission from Matthias Urlichs : When tracing/profiling, the "return" event reports the value returned by the exiting function. However, this does not work for C functions. The profiler's "c_return" hook is called with the same C function object as "c_

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-09 Thread Matthias Urlichs
Matthias Urlichs added the comment: Please do. However, I do think that changing the stdstream related ioctl calls also is a good idea, if only for code regularity/completeness sake. (Besides, nothing prevents somebody from starting a FUSE file system and then redirecting stdout

[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-05-23 Thread Matthias Urlichs
New submission from Matthias Urlichs : Opening a file calls `isatty` which calls an ioctl with the GIL held. GDB: ``` #0 __GI___tcgetattr (fd=18, termios_p=termios_p@entry=0x7f618a5df920) at ../sysdeps/unix/sysv/linux/tcgetattr.c:38 #1 0x7f618bd1ca0c in __isatty (fd=) at ../sysdeps

[issue43744] enum: Adding a member named _classname__ raises IndexError

2021-04-06 Thread Matthias Urlichs
Change by Matthias Urlichs : -- title: enum: Adding a member named _anything__ raises IndexError -> enum: Adding a member named _classname__ raises IndexError ___ Python tracker <https://bugs.python.org/issu

[issue43744] enum: Adding a member named _anything__ raises IndexError

2021-04-06 Thread Matthias Urlichs
Change by Matthias Urlichs : -- title: enum: Adding a var named _anything__ raises IndexError -> enum: Adding a member named _anything__ raises IndexError ___ Python tracker <https://bugs.python.org/issu

[issue43744] enum: Adding a var named _anything__ raises IndexError

2021-04-06 Thread Matthias Urlichs
New submission from Matthias Urlichs : While checking out the Enum implementation I noticed that this code snippet results in an IndexError. I have no idea which error or warning (if any) this should generate instead. Opinions? import enum class duh(enum.Enum): _duh__ = &quo

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2018-10-03 Thread Matthias Urlichs
Change by Matthias Urlichs : -- versions: +Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue20504> ___ ___ Python-bugs-list mailin

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2018-10-03 Thread Matthias Urlichs
Matthias Urlichs added the comment: Owch, yeah, this fell off the radar. Anyway, I've signed the CLA, so if somebody could finish and apply this I'd be grateful. Myself, I unfortunately don't have the time. -- ___ Python tracker <ht

[issue33242] Support binary symbol names

2018-04-08 Thread Matthias Urlichs
Matthias Urlichs <sm...@smurf.noris.de> added the comment: Well, the original problem remains: symbol names aren't constrained to UTF-8 … so if I happen to stumble onto one of those (maybe generated by a code obfuscator), the answer is "don't

[issue33242] Support binary symbol names

2018-04-08 Thread Matthias Urlichs
New submission from Matthias Urlichs <sm...@smurf.noris.de>: ctypes should support binary symbols. Rationale: There's no requirement that the symbol name in question is encoded as ASCII or UTF-8. >>> import ctypes >>> t = type('iface', (ctypes.Structure,), {'_field

[issue32850] Run gc_collect() before complaining about dangling threads

2018-03-27 Thread Matthias Urlichs
Matthias Urlichs <sm...@smurf.noris.de> added the comment: > It's a deliberate choice. It helped me to find real bugs. For example, I > found a very old reference cycle in socket.create_connection(). Fair enough; I will change the patch to complain b

[issue32850] Run gc_collect() before complaining about dangling threads

2018-03-27 Thread Matthias Urlichs
Matthias Urlichs <sm...@smurf.noris.de> added the comment: Apparently this patch has not been applied yet. Is there a reason for that, besides "it's obviously correct so there must be something wrong with it"? ;-) -- ___ Pyt

[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread Matthias Urlichs
Matthias Urlichs <sm...@smurf.noris.de> added the comment: Ah. Thank you for pointing me to that feature, I completely missed it. The proposed enhancement thus boils down to "implement a couple of pdb commands to display and modify this skip list". I'm +1 on keeping the defa

[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread Matthias Urlichs
Matthias Urlichs <sm...@smurf.noris.de> added the comment: *Sigh*. ... if you need Python 3.5 compatibility ... obviously. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32900] Teach pdb to step through asyncio et al.

2018-02-22 Thread Matthias Urlichs
Matthias Urlichs <sm...@smurf.noris.de> added the comment: "Example of a problem"? Well, just single-step into, and then back out of, an @asynccontextmanager-decorated function. @asynccontextmanager async def gen(): yield 1234 async def foo(): import pdb;pdb.set_t

[issue32900] Teach pdb to step through asyncio et al.

2018-02-21 Thread Matthias Urlichs
Matthias Urlichs <sm...@smurf.noris.de> added the comment: File attachment failed, retrying … -- keywords: +patch Added file: https://bugs.python.org/file47456/pdb.diff ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32900] Teach pdb to step through asyncio et al.

2018-02-21 Thread Matthias Urlichs
New submission from Matthias Urlichs <sm...@smurf.noris.de>: The attached patch is a proof-of-concept implementation of a way to teach pdb to "single-step" through non-interesting code that you can't skip with "n". The prime example for this is asyncio, trio et a

[issue32850] Run gc_collect() before complaining about dangling threads

2018-02-15 Thread Matthias Urlichs
Matthias Urlichs <sm...@smurf.noris.de> added the comment: Upon further consideration (and following the observation that my test cases no longer block for two seconds each after applying the first version of this patch): we do not want to clear the reference to "dangling_thr

[issue32850] Run gc_collect() before complaining about dangling threads

2018-02-15 Thread Matthias Urlichs
New submission from Matthias Urlichs <sm...@smurf.noris.de>: Lib/test/support/__init__.py::threading_cleanup() complains about dangling threads even if the reference in question would be cleaned up by the garbage collector. This is not useful, esp. when the list of referrers to the &qu

[issue26789] Please do not log during shutdown

2016-04-17 Thread Matthias Urlichs
New submission from Matthias Urlichs: … or, if you do, ignore errors. This is during program shutdown. Unfortunately, I am unable to create a trivial example which exhibits the order of destruction necessary to trigger this problem. Traceback (most recent call last): File "/us

[issue2786] Names in traceback should have class names, if they're methods

2015-02-06 Thread Matthias Urlichs
Matthias Urlichs added the comment: Please do. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2786 ___ ___ Python-bugs-list mailing list

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2014-06-10 Thread Matthias Urlichs
Matthias Urlichs added the comment: Actually, the problem is cgi.py around line 550: clen = -1 if 'content-length' in self.headers: try: clen = int(self.headers['content-length']) except ValueError: pass

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2014-06-10 Thread Matthias Urlichs
Matthias Urlichs added the comment: Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file35551/cgi.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20504

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2014-06-10 Thread Matthias Urlichs
Matthias Urlichs added the comment: This also applies to 3.4 and 3.5. -- versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20504

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

2014-06-10 Thread Matthias Urlichs
New submission from Matthias Urlichs: This code in cgi.py makes no sense whatsoever: 842 if line.endswith(b--) and last_line_lfend: 843 strippedline = line.strip() 844 if strippedline == next_boundary: 845 break 846

[issue21306] PEP 466: backport hmac.compare_digest

2014-05-30 Thread Matthias Urlichs
Matthias Urlichs added the comment: Currently (Debian's 2.7.7-rc1 package) hmac.compare_digest accepts two bytestring arguments, or two Unicode stings, but not one bytestring and one unicode. I don't think that's a good idea. -- nosy: +smurfix

[issue2722] os.getcwd fails for long path names on linux

2008-05-07 Thread Matthias Urlichs
Matthias Urlichs [EMAIL PROTECTED] added the comment: MAX_PATH is a compile time constant which, like FD_BITS for select(), may be too small for the system you're ultimately running on. Using that as default initial size is OK, but handling ERANGE is still a very good idea. -- nosy

[issue2786] Names in traceback should have class names, if they're methods

2008-05-07 Thread Matthias Urlichs
New submission from Matthias Urlichs [EMAIL PROTECTED]: Consider this simple error: class foo(object): ... def __init__(self,bar): ...pass ... foo() Traceback (most recent call last): File stdin, line 1, in module TypeError: __init__() takes exactly 2 positional arguments (1 given