[issue43119] asyncio.Queue.put never yields if the queue is unbounded

2021-02-04 Thread Ken Jin
Ken Jin added the comment: Thanks for the minimal reproducer. I've tested it on 3.9.0 and 3.10a4 and they seem to exhibit the same behavior too. Out of genuine curiosity (I don't mean to question if this *is* a bug, it seems like a trap for users): why not place an ``await asyncio.sleep(0)``

[issue19733] Setting image parameter of a button crashes with Cocoa Tk

2021-02-04 Thread Dima Pasechnik
Dima Pasechnik added the comment: was it tested on macOS 11.2 ? Tests fail there with Python 3.9.1 -- nosy: +Dima Pasechnik ___ Python tracker ___

[issue43123] email MIME splitting

2021-02-04 Thread Martin Ortner
New submission from Martin Ortner : // reported via PSRT email (see timeline) // external reference: https://consensys.net/diligence/vulnerabilities/private/jcchhpke7usq8wo45vloy282phwpd9fj41imumhb8varxahz2bf9afw5mcno84gx/ cve: vendor: python vendorUrl: https://www.python.org/ authors: tintin

[issue43068] test_subprocess: test_specific_shell() fails on AMD64 FreeBSD Shared 3.x

2021-02-04 Thread STINNER Victor
STINNER Victor added the comment: > Would you like me to rebuild bash/gdb to fix the error, or wait for the tests > to be fixed so that they can handle the error condition? I don't think that Python test suite should handle the case of a broken FreeBSD setup. Could you either disable the bu

[issue43124] smtplib multiple CRLF injection

2021-02-04 Thread Martin Ortner
New submission from Martin Ortner : // reported via PSRT email (see timeline; last contact: Alex/PSRT) // external reference: http://consensys.net/diligence/vulnerabilities/private/z5kxjgfmja4offxbrw1miuxwezggajjfswlz9g2hfuh77we5dy727hqy5x9ii43e/ cve: vendor: python vendorUrl: https://www.pyth

[issue43125] Trying To Concatenate Bytes and String in SMTPLIB

2021-02-04 Thread Michael L. Boom
New submission from Michael L. Boom : The space is string, and either mechanism and/or response are bytes. smtplib.py:634 response = encode_base64(initial_response.encode('ascii'), eol='') (code, resp) = self.docmd("AUTH", mechanism + " " + response) import smtplib, ssl port = 587 smtp_serve

[issue43124] [security] smtplib multiple CRLF injection

2021-02-04 Thread STINNER Victor
Change by STINNER Victor : -- title: smtplib multiple CRLF injection -> [security] smtplib multiple CRLF injection ___ Python tracker ___ _

[issue43122] Python Launcher doesn't open a terminal window

2021-02-04 Thread Kevin
Kevin added the comment: William, Thanks for your comment. I assumed the same thing, but it goes by so fast I am never sure.. > On Feb 3, 2021, at 10:27 PM, William Pickard wrote: > > > William Pickard added the comment: > > That quick flash would be your terminal window if I have to gu

[issue43126] IOBase.readlines(0) behaviour is inconsistent with documentation

