[issue41021] ctypes callback with structure crashes in Python 3.8 on Windows x86

2020-06-19 Thread Eryk Sun
Eryk Sun added the comment: I can reproduce a crash with an x86 build that uses a stdcall callback with a 32-bit argument followed by any ffi_type_sint64 argument (FILETIME, long long, etc). Apparently this is a bug in libffi's ffi_prep_cif. Given the 2nd argument has a size of 8 bytes and

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: -Digital India title: Digital India -> Multiprocesing Pool borken on macOS REPL type: security -> behavior ___ Python tracker

[issue41041] Digital India

2020-06-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- Removed message: https://bugs.python.org/msg371919 ___ Python tracker ___ ___

[issue41041] Digital India

2020-06-19 Thread Digital India
Digital India added the comment: Digital INDIA Common Services Centre is an online portal where citizens are provided access to various government services. The CSC e-Governance is a  portal developed by the Ministry of Electronic and Information Technology, Government of India. 

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Some related note in documentation about repl with commit : https://github.com/python/cpython/commit/73dd030c8b71a7080648554652912982054b1177 > Note Functionality within this package requires that the __main__ module be > importable by the

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: There is a documentation ticket already open : https://bugs.python.org/issue33553 -- nosy: +xtreak ___ Python tracker ___

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Thanks. That's an annoying side effect of having spawn by default on macOS then. Could it be possible in `pool.map()` to detect that some of the objects are from main and would fail and then raise an error message in the parent process before

[issue41047] argparse: misbehavior when combining positionals and choices

2020-06-19 Thread James Corbett
Change by James Corbett : -- keywords: +patch pull_requests: +20172 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20997 ___ Python tracker ___

[issue41047] argparse: misbehavior when combining positionals and choices

2020-06-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +paul.j3, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41047] argparse: misbehavior when combining positionals and choices

2020-06-19 Thread James Corbett
New submission from James Corbett : The `argparse.ArgumentParser` sometimes rejects positional arguments with no arguments when `choices` is set and `nargs="*"`. When there are no arguments and `nargs` is `"*"`, the default value is chosen, or `[]` if there is no default value. This value

[issue41046] unittest: make skipTest a classmethod

2020-06-19 Thread James Corbett
Change by James Corbett : -- keywords: +patch pull_requests: +20171 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20996 ___ Python tracker ___

[issue41046] unittest: make skipTest a classmethod

2020-06-19 Thread James Corbett
New submission from James Corbett : The `unittest.TestCase.skipTest` method, used to skip the current test, is currently an instance method. There's nothing to stop it from being a `classmethod` or a `staticmethod` though---it doesn't use its reference to `self` since it's just a wrapper

[issue41045] f-string's "debug" feature is undocumented

2020-06-19 Thread Guido van Rossum
Guido van Rossum added the comment: Every other detail about f-strings is spelled out meticulously in the reference manual: https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-literals I think it needs to be added here. PS OT: I can't find anything about f-strings in

[issue41045] f-string's "debug" feature is undocumented

2020-06-19 Thread Eric V. Smith
New submission from Eric V. Smith : The feature of f-strings using '=' for "debugging" formatting is not documented. >>> foo = 'bar' >>> f'{foo=}' "foo='bar'" I'm not sure where this should fit in to the documentation, but it needs to be in there somewhere. Basically the documentation

[issue41042] import searches for package even after file was found successfully

2020-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: You should just be using "import index". By using "import index.py", you're telling the interpreter to first import index, execute the code in it, then look for a sub-module named "py" (full name: index.py). Since no such sub-module exists, and index is not

[issue41042] import searches for package even after file was found successfully

2020-06-19 Thread Michael J.
Michael J. added the comment: This is a screenshot of the output I received when I ran index.py in a terminal. As you can see, it imports the script OK, but then it tries to find index as a package, and it fails and prints an error. (2/2) -- Added file:

[issue41042] import searches for package even after file was found successfully

2020-06-19 Thread Michael J.
Michael J. added the comment: Attached I have a file containing the script for my program. It's obviously incomplete, but it will work as a sample file for demonstrating the output and behavior of the interpreter. (1/2) -- Added file: https://bugs.python.org/file49254/index.py

[issue41044] Pegen: double trailing comma on optional+sequence rules at python generator

2020-06-19 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +20170 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20995 ___ Python tracker ___

[issue41044] Pegen: double trailing comma on optional+sequence rules at python generator

