[issue34013] Inconsistent SyntaxError for print

2021-02-19 Thread Irit Katriel
Irit Katriel added the comment: I agree with Terry’s point about printing long expressions in the error msg. Perhaps just the preamble would be useful though: SyntaxError: Missing parentheses in call to 'print'. Instead of just SyntaxError: invalid syntax. -- _

[issue43263] threading module unable to run

2021-02-19 Thread twoone3
New submission from twoone3 <3197653...@qq.com>: When I use embedded Python to import and use threading module,The program will hang,I tested it in versions 3.6.5 and 3.9.1. -- components: C API messages: 387293 nosy: twoone3 priority: normal severity: normal status: open title: thread

[issue43263] threading module unable to run

2021-02-19 Thread Ronald Oussoren
Ronald Oussoren added the comment: Please add more information about what you're doing. Your report does not contain enough information to try to reproduce the problem. This is supposed to work just fine, and does work for me. -- nosy: +ronaldoussoren __

[issue43264] Nested EventProxy in ListProxy cause FileNotFoundError: [Errno 2] No such file or directory problem

2021-02-19 Thread Tobiichi
New submission from Tobiichi <754785...@qq.com>: I append EventProxy into ListProxy like this: ``` l = manager.list([mp.Event() for _ in range(2)]) ``` It works fine on a single node when I'm trying to get this listproxy. but when I trying to use multiple nodes across ethernet. it cause probl

[issue43264] Nested EventProxy in ListProxy cause FileNotFoundError: [Errno 2] No such file or directory problem

2021-02-19 Thread Tobiichi
Change by Tobiichi <754785...@qq.com>: Added file: https://bugs.python.org/file49820/client1.py ___ Python tracker ___ ___ Python-bugs-list

[issue43264] ListProxy with EventProxy in caused FileNotFoundError: [Errno 2] No such file or directory problem

2021-02-19 Thread Tobiichi
Change by Tobiichi <754785...@qq.com>: -- title: Nested EventProxy in ListProxy cause FileNotFoundError: [Errno 2] No such file or directory problem -> ListProxy with EventProxy in caused FileNotFoundError: [Errno 2] No such file or directory problem _

[issue43263] threading module unable to run

2021-02-19 Thread twoone3
twoone3 <3197653...@qq.com> added the comment: I use cpython to running .py file,the file created a new thread,but the exe can't continue to run -- ___ Python tracker ___

[issue43265] Improve sqlite3 backup error handling

2021-02-19 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : There are some issues with the error handling in pysqlite_connection_backup_impl(): 1. ValueError is returned if the target connection equals source connection. Should be OperationalError, IMHO. 2. The aforementioned check is already performed by

[issue43266] "String conversion and formatting" formatting messes up array subscripting

2021-02-19 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : str[size-1] is rendered incorrectly in https://docs.python.org/3.10/c-api/conversion.html The original intent was probably to apply italics to the variables names only. This can be fixed by prefixing the first bracket with a backslash. However, th

[issue43266] "String conversion and formatting" formatting messes up array subscripting

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

[issue43260] Never release buffer when MemoryError in print()

2021-02-19 Thread Eryk Sun
Eryk Sun added the comment: The sys.stdout TextIOWrapper is stuck in a bad state. When the write() method is called with an ASCII string, it implements an optimization that stores a reference to the str() object in the internal pending_bytes instead of immediately encoding the string. Subseq

[issue43260] Never release buffer when MemoryError in print()

2021-02-19 Thread Eryk Sun
Eryk Sun added the comment: Issue 36748 added the ASCII optimization in write(), so I'm adding Inada Naoki to the nosy list. -- nosy: +methane ___ Python tracker ___

[issue43251] sqlite3_column_name() failures should raise MemoryError

2021-02-19 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- title: sqlite3_column_name() failures should call PyErr_NoMemory() -> sqlite3_column_name() failures should raise MemoryError ___ Python tracker

[issue43175] filecmp is not working for UTF-8 BOM file.

