[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset 54b32c987146123f2237f0e21b1d02b1c1ebdf6f by T. Wouters (Brandt Bucher) in branch 'master': bpo-38823: Clean up refleak in fcntl module initialization. (GH-17236) https://github.com/python/cpython/commit/54b32c987146123f2237f0e21b1d02

[issue39104] ProcessPoolExecutor hangs on shutdown nowait with pickling failure

2019-12-19 Thread Thomas Moreau
New submission from Thomas Moreau : The attached scripts hangs on python3.7+. This is due to the fact that the main process closes the communication channels directly while the queue_management_thread might still use them. To prevent that, all the closing should be handled by the

[issue39104] ProcessPoolExecutor hangs on shutdown nowait with pickling failure

2019-12-19 Thread Thomas Moreau
Change by Thomas Moreau : -- keywords: +patch pull_requests: +17134 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17670 ___ Python tracker <https://bugs.python.org/issu

[issue38532] Missing decrefs in the _ctypes module

2020-01-03 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset e02ab59fdffa0bb841182c30ef1355c89578d945 by T. Wouters (Zackery Spytz) in branch 'master': bpo-38532: Add missing decrefs in PyCFuncPtr_FromDll() (GH-16857) https://github.com/python/cpython/commit/e02ab59fdffa0bb841182c30ef1355

[issue38532] Missing decrefs in the _ctypes module

2020-01-03 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset aa3efea9c5f4d25afc3fa4cfd5e6d789943893c9 by T. Wouters (Miss Islington (bot)) in branch '3.8': bpo-38532: Add missing decrefs in PyCFuncPtr_FromDll() (GH-17811) https://github.com/python/cpython/commit/aa3efea9c5f4d25afc3fa4cfd5e6d7

[issue38532] Missing decrefs in the _ctypes module

2020-01-03 Thread Thomas Wouters
Change by Thomas Wouters : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38532> ___ ___ Pyth

[issue28367] Add more standard baud rate constants to "termios"

2020-01-04 Thread Thomas Wouters
Change by Thomas Wouters : -- stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/i

[issue28367] Add more standard baud rate constants to "termios"

2020-01-04 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset 7dc72b8d4f2c9d1eed20f314fd6425eab66cbc89 by T. Wouters (Anthony Shaw) in branch 'master': bpo-28367: Add additional baud rates for termios (GH-13142) https://github.com/python/cpython/commit/7dc72b8d4f2c9d1eed20f314fd6425

[issue39260] find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread Thomas Passin
New submission from Thomas Passin : On Windows, find_executable() in distutils.spawn may fail to find executables that it ought to. This is because the PATH environmental variable no longer includes %ProgramFiles% and %ProgramFiles(x86)%. At least, that is the case on my brand new Windows

[issue39260] distutils.spawn: find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread Thomas Passin
Thomas Passin added the comment: Well, yes, I realize that I could add the directories. But random users of find_executible may not realize that. Actually, it's probably a bit more complex than just adding the top-level directories %ProgramFiles% and %ProgramFiles(x86)%, be

[issue39260] distutils.spawn: find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread Thomas Passin
Thomas Passin added the comment: That's so, and with a bit more complexity might be worth doing. At least, it would be good to have *some* means to find more the the executable files one would expect to find. -- ___ Python tracker &

[issue39260] distutils.spawn: find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread Thomas Passin
Thomas Passin added the comment: I came across it while working on some code running in the Leo editor. I had no idea it was not really public; I just assumed that someone knew something I didn't. Then I discovered that it couldn't find some files I thought it clearly should,

[issue39277] _PyTime_FromDouble() fails to detect an integer overflow when converting a C double to a C int64_t

2020-01-09 Thread Thomas Grainger
New submission from Thomas Grainger : _PyTime_FromDouble() fails to detect an integer overflow when converting a C double to a C int64_t Python 3.7.5 (default, Nov 20 2019, 09:21:52) [GCC 9.2.1 20191008] on linux Type "help", "copyright", "credits" or

[issue39277] _PyTime_FromDouble() fails to detect an integer overflow when converting a C double to a C int64_t

2020-01-09 Thread Thomas Grainger
Change by Thomas Grainger : -- versions: -Python 2.7 ___ Python tracker <https://bugs.python.org/issue39277> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39501] gettext's default localedir does not match documentation

2020-01-30 Thread Thomas Perret
New submission from Thomas Perret : gettext's documentation (Doc/library/gettext.rst:724) states that default locale directory is: "sys.prefix/share/locale" but the code in gettext module (Lib/gettext.py:63) uses "sys.base_prefix/share/locale" -- assigne

[issue39598] ERR_CACHE_MISS

2020-02-10 Thread Thomas Reed
New submission from Thomas Reed : Hi, I have problem with cache. If there is someone in the detail of product longer that 5 minutes and than click to button "back",it makes error "ERR_CACHE_MISS". Do you know, how can i solve it? Thank you :) -- components: Wind

