[issue1644818] Allow importing built-in submodules

2009-12-18 Thread Julien Danjou
Julien Danjou jul...@danjou.info added the comment: Is there to chance to see this *bug* fixed someday? -- nosy: +jd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1644818

[issue18191] urllib2/urllib.parse.splitport does not handle IPv6 correctly

2013-06-11 Thread Julien Danjou
New submission from Julien Danjou: import urllib.parse urllib.parse.splitport(::1) (':', '1') This is obviously invalid. -- components: Library (Lib) messages: 190968 nosy: jd priority: normal severity: normal status: open title: urllib2/urllib.parse.splitport does not handle IPv6

[issue18191] urllib2/urllib.parse.splitport does not handle IPv6 correctly

2013-06-12 Thread Julien Danjou
Julien Danjou added the comment: Attached is a patch inspired by a function written for OpenStack Oslo library. -- keywords: +patch Added file: http://bugs.python.org/file30558/0001-Make-urllib.parse.splitport-handle-IPv6-correctly.patch ___ Python

[issue37961] Tracemalloc traces do not include original stack trace length

2019-08-27 Thread Julien Danjou
New submission from Julien Danjou : When using the tracemalloc module, the maximum number of frames that are captured is specified at startup via a value to the `start` method. However, if the number of frames is truncated, there's no way to know the original length of the stack traces

[issue37961] Tracemalloc traces do not include original stack trace length

2019-08-27 Thread Julien Danjou
Change by Julien Danjou : -- keywords: +patch pull_requests: +15222 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15545 ___ Python tracker <https://bugs.python.org/issu

[issue37961] Tracemalloc traces do not include original stack trace length

2019-08-30 Thread Julien Danjou
Julien Danjou added the comment: > In fact, I didn't check: maybe traceback_t size is not change by your PR, > because of memory aligment and padding. It is changed. The current size is should be determined by sizeof(Py_uhash_t + int + int) which is 4 + 4 + 4, so 12 aligned/padded.

[issue37961] Tracemalloc traces do not include original stack trace length

2019-08-29 Thread Julien Danjou
Julien Danjou added the comment: That's a good question. Considering that Py_DEFAULT_RECURSION_LIMIT is 1000, we could probably settle on 2 bytes by using an uint16_t which ought to be enough unless people regularly trace Python stack traces bigger that are bigger than 2^16

[issue1021318] PyThreadState_Next not thread safe

2019-12-10 Thread Julien Danjou
Julien Danjou added the comment: This is actually true and it's quite easy to produce a bug that triggers a segmentation fault when iterating over a large list of threads create dynamically. That makes PyThreadState_Next barely usable for any program that has a few threads. The head mutex

[issue1021318] PyThreadState_Next not thread safe

2019-12-10 Thread Julien Danjou
Julien Danjou added the comment: It'd be great if you could reopen it. I'm interested in fixing it properly. It's impossible to "solve" in Python 2 since the head mutex is not accessible (it's static in pystate.c) but this is doable with Python 3 (yay). We'd simply need to provide

[issue1021318] PyThreadState_Next not thread safe

2019-12-10 Thread Julien Danjou
Julien Danjou added the comment: Yes, that's the one  -- ___ Python tracker <https://bugs.python.org/issue1021318> ___ ___ Python-bugs-list mailing list Unsub

[issue1021318] PyThreadState_Next not thread safe

2019-12-11 Thread Julien Danjou
Julien Danjou added the comment: Victor, do you have an idea of how you would like this mutex to be exposed? I see it only recently changed in Python 3.7 to be part of a structure, though this structure is not public AFAIU. Is adding 2 new lock/unlock C functions good enough

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-03-03 Thread Julien Danjou
Julien Danjou added the comment: Right, though if you read the code I linked, the PyGC_Head size is never used. AFAICS the Cython code does not access it either (at least not directly). The code segfaults at import time. I'm not even sure it's possible and the problem isn't in something

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-03-03 Thread Julien Danjou
Julien Danjou added the comment: The problem is that AFAIK the wheel system does not allow you to specify and provide a wheel for each minor Python version. For references, the code that segfaults is: https://github.com/DataDog/dd-trace-py/blob/master/ddtrace/profile/collector/stack.pyx

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-11 Thread Julien Danjou
Julien Danjou added the comment: > If you want to ship wheel package, another compromise would be to require > Python 3.7.5 or newer, and check early the Python version. Yes, this is what I do now to avoid getting a segmentation fault. I'm fine with closing this as wontfix or reject