2021-02-04 Thread Martin Larralde
New submission from Martin Larralde : The documentation for `IOBase.readlines` states that the `hint` optional argument should be used like so (https://docs.python.org/3/library/io.html#io.IOBase.readlines): > Read and return a list of lines from the stream. hint can be specified to > contro

[issue43127] Unable to install Python 3.9.1 - Windows 10

2021-02-04 Thread Adrian Lloyd
New submission from Adrian Lloyd : I get the following error when I try to install Python 3.9.1 on windows 10 0x80070659 The installation is forbidden by system policy. The log gives more information: [13A0:0FC0][2021-02-04T16:41:04]e000: Error 0x80070659: Failed to install MSI package. [13A

[issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file

2021-02-04 Thread Eric V. Smith
Eric V. Smith added the comment: I suggest making no change here, except maybe documenting it somewhere. Removing the filename would make this problem even harder to diagnose. And adding additional code to an error condition just increases the chance of something failing. The error reporting

[issue43008] IDLE ignores sys.excepthook in normal, subprocess mode

2021-02-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: IDLE also caches shell input. Off topic here, I sent Andre an email about how FT could access it. -- ___ Python tracker ___ ___

[issue43119] asyncio.Queue.put never yields if the queue is unbounded

2021-02-04 Thread Spencer Nelson
Spencer Nelson added the comment: Thanks for testing on more Python versions. Yes, adding asyncio.sleep(0) after each put is an effective workaround - it's certainly possible to manually yield like that. I just think that that's what asyncio.Queue.put ought to be doing - in fact, that's my p

[issue43107] RotatingFileHandler with multi processes creates too small backup files

2021-02-04 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +23248 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24442 ___ Python tracker _

[issue43128] make test fails Lib/test/test_httpservers.py on 3.9.1

2021-02-04 Thread Alex Osterman
New submission from Alex Osterman : While compiling 3.9.1 on CentOS 8, test_httpservers.py throws multiple errors in the vein of "OSError: [Errno 39] Directory not empty: '/tmp/tmp70ip355o'" from line 707, in teardown. Examining the directories I see that they all contain only a gmon.out. Add

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

2021-02-04 Thread Austin Lamb
Austin Lamb added the comment: You're right to think that folding is a problem Steve, but thankfully my PR does not enable COMDAT folding for that very reason :). /OPT:ICF enables identical COMDAT folding, but surprisingly-to-me /OPT:REF seems to still enable a small amount of folding (I co

[issue19733] Setting image parameter of a button crashes with Cocoa Tk

2021-02-04 Thread Ned Deily
Ned Deily added the comment: > was it tested on macOS 11.2 ? > Tests fail there with Python 3.9.1 The change to re-enable the previously crashing test will first be released in 3.9.2 and AFAICT no longer causes a crash. There are other Tk-related test failures on macOS with Tk 8.6.11 but no

[issue19733] Setting image parameter of a button crashes with Cocoa Tk

2021-02-04 Thread Ned Deily
Ned Deily added the comment: > The change to re-enable the previously crashing test will first be released > in 3.9.2 It's also in the recently-released 3.10.0a5 release preview. -- ___ Python tracker

[issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file

2021-02-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: That bash produces a nicer error message is because bash happens to implement its own special logic to try and figure out why an exec failed with an error other than ENOEXEC. The OS kernel & libc do not give it that information, there is no such errno. B

[issue42773] build.yml workflow not testing on pushes

2021-02-04 Thread Ammar Askar
Change by Ammar Askar : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue33990] CPPFLAGS during ./configure are not passed-through in sysconfig.customize_compiler

2021-02-04 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: -yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue43129] Number of object on stack required by opcode

2021-02-04 Thread Matthieu Dartiailh
New submission from Matthieu Dartiailh : When constructing bytecode object manually as can be done using the bytecode library (https://github.com/MatthieuDartiailh/bytecode which was first developed by V Stinner), one can use dis.stack_effect to compute the required stack size, thus avoiding

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

2021-02-04 Thread John Rey Osano
Change by John Rey Osano : -- components: +C API, Extension Modules, IO type: performance -> enhancement ___ Python tracker ___ ___

[issue21728] Confusing error message when initialising type inheriting object.__init__

2021-02-04 Thread Irit Katriel
Irit Katriel added the comment: Looks like this was fixed under issue31506. In any case it works for me now: >>> A(42) Traceback (most recent call last): File "", line 1, in TypeError: A() takes no arguments -- nosy: +iritkatriel resolution: -> fixed status: open -> pending ___

[issue43130] Should this construct throw an exception?

2021-02-04 Thread Tony Ladd
New submission from Tony Ladd : The expression "1 and 2" evaluates to 2. Actually for most combinations of data type it returns the second object. Of course its a senseless construction (a beginning student made it) but why no exception? -- components: Interpreter Core messages: 38649

[issue30077] Support Apple AIFF-C pseudo compression in aifc.py

2021-02-04 Thread Yussuf Özkan
Yussuf Özkan added the comment: If you read a normal uncompressed AIFF with aifc, the samples are in big-endian order and need to be converted before they can be played on little-endian systems. As all other compression schemes produce big-endian data, so should 'SOWT' encoded AIFF. Therefor

[issue42882] Restarting the interpreter causes UB on 3.10.0a4

2021-02-04 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 2.0 -> 3.0 pull_requests: +23250 pull_request: https://github.com/python/cpython/pull/24440 ___ Python tracker ___

[issue43130] Should this construct throw an exception?

2021-02-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: This is the expected behavior. >From >https://docs.python.org/3/tutorial/introduction.html#first-steps-towards-programming """ In Python, like in C, any non-zero integer value is true; zero is false. The condition may also be a string or list value, in fact

[issue42882] Restarting the interpreter causes UB on 3.10.0a4

2021-02-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset 196d4deaf4810a0bba75ba537dd40f2d71a5a634 by Ken Jin in branch 'master': bpo-42882: Fix MSVC warnings in pystate.c (GH-24440) https://github.com/python/cpython/commit/196d4deaf4810a0bba75ba537dd40f2d71a5a634 --

[issue43130] Should this construct throw an exception?

2021-02-04 Thread Tony Ladd
Tony Ladd added the comment: Dennis Thanks for the explanation. Sorry to post a fake report. Python is relentlessly logical but sometimes confusing. -- ___ Python tracker __

[issue43131] MMAP duplicate reads and writes on ARM64 platform

2021-02-04 Thread Paul Swirhun
New submission from Paul Swirhun : mmap (example, as used in python-periphery) duplicates writes, compared to devmem and a c-periphery on an ARM64 platform (Zynq/Petalinux/Yocto). There are various other reports of duplicated writes using mmap suggesting it is a bug. Example: fd = os.open("/

[issue43131] MMAP duplicate reads and writes on ARM64 platform

2021-02-04 Thread Paul Swirhun
Paul Swirhun added the comment: A workaround is using memoryview (as reported here: https://stackoverflow.com/questions/53492716/python-writing-to-memory-in-a-single-operation). This results in only 1 transaction on the bus for some reason. import os, mmap fd = os.open("/dev/mem", os.O_RDWR

[issue43130] Should this construct throw an exception?

2021-02-04 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-

[issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module

2021-02-04 Thread Zackery Spytz
New submission from Zackery Spytz : PyObject_RichCompareBool() returns -1 on error, but this case is not handled by the find_in_strong_cache() function. -- components: Extension Modules messages: 386503 nosy: ZackerySpytz priority: normal severity: normal status: open title: Incorrect h

[issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module

2021-02-04 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +23251 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24450 ___ Python tracker ___ __

[issue43102] namedtuple's __new__.__globals__['__builtins__'] is None

2021-02-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset b6d68aa08baebb753534a26d537ac3c0d2c21c79 by Raymond Hettinger in branch 'master': bpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439) https://github.com/python/cpython/commit/b6d68aa08baebb753534a26d537ac3c0d2c21c79

[issue43102] namedtuple's __new__.__globals__['__builtins__'] is None

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

[issue43102] namedtuple's __new__.__globals__['__builtins__'] is None

2021-02-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 29584aa6acbc70091dc23636db51ee1696e65072 by Miss Islington (bot) in branch '3.9': bpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439) (GH-24452) https://github.com/python/cpython/commit/29584aa6acbc70091dc23636db51ee

[issue43102] namedtuple's __new__.__globals__['__builtins__'] is None

2021-02-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Okay, it's done. Thanks for the motivating use case. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 ___ Python tracker

[issue43068] test_subprocess: test_specific_shell() fails on AMD64 FreeBSD Shared 3.x

2021-02-04 Thread Kubilay Kocak
Kubilay Kocak added the comment: The failure mode is a generic "an external dependency expected by a test suite is not available or doesn't run", applying to many core Python test that invokes an external utilities, and not specific to OS. As far as I'm aware, the best practice and recommend

[issue43097] IndexError msg of random.choice() not helpful

2021-02-04 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread Inada Naoki
Inada Naoki added the comment: > 1a. Declare both functions equally acceptable. Remove comments claiming that > PyUnicode_AsUTF8AndSize() should be avoided. > > 1b. 1a, and change the implementation of PyUnicode_AsUTF8AndSize() to avoid > allocating the string twice if it needs to be material

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.10 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +23253 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24453 ___ Python tracker ___

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread Inada Naoki
Inada Naoki added the comment: New changeset d938816acf71a74f1bd13fdf0534b3d9ea962e44 by Inada Naoki in branch 'master': bpo-35295: Remove outdated comment. (GH-24453) https://github.com/python/cpython/commit/d938816acf71a74f1bd13fdf0534b3d9ea962e44 -- _

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +23254 pull_request: https://github.com/python/cpython/pull/24454 ___ Python tracker _

[issue43133] Accept file mode "rw" to open-or-create a file and seek to the start

2021-02-04 Thread Nick Coghlan
New submission from Nick Coghlan : After yet again trying to use "rw" to open a file in read/write mode, having it fail, and then having to look up the docs to remind myself that the correct spelling is "r+", I'm finally filing this to suggest we make the obvious "rw" spelling actually work.

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread miss-islington
miss-islington added the comment: New changeset b0b01811bb28d3d6c70846e47fa2f6ba03ed03f1 by Miss Islington (bot) in branch '3.9': bpo-35295: Remove outdated comment. (GH-24453) https://github.com/python/cpython/commit/b0b01811bb28d3d6c70846e47fa2f6ba03ed03f1 --

[issue43119] asyncio.Queue.put never yields if the queue is unbounded

2021-02-04 Thread Josh Rosenberg
Josh Rosenberg added the comment: Making literally every await equivalent to: await asyncio.sleep(0) followed by the actual await (which is effectively what you're proposing when you expect all await to be preemptible) means adding non-trivial overhead to all async operations (asyncio is ba

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2021-02-04 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue39617] max_workers argument to concurrent.futures.ProcessPoolExecutor is not flexible enough

2021-02-04 Thread Christoph Anton Mitterer
Change by Christoph Anton Mitterer : -- nosy: +calestyo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue39951] Ignore specific errors when closing ssl connections

2021-02-04 Thread Fantix King
Fantix King added the comment: This should/will be fixed by GH-17975 I think - like suggested in the OpenSSL comments, the proposed change will always try to run SSL_read() before SSL_shutdown(), even after the close_notify is sent. -- nosy: +fantix _

[issue39951] Ignore specific errors when closing ssl connections

2021-02-04 Thread Dima Tisnek
Dima Tisnek added the comment: @fantix alas, no: ~/cpython (asvetlov--new-ssl|✚1) [1] > ./python.exe ~/repro-39951.py Traceback (most recent call last): File "/Users/dima.tisnek/repro-39951.py", line 33, in asyncio.run(test()) File "/Users/dima.tisnek/cpython/Lib/asyncio/runners.py", l

[issue39951] Ignore specific errors when closing ssl connections

2021-02-04 Thread Dima Tisnek
Dima Tisnek added the comment: Added 3.10 target. -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing lis