[issue45121] Regression in 3.9.7 with typing.Protocol

2021-09-06 Thread Shantanu
Shantanu added the comment: As I mentioned in the post, bpo-45081 actually makes this issue worse, since we get a RecursionError. I think `TypeError: Protocols cannot be instantiated` is probably okay behaviour (as opposed to RecursionError), more just unfortunate that it seems to be an una

[issue45121] Regression in 3.9.7 with typing.Protocol

2021-09-06 Thread Shantanu
Shantanu added the comment: Sorry if my message was confusing. Hopefully the following makes things clear: 3.9.6: snippet runs without error 3.9.7, with bpo-44806: (a probably reasonable) TypeError, but a breaking change main, with bpo-45081: RecursionError -- _

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread Dong-hee Na
Dong-hee Na added the comment: FYI, mypyc is using PyCode_New. mypyc should be fixed not to use PyCode_New :) -- ___ Python tracker ___ ___

[issue45115] Windows: enable compiler optimizations when building Python in debug mode

2021-09-06 Thread Dong-hee Na
Dong-hee Na added the comment: I sent the patch for this issue: https://github.com/python/mypy/pull/11067 -- nosy: +corona10 ___ Python tracker ___ ___

[issue45115] Windows: enable compiler optimizations when building Python in debug mode

2021-09-06 Thread Dong-hee Na
Change by Dong-hee Na : -- Removed message: https://bugs.python.org/msg401202 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread Dong-hee Na
Dong-hee Na added the comment: I sent the patch for this issue: https://github.com/python/mypy/pull/11067 -- ___ Python tracker ___ ___

[issue20115] NUL bytes in commented lines

2021-09-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: What I missed before is that duplicating the effect of the first two interactive entries (no exception) requires escaping the backslash so that the source argument for the explicit compile does not have a null. compile("'\\0'", '', 'exec') at 0x0214431

[issue44892] [configparser] Module configparser fails when the config file contains a0918076336 "100%" inside a commentary

2021-09-06 Thread Nirawat Puechpian
Change by Nirawat Puechpian : -- assignee: -> terry.reedy components: +Extension Modules, FreeBSD, IDLE, IO, Installation, Interpreter Core, SSL, Subinterpreters, Tests, Tkinter, Windows, XML, macOS -Library (Lib) nosy: +koobs, ned.deily, paul.moore, ronaldoussoren, steve.dower, terry

[issue45117] `dict` not subscriptable despite using `__future__` typing annotations

2021-09-06 Thread Dennis Sweeney
Dennis Sweeney added the comment: Hi Stefan, `from __future__ import annotations` only affects annotations -- just the things after the colon. It makes it so that annotations are never evaluated, so things like this work: >>> from __future__ import annotations >>> x: nonsense()()()(

[issue45123] PyAiter_Check & PyObject_GetAiter issues

2021-09-06 Thread Yury Selivanov
New submission from Yury Selivanov : Per discussion on python-dev (also see the linked email), PyAiter_Check should only check for `__anext__` existence (and not for `__aiter__`) to be consistent with `Py_IterCheck`. While there, I'd like to rename PyAiter_Check to PyAIter_Check and PyObject

[issue45123] PyAiter_Check & PyObject_GetAiter issues

2021-09-06 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +26618 pull_request: https://github.com/python/cpython/pull/28194 ___ Python tracker ___ _

[issue44892] [configparser] Module configparser fails when the config file contains a "%" inside a commentary

2021-09-06 Thread Kubilay Kocak
Change by Kubilay Kocak : -- assignee: terry.reedy -> components: +Library (Lib) -Extension Modules, FreeBSD, IDLE, IO, Installation, Interpreter Core, SSL, Subinterpreters, Tests, Tkinter, Windows, XML, macOS nosy: +lukasz.langa -koobs, ned.deily, paul.moore, ronaldoussoren, steve.do

[issue44892] Configparser fails when the file contains $ inside a comment

2021-09-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Diego, I repaired the defacement, which included removing you as nosy. Relevant doc: https://docs.python.org/3/library/configparser.html#configparser.BasicInterpolation To me, the following line implies that % may be used freely in comments. gain: 80%% #

[issue20115] NUL bytes in commented lines

2021-09-06 Thread Guido van Rossum
Guido van Rossum added the comment: Serhiy’s comment from 2014-01-04 gives the answer. It’s different reading from a file than from a string. And only “python x.py” still reads from a file. -- ___ Python tracker

[issue44892] Configparser fails when the .cfg file contains comments

2021-09-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Make PR branch from main, which I used for testing. I verified issue on 3.10 and 3.9, so we will backport. -- stage: needs patch -> test needed title: Configparser fails when the file contains $ inside a comment -> Configparser fails when the .cfg fi

[issue45104] Error in __new__ docs

2021-09-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would be happy with just "instance of cls". Elsewhere in the docs, that phrasing almost always means "instance of a cls or instance of a subclass of cls". Also, it is consistent with the meaning of isinstance(inst, cls) unless overridden by ABC logic.

[issue44892] Configparser fails when the .cfg file contains comments

2021-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: By default configparser does not support inline comments. "# percentage sign '%'" is a part of value. If you want to support inline comments you should pass the inline_comment_prefixes argument. But note that it can break parsing existing valid config fil

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread da-woods
da-woods added the comment: Nuitka (https://github.com/Nuitka/Nuitka/ - a third Python->C API compiler) also looks to use it so you might want to let them know too while you're doing the rounds on this. -- nosy: +da-woods ___ Python tracker

[issue38644] Pass explicitly tstate to function calls

2021-09-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: This adds cost to our most critical code paths. For example, type_call() will now be slower for every single object instantiation. -- nosy: +rhettinger ___ Python tracker _

[issue45104] Error in __new__ docs

2021-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Raymond. Originally it was "instance of cls". It was changed in issue15542 (6b16d938d6d1ccb443815e20e8812deed274dc09). -- nosy: +serhiy.storchaka ___ Python tracker

<    1   2