[issue39599] ABI breakage between 3.7.4 and 3.7.5

2020-02-10 Thread Julien Danjou
New submission from Julien Danjou : As I've reported originally on the python-dev list, there seems to be an ABI breakage between 3.7.4 and 3.7.5. https://mail.python.org/archives/list/python-...@python.org/message/J2FGZPS5PS7473TONJTPAVSNXRGV3TFL/ The culprit commit is https://github.com

[issue39164] PyErr_GetExcInfo does not allow to retrieve for an arbitrary thread

2019-12-30 Thread Julien Danjou
Change by Julien Danjou : -- keywords: +patch pull_requests: +17188 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17752 ___ Python tracker <https://bugs.python.org/issu

[issue39164] PyErr_GetExcInfo does not allow to retrieve for an arbitrary thread

2019-12-30 Thread Julien Danjou
Julien Danjou added the comment: Relevant python-dev thread: https://mail.python.org/archives/list/python-...@python.org/thread/QVMFP76R35SXUIM2WPPVPV5XCVMKPDEB/#TLP6MWNML4PRKFFGXHCKNEUMN6UIQ4MT -- ___ Python tracker <https://bugs.python.

[issue39164] PyErr_GetExcInfo does not allow to retrieve for an arbitrary thread

2019-12-30 Thread Julien Danjou
New submission from Julien Danjou : PyErr_GetExcInfo does not allow to retrieve exception information for an arbitrary thread. As it calls `_PyThreadState_GET` itself, it's impossible to get exception information for a different thread. -- components: C API messages: 359029 nosy: jd

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Julien Danjou
New submission from Julien Danjou : The function _PyErr_GetTopmostException() is not exported and is useful to get access to exceptions info from a PyThreadState. -- components: C API messages: 368327 nosy: jd priority: normal severity: normal status: open title: Expose

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Julien Danjou
Julien Danjou added the comment: I would definitely love to have a public API for this. Would `PyErr_GetTopmostException` be a good candidate for this? (I can open a different bug report if needed) -- ___ Python tracker <https://bugs.python.

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Julien Danjou
Change by Julien Danjou : -- keywords: +patch pull_requests: +19292 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19977 ___ Python tracker <https://bugs.python.org/issu

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Julien Danjou
Julien Danjou added the comment: PyErr_GetExcInfo() does not allow to specify a PyThreadState as argument. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Julien Danjou
Julien Danjou added the comment: I confirm what Victor wrote. :) -- ___ Python tracker <https://bugs.python.org/issue40545> ___ ___ Python-bugs-list mailin

[issue41435] Allow to retrieve ongoing exception handled by every threads

2020-07-30 Thread Julien Danjou
Change by Julien Danjou : -- keywords: +patch pull_requests: +20832 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21689 ___ Python tracker <https://bugs.python.org/issu

[issue41435] Allow to retrieve ongoing exception handled by every threads

2020-08-03 Thread Julien Danjou
Julien Danjou added the comment: Adding to the thread object might be a good idea, but it does not work if you ever start threads with the low-level `_thread` API. It's also a different design from the existing `sys._current_frames`. Adding it on top of a frame is interesting though. I think

[issue41435] Allow to retrieve ongoing exception handled by every threads

2020-07-29 Thread Julien Danjou
New submission from Julien Danjou : In order to do statistical profiling on raised exception, having the ability to poll all the running threads for their currently handled exception would be fantastic. There is an exposed function named `sys._current_frames()` that allows to list

[issue42647] Unable to use concurrent.futures in atexit hook

2020-12-15 Thread Julien Danjou
New submission from Julien Danjou : Python 3.9 introduced a regression with concurrent.futures. The following program works fine on Python < 3.8 but raises an error on 3.9: ``` import atexit import concurrent.futures def spawn(): with concurrent.futures.ThreadPoolExecutor() a

[issue42647] Unable to use concurrent.futures in atexit hook

2021-02-01 Thread Julien Danjou
Julien Danjou added the comment: > Is there a real-world situation where it's specifically necessary or even > beneficial to utilize ThreadPoolExecutor at this point after thread > finalization rather than earlier in the program? Not that it doesn't exist, > but to me it intui