2021-02-19 Thread suresh
suresh added the comment: I am getting same file size and are regular files (True) as below. Could you assist on filecmp any changes required in passing the inputs. Since it returns false. Code: >>> os.chdir(r'C:\Users\suresh.n\Files') >>> open('source.css', 'rb').read() == open('destinati

[issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter()

2021-02-19 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : The type checks at the start of pysqlite_statement_bind_parameter() are redundant: We first check for exact types (*_CheckExact()), and then we check again for exact or subtyped versions (*_Check()). (Adding to the redundantness: the result of this

[issue43263] threading module unable to run

2021-02-19 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry, but as Ronald says there's not nearly enough information here. Some questions: - What do you mean by "embedded Python"? - What is "the exe" that you refer to in your second mesasge? Is that python.exe? Is that an executable you compiled from your Pyth

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: I rephrased PR 24564 to clarify the scope of the incompatible change: in practice, only the types.FunctionType constructor changes. Defining functions in Python using "def function(...): ...", eval(code, {}) and exec(code, {}) are not affected. eval() and ex

[issue43258] Prevent needless allocation of sqlite3 aggregate function context

2021-02-19 Thread Berker Peksag
Berker Peksag added the comment: New changeset 979b23cbe44071b056ff524c0aa20e5d9794b5b0 by Erlend Egeberg Aasland in branch 'master': bpo-43258: Don't allocate sqlite3 aggregate context for empty queries (GH-24569) https://github.com/python/cpython/commit/979b23cbe44071b056ff524c0aa20e5d9794b

[issue43258] Prevent needless allocation of sqlite3 aggregate function context

2021-02-19 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23353 pull_request: https://github.com/python/cpython/pull/24574 ___ Python tracker ___ __

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: Updated PR documentation: --- The types.FunctionType constructor now inherits the current builtins if the globals parameter is used and the globals dictionary has no "__builtins__" key, rather than rather than using {"None": None} as builtins: same behavior tha

[issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey)

2021-02-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23354 pull_request: https://github.com/python/cpython/pull/24575 ___ Python tracker ___ __

[issue34013] Inconsistent SyntaxError for print

2021-02-19 Thread Vedran Čačić
Vedran Čačić added the comment: > "It's still one of the most common beginner mistakes" Do you have any data to back this up? I really think it's overblown. On the other hand, if it really _is_ so, how about changing the language? It wouldn't be the first thing that was changed for Py3, and t

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

2021-02-19 Thread STINNER Victor
New submission from STINNER Victor : I modified many internal C functions to pass the current Python thread state (tstate), but in practice, only the current interpreter (interp) is needed. -- components: Interpreter Core messages: 387308 nosy: vstinner priority: normal severity: norma

[issue43258] Prevent needless allocation of sqlite3 aggregate function context

2021-02-19 Thread Berker Peksag
Berker Peksag added the comment: New changeset 2bb0bf4dd8c0bd4d23eb04afce1a58e07982 by Erlend Egeberg Aasland in branch 'master': bpo-43258: Make sqlite3 callback functions static (GH-24574) https://github.com/python/cpython/commit/2bb0bf4dd8c0bd4d23eb04afce1a58e07982 -- __

[issue43258] Prevent needless allocation of sqlite3 aggregate function context

2021-02-19 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

2021-02-19 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +23355 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24576 ___ Python tracker ___ _

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

2021-02-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23356 pull_request: https://github.com/python/cpython/pull/24577 ___ Python tracker ___ __

[issue43269] [sqlite3] Clean up function scoping

2021-02-19 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : There's a lot of file scoped functions without the static storage-class specifier. All file local functions should have the static storage-class specifier. -- components: Library (Lib) messages: 387310 nosy: berker.peksag, erlendaasland pri

[issue43269] [sqlite3] Clean up function scoping

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

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5592f2b9daa24bf74cc616abcc40a29da2bdccb2 by Victor Stinner in branch 'master': bpo-43268: Replace _PyThreadState_GET() with _PyInterpreterState_GET() (GH-24576) https://github.com/python/cpython/commit/5592f2b9daa24bf74cc616abcc40a29da2bdccb2

[issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey)

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 62078101ea1be5d2fc472a3f0d9d135e0bd5cd38 by Victor Stinner in branch 'master': bpo-40522: Replace PyThreadState_GET() with PyThreadState_Get() (GH-24575) https://github.com/python/cpython/commit/62078101ea1be5d2fc472a3f0d9d135e0bd5cd38 ---

[issue34013] Inconsistent SyntaxError for print

2021-02-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Let's step back a bit and focus on the issue at hand. The problem is the following: * We **already** have a warning for the print statement without parens: Python 3.9.1 (default, Dec 14 2020, 11:49:16) [Clang 12.0.0 (clang-1200.0.32.27)] on darwin Typ

[issue43269] [sqlite3] Clean up function scoping

2021-02-19 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ref. https://github.com/python/cpython/pull/24569#issuecomment-782014177, Berker. -- ___ Python tracker ___

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 101bf69ff18a946fed7c274f088878aaf85174cc by Victor Stinner in branch 'master': bpo-43268: _Py_IsMainInterpreter() now expects interp (GH-24577) https://github.com/python/cpython/commit/101bf69ff18a946fed7c274f088878aaf85174cc -- _

[issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group

2021-02-19 Thread Christoph Anton Mitterer
Christoph Anton Mitterer added the comment: Okay the problem seems to be that I didn't give you the exact details on what I do. Actually, the group (which then contains the mutually exclusive group) is contained in a "shared" parent parser, which I then use in the subparsers. If I leave out

[issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group

2021-02-19 Thread Christoph Anton Mitterer
Change by Christoph Anton Mitterer : Added file: https://bugs.python.org/file49822/test-no-parent.py ___ Python tracker ___ ___ Python-bugs-

[issue34013] Inconsistent SyntaxError for print

2021-02-19 Thread Andre Roberge
Andre Roberge added the comment: +1 to the idea of adding something to the grammar, and have a simple error message: SyntaxError: Missing parentheses in call to 'print'. in *all* cases, including the first one that prompted this bug report. I write that even though I have created a third-pa

[issue43270] [C API] Remove _PyErr_OCCURRED() macro

2021-02-19 Thread STINNER Victor
New submission from STINNER Victor : The private _PyErr_OCCURRED() function was introduced to optimize Objects/setobject.c: commit 5ba0cbe39221ff8985ce5a4702a3b01a17ae3248 Author: Raymond Hettinger Date: Sat Aug 6 18:31:24 2005 + * set_new() doesn't need to zero the structure a sec

[issue43270] [C API] Remove _PyErr_OCCURRED() macro

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: > #define _PyErr_OCCURRED() (PyThreadState_GET()->curexc_type) But this way, this macro access directly the PyThreadState.curexc_type member which goes against the bpo-39947 "[C API] Make the PyThreadState structure opaque (move it to the internal C API)" is

[issue43270] [C API] Remove _PyErr_OCCURRED() macro

2021-02-19 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +23358 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24579 ___ Python tracker ___ _

[issue43270] [C API] Remove _PyErr_OCCURRED() macro

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: _PyErr_Occurred() is defined as: static inline PyObject* _PyErr_Occurred(PyThreadState *tstate) { assert(tstate != NULL); return tstate->curexc_type; } -- ___ Python tracker

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

2021-02-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23359 pull_request: https://github.com/python/cpython/pull/24580 ___ Python tracker ___ __

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

2021-02-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23360 pull_request: https://github.com/python/cpython/pull/24581 ___ Python tracker ___ __

[issue27646] doc: yield from expression can be any iterable

2021-02-19 Thread Irit Katriel
Change by Irit Katriel : -- title: yield from expression can be any iterable -> doc: yield from expression can be any iterable versions: +Python 3.10 -Python 3.5, Python 3.6 ___ Python tracker __

[issue42093] Add opcode cache for LOAD_ATTR

2021-02-19 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 4.0 -> 5.0 pull_requests: +23361 pull_request: https://github.com/python/cpython/pull/24582 ___ Python tracker ___ ___

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset acde3f1530f1664c9ec7f22e16a7f54c5191e4a6 by Victor Stinner in branch 'master': bpo-43268: Remove abusive usage of tstate in sysmodule.c (#24581) https://github.com/python/cpython/commit/acde3f1530f1664c9ec7f22e16a7f54c5191e4a6 --

[issue43270] [C API] Remove _PyErr_OCCURRED() macro

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

[issue43270] [C API] Remove _PyErr_OCCURRED() macro

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset a486054b24658fa623e030ddd4cc0cbfcac54ab0 by Victor Stinner in branch 'master': bpo-43270: Remove private _PyErr_OCCURRED() macro (GH-24579) https://github.com/python/cpython/commit/a486054b24658fa623e030ddd4cc0cbfcac54ab0 -- _

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset bcb094b41f7fe4dd1686c50891d85632fcf0d481 by Victor Stinner in branch 'master': bpo-43268: Pass interp rather than tstate to internal functions (GH-24580) https://github.com/python/cpython/commit/bcb094b41f7fe4dd1686c50891d85632fcf0d481 ---

[issue30425] Python 3.6.1 (32-bit)_20170522020736.log

2021-02-19 Thread Irit Katriel
Irit Katriel added the comment: Chakrit, what is the issue you are reporting here? -- nosy: +iritkatriel resolution: -> not a bug status: open -> pending ___ Python tracker _

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

2021-02-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23362 pull_request: https://github.com/python/cpython/pull/24583 ___ Python tracker ___ __

[issue43255] Ceil division with /// operator

2021-02-19 Thread Boštjan Mejak
Boštjan Mejak added the comment: Mr. Stinner, I really don't understand what are you hinting at. -- ___ Python tracker ___ ___ Pytho

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 839184f85cb2d2ad514fff9b431733d1c9607533 by Victor Stinner in branch 'master': bpo-43268: local_clear() uses _PyInterpreterState_GET() (GH-24583) https://github.com/python/cpython/commit/839184f85cb2d2ad514fff9b431733d1c9607533 -- ___

[issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)

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

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4a6bf276ed3e6687394afe26b0d9a061ac06fc6b by Nicholas Sim in branch 'master': bpo-35134: Move non-limited C API files to Include/cpython/ (GH-24561) https://github.com/python/cpython/commit/4a6bf276ed3e6687394afe26b0d9a061ac06fc6b -- _

[issue43257] get_type_hints evaluates class variables before type hints

2021-02-19 Thread Ken Jin
Ken Jin added the comment: Hmm I noticed this occurs in Python 3.9 but not 3.10. If you insert ``from __future__ import annotations`` at the start of your code, it stops erroring. Anyways, I don't think this is dataclass specific, the following code using a plain class also errors: ``` from

[issue43265] Improve sqlite3 backup error handling

2021-02-19 Thread Berker Peksag
Berker Peksag added the comment: I'm not sure about 1) because if target == source it means a user error. OperationalError is usually used for non-user errors. 3) sounds good to me if that part is already covered by tests and they passed. -- ___ P

[issue43265] Improve sqlite3 backup error handling

2021-02-19 Thread Андрей Воропаев
Change by Андрей Воропаев : Added file: https://bugs.python.org/file49823/DOC-20200420-WA ___ Python tracker ___ ___ Python-bugs-list mai

[issue43266] "String conversion and formatting" formatting messes up array subscripting

2021-02-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 2d3e463e4a5aa109d1c15c86f9631580f5ef7a7e by Erlend Egeberg Aasland in branch 'master': closes bpo-43266: Improve array formatting. (GH-24573) https://github.com/python/cpython/commit/2d3e463e4a5aa109d1c15c86f9631580f5ef7a7e -- nosy:

[issue43266] "String conversion and formatting" formatting messes up array subscripting

2021-02-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +23364 pull_request: https://github.com/python/cpython/pull/24585 ___ Python tracker ___ __

[issue43266] "String conversion and formatting" formatting messes up array subscripting

2021-02-19 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23363 pull_request: https://github.com/python/cpython/pull/24584 ___ Python tracker _

[issue43257] get_type_hints evaluates class variables before type hints

2021-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: Sure looks like a compiler bug! Can you investigate whether this occurs in earlier Python versions? Maybe bisect if it doesn’t? -- ___ Python tracker _

[issue43255] Ceil division with /// operator

2021-02-19 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue43266] "String conversion and formatting" formatting messes up array subscripting

2021-02-19 Thread miss-islington
miss-islington added the comment: New changeset 1cfed3d5b0ec1419c8a1d5cf8bff1a6e1483771a by Miss Islington (bot) in branch '3.9': closes bpo-43266: Improve array formatting. (GH-24573) https://github.com/python/cpython/commit/1cfed3d5b0ec1419c8a1d5cf8bff1a6e1483771a --

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

2021-02-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23365 pull_request: https://github.com/python/cpython/pull/24582 ___ Python tracker ___ __

[issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group

2021-02-19 Thread paul j3
paul j3 added the comment: The parents mechanism is not elaborate. It copies groups and actions by reference. The comments that I quoted actually come from that method that does this copying. >From a quick glance at that code I see that it does not preserve the group >nesting. Mutually

[issue43251] sqlite3_column_name() failures should raise MemoryError

2021-02-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, it returns NULL in case of out of memory, but is it the only cause? Can NULL be returned for other reasons? -- ___ Python tracker __

[issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter()

2021-02-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a kind of optimization. We first perform few fast checks for exact types, and then slower subclass checks. I do not know whether this optimization is worth, but it was written so, and there is nothing wrong in it. -- nosy: +serhiy.storchaka

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

2021-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: Please revert this and use a separate build flag (e.g. DISABLE_INLINE_CACHES) for the refleaks run. (Or perhaps provide an -X flag to disable it without the need to recompile.) I am developing new inline cache ideas and of course I need to run in debug mo

[issue42402] Termios module documentation is extremely lacking

2021-02-19 Thread Irit Katriel
Irit Katriel added the comment: Could it simply be that the link to mod:`termios` should have been to :manpage:`termios(3)` instead? -- nosy: +iritkatriel ___ Python tracker

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

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue (but I'm not interested by trying to fix it). -- resolution: fixed -> status: closed -> open ___ Python tracker ___ _

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

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: > (Or perhaps provide an -X flag to disable it without the need to recompile.) Giving the ability to control the cache size, at least at Python startup, is one option. Or maybe need a generic -X flag to tell Python that libregrtest is tracking leaks, since

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, that's clearer. I'm still worried about the change in semantics where globals["__builtins__"] is assigned a different dict after the function object has been created (similar to https://bugs.python.org/file49816/func_builtins2.py). I.e. def foo()

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-19 Thread Mark Shannon
Mark Shannon added the comment: In Python 3.9 the binding is more late-ish binding, than true late binding. Because globals['__builtins__'] is cached for each function activation, executing functions don't see updates. Example: >>> def f(): ... print(len("test")) ... bltns = f.__glo

[issue28007] Bad .pyc files prevent import of otherwise valid .py files.

2021-02-19 Thread Brian Hulette
Brian Hulette added the comment: Hey there, I just came across this bug when looking into a problem with corrupted pyc files. Was the patch ever applied? I'm still seeing the original behavior in Python 3.7. Thanks! -- nosy: +hulettbh ___ Python

[issue43265] Improve sqlite3 backup error handling

2021-02-19 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > I'm not sure about 1) because if target == source it means a user error. > OperationalError is usually used for non-user errors. Yes, my bad. ProgrammingError would be better. target == source results in SQLITE_ERROR, BTW. I'll throw up a PR for 3.

[issue28007] Bad .pyc files prevent import of otherwise valid .py files.

2021-02-19 Thread Brett Cannon
Brett Cannon added the comment: Since this is still open I would assume it never made it in. -- ___ Python tracker ___ ___ Python-b

[issue43263] threading module unable to run

2021-02-19 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> works for me status: open -> pending ___ Python tracker ___ ___ Python-bugs-list maili

[issue43265] Improve sqlite3 backup error handling

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

[issue42990] Improve the C code for calling Python code: _PyEval_EvalCode()

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: Guido: "I'm still worried about the change in semantics where globals["__builtins__"] is assigned a different dict after the function object has been created (...)" Well, there is a semantics change of Python 3.10 documented at: https://docs.python.org/dev/w

[issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter()

2021-02-19 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > It is a kind of optimization. PyLong_Check is very fast (only one comparison, AFAICS), so there is no gain in first doing PyLong_CheckExact and then PyLong_Check. Ditto for unicode. PyFloat_Check is the most expensive check, but it comes before bot

[issue43251] sqlite3_column_name() failures should raise MemoryError

2021-02-19 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Well, it returns NULL in case of out of memory, but is it the only cause? Can > NULL be returned for other reasons? According to the SQLite docs, no. Looking at the source code, we see that it also returns NULL if the second parameter (column index

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

2021-02-19 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- title: sqlite3_column_name() failures should raise MemoryError -> [sqlite3] sqlite3_column_name() failures should raise MemoryError ___ Python tracker __

[issue43265] [sqlite3] Improve backup error handling

2021-02-19 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- title: Improve sqlite3 backup error handling -> [sqlite3] Improve backup error handling ___ Python tracker ___ __

[issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow

2021-02-19 Thread STINNER Victor
New submission from STINNER Victor : AMD64 Windows10 3.x, build 856: https://buildbot.python.org/all/#/builders/146/builds/856 17 tests failed: test_exceptions test_fileio test_io test_isinstance test_json test_lib2to3 test_logging test_pickle test_pickletools test_plistlib test_ric

[issue43166] Unused letters in Windows-specific pragma optimize

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: Since this change, AMD64 Windows10 3.x buildbot started to crash with Windows fatal exception: stack overflow -> see bpo-43271. -- nosy: +vstinner ___ Python tracker __

[issue43272] AMD64 Arch Linux VintageParser 3.9: test_fstring test_named_expressions test_unpack_ex failed

2021-02-19 Thread STINNER Victor
New submission from STINNER Victor : AMD64 Arch Linux VintageParser 3.9: https://buildbot.python.org/all/#/builders/495/builds/147 3 tests failed: test_fstring test_named_expressions test_unpack_ex The latest success build was 4 months ago (Nov 2): https://buildbot.python.org/all/#/builder

[issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow

2021-02-19 Thread Steve Dower
Steve Dower added the comment: Looks like someone increased the size of locals in the ceval functions. If any new buffers have been added recently, moving the processing into a helper function or using a single buffer instead of allocating them in separate if/case blocks can help reduce it.

[issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow

2021-02-19 Thread STINNER Victor
STINNER Victor added the comment: If someone wants to measure the stack memory usage per function call, _testcapi.stack_pointer() can be used: see bpo-30866. -- ___ Python tracker __

[issue41837] Upgrade installers to OpenSSL 1.1.1i

2021-02-19 Thread Steve Dower
Steve Dower added the comment: Looks like we missed Christian's last message... Have OpenSSL made an updated release? If this issue is as bad as the short description above sounds, I expect they would have. It's possible to rebuild with the patch, but easier if it's a release. (Also, Christ

[issue30480] samefile and sameopenfile fail for WebDAV mapped drives

2021-02-19 Thread Steve Dower
Steve Dower added the comment: Same as issue33935, but since the newer issue has proposed solutions on it already, I'm preferring to keep that one open. -- resolution: -> duplicate stage: test needed -> resolved status: open -> closed ___ Python t

[issue42405] Add distutils mvsccompiler support for Windows ARM64 build

2021-02-19 Thread Steve Dower
Steve Dower added the comment: Closed due to PEP 632 (distutils is now deprecated). Changes to support this should go into setuptools or another build backend. I'm already trying to get some resources together to help these other projects build/test on ARM64, so that should help. If someone

[issue42338] Enable Debug Build For Python Native Modules in Windows, with Visual Studio Toolchain

2021-02-19 Thread Steve Dower
Steve Dower added the comment: That's the best solution. Alternatively, you can install the debug binaries of CPython using the option in the installer, recompile 3rd party packages from source, and use true debug builds that way. Unfortunately, there's not much we can do about 3rd party pa

[issue41837] Upgrade installers to OpenSSL 1.1.1i

2021-02-19 Thread Ned Deily
Change by Ned Deily : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue43265] [sqlite3] Improve backup error handling

2021-02-19 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: The unit test suite shows one case of improved "exception text". I'd say it's an improvement. $ ./python.exe # with GH-24586 applied >>> import sqlite3 >>> c1 = sqlite3.connect(":memory:") >>> c2 = sqlite3.connect(":memory:") >>> c1.backup(c2, name="

[issue42825] Build libraries with "/OPT:REF" linker optimization on Windows

2021-02-19 Thread Austin Lamb
Austin Lamb added the comment: What are the next steps for this - anything else I can provide, or is someone able to take a look at the Pull Request? Thanks! -- ___ Python tracker _

[issue42027] /passive run of Windows installer fail silently on Win7

2021-02-19 Thread Steve Dower
Steve Dower added the comment: Probably an easy fix, if someone has a Win7 machine around to test on (which I don't these days). There are some UI level comparisons in the bootstrapper C++ file under Tools/msi that probably need fixing. Not urgent. Won't be long until Win10 is the only one w

[issue43181] Python macros don’t shield arguments

2021-02-19 Thread Vitaliy
Vitaliy added the comment: Thanks for the fix, it works for my use case. (btw that was #define U(...) __VA_ARGS__ and not what I wrote). > I don't think that PR 24533 should be backported to Python 3.8 and Python > 3.9. I prefer to avoid any risk of regression, and so only change Python 3.

[issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow

2021-02-19 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +Mark.Shannon, gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

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

2021-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: > Giving the ability to control the cache size, at least at Python startup, is > one option. I'd really prefer not to allow users to control cache sizes. There's basically no point in that; the only practically useful thing is to enable or disable it. -

  1   2   >