[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2021-01-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I subscribe that but is also a matter of what are the optimizations with higher ratio impact/(cost+complexity). Caching the function pointers on binary operations or (better IMHO) comparisons is likely a good candidate --

[issue42528] Improve the docs of most Py*_Check{,Exact} API calls

2021-01-06 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +22968 pull_request: https://github.com/python/cpython/pull/24139 ___ Python tracker

[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2021-01-06 Thread STINNER Victor
STINNER Victor added the comment: See also "Configure Python initialization (PyConfig) in Python" https://mail.python.org/archives/list/python-...@python.org/thread/HQNFTXOCDD5ROIQTDXPVMA74LMCDZUKH/#X45X2K4PICTDJQYK3YPRPR22IGT2CDXB And bpo-42260: [C API] Add PyInterpreterState_SetConfig():

[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-01-06 Thread Mark Shannon
Mark Shannon added the comment: OK, I won't merge anything yet. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset fe9f446afe46bd716592eda9fa2af8d9f46bbce4 by Erlend Egeberg Aasland in branch 'master': bpo-41798: Allocate _decimal extension module C API on the heap (GH-24117) https://github.com/python/cpython/commit/fe9f446afe46bd716592eda9fa2af8d9f46bbce4

[issue42528] Improve the docs of most Py*_Check{,Exact} API calls

2021-01-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 315fc52db17b19fe30aa9193f26adf69e18d8844 by Antonio Cuni in branch 'master': bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602) https://github.com/python/cpython/commit/315fc52db17b19fe30aa9193f26adf69e18d8844

[issue42681] Incorrect range checks/documentation in curses

2021-01-06 Thread STINNER Victor
STINNER Victor added the comment: Great work, thank you Serhiy! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Then why not fix the compiler? As I understand, it is not clear yet what behavior should be, and discussing it is the matter of issue42725. Any changes before the decision be made are preliminary. It is very likely that the decision will be in favor of

[issue41629] __class__ not set defining 'X' as

2021-01-06 Thread Richard Neumann
Richard Neumann added the comment: I just stumbled across this issue trying to resolve this: https://bugs.python.org/issue42765? While this fails: from typing import NamedTuple class Spamm(NamedTuple): foo: int bar: str def __getitem__(self, index_or_key): """Returns

[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-01-06 Thread Mark Shannon
Mark Shannon added the comment: The aim is to change the behavior of the symbol table to match the compiler. The behavior has already changed at module scope. Python 3.9.0+ >>> x:(yield None) File "", line 1 SyntaxError: 'yield' outside function >>> Python 3.10.0a4+ >>> x:(yield None)

[issue42765] Introduce new data model method __iter_items__

2021-01-06 Thread Richard Neumann
Richard Neumann added the comment: Okay, I found the solution. Not using super() works: from typing import NamedTuple class Spamm(NamedTuple): foo: int bar: str def __getitem__(self, index_or_key): if isinstance(index_or_key, str): try:

[issue42541] Tkinter colours wrong on MacOS universal2

2021-01-06 Thread E. Paine
E. Paine added the comment: This does not appear to be a problem anymore on Tk 8.6.11 so I think this issue can be closed. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue42765] Introduce new data model method __iter_items__

2021-01-06 Thread Richard Neumann
Richard Neumann added the comment: Thank you all for your input. I had a look at aforementioned discussion and learned something new. So I tried to implement the dict data model by implementing keys() and __getitem__() accordingly: from typing import NamedTuple class Spamm(NamedTuple):

[issue39457] Add an autocommit property to sqlite3.Connection with a PEP 249 compliant manual commit mode and migrate

2021-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 05.01.2021 19:04, Géry wrote: > > @lemburg > >> I guess the SQLite driver does not start a new transaction for SELECTs, >> since these are usually read-only > > Nor for DDL statements (CREATE, DROP). Those are definitely changing the database and

[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does not it change the current behavior? I do not see a difference with issue42725. >>> def f(): ... x: (yield) ... >>> f() -- ___ Python tracker

[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-01-06 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +22967 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/24138 ___ Python tracker

[issue42725] PEP 563: Should the behavior change for yield/yield from's

2021-01-06 Thread Mark Shannon
Mark Shannon added the comment: I've also opened #42837 which is about fixing the symbol table, so that it is correct w.r.t. to current behavior. I'd like to fix it ASAP as the compiler should be able to rely on the symbol table being correct. Of course, once we have decided what the

[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-01-06 Thread Mark Shannon
Mark Shannon added the comment: No this is not a duplicate. This is about making the symbol table correct for current semantics. #42725 is about changing the behavior -- resolution: duplicate -> status: closed -> open superseder: PEP 563: Should the behavior change for yield/yield

[issue39508] no module curses error although i downloaded the module - windows 10

2021-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The curses module is not supported on Windows. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> curses for win32 ___ Python tracker

[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue42725. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> PEP 563: Should the behavior change for yield/yield from's ___

[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-01-06 Thread Mark Shannon
New submission from Mark Shannon : This is an internal inconsistency. I have not identified any surface level bugs, but it is a trap for future compiler work. -- assignee: Mark.Shannon messages: 384479 nosy: Mark.Shannon, larry priority: normal severity: normal status: open title:

[issue31951] import curses is broken on windows

2021-01-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> curses for win32 ___ Python tracker ___

[issue42164] Python fails to compile in the Fedora Stable LTO buildbots

2021-01-06 Thread STINNER Victor
STINNER Victor added the comment: Buildbots are back to green. It seems like the bug is gone with "gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)". -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2021-01-06 Thread STINNER Victor
STINNER Victor added the comment: boost-python was using the removed private _Py_fopen() function, I proposed https://github.com/boostorg/python/pull/344 to replace _Py_fopen() with fopen(). -- ___ Python tracker

[issue42836] docs: struct: clarify struct caching behaviour

2021-01-06 Thread Sandeep Subramanian
New submission from Sandeep Subramanian : As per docs in :https://docs.python.org/3.7/library/struct.html#struct.Struct > The compiled versions of the most recent format strings passed to Struct and > the module-level functions are cached, so programs that use only a few format > strings

<    1   2