[issue39598] ERR_CACHE_MISS

2020-02-10 Thread Thomas Reed
Thomas Reed added the comment: No, normally browsing the web and products (without login in), after looking at the product details and then clicking the back button, the error will occur. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39598] ERR_CACHE_MISS

2020-02-10 Thread Thomas Reed
Thomas Reed added the comment: Alright, thanks. -- ___ Python tracker <https://bugs.python.org/issue39598> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39678] RFC improve readability of _queue_management_worker for ProcessPoolExecutor

2020-02-18 Thread Thomas Moreau
New submission from Thomas Moreau : As discussed in GH#17670, the the `_queue_management_worker` function has grown quite long and complicated. It could be turned into an object with a bunch of short and readable helper methods. -- components: Library (Lib) messages: 362218 nosy

[issue39678] RFC improve readability of _queue_management_worker for ProcessPoolExecutor

2020-02-18 Thread Thomas Moreau
Change by Thomas Moreau : -- keywords: +patch pull_requests: +17931 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18551 ___ Python tracker <https://bugs.python.org/issu

[issue29842] Make Executor.map work with infinite/large inputs correctly

2020-02-20 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +17948 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18566 ___ Python tracker <https://bugs.python.org/issu

[issue39931] Global variables are not accessible from child processes (multiprocessing.Pool)

2020-03-11 Thread Thomas Grainger
Thomas Grainger added the comment: yeah this is normal. on Python 3.8 mac multiprocessing switched to spawn you have to use https://docs.python.org/3/library/multiprocessing.shared_memory.html to share content between processes or pass it to be pickled in the args of imap_unordered https

[issue38891] ShareableList read and write access is O(N), should be O(1)

2020-03-14 Thread Thomas Krennwallner
Change by Thomas Krennwallner : -- keywords: +patch nosy: +tkren nosy_count: 3.0 -> 4.0 pull_requests: +18343 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18996 ___ Python tracker <https://bugs.python.org/i

[issue24916] In sysconfig, don't rely on sys.version format

2020-03-17 Thread Thomas Kluyver
Thomas Kluyver added the comment: Serhiy, I think you fixed the part that was actually likely to cause problems a few years ago in issue #25985 & commit 885bdc4946890f4bb80557fab80c3874b2cc4d39 . Using sys.version[:3] to get a short version like 3.8 was what I wanted to fix. People

[issue20899] Nested namespace imports do not work inside zip archives

2020-03-24 Thread Thomas Heller
Change by Thomas Heller : -- nosy: -theller ___ Python tracker <https://bugs.python.org/issue20899> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40075] _tkinter PythonCmd fails to acquire GIL

2020-03-26 Thread Thomas Holder
New submission from Thomas Holder : The attached demo application runs a Tkinter GUI and a PyQt GUI in the same thread. PyQt owns the main loop and keeps updating the Tkinter instance by calling `update()`. On Windows, when binding a "" event, resizing the Tk window will lead

[issue40075] _tkinter PythonCmd fails to acquire GIL

2020-03-26 Thread Thomas Holder
Change by Thomas Holder : -- keywords: +patch pull_requests: +18538 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19178 ___ Python tracker <https://bugs.python.org/issu

[issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())

2020-04-27 Thread Thomas Grainger
Thomas Grainger added the comment: Perhaps there could be a MagicAsyncMock that supports .__await__ and .__aenter__ etc? -- ___ Python tracker <https://bugs.python.org/issue40

[issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())

2020-04-27 Thread Thomas Grainger
New submission from Thomas Grainger : aentering a MagicMock() results in an AsyncMock which behaves differently than I expected: ``` python3.9 -m asyncio asyncio REPL 3.9.0a5 (default, Apr 18 2020, 00:00:31) [GCC 9.3.0] on linux Use "await" directly instead of "asyncio.run

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread Thomas Moreau
Thomas Moreau added the comment: Sorry I just saw this. It seems that I introduced this regression. One of the goal of having a `ThreadWakeup` and not a `SimpleQueue` is to avoid using locks that can hinder the performance of the executor. I don't remember the exact details but I th

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-29 Thread Thomas Moreau
Thomas Moreau added the comment: I think this is a reasonable way to move on.Some of the locks can probably be removed but this needs careful investigation and in the mean time, it hinders everyone. Thanks victor for the fast fix up! To me, an interesting observation is that the failure

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-29 Thread Thomas Moreau
Change by Thomas Moreau : -- pull_requests: +19111 pull_request: https://github.com/python/cpython/pull/19788 ___ Python tracker <https://bugs.python.org/issue39

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-29 Thread Thomas Moreau
Thomas Moreau added the comment: I did GH 19788 with a few modifications. There is only one lock that seems to mater for the perf, and I actually added one other (the one in _python_exit, which necessitate another bug fix for fork context). I did not benchmark to see if it was worth it in

[issue40574] segfault causing regression from PEP 573 implementation

2020-05-08 Thread Thomas Caswell
New submission from Thomas Caswell : https://github.com/python/cpython/commit/e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 causes pyqt5 to segfault an accessing an attribute To reproduce this: pip install pyqt5 pip install sip python -c "import PyQt5.QtCore; PyQt5.QtCore.Qt.Key_Control&quo

[issue40574] segfault causing regression from PEP 573 implementation

2020-05-08 Thread Thomas Caswell
Thomas Caswell added the comment: Sorry, forgot to add this is on Linux. -- ___ Python tracker <https://bugs.python.org/issue40574> ___ ___ Python-bugs-list m

[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-10 Thread Thomas Caswell
Thomas Caswell added the comment: The script I used for the bisect was: --- TARGET_ENV=bisect_env rm -r ~/.pybuild/$TARGET_ENV || true git clean -xfd ./configure --prefix=/home/tcaswell/.pybuild/$TARGET_ENV make -j 9 make install ~/.pybuild/$TARGET_ENV/bin/python3 -m venv --copies --clear

[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-10 Thread Thomas Caswell
Thomas Caswell added the comment: I think I have figured out the problem. I had a locally built and cached wheel of PyQt5-sip from before PEP573 went in. If that wheel is used for later commits I get the segfault, if I rebuilt the wheel from source it works. I am not sure if this is an

[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Thomas Wouters
Thomas Wouters added the comment: The normal way to do this (for make/autoconf) is to add a --with-tzpath argument to configure.ac, and a make variable to pass it to the compilation of anything that needs it. You can then access it from Python code with sysconfig.get_config_var(). In

[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-11 Thread Thomas Caswell
Thomas Caswell added the comment: The path is - on a commit prior to e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 install pyqt-sip. pip will build a wheel for you called PyQt5_sip-12.7.2-cp39-cp39-linux_x86_64.whl - on a commit after e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 if you do `pip

[issue31436] test_socket.SendfileUsingSendfileTest.testWithTimeoutTriggeredSend fails due to sendfile completing before timeout

2020-05-11 Thread Thomas Chan
Change by Thomas Chan : -- nosy: +tchan ___ Python tracker <https://bugs.python.org/issue31436> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36702] test_dtrace failed

2020-05-11 Thread Thomas Chan
Change by Thomas Chan : -- nosy: +tchan ___ Python tracker <https://bugs.python.org/issue36702> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-12 Thread Thomas Caswell
Thomas Caswell added the comment: That seems reasonable. To be pedantic, it is pyqt5-sip (not sip) that was the source of the problem. I am going to open an issue with pip to disable caching locally built wheels for pre-released versions of Python

[issue40257] Improve the use of __doc__ in pydoc

