[issue43317] python -m gzip could use a larger buffer

2021-02-24 Thread Ruben Vorderman
Change by Ruben Vorderman : -- type: -> performance ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43316] python -m gzip handles error incorrectly

2021-02-24 Thread Ruben Vorderman
Change by Ruben Vorderman : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43303] ASAN : Memory leak in compilation

2021-02-24 Thread Ramin Farajpour Cami
Change by Ramin Farajpour Cami : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43318] pdb can't output the prompt message when successfully clear a breakpoint by "filename:lineno"

2021-02-24 Thread huzhaojie
Change by huzhaojie : -- components: Library (Lib) nosy: hjzin priority: normal severity: normal status: open title: pdb can't output the prompt message when successfully clear a breakpoint by "filename:lineno" type: behavior versions: Python 3.10, Python 3.8, Python 3.9

[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2021-02-24 Thread Tzu-ping Chung
Change by Tzu-ping Chung : -- keywords: +patch pull_requests: +23429 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24644 ___ Python tracker ___

[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2021-02-24 Thread Steve Dower
Steve Dower added the comment: This seems like a good change to me. Making sure that the implementation is easily patchable sounds like a good plan, though I don't have any specific suggestions on what would be best. -- nosy: +steve.dower ___

[issue39758] StreamWriter.wait_closed() can hang indefinitely.

2021-02-24 Thread Russell Owen
Russell Owen added the comment: Regarding my previous comment: I have never seen this in Python 3.7 (though I see that this particular bug is listed as being present there) so it may be a different underlying issue. -- ___ Python tracker

[issue39758] StreamWriter.wait_closed() can hang indefinitely.

2021-02-24 Thread Russell Owen
Russell Owen added the comment: I am also seeing this in Python 3.8.6. I am not using SSL, but am simply calling `await writer.wait_closed()` on an `asyncio.StreamWriter`. Sometimes it works quickly and sometimes it hangs indefinitely. -- nosy: +r3owen

[issue43290] [sqlite3] remove legacy code from pysqlite_step

2021-02-24 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Regarding test coverage: _pysqlite_query_execute() has one coverage gap: lines 478-488 (if (self->statement->in_use)) are never executed. Except from that, the only missing are the hard-to-trigger goto error's (for example PyList_New and

[issue26111] On Windows, os.scandir will keep a handle on the directory until the iterator is exhausted

2021-02-24 Thread Eryk Sun
Eryk Sun added the comment: Issue 25994 added support for the context-manager protocol and close() method in 3.6. So it's at least much easier to ensure that the handle gets closed. The documentation of scandir() links to WinAPI FindFirstFile and FindNextFile, which at least mentions the

[issue43290] [sqlite3] remove legacy code from pysqlite_step

2021-02-24 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: pysqlite_cursor_iternext() has four users: - sqlite3.Cursor.fetchone() - sqlite3.Cursor.fetchall() - sqlite3.Cursor.fetchmany() - sqlite3.Cursor.__next__() All of these methods pass self to pysqlite_cursor_iternext(). pysqlite_cursor_iternext() starts

[issue43293] Move note about GIL to top of threading module

2021-02-24 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting

2021-02-24 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +23428 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/24643 ___ Python tracker ___

[issue13368] Possible problem in documentation of module subprocess, method send_signal

2021-02-24 Thread Eryk Sun
Eryk Sun added the comment: Popen.send_signal() documents that sending CTRL_C_EVENT (cancel) to a process group is possible, which is clearly a true statement and easily demonstrated. OTOH, the Windows documentation of GenerateConsoleCtrlEvent() claims it's not possible. If you know what

[issue37448] obmalloc: radix tree for tracking arena address ranges

2021-02-24 Thread Neil Schemenauer
Change by Neil Schemenauer : Added file: https://bugs.python.org/file49834/perf_compare_radix4x.txt ___ Python tracker ___ ___

[issue37448] obmalloc: radix tree for tracking arena address ranges

2021-02-24 Thread Neil Schemenauer
Change by Neil Schemenauer : Added file: https://bugs.python.org/file49833/perf_compare_noradix.txt ___ Python tracker ___ ___

[issue43290] [sqlite3] remove legacy code from pysqlite_step

2021-02-24 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: There are six users of pysqlite_step(): $ grep -nrE "\" Modules/_sqlite Modules/_sqlite/util.c:27:int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection) Modules/_sqlite/connection.c:393:rc = pysqlite_step(statement, self);

[issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: FYI - This was somewhat of an unfortuate API change. I'm coming across code that relies on ; also being treated as a separator by parse_qs(). That code is now broken with no easy way around it. And I'm only seeing things lucky enough to have an explicit

[issue43293] Move note about GIL to top of threading module

2021-02-24 Thread Quantum
Change by Quantum : -- pull_requests: +23427 pull_request: https://github.com/python/cpython/pull/24642 ___ Python tracker ___ ___

[issue43293] Move note about GIL to top of threading module

2021-02-24 Thread miss-islington
miss-islington added the comment: New changeset f82578ace103ec977cec3424b20e0b5f19cf720e by Miss Islington (bot) in branch '3.9': bpo-43293: Doc: move note about GIL to top of threading module (GH-24622) https://github.com/python/cpython/commit/f82578ace103ec977cec3424b20e0b5f19cf720e

[issue43293] Move note about GIL to top of threading module

2021-02-24 Thread miss-islington
miss-islington added the comment: New changeset 2a9e6ab6adc82713e43cdf0aed09557d0d63e3bb by Miss Islington (bot) in branch '3.8': bpo-43293: Doc: move note about GIL to top of threading module (GH-24622) https://github.com/python/cpython/commit/2a9e6ab6adc82713e43cdf0aed09557d0d63e3bb

[issue43293] Move note about GIL to top of threading module

2021-02-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +23426 pull_request: https://github.com/python/cpython/pull/24641 ___ Python tracker ___

[issue43293] Move note about GIL to top of threading module

2021-02-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 32181be6081f6c70a1e0bd0540050805c8e88e83 by Guanzhong Chen in branch 'master': bpo-43293: Doc: move note about GIL to top of threading module (GH-24622) https://github.com/python/cpython/commit/32181be6081f6c70a1e0bd0540050805c8e88e83

[issue43293] Move note about GIL to top of threading module

2021-02-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +23425 pull_request: https://github.com/python/cpython/pull/24640 ___ Python tracker

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2021-02-24 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue24977] shutil copy to non-existant directory

2021-02-24 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> shutil.copy raises IsADirectoryError when the directory does not actually exist ___ Python tracker

[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2021-02-24 Thread John Hennig
John Hennig added the comment: @Floris: > Not mentioning Path.resolve()'s behavior w.r.t. non-existing files since that's documented in resolve() itself. I don't see it mentioned in the documentation of `resolve()`, or anywhere else in the docs, that on Windows (but not on other platforms)

[issue43310] Method __del__ with callable

2021-02-24 Thread Mark Dickinson
Mark Dickinson added the comment: Postscript: the "MethodType" that appears in the previous comment can be imported from the types module: "from types import MethodType". -- ___ Python tracker

[issue43310] Method __del__ with callable

2021-02-24 Thread Mark Dickinson
Mark Dickinson added the comment: The key difference between the func_del function and the instance C() is that func_del is a (non-data) descriptor in addition to being callable, while the instance C() is not. That makes func_del usable as a method. If you define C as follows, you'll see

[issue22080] Add windows_helper module helper

2021-02-24 Thread Eryk Sun
Eryk Sun added the comment: I rewrote windows_helper.py with cleaner ctypes code, better error handling, the correct implementation of restoring the previous privilege state, and without leaking the handle for the process token. It's kind of limited as a "Windows helper" module. It's just

[issue35077] Make TypeError message less ambiguous

2021-02-24 Thread coyot linden
coyot linden added the comment: 3.8 has come and gone, resubmitting this for 3.10 -- versions: +Python 3.10 -Python 3.8 ___ Python tracker ___

[issue43317] python -m gzip could use a larger buffer

2021-02-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

2021-02-24 Thread hai shi
hai shi added the comment: > It would be great to have a tool to check that all symbols exported on Unix > are also exported on Windows. I write a demo in PR 24639(compare the stable_abi.dat to python3dll.c). And the output result: ``` Some symbols from the limited API on windows are

[issue43310] Method __del__ with callable

2021-02-24 Thread Erik Soma
Erik Soma added the comment: You can wrap your callable in a regular function: ``` def hack_c(): c = C() def _(*args, **kwargs): return c(*args, **kwargs) return _ A.__del__ = hack_c() ``` Or (untested) make your callable an extension type with

[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

2021-02-24 Thread hai shi
Change by hai shi : -- keywords: +patch nosy: +shihai1991 nosy_count: 4.0 -> 5.0 pull_requests: +23424 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24639 ___ Python tracker

[issue43290] [sqlite3] remove legacy code from pysqlite_step

2021-02-24 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I’ll check all uses and see if we’ve got everything covered by the test suite. This is one of the core functions of the sqlite3 module (all queries call step at least once, but often multiple times), so I’d expect coverage is pretty good. --

[issue43315] Decimal.__str__ has no way to force exact decimal representation

2021-02-24 Thread Szymon
Szymon added the comment: Thanks for the replies. The use of format works great. Maybe it's worth mentioning in the documentation because using "%f" % Decimal("0.0001") leds to loosing precision (cast to float64 I guess) while using f"{"Decimal('0.0001'):f}" does the thing

[issue43305] A typo in /Modules/_io/bufferedio.c

2021-02-24 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +serhiy.storchaka, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43315] Decimal.__str__ has no way to force exact decimal representation

2021-02-24 Thread Steven D'Aprano
Steven D'Aprano added the comment: Python 3.5 to 3.9 are all in feature freeze and can accept no new features; new features can only be added to 3.10. But having said that, I agree with Mark that the correct solution here is to use format, not str. Szymon, unless you have a very argument

[issue43317] python -m gzip could use a larger buffer

2021-02-24 Thread Ruben Vorderman
New submission from Ruben Vorderman : python -m gzip reads in chunks of 1024 bytes: https://github.com/python/cpython/blob/1f433406bd46fbd00b88223ad64daea6bc9eaadc/Lib/gzip.py#L599 This hurts performance somewhat. Using io.DEFAULT_BUFFER_SIZE will improve it. Also 'io.DEFAULT_BUFFER_SIZE' is

[issue43290] [sqlite3] remove legacy code from pysqlite_step

2021-02-24 Thread Dong-hee Na
Dong-hee Na added the comment: Hmm by the way the current implementation returns SQLITE_OK if the statement is NULL, but it looks like return SQLITE_MISUSE if we apply this patch. Does it not cause any behavior regression? if so we should add news also. -- nosy: +corona10

[issue43316] python -m gzip handles error incorrectly

2021-02-24 Thread Ruben Vorderman
New submission from Ruben Vorderman : `Python -m gzip -d myfile` will throw an error because myfile does not end in '.gz'. That is fair (even though a bit redundant, GzipFile contains a header check, so why bother checking the extension?). The problem is how this error is thrown. 1. Error is

[issue43308] subprocess.Popen leaks file descriptors opened for DEVNULL or PIPE stdin/stdout/stderr arguments

2021-02-24 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43315] Decimal.__str__ has no way to force exact decimal representation

2021-02-24 Thread Mark Dickinson
Mark Dickinson added the comment: This is by design: the choice of -6 is not arbitrary, but follows the standard that the Decimal class is based on. Quoting from http://speleotrove.com/decimal/daconvs.html#reftostr: > If the exponent is less than or equal to zero and the adjusted exponent

[issue43315] Decimal.__str__ has no way to force exact decimal representation

2021-02-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +facundobatista, mark.dickinson, rhettinger ___ Python tracker ___ ___

[issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError

2021-02-24 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I believe we can proceed with this as planned. Serhiy, do you have additional comments or change requests? -- ___ Python tracker

[issue23634] os.fdopen reopening a read-only fd on windows

2021-02-24 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43290] [sqlite3] remove legacy code from pysqlite_step

2021-02-24 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23423 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24638 ___ Python tracker

[issue43290] [sqlite3] remove legacy code from pysqlite_step

2021-02-24 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: >From the SQLite 3.5.3 changelog: - sqlite3_step() returns SQLITE_MISUSE instead of crashing when called with a NULL parameter. -- ___ Python tracker

[issue43315] Decimal.__str__ has no way to force exact decimal representation

2021-02-24 Thread Szymon
New submission from Szymon : str(Decimal("0.0001")) always returns "1E-8" and there is no way to directly get the "0.0001" string back without writting custom method for converting DecimalTuple to string. This is caused by arbitrary choice of `and leftdigits > -6` condition in

[issue43314] [sqlite3] remove pre SQLite 3.7.7 support code

2021-02-24 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23422 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24637 ___ Python tracker

[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2021-02-24 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: That would work as well (raising KeyError or ValueError if `name` is not valid?) -- ___ Python tracker ___

[issue43314] [sqlite3] remove pre SQLite 3.7.7 support code

2021-02-24 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : I missed the SQLITE_OPEN_URI #ifdef in GH-24106. The "open URI" interface was added in 3.7.7. The dead code can safely be removed. $ grep -r SQLITE_OPEN_URI sqlite-3.7.6/ $ grep -r SQLITE_OPEN_URI sqlite-3.7.7/ [...] sqlite-3.7.7/sqlite3.h:#define

[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2021-02-24 Thread Christian Heimes
Christian Heimes added the comment: Do you need all three items or would "get_preferred_scheme(name: str) -> str" be sufficient? -- ___ Python tracker ___

[issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state

2021-02-24 Thread junyixie
New submission from junyixie : https://github.com/ericsnowcurrently/multi-core-python/issues/73 https://github.com/JunyiXie/cpython/commit/820954879fd546fcb29b654d10c424bd47da70ce changes: move pymalloc state in obmalloc.h _is add pymalloc_state pymalloc_allocxx api use subinterpreter

[issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state

2021-02-24 Thread junyixie
Change by junyixie : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2021-02-24 Thread mattip
mattip added the comment: I wonder if the distro maintainers might be able to use this to reduce the patching they do for their schema? -- nosy: +mattip ___ Python tracker

[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2021-02-24 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: Adding Christian to the nosy list since IIRC you said something related to this a while ago. -- nosy: +christian.heimes ___ Python tracker

[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2021-02-24 Thread Tzu-ping Chung
New submission from Tzu-ping Chung : While trying to migrate pip’s internal usages of distutils to sysconfig,[1] I noticed there isn’t a way for pip to select a scheme for sysconfig.get_paths() for `pip install --target` and `pip install --user`. I tried to implement some logic to "guess" a

[issue43311] PyInterpreterState_New use thread tstate before set.

2021-02-24 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +23420 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24636 ___ Python tracker ___

[issue43311] PyInterpreterState_New use thread tstate before set.

2021-02-24 Thread junyixie
New submission from junyixie : PyInterpreterState_New use thread tstate before set. PyInterpreterState_New use tstate. but tstate is not set. tstate will set after PyInterpreterState_New. PyInterpreterState *interp = PyInterpreterState_New(); if (interp == NULL) { *tstate_p =