2020-06-19 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : Python generator generates two trailing commas instead of one when both repeat0 (*) + optional ([]) qualifiers used. Example failing test (raises a SyntaxError, since the generated parser can't be parseable / executable) def test_opt_sequence(self)

[issue41042] import searches for package even after file was found successfully

2020-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: Please provide a small script that demonstrates this behavior. -- nosy: +eric.smith ___ Python tracker ___

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: To be unpickle-able, the code for f needs to be imported, which it can't be from the repl. Windows has this same issue, due to also not using fork(). >From >https://docs.python.org/3/library/pickle.html#what-can-be-pickled-and-unpickled: > "Thus the defining

[issue41040] Fix test_modulefinder

2020-06-19 Thread miss-islington
miss-islington added the comment: New changeset 75238869b546526ac9e18d6169f3dc87c7f94eef by Miss Islington (bot) in branch '3.9': bpo-41040: Fix test_modulefinder. (GH-20991) https://github.com/python/cpython/commit/75238869b546526ac9e18d6169f3dc87c7f94eef --

[issue41040] Fix test_modulefinder

2020-06-19 Thread miss-islington
miss-islington added the comment: New changeset 80651ab9e3f9d9a89e566a0b87a51b28720094f0 by Miss Islington (bot) in branch '3.8': bpo-41040: Fix test_modulefinder. (GH-20991) https://github.com/python/cpython/commit/80651ab9e3f9d9a89e566a0b87a51b28720094f0 --

[issue41043] Escape the literal part of the path for glob()

2020-06-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20169 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20994 ___ Python tracker

[issue41043] Escape the literal part of the path for glob()

2020-06-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : It is common to use glob() as glob.glob(os.path.join(basedir, pattern)) But it does not work correctly if the base directory contains special globbing characters ('*', '?', '['). It is an uncommon case, so in most cases the code works. But when

[issue41040] Fix test_modulefinder

2020-06-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +20168 pull_request: https://github.com/python/cpython/pull/20993 ___ Python tracker ___

[issue41042] import searches for package even after file was found successfully

2020-06-19 Thread Michael J.
New submission from Michael J. : Hello, Earlier today, I was developing a program and I wanted to check its variables after it finished running. Simply going into a terminal, entering my program's directory, and executing "python3 index.py" would return control to the command line before I

[issue41040] Fix test_modulefinder

2020-06-19 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +20167 pull_request: https://github.com/python/cpython/pull/20992 ___ Python tracker

[issue41040] Fix test_modulefinder

2020-06-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a041e116db5f1e78222cbf2c22aae96457372680 by Serhiy Storchaka in branch 'master': bpo-41040: Fix test_modulefinder. (GH-20991) https://github.com/python/cpython/commit/a041e116db5f1e78222cbf2c22aae96457372680 --

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : $ python Python 3.8.2 | packaged by conda-forge | (default, Apr 24 2020, 07:56:27) [Clang 9.0.1 ] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from multiprocessing import Pool >>> >>> def f(x): ... return x*x

[issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs

2020-06-19 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 59cf853332a82ce92875ea3dd6bba08e1305a288 by Ram Rachum in branch 'master': bpo-40636: Documentation for zip-strict (#20961) https://github.com/python/cpython/commit/59cf853332a82ce92875ea3dd6bba08e1305a288 --

[issue40704] PyIter_Check fails when compiling in the Limited API

2020-06-19 Thread Stefan Behnel
Stefan Behnel added the comment: You can see it from the tags on the commit, it was fixed in Py3.8. Duplicate of issue 33738. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6, Python 3.7

[issue41040] Fix test_modulefinder

2020-06-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20166 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20991 ___ Python tracker

[issue41040] Fix test_modulefinder

2020-06-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There is a bug in test_modulefinder. The bytes string literal contains \u2090. 1. Since \u is not recognized escape sequence in bytes literals, compiling the file emits a deprecation warning: /home/serhiy/py/cpython/Lib/test/test_modulefinder.py:281:

[issue40704] PyIter_Check fails when compiling in the Limited API

2020-06-19 Thread Maxwell Bernstein
Maxwell Bernstein added the comment: Oh, it looks like this has been done: https://github.com/python/cpython/commit/ea62ce7f4fefc66bc0adba16bcd7666d5bbd5b44 Although I am not sure what version this made it into. So maybe this does not affect versions 3.9/3.10. I've seen it in 3.6/6, for

[issue40704] PyIter_Check fails when compiling in the Limited API

2020-06-19 Thread Maxwell Bernstein
Change by Maxwell Bernstein : -- keywords: +patch pull_requests: +20165 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/7477 ___ Python tracker

[issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order

2020-06-19 Thread Bar Harel
Bar Harel added the comment: I've just encountered this bug as well. Although this issue is old, #1 should be fixed whether we like it or not. Cancelling an unintended event instead of the one we wanted is a bug, and prevents me from using the library at all (I schedule events based on

[issue41026] mailbox does not support new Path object

2020-06-19 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి
Change by Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) : -- nosy: +thatiparthy nosy_count: 2.0 -> 3.0 pull_requests: +20164 pull_request: https://github.com/python/cpython/pull/20990 ___ Python tracker

[issue41039] Simplify python3.dll build

2020-06-19 Thread Nikita Nemkin
Change by Nikita Nemkin : -- keywords: +patch pull_requests: +20163 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20989 ___ Python tracker ___

[issue41039] Simplify python3.dll build

2020-06-19 Thread Nikita Nemkin
New submission from Nikita Nemkin : python3.dll build process can be simplified if we use linker comment #pragma instead of .def files. Custom build targets become unnecessary and hardcoded Python DLL name can be replaced with a macro. Also, python3.dll doesn't need DllMain and can be built

[issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm

2020-06-19 Thread miss-islington
miss-islington added the comment: New changeset 1529322ca6b7b029af65aceeb04e6d47013eeeb4 by Miss Islington (bot) in branch '3.9': bpo-38377: Fix skip_if_broken_multiprocessing_synchronize() on macOS (GH-20984) https://github.com/python/cpython/commit/1529322ca6b7b029af65aceeb04e6d47013eeeb4

[issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm

2020-06-19 Thread miss-islington
miss-islington added the comment: New changeset ec9bc2da421c456e416d991fd1fe79ac33344d9d by Miss Islington (bot) in branch '3.8': bpo-38377: Fix skip_if_broken_multiprocessing_synchronize() on macOS (GH-20984) https://github.com/python/cpython/commit/ec9bc2da421c456e416d991fd1fe79ac33344d9d

[issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm

2020-06-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +20162 pull_request: https://github.com/python/cpython/pull/20988 ___ Python tracker ___

[issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm

2020-06-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3358da4054b9b0b045eb47dc74dee3d58bfbb1d5 by Victor Stinner in branch 'master': bpo-38377: Fix skip_if_broken_multiprocessing_synchronize() on macOS (GH-20984) https://github.com/python/cpython/commit/3358da4054b9b0b045eb47dc74dee3d58bfbb1d5

[issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm

2020-06-19 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +20161 pull_request: https://github.com/python/cpython/pull/20987 ___ Python tracker

[issue40077] Convert static types to PyType_FromSpec()

2020-06-19 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset ec689187957cc80af56b9a63251bbc295bafd781 by Dong-hee Na in branch 'master': bpo-40077: Convert _bz2 module to use PyType_FromSpec (GH-20960) https://github.com/python/cpython/commit/ec689187957cc80af56b9a63251bbc295bafd781 --

[issue37630] Investigate replacing SHA3 code with OpenSSL

2020-06-19 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- pull_requests: +20160 pull_request: https://github.com/python/cpython/pull/20986 ___ Python tracker ___

[issue41034] test_builtin: PtyTests fail when run twice

2020-06-19 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41036] Visit the type of instance of heap types if tp_traverse is not implemented

2020-06-19 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL)

2020-06-19 Thread Zachary Ware
Zachary Ware added the comment: Hi Julien, Thanks for the suggestion, but I agree with Ammar and Remi that this is not likely to either be easily doable or actually help your case. This would also be a big enough change to likely need a PEP. If you still want to pursue this I would

[issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale

2020-06-19 Thread Nikita Nemkin
Change by Nikita Nemkin : -- keywords: +patch pull_requests: +20159 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20985 ___ Python tracker ___

[issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale

2020-06-19 Thread Nikita Nemkin
New submission from Nikita Nemkin : In absence of explicit declaration, resource compiler uses system codepage. When this codepage is DBCS or UTF-8, Python's copyright string is corrupted, because it contains copyright sign encoded as \xA9. The fix is to explicitly declare codepage 1252.

[issue40958] ASAN/UBSAN: heap-buffer-overflow in pegen.c

2020-06-19 Thread neonene
Change by neonene : -- nosy: +christian.heimes -neonene ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41037] Add (optional) threadstate to: PyOS_InterruptOccurred()

2020-06-19 Thread STINNER Victor
STINNER Victor added the comment: Such function already exists in the master branch, but it's only part of the internal C API: PyAPI_FUNC(int) _PyOS_InterruptOccurred(PyThreadState *tstate); Currently, the C API design is to always requires to hold the GIL. --

[issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm

2020-06-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +20158 pull_request: https://github.com/python/cpython/pull/20984 ___ Python tracker ___

[issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm

2020-06-19 Thread STINNER Victor
STINNER Victor added the comment: >From what I understood, the problem is that creating a SemLock has an impact >on the resource tracker. The failing unit tests checks something about the resource tracker. The test runs a function in a child process. The function is defined in

[issue41036] Visit the type of instance of heap types if tp_traverse is not implemented

2020-06-19 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41036] Visit the type of instance of heap types if tp_traverse is not implemented

2020-06-19 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +20157 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20983 ___ Python tracker ___

[issue41037] Add (optional) threadstate to: PyOS_InterruptOccurred()

2020-06-19 Thread Sebastian Berg
New submission from Sebastian Berg : In https://bugs.python.org/issue40826 it was defined that `PyOS_InterruptOccurred()` can only be called with a GIL. NumPy had a few places with very unsafe sigint handling (not thread-safe). But generally when we are in a situation that catching sigints

[issue41036] Visit the type of instance of heap types if tp_traverse is not implemented

2020-06-19 Thread STINNER Victor
New submission from STINNER Victor : While reviewing changes of bpo-40077 "Convert static types to PyType_FromSpec()", I noticed that some static types don't implement tp_traverse. The doc says: Heap-allocated types (...) hold a reference to their type. Their traversal function must

[issue40704] PyIter_Check fails when compiling in the Limited API

2020-06-19 Thread Stefan Behnel
Stefan Behnel added the comment: It should be replaced with an actual function, which can be inline in the non-limited case. -- nosy: +scoder stage: -> needs patch type: -> compile error versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7

[issue40637] Allow users to disable builtin hash modules on compile time

2020-06-19 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +20156 pull_request: https://github.com/python/cpython/pull/20980 ___ Python tracker ___

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: Changing versions to where the fix would be applied. -- versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds

2020-06-19 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +20155 pull_request: https://github.com/python/cpython/pull/20979 ___ Python tracker ___

[issue41035] zipfile.Path does not work properly with zip archives where paths start with /

2020-06-19 Thread sorrow
New submission from sorrow : I encountered errors when I had to work with ZPI file where path start with "/" -- components: Library (Lib) messages: 371880 nosy: sorrow priority: normal severity: normal status: open title: zipfile.Path does not work properly with zip archives where

[issue41035] zipfile.Path does not work properly with zip archives where paths start with /

2020-06-19 Thread sorrow
sorrow added the comment: >>> import zipfile >>> import io >>> data = io.BytesIO() >>> zf = zipfile.ZipFile(data, 'w') >>> zf.writestr('/a.txt', 'content of a') >>> zf.filename = 'abcde.zip' >>> root = zipfile.Path(zf) >>> list(root.iterdir()) [] >>> root.exists() False --

[issue40943] PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN is not defined

2020-06-19 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41026] mailbox does not support new Path object

2020-06-19 Thread Laurence
Laurence added the comment: I have patched the module to accept a path-like object, however it still follows the pre-pathlib ways of doing things elsewhere. There's quite a bit of work to do to modernise the whole module, but this patch at least adds support to pass a Path to the classes

[issue41026] mailbox does not support new Path object

2020-06-19 Thread Laurence
Change by Laurence : -- keywords: +patch pull_requests: +20153 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20976 ___ Python tracker ___

[issue39949] truncating match in regular expression match objects repr

2020-06-19 Thread Quentin Wenger
Quentin Wenger added the comment: Other pathological case: literal backslashes ``` >>> re.match(".*", r"\\") ``` -- ___ Python tracker ___

[issue41034] test_builtin: PtyTests fail when run twice

2020-06-19 Thread STINNER Victor
STINNER Victor added the comment: See also: * bpo-19884: "Importing readline produces erroneous output". Worked around using TERM='xterm-256color env var and by calling rl_variable_bind ("enable-meta-key", "off"); * bpo-11679 "readline interferes with characters beginning with byte \xe9".

[issue40741] Upgrade to SQLite v3.32 in Windows and macOS builds

2020-06-19 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: FYI, 3.32.3 is out now: https://sqlite.org/releaselog/3_32_3.html I'll update the PR and push a new PR for source deps right away. -- ___ Python tracker

[issue41034] test_builtin: PtyTests fail when run twice

2020-06-19 Thread STINNER Victor
STINNER Victor added the comment: I also reproduce the issue on RHEL 8 with readline 7.0. But the issue is hidden if stdout is not a TTY. I use "| cat", so Python stdout is a pipe: $ ./python -m test test_readline test_builtin -v|cat (...) Tests result: SUCCESS --

[issue41034] test_builtin: PtyTests fail when run twice

2020-06-19 Thread STINNER Victor
STINNER Victor added the comment: I reproduce the issue on Fedora 32 with readline 8.0: $ ./python -m test.pythoninfo|grep readline readline._READLINE_LIBRARY_VERSION: 8.0 readline._READLINE_RUNTIME_VERSION: 0x800 readline._READLINE_VERSION: 0x800 --

[issue41034] test_builtin: PtyTests fail when run twice

2020-06-19 Thread STINNER Victor
STINNER Victor added the comment: The two non-ASCII tests are very old: commit 0d776b1ce849ff0646738b6361ef940ab6f8b9cb Author: Antoine Pitrou Date: Sun Nov 6 00:34:26 2011 +0100 Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode error handler in interactive

[issue41034] test_builtin: PtyTests fail when run twice

2020-06-19 Thread STINNER Victor
STINNER Victor added the comment: test_input_tty_non_ascii_unicode_errors() fails if readline was imported previously. Example: $ ./python -m test test_readline test_builtin -v (...) == FAIL: test_input_tty_non_ascii

[issue41034] test_builtin: PtyTests fail when run twice

2020-06-19 Thread STINNER Victor
New submission from STINNER Victor : I tried to check for reference leaks, but running test_builtin twice fails: $ ./python -m test -R 3:3 test_builtin 0:00:00 load avg: 2.18 Run tests sequentially 0:00:00 load avg: 2.18 [1/1] test_builtin beginning 6 repetitions 123456 .test test_builtin

[issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs

2020-06-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 310f6aa7db8dd48952ed718111ce0f016b1c8ef9 by Guido van Rossum in branch 'master': bpo-40636: PEP 618: add strict parameter to zip() (GH-20921) https://github.com/python/cpython/commit/310f6aa7db8dd48952ed718111ce0f016b1c8ef9 -- nosy:

[issue39949] truncating match in regular expression match objects repr

2020-06-19 Thread Quentin Wenger
Quentin Wenger added the comment: *off -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39949] truncating match in regular expression match objects repr

2020-06-19 Thread Quentin Wenger
Quentin Wenger added the comment: (but those are one-character escapes, so that should be fine - either the escape is complete or the backslash is trailing and can be "peeled of") -- ___ Python tracker

[issue39949] truncating match in regular expression match objects repr

2020-06-19 Thread Quentin Wenger
Quentin Wenger added the comment: And ascii escapes should also not be forgotten. ``` >>> re.match(b".*", b"\t") >>> re.match(".*", "\t") ``` -- ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2020-06-19 Thread Arkady
Arkady added the comment: I have reproduced a similar memory leak in the multiprocessing This is the trace: 913 memory blocks: 33232 Bytes: File "/usr/lib/python3.7/threading.py", line 890;self._bootstrap_inner(); File "/usr/lib/python3.7/threading.py", line 914;

[issue41028] Move docs.python.org language and version switcher out of cpython

2020-06-19 Thread Julien Palard
Julien Palard added the comment: In production, this is now starting to fix links and picker for the 2.7 version, which was stating: Docs by version Python 3.9 (in development) and now displays: Docs by version Python 3.10 (in development) --

[issue39949] truncating match in regular expression match objects repr

2020-06-19 Thread Quentin Wenger
Quentin Wenger added the comment: An extraneous difficulty also exists for bytes regexes, because there non-ascii characters are repr'ed using escape sequences. So there's a risk of cutting one in the middle. ``` >>> import re >>> re.match(b".*", b"\xce") ``` --

[issue38035] shared_semaphores cannot be shared across unrelated processes

2020-06-19 Thread Vinay Sharma
Vinay Sharma added the comment: Hi @taleinat, I had sent a mail to the python mailing list as suggested. And till now it has received rather positive comments, in the sense that people who responded see this is a useful feature to be integrated into python. --

[issue40943] PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN is not defined

2020-06-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 37bb2895561d3e63a631f10875567b4e33b30c07 by Victor Stinner in branch 'master': bpo-40943: PY_SSIZE_T_CLEAN required for '#' formats (GH-20784) https://github.com/python/cpython/commit/37bb2895561d3e63a631f10875567b4e33b30c07 --

[issue41033] readline.c: SEGFAULT on SIGWINCH when loaded twice

2020-06-19 Thread daniel hahler
New submission from daniel hahler : The following will crash due to the signal handler calling itself recursively: ``` import os, readline, signal, sys del sys.modules["readline"] import readline os.kill(os.getpid(), signal.SIGWINCH) ``` This fixes it: ``` diff --git a/Modules/readline.c

[issue40860] Exception in multiprocessing/context.py under load

2020-06-19 Thread Arkady
Arkady added the comment: There is a memory leak every time call to join() fails (is https://bugs.python.org/issue37788 relevant?) -- ___ Python tracker ___

[issue41032] locale.setlocale example incorrect

2020-06-19 Thread MarcoBakera
New submission from MarcoBakera : The example given results in an error. https://docs.python.org/3.8/library/locale.html?highlight=locale >>> locale.setlocale(locale.LC_ALL, 'de_DE') I could be improved with one of the following versions: >>> locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')

[issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL)

2020-06-19 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: It would not work, an iterator is just a thing that has __next__() and __iter__(): class MyIterator: def __iter__(self): return self def __next__(self): return 1 Plenty of iterators would not have this method even if we added it to some of them in

[issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL)

2020-06-19 Thread Julien H
Julien H added the comment: Hello Ammar Askar, I agree `_` avoids the "up arrow" problem I mentioned in the REPL. I actually primarily use jupyter notebooks in my work. Point 1. in my first message is the primary issue. Having to edit the line in two places to perform one action has

[issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL)

2020-06-19 Thread Julien H
Change by Julien H : -- title: Provide toList() method on iterators (`list()` is a flow killer in REPL) -> Provide toList() method on iterators/generators (`list()` is a flow killer in REPL) ___ Python tracker

[issue41031] Inconsistency in C and python traceback printers

2020-06-19 Thread Michael Simacek
New submission from Michael Simacek : I belive the python traceback module was designed to produce the same output as the internal exception printer (sys.__excepthook__), but this is not the case when the exception's __str__ raises an exception. Given an exception of the following class:

[issue41030] Provide toList() method on iterators/generators (`list()` is a flow killer in REPL)

2020-06-19 Thread Ammar Askar
Ammar Askar added the comment: Julien, in the REPL "_" represents the last evaluated expression. So you can do: >>> iter(range(10)) >>> list(_) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Do you feel like that covers what you're asking for? -- nosy: +ammar2

[issue41030] Provide toList() method on iterators (`list()` is a flow killer in REPL)

2020-06-19 Thread Julien H
Change by Julien H : -- components: +Library (Lib) -Demos and Tools versions: -Python 3.9 ___ Python tracker ___ ___

[issue41030] Provide toList() method on iterators (`list()` is a flow killer in REPL)

2020-06-19 Thread Julien Edmond René Harbulot
Julien Edmond René Harbulot added the comment: Consider how easy in the REPL it is to hit `up arrow` and then append code to the previously entered command, compared to having to move the cursor back in the command to edit it somewhere in the middle. Simulated REPL session: ```

[issue41026] mailbox does not support new Path object

2020-06-19 Thread Laurence
Laurence added the comment: Hi Rémi, I understand why it is the case, I just thought it would be a nice enhancement and quick win to add the support. RE "you should use os.fspath() instead of str()": I'm following in the pathlib docuementation

[issue41030] Provide toList() method on iterators (`list()` is a flow killer in REPL)

2020-06-19 Thread Julien Edmond René Harbulot
New submission from Julien Edmond René Harbulot : I work with python in the REPL or jupyter notebooks for my data science work and often find myself needing to explore data structures or directories on disk. So I'll access these data structure in a linear "go-forward" fashion using the dot,

[issue41021] ctypes callback with structure crashes in Python 3.8 on Windows x86

2020-06-19 Thread Aravindhan
Change by Aravindhan : -- title: ctypes callback with structure crashes in Python 3.8 on Windows -> ctypes callback with structure crashes in Python 3.8 on Windows x86 ___ Python tracker

[issue41021] ctypes callback with structure crashes in Python 3.8 on Windows

2020-06-19 Thread Aravindhan
Aravindhan added the comment: Hi, Thanks for response @eryksun Sorry that I did not mention it is compiled for x86 and the crash happens in 32bit python. Yes, the dll is declared with stdcall and built for x86 with MSVC. It is tested with python 3.7.4 32bit which is successful and fails on

  1   2   >