2020-05-17 Thread Thomas Caswell
Change by Thomas Caswell : -- nosy: +tcaswell ___ Python tracker <https://bugs.python.org/issue40257> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42666] getting a class source regresses in Python 3.9

2020-12-17 Thread Thomas Viehmann
New submission from Thomas Viehmann : getting a class source regresses in Python 3.9 onwards. The following worked in Python 3.8, now it doesn't anymore for 3.9.1 and 3.10.0a2: (save as foo.py) import inspect class Foo: def spam(self): global Bar clas

[issue42666] getting a class source regresses in Python 3.9

2020-12-17 Thread Thomas Viehmann
Thomas Viehmann added the comment: I might add that this is a case I hit in the PyTorch test suite. I tried to fix this a long time ago in a pricipled way in https://bugs.python.org/issue33826 and Guido explained that fixing it was too heavy handed to be worthwile in https://mail.python.org

[issue42677] Support comments in argparse fromfile_prefix_chars files

2020-12-18 Thread Thomas Nabelek
New submission from Thomas Nabelek : For input argument files, specified with the fromfile_prefix_chars argument to argparse.ArgumentParser, argparse should ignore lines beginning with '#' so that comments can be used in those files. -- components: Library (Lib) messages: 3

[issue42677] Support comments in argparse fromfile_prefix_chars files

2020-12-19 Thread Thomas Nabelek
Thomas Nabelek added the comment: While overloading convert_arg_line_to_args may work, I think that @file reading is kind of the odd ball out in not recognizing '#' as the beginning of a comment. Besides, I'm not sure that overloading just convert_arg_line_to_args is suff

[issue42677] Support comments in argparse fromfile_prefix_chars files

2020-12-19 Thread Thomas Nabelek
Thomas Nabelek added the comment: Oh, yes, returning [] does work. Thanks guys. -- ___ Python tracker <https://bugs.python.org/issue42677> ___ ___ Python-bug

[issue42677] Support comments in argparse fromfile_prefix_chars files

2020-12-19 Thread Thomas Nabelek
Thomas Nabelek added the comment: For anyone else, here is my implementation. I decided not to do anything to support comments on the same lines as arguments. import argparse import re # Override argparse's convert_arg_line_to_args method to allow for comments and empty lines

[issue42917] Block stack size for frame objects should be dynamically sizable

