[issue44666] compileall.compile_file fails when sys.stdout is redirected to StringIO

2021-07-19 Thread Stefan Hölzl
Change by Stefan Hölzl : -- keywords: +patch pull_requests: +25784 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27236 ___ Python tracker <https://bugs.python.org/issu

[issue44666] compileall.compile_file fails when sys.stdout is redirected to StringIO

2021-07-18 Thread Stefan Hölzl
New submission from Stefan Hölzl : compile_files tries to escape non-printable characters in error messages by using sys.stdout.encoding https://github.com/python/cpython/blob/main/Lib/compileall.py#L256 when using contextlib.redirect_stdout to redirect stdout to io.StringIO as explained

[issue36928] linkt threading.settrace to sys.settrace

2019-05-15 Thread Stefan Hölzl
Change by Stefan Hölzl : -- keywords: +patch pull_requests: +13255 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue36928] linkt threading.settrace to sys.settrace

2019-05-15 Thread Stefan Hölzl
New submission from Stefan Hölzl : The documentation of sys.settrace suggest to call it from every created thread to enable tracing within threads. I would suggest to add a link to threading.settrace which automatically sets a trace function for every by threading module created thread. link

[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-05-11 Thread Stefan Hölzl
Stefan Hölzl added the comment: Here is a complete example. Please consider this is a very simple example just to demonstrate what would be possible with my proposed changes. In the following example you can see two things: * saving informations about the context in which a workload

[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-05-10 Thread Stefan Hölzl
Stefan Hölzl added the comment: It would allow to use Futures with a customized interface for a specific domain. e.g. to not only save the result of a task but also some context informations or provide properties/methods which are result specific. But when subclassing Future the builtin Thread

[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-04-02 Thread Stefan Hölzl
Change by Stefan Hölzl : -- keywords: +patch pull_requests: +12596 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36512> ___ ___ Py

[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-04-02 Thread Stefan Hölzl
New submission from Stefan Hölzl : adding a future_factory argument to Thread/ProcessPoolExecutor to control which type of Future should be created by Executor.submit -- components: Library (Lib) messages: 339364 nosy: stefanhoelzl priority: normal severity: normal status: open title