[issue42852] pprint fails in transformming non-breaking space

2021-01-06 Thread Xinmeng Xia
New submission from Xinmeng Xia : "pprint" can transform unicode like "print". However, pprint fails to transform non-breaking space('\240') . See the following example: Python 3.10.0a2 (default, Nov 24 2020, 14:18:46) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for

[issue42851] Subclassing Enum with ipaddress.IPv4Network/IPv6Network raises TypeError.

2021-01-06 Thread Mariusz Felisiak
New submission from Mariusz Felisiak : We noticed a behavior change in Python3.10.0a4 (it works properly in Python3.10.0a3) when running Django's test suite[1]. Subclassing `enum.Enum` with `ipaddress.IPv4Network/IPv6Network` raises `TypeError`, e.g. >>> import enum >>> import ipaddress >>>

[issue42850] Process hangs when calling urllib.request in a multiprocessing.Process with import of sounddevice package

2021-01-06 Thread Robin Scheibler
New submission from Robin Scheibler : I am having an issue with using urllib in a multiprocessing.Process when the package sounddevice (https://github.com/spatialaudio/python-sounddevice) has been already imported. The sub-process hangs upon calling urllib.request.urlopen (and methods from

[issue19683] test_minidom has many empty tests

2021-01-06 Thread karl
karl added the comment: @zach.ware @r.david.murray I'm going through the source currently. I see that the test file is using: class MinidomTest(unittest.TestCase): def confirm(self, test, testname = "Test"): self.assertTrue(test, testname) Is there a specific reason to use

[issue42849] pool worker can't be terminated

2021-01-06 Thread Zhesi Huang
New submission from Zhesi Huang : i see a case, the worker proc of pool can't be terminated, i try kill -SIGTERM or -SIGINT, but it still can't terminated the worker proc, then the pool __exit__ will hang forever ``` class NonDaemonProcess(multiprocessing.Process): #

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: I meant Irit. Silly autocorrect. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: No problem. Riot, are you interested in this? -- nosy: +Guido.van.Rossum, iritkatriel ___ Python tracker ___

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread asleep-cult
asleep-cult added the comment: I'm not sure I have a deep enough understanding of how this works, so no -- ___ Python tracker ___

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: The recursion error is actually inside the traceback module. The reason is that the code there calls itself recursively for each level of context. Since bar() builds up an endless chain of contexts as it calls itself recursively, that chain is very long.

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread asleep-cult
asleep-cult added the comment: Didn't show enough of the traceback to show that the latter does not suppress the Test exception Traceback (most recent call last): File "c:/Development/test/test.py", line 11, in bar x() File "c:/Development/test/test.py", line 7, in x raise

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread asleep-cult
asleep-cult added the comment: I did test it with a simple recursive function but a more realistic test confirms that its not just __getattribute__ (which makes sense) import asyncio class Test(Exception): ... def x(): raise Test('Hello World!') def bar(): try: x()

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: Is there anything specific about __getattribute__ here? Wouldn't you have the same issue for *any* function that raises RecursionError called inside an async def? -- nosy: +gvanrossum ___ Python tracker

[issue42783] asyncio.sleep(0) idiom is not documented

2021-01-06 Thread Nick Coghlan
Nick Coghlan added the comment: I merged the update to the 3.10 docs, but the automated backport to 3.9 to update the online docs failed. -- resolution: -> fixed stage: patch review -> backport needed versions: +Python 3.10, Python 3.9 ___ Python

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread asleep-cult
New submission from asleep-cult : The code below produces an unexpected traceback format that makes the source of an error very hard to find, this more than likely happens in less specific situations but this is how I came across it. I'm also not sure if this is an issue with asyncio,

[issue42783] asyncio.sleep(0) idiom is not documented

2021-01-06 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 5c30145afb6053998e3518befff638d207047f00 by Simon Willison in branch 'master': bpo-42783: Documentation for asyncio.sleep(0) (#24002) https://github.com/python/cpython/commit/5c30145afb6053998e3518befff638d207047f00 -- nosy: +ncoghlan

[issue10572] Move test sub-packages to Lib/test

2021-01-06 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22976 pull_request: https://github.com/python/cpython/pull/24148 ___ Python tracker ___

[issue42847] Normalise file encodings in Lib/sqlite3/test/

2021-01-06 Thread Berker Peksag
Berker Peksag added the comment: iso-8859-1 is still commonly used in some parts of Nordic countries, but I don't see a reason not to change it here :) Thank you, Erlend! -- components: +Tests -Library (Lib) type: -> enhancement ___ Python

[issue42847] Normalise file encodings in Lib/sqlite3/test/

2021-01-06 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42847] Normalise file encodings in Lib/sqlite3/test/

2021-01-06 Thread Berker Peksag
Berker Peksag added the comment: New changeset deab1e54ff1695cdbe87f8db3d2c382d8e78330f by Erlend Egeberg Aasland in branch 'master': bpo-42847: Normalise Lib/sqlite3/test/* file encodings (GH-24147) https://github.com/python/cpython/commit/deab1e54ff1695cdbe87f8db3d2c382d8e78330f

[issue42847] Normalise file encodings in Lib/sqlite3/test/

2021-01-06 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +22975 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24147 ___ Python tracker

[issue40823] Don't use obsolete unittest.makeSuite() in sqlite3 tests

2021-01-06 Thread Berker Peksag
Berker Peksag added the comment: Thank you! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker ___

[issue40823] Don't use obsolete unittest.makeSuite() in sqlite3 tests

2021-01-06 Thread Berker Peksag
Berker Peksag added the comment: New changeset 849e339a925fb398be31e566c31b99ce6cdb6006 by Erlend Egeberg Aasland in branch 'master': bpo-40823: Use loadTestsFromTestCase() iso. makeSuite() in sqlite3 tests (GH-20538)

[issue42847] Normalise file encodings in Lib/sqlite3/test/

2021-01-06 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Indeed it is. I'll create a PR as soon as GH-20538 is merged. -- ___ Python tracker ___

[issue42847] Normalise file encodings in Lib/sqlite3/test/

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: SGTM, the use of ISO-8859 is surely a legacy issue. -- nosy: +gvanrossum ___ Python tracker ___

[issue42847] Normalise file encodings in Lib/sqlite3/test/

2021-01-06 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : GitHub does not play well with other file encodings than UTF-8. For example, when the "suggestion" in https://github.com/python/cpython/pull/20538#discussion_r552926126 was applied, GitHub silently converted Lib/sqlite3/test/types.py from ISO-8859

[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2021-01-06 Thread Vladimir Ryabtsev
Vladimir Ryabtsev added the comment: The issue won't be fixed, but other useful changes applied. -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue42846] Using _multibytecodec module on Windows, test_threading/embed get failure

2021-01-06 Thread neonene
New submission from neonene : After https://github.com/python/cpython/commit/0b858cdd5d114f0890b11b6c4d6559d0ceb468ab (bpo-1635741: Convert _multibytecodec to multi-phase init), On Windows x64/x86 with chinese/japanese/korean system-locale, MultibyteCodec_Check() in multibytecodec.c returns

[issue38413] Remove or change "Multithreading" section

2021-01-06 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> fixed type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38413] Remove or change "Multithreading" section

2021-01-06 Thread Berker Peksag
Berker Peksag added the comment: New changeset 49c150f1f16398a4e77e051244f27adc5ac7b47b by Vladimir in branch '3.9': bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159) https://github.com/python/cpython/commit/49c150f1f16398a4e77e051244f27adc5ac7b47b --

[issue40601] [C API] Hide static types from the limited C API

2021-01-06 Thread STINNER Victor
STINNER Victor added the comment: PC/python3dll.c exports 66 types in the stable ABI: Py_GenericAliasType PyObject_Type _PyWeakref_CallableProxyType _PyWeakref_ProxyType _PyWeakref_RefType PyBaseObject_Type PyBool_Type PyByteArray_Type PyByteArrayIter_Type PyBytes_Type PyBytesIter_Type

[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 1ab045933b90d1954af983cc08d1bf0bc46b6240 by Hai Shi in branch 'master': bpo-41798: Allocate the _datetime.datetime_CAPI on the heap memory (GH-24096) https://github.com/python/cpython/commit/1ab045933b90d1954af983cc08d1bf0bc46b6240 --

[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 f22b7ca1afd98a7381a9fe9e53bd6dfa2a5eba16 by Erlend Egeberg Aasland in branch 'master': bpo-41798: Allocate _socket module C API on the heap (GH-24126) https://github.com/python/cpython/commit/f22b7ca1afd98a7381a9fe9e53bd6dfa2a5eba16

[issue38413] Remove or change "Multithreading" section

2021-01-06 Thread Vladimir Ryabtsev
Change by Vladimir Ryabtsev : -- stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.7 ___ Python tracker ___

[issue42299] Remove formatter module

2021-01-06 Thread Ernest W. Durbin III
Ernest W. Durbin III added the comment: Issues relating to documentation build likely need to be looked at and addressed by Julien. If it does end up being an infra issue, feel free to read me to nosy. -- nosy: +mdk ___ Python tracker

[issue42299] Remove formatter module

2021-01-06 Thread Christian Heimes
Christian Heimes added the comment: https://docs.python.org/3.10/library/index.html no longer links to https://docs.python.org/3.10/library/misc.html but misc.html and formatter.html are still there. It looks like a bug in the build and update process. I bet it's not removing files. Ee,

[issue38413] Remove or change "Multithreading" section

2021-01-06 Thread Vladimir Ryabtsev
Change by Vladimir Ryabtsev : -- pull_requests: +22974 pull_request: https://github.com/python/cpython/pull/24145 ___ Python tracker ___

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

2021-01-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Agreed. In that regard the most standard thing that we have is the pyperformance suite, which are almost all macro benchmarks. Is also what is displayed in speed.python.org -- ___ Python tracker

[issue42840] `type` takes **kwargs for __init_subclass__

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: Excellent! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42839] SourceFileLoader does not (fully) accept path-like objects

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: If Brett's theory is right, compile() has a bug though -- it shouldn't plug a non-string into the code object. Or possibly the code object constructor should reject such objects (or extract the string). -- ___

[issue42839] SourceFileLoader does not (fully) accept path-like objects

2021-01-06 Thread Brett Cannon
Brett Cannon added the comment: importlib is probably not os.PathLike-clean due to its bootstrapping restrictions of not getting to use anything implemented in Python from 'os' (i.e. if it isn't being managed in posixmodule.c then it probably won't work). If you follow the traceback it's

[issue42840] `type` takes **kwargs for __init_subclass__

2021-01-06 Thread Erik Soma
Erik Soma added the comment: Can do. I have found a blurb in the 3.6 What's New that confirms it was purposeful (https://docs.python.org/3/whatsnew/3.6.html#index-37). -- ___ Python tracker

[issue38780] SysLogHandler crash atexit

2021-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: > As far as I know, this only happens during shutdown. During shutdown it has > already removed the attribute as part of the teardown process. In this case > adding the attribute at the begining will do no good. Certainly, that's true - there are a number of

[issue42299] Remove formatter module

2021-01-06 Thread Miro Hrončok
Miro Hrončok added the comment: I am confused. Why is this still online when the source was removed? https://docs.python.org/3.10/library/formatter.html -- nosy: +hroncok ___ Python tracker

[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: Thanks, for the replies, didn't know about that. Interesting thing that `collections.abc.Set` base class has implementations of `__and__`, `__or__`, `__sub__` and `__xor__` methods, it also provide `_from_iterable` class method that is

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

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: Undoubtedly -- but impact should be measured on what typical users would see, not on narrow benchmarks. -- ___ Python tracker ___

[issue42811] Update docs for importlib.util.resolve_name() to use __spec__.parent instead of __package__

2021-01-06 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42811] Update docs for importlib.util.resolve_name() to use __spec__.parent instead of __package__

2021-01-06 Thread miss-islington
miss-islington added the comment: New changeset ff8458b918050168acda1ad6d079f52b8effa821 by Yair Frid in branch 'master': bpo-42811: Update importlib.utils.resolve_name() docs to use __spec__.parent (GH-24100) https://github.com/python/cpython/commit/ff8458b918050168acda1ad6d079f52b8effa821

[issue42811] Update docs for importlib.util.resolve_name() to use __spec__.parent instead of __package__

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

[issue42839] SourceFileLoader does not (fully) accept path-like objects

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe Brett can help? -- nosy: +brett.cannon, gvanrossum ___ Python tracker ___ ___

[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Brandt Bucher
Brandt Bucher added the comment: (Also, it would break virtual subclasses.) -- nosy: +brandtbucher ___ Python tracker ___ ___

[issue42840] `type` takes **kwargs for __init_subclass__

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: That sounds intentional to me (else the class statement would have a capability that cannot be dynamically emulated by calling type()). We should probably update the docs (if you could submit a small PR that would be appreciated) and also typeshed

[issue38780] SysLogHandler crash atexit

2021-01-06 Thread Alan Robertson
Alan Robertson added the comment: As far as I know, this only happens during shutdown. During shutdown it has already removed the attribute as part of the teardown process. In this case adding the attribute at the begining will do no good. On Wed, Jan 6, 2021, at 10:30 AM, Vinay Sajip

[issue38780] SysLogHandler crash atexit

2021-01-06 Thread Alan Robertson
Alan Robertson added the comment: On Wed, Jan 6, 2021, at 10:30 AM, Vinay Sajip wrote: > > Vinay Sajip added the comment: > > TBH as I said in the now-closed PR, using a NullSocket seems overkill. > As mentioned in msg359594, it seems to make more sense to assign a > socket attribute to

[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: This was discussed during the PEP review and rejected. The main reason is that this operator would need to create a new instance, and there is no standard API that's part of the Mapping protocol that can be used (the constructor of a Mapping instance

[issue38780] SysLogHandler crash atexit

2021-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: TBH as I said in the now-closed PR, using a NullSocket seems overkill. As mentioned in msg359594, it seems to make more sense to assign a socket attribute to None early in the constructor. If an error occurs during socket creation, the socket attribute will

[issue42845] Third Party Module Installation using pip fails in Python 3.10.0a3

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: This is expected -- those modules contain C extensions for which no 3.10 wheels are available from PyPI yet, so pip tries to build them locally. If you want to help testing, please install the recommended free version of the MS C++ compiler. From

[issue42842] module 'logging' has not attribute 'handlers'

2021-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: This is not a bug - this is how it is supposed to work. The handlers module isn't automatically loaded; you have to import it. The basic handlers (NullHandler, StreamHandler, FileHandler) are in the logging module - additional handlers are in logging.handlers.

[issue42844] Turtle Module -- "onclick" arguments enchancement

2021-01-06 Thread Stephen
Change by Stephen : -- keywords: +patch pull_requests: +22972 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24143 ___ Python tracker ___

[issue42845] Third Party Module Installation using pip fails in Python 3.10.0a3

2021-01-06 Thread Shreyan Avigyan
New submission from Shreyan Avigyan : A few days ago, I tried installing Python 3.10.a3 for testing. After installing, I tried using the Python built-in modules, they were working fine. Then I tried going for installing third party modules using pip from the command prompt. While installing

[issue42843] What min_sphinx for Python 3.10

2021-01-06 Thread Julien Palard
Julien Palard added the comment: In favor of Sphinx 3 only : - We have :no-trim-doctest-flags: which fixes https://bugs.python.org/issue36675 - backslash handing is different in Sphinx 2 and Sphinx 3: https://bugs.python.org/issue42822 In favor of keeping compatibility with Sphinx 2 : -

[issue42844] Turtle Module -- "onclick" arguments enchancement

2021-01-06 Thread Stephen
New submission from Stephen : I have created an enhancement in the Turtle module. When a programmer wants to have an action performed after clicking on a Turtle object, the programmer is currently unable to supply any arguments into the method that is run when "on_clicked" which is extremely

[issue42843] What min_sphinx for Python 3.10

2021-01-06 Thread Julien Palard
Change by Julien Palard : -- keywords: +patch pull_requests: +22971 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24142 ___ Python tracker ___

[issue42843] What min_sphinx for Python 3.10

2021-01-06 Thread Julien Palard
New submission from Julien Palard : According to [1] there's no concensus on which minimum Sphinx version we should use for Python 3.10. "sadly" since https://github.com/python/cpython/pull/23620 which make use of a Sphinx 3.2.0 only feature, we should bump it to 3.2, but it may not work for

[issue42842] module 'logging' has not attribute 'handlers'

2021-01-06 Thread hai shi
Change by hai shi : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42309] BUILD: AIX-64-bit segmentation fault using xlc-v11

2021-01-06 Thread Michael Felt
Michael Felt added the comment: OK - looking at this again. This looks very similiar to another 'coredump' issue (will have to look for the number later). iirc, when something called 'pgen', or similiar was modified. Here is a lengthy `dbx` dump. If I am reading this correctly, it is

[issue42842] module 'logging' has not attribute 'handlers'

2021-01-06 Thread sasquatchplatypus
Change by sasquatchplatypus : -- title: import logging.handlers shows weird behavior -> module 'logging' has not attribute 'handlers' ___ Python tracker ___

[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2021-01-06 Thread Eryk Sun
Eryk Sun added the comment: > For Windows though, I'm unsure. If copystat() gains the ability to copy the file's owner and group in POSIX, it is not a priority to mirror this capability in Windows, which doesn't implement anything like the Unix owner-group-other permission model. The only

[issue42842] import logging.handlers shows weird behavior

2021-01-06 Thread sasquatchplatypus
New submission from sasquatchplatypus : when trying to import a handler from logging.handlers, you have to explicitely import logging.handlers, because trying to get it from logging directly (for example import logging, logging.handlers.RotatingFileHandlers) raises this error: AttributeError:

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

2021-01-06 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum, lys.nikolaou, pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: Yield in an annotation should be a syntax error. -- ___ Python tracker ___ ___

[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- keywords: +patch pull_requests: +22970 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24141 ___ Python tracker

[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- components: +Library (Lib) type: -> enhancement ___ Python tracker ___ ___

[issue42841] Add bitwise or operator to collections.abc Mapping and MutableMapping

2021-01-06 Thread Yurii Karabas
New submission from Yurii Karabas <1998uri...@gmail.com>: In python3.9 `dict` `bitwise or` operator was introduced. I think it will be great if `collections.abc.Mapping` and `collections.abc.MutableMapping` will have a default implementation of `bitwise or` operator. -- messages:

[issue42840] `type` takes **kwargs for __init_subclass__

2021-01-06 Thread Erik Soma
New submission from Erik Soma : The documentation (https://docs.python.org/3/library/functions.html#type) shows type's signature as: class type(object) class type(name, bases, dict) But the "actual" 2nd signature in CPython 3.6+ is: class type(name, bases, dict, **kwargs) **kwargs here

[issue42823] Incorrect frame.f_lineno when frame.f_trace is set

2021-01-06 Thread Ned Batchelder
Ned Batchelder added the comment: OK, thanks. I guess the parallels between the Python frame object and the C frame object made it easy to think I could use the fields directly. I'm updating the coverage.py code. -- ___ Python tracker

[issue42839] SourceFileLoader does not (fully) accept path-like objects

2021-01-06 Thread favonia
New submission from favonia : If one uses the loader created by importlib.machinery.SourceFileLoader(module_name, path) in a meta path finder, where path is not a str, then the following error would happen at the moment the module is being imported. Note that, the error would not occur if

[issue42838] Wait for cleanup coroutines before event loop is closed.

2021-01-06 Thread xloem
New submission from xloem <0xl...@gmail.com>: To handle destruction of resources especially during exceptions, it would be nice if there were some way to provide coroutines/tasks that run at the termination or closure of an event loop. There are a lot of api options here. Maybe a simple

[issue42823] Incorrect frame.f_lineno when frame.f_trace is set

2021-01-06 Thread Mark Shannon
Mark Shannon added the comment: It looks like you are accessing the c field "f_lineno" directly. That was never guaranteed to work, it just happened to. You should use PyFrame_GetLineNumber() If "f_lineno" is up to date, then it will be almost efficient as the direct field access (the

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

2021-01-06 Thread mike bayer
mike bayer added the comment: I think this issue just discusses the naming of an attribute called ".autocommit". for the discussion for SQLite's unusual starting of transactions, that's all in two other issues: https://bugs.python.org/issue9924 https://bugs.python.org/issue10740 so I

[issue42823] Incorrect frame.f_lineno when frame.f_trace is set

2021-01-06 Thread Ned Batchelder
Ned Batchelder added the comment: This change seems like it has caused a problem. Python trace functions behave as they did in Python 3.9, but C trace functions no longer get line numbers for call or return events. Running this test code: def gen(inp): for n in inp:

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

2021-01-06 Thread James Oldfield
James Oldfield added the comment: There's some confusion here over what autocommit=True would do. I believe the last three comments give three different interpretations! Géry said conn.autocommit would change to False when I start a transaction with execute("BEGIN"), Mike said it wouldn't

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

2021-01-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset faf49573963921033c608b4d2f398309d9f0d2b5 by Miss Islington (bot) in branch '3.9': bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602) (GH-24139)

[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-06 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- pull_requests: +22969 pull_request: https://github.com/python/cpython/pull/24140 ___ Python tracker ___

[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

  1   2   >