2021-01-12 Thread Thomas Anderson
New submission from Thomas Anderson : Currently the block stack size is hardcoded to 20. Similar to how the value stack is dynamically sizable, we should make the block stack dynamically sizable. This will reduce space on average (since the typical number of blocks for a function is well

[issue42917] Block stack size for frame objects should be dynamically sizable

2021-01-15 Thread Thomas Anderson
Thomas Anderson added the comment: > Reducing the size of the frame object seems like a worthwhile goal, but > what's the point in increasing the maximum block stack? No point for humans, but it may be useful for code generators. -- ___

[issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries

2021-02-12 Thread Richie Thomas
Richie Thomas added the comment: Hello, can you give me a few more details around the workaround for this. I am using pyenv to install 3.9.1 and not sure how I would include the xz installed using homebrew. Where do I find the setup.py or configure command? Thanks for the help

[issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries

2021-02-12 Thread Richie Thomas
Richie Thomas added the comment: That works for me. Thank you! On Fri, Feb 12, 2021 at 11:12 PM Dustin Rodrigues wrote: > > Dustin Rodrigues added the comment: > > You'll probably need to contact the pyenv project ( > https://github.com/pyenv/pyenv) if the following

[issue43227] Backslashes in function arguments in f-string expressions

2021-02-14 Thread Thomas Nabelek
New submission from Thomas Nabelek : >From https://www.python.org/dev/peps/pep-0498/#escape-sequences: "Backslashes may not appear inside the expression portions of f-strings" Is this supposed to be true even for arguments to functions inside of the expression? my_str = &quo

[issue43298] Windows build issue

2021-02-22 Thread Kevin Thomas
New submission from Kevin Thomas : When compiling for Windows it does not properly handle the version string MSB4184 C:\Users\kevin\cpython>PCbuild\build.bat Using py -3.7 (found 3.7 with py.exe) Fetching external libraries... bzip2-1.0.6 already exists, skipping. sqlite-3.34.0.0 alre

[issue43298] Windows build cannot detect missing Windows SDK

2021-02-22 Thread Kevin Thomas
Kevin Thomas added the comment: Thank you Steve. I did not have the latest installed which is Win10SDK_10.0.18362, therefore it did trigger that original error in msg387518. After installing, Win10SDK_10.0.18362, it did in-fact allow a successful compilation. Updating that error code

[issue43298] Windows build cannot detect missing Windows SDK

2021-02-23 Thread Kevin Thomas
Kevin Thomas added the comment: Hi Steve actually there was none installed which was strange as I had Visual Studio installed but it was not checked by default. After selecting it and installing it, everything works as expected. Updating the error message in some way might be helpful

[issue37771] No equivalent of `inspect.getcoroutinestate` for PyAsyncGenASend instances

2021-03-06 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +alex.gronholm, graingert ___ Python tracker <https://bugs.python.org/issue37771> ___ ___ Python-bugs-list mailing list Unsub

[issue43216] Removal of @asyncio.coroutine in Python 3.10

2021-03-06 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +graingert ___ Python tracker <https://bugs.python.org/issue43216> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40720] accessing mmap of file that is overwritten causes bus error

2021-03-09 Thread Thomas Grainger
Thomas Grainger added the comment: I can confirm this happens on py3.5-3.10 ``` import mmap import pathlib import tempfile def main(): with tempfile.TemporaryDirectory() as tmp: tmp_path = pathlib.Path(tmp) path = tmp_path / "eg" path.write_bytes(b&qu

[issue40697] add fissix as a lib2to3 alternative

2020-05-20 Thread Thomas Grainger
New submission from Thomas Grainger : now that lib2to3 is deprecated, the stdlib should point to alternatives currently the docs point to libcst or parso, however neither is a drop-in replacement for lib2to3 the docs should add fissix as a lib2to3 alternative, because it is a drop-in

[issue40906] Unable to import module due to python unable to resolve dependecies

2020-06-09 Thread Thomas Scheruebl
Thomas Scheruebl added the comment: >From what I can see this behavior is intended starting with Python 3.8 for >Windows and DLL loading for extension modules. You can use add_dll_directory to add directories to the DLL load path (see https://docs.python.org/3/library/o

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2020-07-11 Thread Thomas Gläßle
Thomas Gläßle added the comment: Hi, I have rebased this on master and fixed the minor conflict. Let me know if there is anything else I can do. Best, Thomas -- versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.

[issue40075] _tkinter PythonCmd fails to acquire GIL

2020-07-30 Thread Thomas Holder
Thomas Holder added the comment: Attaching an even simpler example which doesn't use PyQt. It shows a native Windows dialog using ctypes. I could not reproduce the crash without showing any non-tk dialog. Steve's explanation sounds plausible. -- Added file: https://bugs.

[issue41520] 3.8.5 regression, warnings.simplefilter('error', SyntaxWarning) does not raise.

2020-08-10 Thread Thomas Caswell
Thomas Caswell added the comment: bisecting agrees with Matthias: # first bad commit: [c067183605cf84bb1a246635f52827251d0476f8] bpo-40807: Show warnings once from codeop._maybe_compile (GH-20486) -- nosy: +tcaswell ___ Python tracker <ht

[issue41576] document BaseException in favour of bare except in error tutorial

2020-08-18 Thread Thomas Grainger
Change by Thomas Grainger : -- assignee: docs@python components: Documentation nosy: docs@python, graingert priority: normal pull_requests: 21033 severity: normal status: open title: document BaseException in favour of bare except in error tutorial

[issue41576] document BaseException in favour of bare except in error tutorial

2020-08-18 Thread Thomas Grainger
Thomas Grainger added the comment: it seems odd to document digging around in sys.exc_info() in favour of the more ergonomic syntax to do the same thing -- ___ Python tracker <https://bugs.python.org/issue41

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy

2020-08-20 Thread Thomas Grainger
New submission from Thomas Grainger : when running "python -m ham.py" KeyboardInterrupt should result in -2, but results in 1 see test case -- components: Interpreter Core files: test_exit.py messages: 375732 nosy: graingert priority: normal severity: normal status:

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy

2020-08-20 Thread Thomas Grainger
Thomas Grainger added the comment: see also https://bugs.python.org/issue1054041 -- ___ Python tracker <https://bugs.python.org/issue41602> ___ ___ Python-bug

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy

2020-08-20 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +ncoghlan ___ Python tracker <https://bugs.python.org/issue41602> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy

2020-08-20 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue41602> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy

2020-08-20 Thread Thomas Grainger
Change by Thomas Grainger : Added file: https://bugs.python.org/file49415/test_exit.txt ___ Python tracker <https://bugs.python.org/issue41602> ___ ___ Python-bugs-list m

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy

2020-08-20 Thread Thomas Grainger
Thomas Grainger added the comment: I think I've eliminated runpy.py, as I still get a `-2` when using: import runpy runpy.run_module("ham") or runpy._run_module_as_main("ham") see attached test_exit_runpy.py It seems the only difference is if pymain_run_file or

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-08-20 Thread Thomas Grainger
Change by Thomas Grainger : -- title: Python doesn't exit with proper resultcode on SIGINT in runpy -> Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) ___ Python tracker <https://bugs.pytho

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-08-20 Thread Thomas Grainger
Thomas Grainger added the comment: I've now eliminated pymain_run_stdin and pymain_run_command, both process a KeyboardInterrupt as -2 see attached test_exit_command_stdin.py -- Added file: https://bugs.python.org/file49417/test_exit_command_std

[issue41605] t = re.sub(".*", "*", src) has different ouput

2020-08-21 Thread Thomas Grainger
Thomas Grainger added the comment: seems like a dupe? https://bugs.python.org/issue32308 -- keywords: +patch message_count: 3.0 -> 4.0 nosy: +graingert nosy_count: 5.0 -> 6.0 pull_requests: +21050 stage: -> patch review pull_request: https://github.com/python/cpython/

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-08-21 Thread Thomas Grainger
Thomas Grainger added the comment: adding vstinner, as this seems related to pymain_run_module rather than runpy -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue41

[issue41576] document BaseException in favour of bare except in error tutorial

2020-08-22 Thread Thomas Grainger
Thomas Grainger added the comment: The purpose of this tutorial section is to document how to catch all types of exceptions and extract the type and value. When this is required, `BaseException as err:` is the preferred approach. This document still mentions the alternative approach so that

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-08-23 Thread Thomas Grainger
Change by Thomas Grainger : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue41602> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-08-25 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +21065 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21956 ___ Python tracker <https://bugs.python.org/issu

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-08-25 Thread Thomas Grainger
Thomas Grainger added the comment: I've confirmed that the pymain_run_module fails on master in the same way with Mac, Windows and Ubuntu -- ___ Python tracker <https://bugs.python.org/is

[issue41635] flaky test.test_asyncio.test_events.ProactorEventLoopTests.test_call_later

2020-08-25 Thread Thomas Grainger
New submission from Thomas Grainger : == FAIL: test_call_later (test.test_asyncio.test_events.ProactorEventLoopTests) -- Traceback (most recent call last

[issue41643] make shutil.make_archive always accept pathlib objects

2020-08-26 Thread Thomas Grainger
Change by Thomas Grainger : -- title: make shutil.make_archive always accepts pathlib objects -> make shutil.make_archive always accept pathlib objects ___ Python tracker <https://bugs.python.org/issu

[issue41643] make shutil.make_archive always accepts pathlib objects

2020-08-26 Thread Thomas Grainger
New submission from Thomas Grainger : >>> shutil.make_archive(pathlib.Path("./foo"), root_dir=pathlib.Path("./foo"), >>> format="zip") '/home/graingert/projects/ham/foo.zip' >>> shutil.make_archive(pathlib.Path("./foo&q

[issue41643] make shutil.make_archive always accept pathlib objects

2020-08-26 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +21072 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21962 ___ Python tracker <https://bugs.python.org/issu

[issue41676] asyncio.Event.wait broken link from asyncio.Event

2020-08-31 Thread Thomas Grainger
New submission from Thomas Grainger : https://docs.python.org/dev/library/asyncio-sync.html#asyncio.Event links to https://docs.python.org/dev/library/asyncio-task.html#asyncio.wait instead of https://docs.python.org/dev/library/asyncio-sync.html#asyncio.Event.wait -- assignee: docs

[issue41676] asyncio.Event.wait broken link from asyncio.Event

2020-08-31 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +21129 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22029 ___ Python tracker <https://bugs.python.org/issu

[issue41755] Docs: Please remove `from distutils.core import setup`

2020-09-10 Thread Thomas Guettler
New submission from Thomas Guettler : Please remove this page or at least the code snippet containing `from distutils.core import setup` on this page: https://docs.python.org/3/distutils/setupscript.html There is the more up to date doc here: https://packaging.python.org/tutorials/packaging

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-09-16 Thread Thomas Grainger
Thomas Grainger added the comment: adding `__main__` owners to nosy -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue41602> ___ ___ Pytho

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-09-16 Thread Thomas Grainger
Thomas Grainger added the comment: The return code of python on linux when the program is ended with a KeyboardInterrupt should be -2, this works in most cases - except when called via "python -m" Does this repl help? Python 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-09-16 Thread Thomas Grainger
Thomas Grainger added the comment: > Okay, I got it. Now my next question. What do you mean by "I've eliminated > runpy" and various other remarks along those lines? I can use `runpy._run_module_as_main` from another Python entry, eg -c and get the correct `-2` >>

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-09-16 Thread Thomas Grainger
Thomas Grainger added the comment: I'm assuming _Py_UnhandledKeyboardInterrupt is getting incorrectly cleared somewhere in here https://github.com/python/cpython/blob/fc23a9483ef0d7c98bea9f82392377d0b6ef7b18/Modules/main.c#L291-L300 Py_DECREF(runpy); Py_DECREF(runm

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-09-16 Thread Thomas Grainger
Thomas Grainger added the comment: I pushed that patch -- versions: -Python 3.10 ___ Python tracker <https://bugs.python.org/issue41602> ___ ___ Python-bug

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-09-16 Thread Thomas Grainger
Thomas Grainger added the comment: nice the tests pass with that fix -- ___ Python tracker <https://bugs.python.org/issue41602> ___ ___ Python-bugs-list mailin

[issue37062] `AutoNumber` class in enum documentation: support *args in constructor

2020-09-21 Thread Reuben Thomas
Reuben Thomas added the comment: That's the one I was thinking of: the example in the docs. -- ___ Python tracker <https://bugs.python.org/issue37062> ___ ___

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-09-24 Thread Thomas Grainger
Change by Thomas Grainger : -- pull_requests: +21438 pull_request: https://github.com/python/cpython/pull/22398 ___ Python tracker <https://bugs.python.org/issue41

[issue41854] argparse.add_mutually_exclusive_group fails for optional positional arguments

2020-09-24 Thread Reuben Thomas
New submission from Reuben Thomas : The following code: group = parser.add_mutually_exclusive_group() group.add_argument('--install-only', action='store_true', help='just install the program, do not run it') group.add_argument('args'

[issue41856] argparse: auto-generated synopsis omits REMAINDER argument

2020-09-24 Thread Reuben Thomas
New submission from Reuben Thomas : Consider the following example from the Python documentation: >>> parser = argparse.ArgumentParser(prog='PROG') >>> parser.add_argument('--foo') >>> parser.add_argument('command') >>> parser

[issue41856] argparse: auto-generated synopsis omits REMAINDER argument

2020-09-24 Thread Reuben Thomas
Reuben Thomas added the comment: A workaround to help users for now is: >>> parser.add_argument('args', metavar='...', nargs=argparse.REMAINDER) as then at least the help entry corresponds to the synopsis: positional arguments: command ... And with

[issue40075] _tkinter PythonCmd fails to acquire GIL

2020-09-29 Thread Thomas Holder
Thomas Holder added the comment: I finally managed to test tstate_acquire.diff and it works perfectly! Should I close my pull request? Or update it with your patch? -- ___ Python tracker <https://bugs.python.org/issue40

<    4   5   6   7   8   9   10   11   12   13   >