[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-06-04 Thread Thomas Caswell
Thomas Caswell added the comment: This change also affects PyQt6: Python 3.10.0b2+ (heads/3.10:d0991e2db3, Jun 1 2021, 11:42:08) [GCC 11.1.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import PyQt

[issue44013] tempfile.TemporaryFile: name of file descriptor cannot be reused in consecutive initialization

2021-06-05 Thread Thomas Jollans
Thomas Jollans added the comment: Hello Xiang Zhong, You're almost correct, but not quite. File descriptors/file numbers are just integers assigned by the operating system, and Python has little to no control over them. The OS keeps a numbered list of open files for each process

[issue44354] ssl deprecation warnings erganomics

2021-06-08 Thread Thomas Grainger
New submission from Thomas Grainger : The ssl module OP_NO_* deprecation warning message is slightly wrong: The error message prints out "is deprecated is deprecated" because of an earlier format template There's a colon in the warning message `ssl module:` and that makes i

[issue44354] ssl deprecation warnings erganomics

2021-06-08 Thread Thomas Grainger
Thomas Grainger added the comment: the "ssl module:" part of the warning message, I think, is redundant as it should be defined in the https://docs.python.org/3/library/warnings.html#warnings.warn_explicit module kwarg -- ___ Pyth

[issue44362] improve documentation of SSL deprecations

2021-06-09 Thread Thomas Grainger
New submission from Thomas Grainger : > I can see in the 3.10 release notes, that ssl.PROTOCOL_TLS becomes > deprecated. Is there any further context explaining why, and what the > preferred usage is instead, so that I (and anyone else) can understand this a > bit more thorou

[issue44362] improve documentation of SSL deprecations

2021-06-09 Thread Thomas Grainger
Thomas Grainger added the comment: It's also confusing that other not deprecated flags are described in terms of this deprecated flag. These will need rewriting when the deprecated flag is removed -- ___ Python tracker <https://bugs.py

[issue44372] Can't install Python3.8, 3.9, 3.10 various errors including 0x80070643

2021-06-10 Thread Thomas Schweikle
New submission from Thomas Schweikle : Python Setup for python-3.8.10-amd64.exe, python-3.9.5-amd64.exe, python10.0b2-amd64.exe fails after exausting "No Python 3.8 installation was detected.", then again "No Python 3.8 installation was detected." next it tells about &qu

[issue44354] ssl deprecation warnings erganomics

2021-06-10 Thread Thomas Grainger
Thomas Grainger added the comment: it looks like OP_NO_SSLv2 and OP_NO_SSLv3 are not raising a DeprecationWarning ``` python310 -W error Python 3.10.0b2 (default, Jun 2 2021, 00:22:18) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license&qu

[issue44354] ssl deprecation warnings erganomics

2021-06-10 Thread Thomas Grainger
Thomas Grainger added the comment: there should still be a deprecation warning so that 3.12 can raise AttributeError -- ___ Python tracker <https://bugs.python.org/issue44

[issue44362] improve documentation of SSL deprecations

2021-06-10 Thread Thomas Grainger
Thomas Grainger added the comment: > Would you like me to submit a PR for this simple patch? > > https://github.com/jdevries3133/cpython/commit/42d9bd7f97f03b49d4fc89780616704998492ac1 TLS_PROTOCOL_CLIENT and TLS_PROTOCOL_SERVER are defined in terms of the deprecated TLS_PROTOCO

[issue44428] _ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes

2021-06-15 Thread Thomas Grainger
New submission from Thomas Grainger : demo program: import asyncio import socket import threading async def amain(): family = socket.AddressFamily.AF_INET sock = socket.socket(family, socket.SOCK_STREAM) sock.settimeout(1) sock.bind(('localhost', 0)) sock.listen(

[issue44446] linecache.getline TypeError when formatting tracebacks in stacks containing an async list comprehension

2021-06-17 Thread Thomas Grainger
New submission from Thomas Grainger : demo: import traceback import io async def foo(): yield 1 traceback.print_stack(file=io.StringIO()) yield 2 async def bar(): return [chunk async for chunk in foo()] next(bar().__await__(), None) print("working!") Trace

[issue44446] linecache.getline TypeError when formatting tracebacks in stacks containing an async list comprehension

2021-06-17 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +Mark.Shannon -nedbat ___ Python tracker <https://bugs.python.org/issue6> ___ ___ Python-bugs-list mailing list Unsub

[issue44446] linecache.getline TypeError when formatting tracebacks in stacks containing an async list comprehension

2021-06-17 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +nedbat ___ Python tracker <https://bugs.python.org/issue6> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33408] Enable AF_UNIX support in Windows

2021-06-26 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +graingert ___ Python tracker <https://bugs.python.org/issue33408> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44428] _ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes

2021-06-26 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue44428> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44428] _ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes

2021-06-26 Thread Thomas Grainger
Thomas Grainger added the comment: nosying the author of the selector_events fix -- ___ Python tracker <https://bugs.python.org/issue44428> ___ ___ Python-bug

[issue1462485] StopIteration raised in body of 'with' statement suppressed

2021-07-05 Thread Thomas Grainger
Thomas Grainger added the comment: ``` import contextlib @contextlib.contextmanager def foo(): yield class StartIrritation(StopIteration): pass with foo(): raise StartIrritation ``` -- nosy: +graingert ___ Python tracker <ht

[issue44566] StopIteration subclass raised in body of 'with' statement suppressed

2021-07-05 Thread Thomas Grainger
New submission from Thomas Grainger : https://bugs.python.org/issue1462485 import contextlib @contextlib.contextmanager def foo(): yield class StartIrritation(StopIteration): pass with foo(): raise StartIrritation -- messages: 396979 nosy: graingert, ncoghlan

[issue1462485] StopIteration raised in body of 'with' statement suppressed

2021-07-05 Thread Thomas Grainger
Thomas Grainger added the comment: apologies I meant to post this on a new ticket -- ___ Python tracker <https://bugs.python.org/issue1462485> ___ ___ Python-bug

[issue44566] StopIteration subclass raised in body of 'with' statement suppressed

2021-07-05 Thread Thomas Grainger
Thomas Grainger added the comment: This is the output: ``` Traceback (most recent call last): File "/home/graingert/projects/close.py", line 5, in foo yield File "/home/graingert/projects/close.py", line 12, in raise StartIrritation __main__.StartIrritation

[issue44566] StopIteration subclass raised in body of 'with' statement suppressed

2021-07-05 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +25590 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27024 ___ Python tracker <https://bugs.python.org/issu

[issue44428] _ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes

2021-07-12 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +lukasz.langa ___ Python tracker <https://bugs.python.org/issue44428> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44611] CPython uses deprecated randomness API

2021-07-12 Thread Thomas Grainger
Thomas Grainger added the comment: https://docs.microsoft.com/en-us/windows/win32/seccng/cng-portal ? -- nosy: +graingert ___ Python tracker <https://bugs.python.org/issue44

[issue44630] Assertion failure in csv module

2021-07-13 Thread Thomas Wouters
New submission from Thomas Wouters : The csv module has some incorrect exception handling when dealing with dialect objects that are not csv.Dialect subclasses (or that otherwise raise errors when accessing the dialect attributes): >>> csv.reader([], dialect=None) python: ../.

[issue44630] Assertion failure in csv module

2021-07-13 Thread Thomas Wouters
Change by Thomas Wouters : -- keywords: +patch pull_requests: +25670 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27127 ___ Python tracker <https://bugs.python.org/issu

[issue44070] __file__ is now fully qualified in 3.8 and 3.9

2021-07-15 Thread Thomas Grainger
Thomas Grainger added the comment: hello, just chiming in to let you know that this broke CI on twisted: https://github.com/twisted/twisted/pull/1628/ (As above for Chalice, I think this didn't actually break the framework itself, just the tests for the framework. ) do you know wha

[issue44184] crash on windows invoking flake8

2021-07-15 Thread Thomas Wouters
Thomas Wouters added the comment: Reopening this issue, as there is another branch (for non-GC heaptypes) earlier in subtype_dealloc that I believe suffers from the same problem. Actually triggering the error in a test has been difficult because as far as I can tell it relies on garbage

[issue44184] crash on windows invoking flake8

2021-07-15 Thread Thomas Wouters
Change by Thomas Wouters : -- pull_requests: +25701 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/27165 ___ Python tracker <https://bugs.python.org/issu

[issue44184] crash on windows invoking flake8

2021-07-15 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset 074e7659f208051b6b973f7fdb654dd22b93aaa2 by T. Wouters in branch 'main': bpo-44184: Apply GH-26274 to the non-GC-type branch of subtype_dealloc (GH-27165) https://github.com/python/cpython/commit/074e7659f208051b6b973f7fdb654d

[issue44184] crash on windows invoking flake8

2021-07-15 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset 6aa59c68dc7910c0675ad23c1f9d88edfb81dfcb by Miss Islington (bot) in branch '3.10': bpo-44184: Apply GH-26274 to the non-GC-type branch of subtype_dealloc (GH-27165) (GH-27174) https://github.com/python/cpyt

[issue44184] crash on windows invoking flake8

2021-07-15 Thread Thomas Wouters
Thomas Wouters added the comment: Fix extended to the other branch (and backported to 3.10), and both parts backported to 3.9. I don't think it counts as a security issue, so not backporting to 3.8. -- ___ Python tracker <https://bugs.py

[issue44184] crash on windows invoking flake8

2021-07-15 Thread Thomas Wouters
Change by Thomas Wouters : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44184] crash on windows invoking flake8

2021-07-15 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset 0b4704973dbef712d05bdd62349bb4244f545430 by Miss Islington (bot) in branch '3.9': bpo-44184: Apply GH-26274 to the non-GC-type branch of subtype_dealloc (GH-27165) (GH-27175) https://github.com/python/cpyt

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-07-19 Thread Geoffrey Thomas
Geoffrey Thomas added the comment: I am still seeing failures to read responses over 2 GB in Python 3.10b1. I'm working on a reproducer, but I'm getting the same "OverflowError: signed integer is greater than maximum" that I get in 3.9.

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-07-19 Thread Geoffrey Thomas
Geoffrey Thomas added the comment: Christian mentioned on Twitter that this is probably due to a missing argument clinic change from "int" to "Py_ssize_t". I can confirm that fixing that and rerunning argument clinic makes things start to work. I don't have the abil

[issue44684] Docs for mock.call

2021-07-20 Thread Thomas Guettler
New submission from Thomas Guettler : The docs for `mock.call` could get improved: https://docs.python.org/3/library/unittest.mock.html#call Up to now it is not clear how to access individual members of the call. Example: I want to check if the call used the kwarg "foo" with th

[issue44686] use pkgutil.resolve_name in unittest.mock

2021-07-20 Thread Thomas Grainger
New submission from Thomas Grainger : per https://bugs.python.org/issue12915 pkgutil.resolve_name was added for use in mock and other stdlib modules: > pydoc has locate and resolve, packaging has util.resolve_name, unittest has > something else, etc. -- messages: 39790

[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-07-21 Thread Thomas Wouters
New submission from Thomas Wouters : Objects/complexobject.c's complex_pow uses undefined behaviour, by casting a float of unknown magnitude to a long: int_exponent = (long)exponent.real; At Google we build with clang and -fsanitize=float-cast-overflow by default, which catches

[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-07-21 Thread Thomas Wouters
Change by Thomas Wouters : -- keywords: +patch pull_requests: +25823 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27278 ___ Python tracker <https://bugs.python.org/issu

[issue32635] test_crypt segfaults when using libxcrypt instead of libcrypt

2021-07-21 Thread Geoffrey Thomas
Geoffrey Thomas added the comment: Sorry to bump an old thread, but - does need to be in the public Python.h header? Or would it be enough to be in _cryptmodule.c, which is the code that uses crypt_r()? I can provide a quick patch to change that if that seems sound. -- nosy

[issue26153] PyImport_GetModuleDict: no module dictionary! when `__del__` triggers a warning

2021-07-26 Thread Thomas Wouters
Thomas Wouters added the comment: This was fixed back in 2018, in fact. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43468] functools.cached_property incorrectly locks the entire descriptor on class instead of per-instance locking

2021-07-27 Thread Thomas Grainger
Thomas Grainger added the comment: how about deprecating the functools.cached_property? -- nosy: +graingert ___ Python tracker <https://bugs.python.org/issue43

[issue43468] functools.cached_property incorrectly locks the entire descriptor on class instead of per-instance locking

2021-07-27 Thread Thomas Grainger
Thomas Grainger added the comment: > using a per-descriptor `WeakKeyDictionary` to map the instance to locks > (which would of course not work - is there any way to map unhashable > instances weakly?) there's an issue for that too: https://bugs.python.

[issue37715] 2to3 set default encoding

2021-07-27 Thread Thomas Grainger
Thomas Grainger added the comment: lib2to3 is deprecated and is pending removal, so I think this can be closed -- nosy: +graingert ___ Python tracker <https://bugs.python.org/issue37

[issue44751] crypt.h should be in _cryptmodule.c, not in public header

2021-07-27 Thread Geoffrey Thomas
New submission from Geoffrey Thomas : In #32635, it was discovered that _cryptmodule.c was missing a dependency on crypt.h, which caused it to segfault when it was missing the proper prototype for crypt. This was fixed by adding an #include to Python.h. This include doesn't need to

[issue44751] crypt.h should be in _cryptmodule.c, not in public header

2021-07-27 Thread Geoffrey Thomas
Change by Geoffrey Thomas : -- keywords: +patch pull_requests: +25927 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27394 ___ Python tracker <https://bugs.python.org/issu

[issue32635] test_crypt segfaults when using libxcrypt instead of libcrypt

2021-07-27 Thread Geoffrey Thomas
Geoffrey Thomas added the comment: Opened #44751 and https://github.com/python/cpython/pull/27394 . -- ___ Python tracker <https://bugs.python.org/issue32

[issue44070] __file__ is now fully qualified in 3.8 and 3.9

2021-07-27 Thread Thomas Grainger
Thomas Grainger added the comment: Yep that's the fix I went for in the end https://github.com/twisted/twisted/pull/1628/files#diff-8110fe13865c1f305bb999e82cd7514b2e7269f41087bd7ef39c3d6de508R105 -- ___ Python tracker &

[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-08-02 Thread Thomas Petazzoni
Thomas Petazzoni added the comment: I can confirm we are seeing the same issue when building Python 3.9 in the context of Buildroot. See http://autobuild.buildroot.net/results/ae6/ae6c4ab292589a4e4442dfb0a1286349a9bf4d29/build-end.log for an example build result. This happens since we have

[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-08-02 Thread Thomas Petazzoni
Thomas Petazzoni added the comment: For the record: we're seeing this issue ~50 times a day on our build infrastructure. -- ___ Python tracker <https://bugs.python.org/is

[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

2021-08-11 Thread Thomas Trummer
New submission from Thomas Trummer : According to the documentation[1] loop.create_datagram_endpoint() returns an asyncio.DatagramTransport. However on Windows this is not the case when the ProactorEventLoop is used (which seems to be the default since Python 3.8). This is a problem because

[issue44908] recommend httpx as well as requests in http.client/urllib.request docs

2021-08-12 Thread Thomas Grainger
New submission from Thomas Grainger : HTTPX is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2. It's also broadly compatible and inspired by the requests API: https://github.com/encode/httpx/blob/master

[issue44928] async generator missing unawaited coroutine warning

2021-08-16 Thread Thomas Grainger
New submission from Thomas Grainger : demo program: ``` def test_async_fn(): async def async_fn(): pass async_fn() def test_async_gen_fn(): async def agen_fn(): yield agen_fn().aclose() agen_fn().asend(None) test_async_fn() test_async_gen_fn

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-16 Thread Thomas Grainger
Thomas Grainger added the comment: It looks like it got archived here https://github.com/mdn/archived-content/blob/main/files/en-us/mozilla/qa/bug_writing_guidelines/index.html -- nosy: +graingert ___ Python tracker <https://bugs.python.

[issue44743] asyncio DatagramProtocol stops calling callbacks after OSError

2021-08-18 Thread Thomas Trummer
Change by Thomas Trummer : -- nosy: +Thomas Trummer ___ Python tracker <https://bugs.python.org/issue44743> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44948] DeprecationWarning: Using ioctl() method

2021-08-18 Thread Thomas Trummer
New submission from Thomas Trummer : DeprecationWarning: Using ioctl() method on sockets returned from get_extra_info('socket') will be prohibited in asyncio 3.9. Please report your use case to bugs.python.org. Use case: def connection_made(self, transport: asyncio.BaseTranspor

[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-18 Thread Thomas Grainger
Thomas Grainger added the comment: Depends on the redirect type they create. If it's temporary we should keep the same URL, if it's permanent or otherwise has bookmark updating semantics we should update the URL to follow the redirect On Wed, 18 Aug 2021, 21:40 Jack DeVries, wrote:

[issue44962] asyncio.create_task weakrefset race condition

2021-08-20 Thread Thomas Grainger
New submission from Thomas Grainger : with the following demo script I can get a IndexError: pop from empty list ``` import itertools import asyncio import concurrent.futures import sys import threading threads = 200 def test_all_tasks_threading() -> None: async def foo() ->

[issue44962] asyncio.create_task weakrefset race condition

2021-08-20 Thread Thomas Grainger
Change by Thomas Grainger : -- versions: +Python 3.7 ___ Python tracker <https://bugs.python.org/issue44962> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44962] asyncio.create_task weakrefset race condition

2021-08-20 Thread Thomas Grainger
Change by Thomas Grainger : -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue44962> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44962] asyncio.create_task weakrefset race condition

2021-08-20 Thread Thomas Grainger
Thomas Grainger added the comment: still happens on 3.10 even though there's an `with _IterationGuard` ``` worked 0 Traceback (most recent call last): File "/home/graingert/projects/asyncio-demo/demo.py", line 36, in sys.exit(main()) File "/home/graingert/p

[issue44962] asyncio.create_task weakrefset race condition

2021-08-20 Thread Thomas Grainger
Thomas Grainger added the comment: interestingly 3.10 didn't show: sys:1: RuntimeWarning: coroutine 'BaseEventLoop.shutdown_asyncgens' was never awaited -- ___ Python tracker <https://bugs.pyt

[issue44963] anext_awaitable is not a collections.abc.Generator

2021-08-20 Thread Thomas Grainger
Thomas Grainger added the comment: it also fails with asyncio.create_task ``` import asyncio async def agen(): yield async def main(): p = agen() await asyncio.create_task(anext(p, 'finished')) asyncio.run(main()) ``` ``` Traceback (most recent call last): F

[issue44963] anext_awaitable is not a collections.abc.Generator

2021-08-21 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +pablogsal ___ Python tracker <https://bugs.python.org/issue44963> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44962] asyncio.create_task weakrefset race condition

2021-08-23 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +26365 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27909 ___ Python tracker <https://bugs.python.org/issu

[issue44962] asyncio.create_task weakrefset race condition

2021-08-23 Thread Thomas Grainger
Change by Thomas Grainger : -- pull_requests: +26373 pull_request: https://github.com/python/cpython/pull/27921 ___ Python tracker <https://bugs.python.org/issue44

[issue44962] asyncio.create_task weakrefset race condition

2021-08-23 Thread Thomas Grainger
Thomas Grainger added the comment: > weakref.WeakSet is not thread-safe, which means concurrent create_task's in > different threads (even on separate event loops) is not safe. actually it looks like WeakSet is *supposed* to be thread-safe ``` import patchy p

[issue44962] asyncio.create_task weakrefset race condition

2021-08-24 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +pitrou ___ Python tracker <https://bugs.python.org/issue44962> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45135] dataclasses.asdict() incorrectly calls __deepcopy__() on values.

2021-09-08 Thread Thomas Fischbacher
New submission from Thomas Fischbacher : This problem may also be the issue underlying some other dataclasses.asdict() bugs: https://bugs.python.org/issue?%40columns=id%2Cactivity%2Ctitle%2Ccreator%2Cassignee%2Cstatus%2Ctype&%40sort=-activity&%40filter=status&%40action=searchid

[issue45135] dataclasses.asdict() incorrectly calls __deepcopy__() on values.

2021-09-08 Thread Thomas Fischbacher
Thomas Fischbacher added the comment: The current behavior deviates from the documentation in a way that might evade tests and hence has the potential to cause production outages. Is there a way to fix the documentation so that it correctly describes current behavior - without having to

[issue45251] signal.SIGCLD alias is not available on OSX

2021-09-20 Thread Thomas Caswell
New submission from Thomas Caswell : The module attribute signal.SIGCLD (https://docs.python.org/3/library/signal.html#signal.SIGCLD) is an "archaic" (quoting from the GNU C Library source) alias for signal.SIGCHLD (https://docs.python.org/3/library/signal.html#sign

[issue45276] avoid try 1000 in asyncio all_tasks by making weak collection .copy() atomic

2021-09-24 Thread Thomas Grainger
New submission from Thomas Grainger : the weak collections should have the same threadsafe/thread unsafe guarantees as their strong reference counterparts - eg dict.copy and set.copy are atomic and so the weak versions should be atomic also -- components: Interpreter Core, asyncio

[issue45276] avoid try 1000 in asyncio all_tasks by making weak collection .copy() atomic

2021-09-24 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +26925 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28541 ___ Python tracker <https://bugs.python.org/issu

[issue45278] RuntimeError on race on weakset concurrent iteration

2021-09-24 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +graingert ___ Python tracker <https://bugs.python.org/issue45278> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45279] avoid redundant _commit_removals pending_removals guard

2021-09-24 Thread Thomas Grainger
New submission from Thomas Grainger : refactor to avoid redundant _commit_removals pending_removals guard -- components: Library (Lib) messages: 402554 nosy: graingert priority: normal severity: normal status: open title: avoid redundant _commit_removals pending_removals guard versions

[issue45279] avoid redundant _commit_removals pending_removals guard

2021-09-24 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +26930 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28546 ___ Python tracker <https://bugs.python.org/issu

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2021-10-07 Thread Thomas Grainger
Thomas Grainger added the comment: afaik this is intentional https://bugs.python.org/issue31033 -- nosy: +graingert ___ Python tracker <https://bugs.python.org/issue45

[issue45423] SSL SNI varies when host contains port number

2021-10-10 Thread Thomas Hobson
New submission from Thomas Hobson : Not entirely sure if this is intended. When using urllib.request.urlopen, with a hostname and a varying port the SNI information sent differs. To my undersnding, the SNI info shouldn't include the port and should only include the actual host. Attach

[issue45435] delete misleading faq entry about atomic operations

2021-10-11 Thread Thomas Grainger
Change by Thomas Grainger : -- assignee: docs@python components: Documentation nosy: docs@python, graingert priority: normal severity: normal status: open title: delete misleading faq entry about atomic operations ___ Python tracker <ht

[issue45435] delete misleading faq entry about atomic operations

2021-10-11 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +27181 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28886 ___ Python tracker <https://bugs.python.org/issu

[issue45435] delete misleading faq entry about atomic operations

2021-10-12 Thread Thomas Grainger
Thomas Grainger added the comment: it's as part of this discussion in https://mail.python.org/archives/list/python-...@python.org/thread/ABR2L6BENNA6UPSPKV474HCS4LWT26GY/#IAOCDDCJ653NBED3G2J2YBWD7HHPFHT6 and others in #python-dev specifically https://github.com/python/cpython

[issue45434] [C API] Clean-up the Python.h header file

2021-10-18 Thread Thomas Wouters
Thomas Wouters added the comment: Victor, what's the benefit of doing this work? Are there real problems this fixes? I'm worried about the churn in third-party extensions, examples, tutorials, etc, especially for audiences that upon seeing a compiler error won't immediate

[issue29941] Confusion between asserts and Py_DEBUG

2021-10-18 Thread Thomas Wouters
Change by Thomas Wouters : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue29941> ___ ___ Python-bugs-list

[issue25625] "chdir" Contex manager for pathlib

2021-10-20 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +graingert nosy_count: 10.0 -> 11.0 pull_requests: +27360 pull_request: https://github.com/python/cpython/pull/29091 ___ Python tracker <https://bugs.python.org/issu

[issue45748] "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10

2021-11-08 Thread Thomas Trummer
New submission from Thomas Trummer : 3.7 and later are all working fine. First good commit: 55fe1ae9708d81b902b6fe8f6590e2a24b1bd4b0 First bad commit: fdbd01151dbd5feea3e4c0316d102db3d2a2a412 git checkout v3.6.15 #0 0x76cc52a0 in PyCFuncPtr_new (type=0x559157f8, args

[issue45775] Implementation of colorsys.rgb_to_yuv and vice versa

2021-11-09 Thread Thomas Stolarski
New submission from Thomas Stolarski : Since the implementation of `rgb_to_yiq` roughly 30 years ago now, the advent of HDTV has resulted in most broadcasting and video processing having moved towards Rec 709 (or BT.709). While I know colorsys has been on the chopping block for a while, it

[issue45775] Implementation of colorsys.rgb_to_yuv and vice versa

2021-11-09 Thread Thomas Stolarski
Change by Thomas Stolarski : -- keywords: +patch pull_requests: +27763 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29512 ___ Python tracker <https://bugs.python.org/issu

[issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty

2021-11-16 Thread Thomas Wouters
Thomas Wouters added the comment: Py_CompileString() in Python 3.9 and later, using the PEG parser, appears to no longer honours source encoding cookies. A reduced test case: #include "Python.h" #include const char *src = ( "# -*- coding: Latin-1 -*-\n&quo

[issue45775] Implementation of colorsys.rgb_to_yuv and vice versa

2021-11-23 Thread Thomas Stolarski
Thomas Stolarski added the comment: I figured this would probably be the case, but since YIQ also requires a profile (and the FCC one it implements is pretty weird for digital work), I thought I'd give it a shot anyway. Would it be worth moving the test/formatting changes over

[issue43806] asyncio.StreamReader hangs when reading from pipe and other process exits unexpectedly

2021-11-24 Thread Thomas Kluyver
Thomas Kluyver added the comment: In the example script, I believe you need to close the write end of the pipe in the parent after forking: cpid = os.fork() if cpid == 0: # Write to pipe (child) else: # Parent os.close(ctx) # Read from pipe This is the same with synchronous

[issue43805] multiprocessing.Queue hangs when process on other side dies

2021-11-24 Thread Thomas Kluyver
Thomas Kluyver added the comment: I think this is expected. The queue itself doesn't know that one particular process is meant to put data into it. It just knows that there's no data to get, so .get() blocks as the docs say it should. This doesn't apply to issue22393, because

[issue43805] multiprocessing.Queue hangs when process on other side dies

2021-12-06 Thread Thomas Kluyver
Thomas Kluyver added the comment: It's not my decision, so I can't really say. But the Queue API is pretty stable, and exists 3 times over in Python (the queue module for use with threads, in multiprocessing and in asyncio). So I'd guess that anyone wanting to add to that AP

[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Thomas Grainger
Thomas Grainger added the comment: I think `AttributeError: args` is the desired/expected behaviour consider the sync version: ``` import logging from asyncio import sleep, gather, run from contextlib import asynccontextmanager, contextmanager @contextmanager def foo(): yield def test

[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Thomas Grainger
Thomas Grainger added the comment: or consider the trio version: ``` import logging import trio from contextlib import asynccontextmanager @asynccontextmanager async def foo(): await trio.sleep(1) yield async def test(): async with trio.open_nursery() as n: f = foo

[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Thomas Grainger
Thomas Grainger added the comment: ah I can repeat this on python3.8.10 trio but not python3.9.9 trio: ``` import logging import trio from contextlib import asynccontextmanager @asynccontextmanager async def foo(): await trio.sleep(1) yield async def test(): async with

[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Thomas Grainger
Thomas Grainger added the comment: I see the change here: https://github.com/python/cpython/commit/1c5c9c89ffc36875afaf4c3cc6a716d4bd089bbf#diff-e00601a380ba6c916ba4333277fe6ea43d2477804002ab1ae64480f80fec8e3aR177-R179 this is intentionally implementing https://bugs.python.org/issue30306 for

[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Thomas Grainger
Thomas Grainger added the comment: you can see the analogous sync contextmanager issue on python3.6 with: ``` import logging from contextlib import contextmanager @contextmanager def foo(): yield def test(): f = foo() f.__enter__() f.__enter__() test() ``` on python3.7

[issue46000] NetBSD curses compatibility

2021-12-06 Thread Thomas Klausner
New submission from Thomas Klausner : The code in Modules/_cursesmodule.c has an assumption on ncurses. The attached simple patch fixes this and works with both NetBSD curses and ncurses. -- components: Extension Modules files: patch-Modules___cursesmodule.c messages: 407825 nosy: wiz

[issue46000] NetBSD curses compatibility

2021-12-06 Thread Thomas Klausner
Thomas Klausner added the comment: Done: https://github.com/python/cpython/pull/29947 -- ___ Python tracker <https://bugs.python.org/issue46000> ___ ___ Pytho

<    3   4   5   6   7   8   9   10   11   12   >