From report at bugs.python.org Tue Oct 1 00:21:40 2019 From: report at bugs.python.org (paul rubin) Date: Tue, 01 Oct 2019 04:21:40 +0000 Subject: [New-bugs-announce] [issue38333] add type signatures to library function docs Message-ID: <1569903700.63.0.276076850828.issue38333@roundup.psfhosted.org> New submission from paul rubin : It would be nice if the library reference manual had type signatures for all the stdlib functions at some point. It might be possible to extract a lot of them automatically from typeshed and semi-automatically paste them into the doc files. It might also be ok to do this gradually. I can help with this but wouldn't want to take on the entire task. ---------- assignee: docs at python components: Documentation messages: 353634 nosy: docs at python, phr priority: normal severity: normal status: open title: add type signatures to library function docs type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 04:17:22 2019 From: report at bugs.python.org (Daniel Hillier) Date: Tue, 01 Oct 2019 08:17:22 +0000 Subject: [New-bugs-announce] [issue38334] zipfile: Seeking encrypted file breaks after seeking backwards Message-ID: <1569917842.05.0.044912868688.issue38334@roundup.psfhosted.org> New submission from Daniel Hillier : Seeking back beyond the decrypted / unzipped buffer doesn't reset the decrypter's crc key values. All data read after seeking back beyond the buffer is garbled. ---------- components: Library (Lib) messages: 353646 nosy: dhillier priority: normal severity: normal status: open title: zipfile: Seeking encrypted file breaks after seeking backwards type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:43:43 2019 From: report at bugs.python.org (Sanjay) Date: Tue, 01 Oct 2019 11:43:43 +0000 Subject: [New-bugs-announce] [issue38335] simplify overlaps function in ipaddress.py Message-ID: <1569930223.76.0.865877463422.issue38335@roundup.psfhosted.org> New submission from Sanjay : the current implementation of overlaps function tests either network or broadcast address is in other but we can skip checking broadcast address is in other because we anyway check if other.network_address in self without loss of generality if we assume self has smaller prefixlen than other then when self.broadcast_address in other then other.network_address *SHOULD* be in self but the reverse is not true so my first patch was to make the function logic simply do `self.network_address in other or other.network_address in self` but the current PR does a different change. We have introduced two new functions subnet_of and supernet_of for two networks A, B there are only three possibilities 1. they don't overlap 2. A is subnet of B 3. B is subnet of A so we can reuse the existing function and just do `return self.subnet_of(other) or self.supernet_of(other)` the only thing is while overlaps() function returns false when we try to compare with a network or with diff version the other throws exception so I added a typecheck in the beginning. P.S the docstring is slightly convoluted for newcomers, based on the three possibilities it should say "Tell if self is supernet or subnet of other" because "partly contained" can also mean two ranges intersect which can never happen to network prefixes. I have not made that change but can make it. There are also some other issues I want to address but I want to do one at a time. ---------- components: Library (Lib) files: skip_broadcast_in.patch keywords: patch messages: 353676 nosy: Sanjay priority: normal severity: normal status: open title: simplify overlaps function in ipaddress.py versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48634/skip_broadcast_in.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 07:56:31 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Tue, 01 Oct 2019 11:56:31 +0000 Subject: [New-bugs-announce] [issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence Message-ID: <1569930991.59.0.212656372364.issue38336@roundup.psfhosted.org> New submission from G?ry : The [language documentation](https://docs.python.org/3/reference/datamodel.html#invoking-descriptors) states: > Data descriptors with __set__() and __get__() defined always override a redefinition in an instance dictionary. In contrast, non-data descriptors can be overridden by instances. This override is not limited to data descriptors defining `__set__()` (and `__get__()`). It is also true for data descriptors defining `__delete__()` (and `__get__()`) and data descriptors defining both `__set__()` and `__delete__()` (and `__get__()`). In other words, _any_ data descriptors (objects defining either `__set__()` or `__delete__()` or both) defining `__get__()` override an attribute redefinition in an instance dictionary. ---------- assignee: docs at python components: Documentation messages: 353685 nosy: docs at python, maggyero priority: normal severity: normal status: open title: Remove the __set__ method restriction on data descriptors for attribute lookup precedence type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 08:01:59 2019 From: report at bugs.python.org (Jonas Drotleff) Date: Tue, 01 Oct 2019 12:01:59 +0000 Subject: [New-bugs-announce] [issue38337] inspect: getmembers calls properties Message-ID: <1569931319.11.0.161787180553.issue38337@roundup.psfhosted.org> New submission from Jonas Drotleff : When calling inspect.getmembers on a class that has a property (@property), the property will be called by the getattr call in getmembers. Example: import inspect class Example: def __init__(self, var): self._var = var print('__init__') def foo(self, bar): print(bar) print('foo') @property def var(self): print('Access property') return self._var if __name__ == '__main__': ex = Example('Hello') print('--- getmembers from instance ---') print(inspect.getmembers(ex)) print('--- getmembers from class ---') print(inspect.getmembers(Example)) Result: __init__ --- getmembers from instance --- Access property [('__class__', ), ..., ('var', 'Hello')] --- getmembers from class --- [('__class__', ), ..., ('var', )] Expected: __init__ --- getmembers from instance --- [('__class__', ), ..., ('var', )] --- getmembers from class --- [('__class__', ), ..., ('var', )] ---------- components: Library (Lib) messages: 353688 nosy: jnsdrtlf priority: normal severity: normal status: open title: inspect: getmembers calls properties type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 08:55:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 12:55:54 +0000 Subject: [New-bugs-announce] [issue38338] [2.7] test_ssl fails Message-ID: <1569934554.24.0.56143952582.issue38338@roundup.psfhosted.org> New submission from STINNER Victor : SSLv23 and TLS v1.0 are disabled by RHEL8 crypto policy. AMD64 RHEL8 2.7: https://buildbot.python.org/all/#/builders/245/builds/5 test_protocol_sslv23 (test.test_ssl.ThreadedTests) Connecting to an SSLv23 server with various client options ... Could not scan /etc/ssl/openssl.cnf for MinProtocol: [Errno 2] No such file or directory: '/etc/ssl/openssl.cnf' PROTOCOL_TLS->PROTOCOL_TLS CERT_NONE PROTOCOL_TLSv1->PROTOCOL_TLS CERT_NONE ERROR ====================================================================== ERROR: test_protocol_sslv23 (test.test_ssl.ThreadedTests) Connecting to an SSLv23 server with various client options ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 189, in f return func(*args, **kwargs) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2402, in test_protocol_sslv23 try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1') File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2134, in try_protocol_combo chatty=False, connectionchatty=False) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2062, in server_params_test s.connect((HOST, server.port)) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 864, in connect self._real_connect(addr, False) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 855, in _real_connect self.do_handshake() File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 828, in do_handshake self._sslobj.do_handshake() SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:727) and test_protocol_tlsv1_1 (test.test_ssl.ThreadedTests) Connecting to a TLSv1.1 server with various client options. ... Could not scan /etc/ssl/openssl.cnf for MinProtocol: [Errno 2] No such file or directory: '/etc/ssl/openssl.cnf' PROTOCOL_TLSv1_1->PROTOCOL_TLSv1_1 CERT_NONE {PROTOCOL_TLS->PROTOCOL_TLSv1_1} CERT_NONE PROTOCOL_TLSv1_1->PROTOCOL_TLS CERT_NONE ERROR ====================================================================== ERROR: test_protocol_tlsv1_1 (test.test_ssl.ThreadedTests) Connecting to a TLSv1.1 server with various client options. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 189, in f return func(*args, **kwargs) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2477, in test_protocol_tlsv1_1 try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1') File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2134, in try_protocol_combo chatty=False, connectionchatty=False) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py", line 2062, in server_params_test s.connect((HOST, server.port)) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 864, in connect self._real_connect(addr, False) File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 855, in _real_connect self.do_handshake() File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", line 828, in do_handshake self._sslobj.do_handshake() SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:727) ---------- assignee: christian.heimes components: SSL, Tests messages: 353691 nosy: christian.heimes, vstinner priority: normal severity: normal status: open title: [2.7] test_ssl fails versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:20:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Oct 2019 13:20:50 +0000 Subject: [New-bugs-announce] [issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8 Message-ID: <1569936050.09.0.437024380138.issue38339@roundup.psfhosted.org> New submission from STINNER Victor : Example: https://travis-ci.org/python/cpython/jobs/590339147 $ python --version Python 3.6.3 $ pip --version pip 9.0.1 from /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages (python 3.6) Could not locate requirements.txt. Override the install: key in your .travis.yml to install dependencies. before_script.1 0.00s$ cd Doc before_script.2 8.58s$ python -m pip install sphinx~=1.6.1 blurb 1.88s$ make check suspicious html SPHINXOPTS="-q -W -j4" python3 tools/rstlint.py -i tools -i ./venv -i README.rst No problems found. make[1]: Entering directory `/home/travis/build/python/cpython/Doc' mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build -b suspicious -d build/doctrees -D latex_elements.papersize= -q -W -j4 . build/suspicious Sphinx version error: This project needs at least Sphinx v1.8 and therefore cannot be built with this version. make[1]: *** [build] Error 1 make[1]: Leaving directory `/home/travis/build/python/cpython/Doc' Suspicious check complete; look for any errors in the above output or in build/suspicious/suspicious.csv. If all issues are false positives, append that file to tools/susp-ignored.csv. make: *** [suspicious] Error 1 The command "make check suspicious html SPHINXOPTS="-q -W -j4"" exited with 2. cache.2 store build cache ---------- assignee: docs at python components: Documentation messages: 353692 nosy: docs at python, mdk, vstinner priority: normal severity: normal status: open title: [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 09:24:11 2019 From: report at bugs.python.org (ECAS India) Date: Tue, 01 Oct 2019 13:24:11 +0000 Subject: [New-bugs-announce] [issue38340] ERROR WHILE BUILDING pyworld for x86_64-linux-gnu-gcc Message-ID: <1569936251.44.0.0859719635079.issue38340@roundup.psfhosted.org> New submission from ECAS India : creating build/temp.linux-x86_64-3.7/lib/World creating build/temp.linux-x86_64-3.7/lib/World/src x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ilib/World/src -I/usr/include/python3.7m -I/usr/local/lib/python3.7/dist-packages/numpy/core/include -c pyworld/pyworld.cpp -o build/temp.linux-x86_64-3.7/pyworld/pyworld.o x86_64-linux-gnu-gcc: error: pyworld/pyworld.cpp: No such file or directory x86_64-linux-gnu-gcc: fatal error: no input files compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Failed building wheel for pyworld Running setup.py clean for pyworld Failed to build pyworld ---------- files: Screenshot from 2019-10-01 18-53-25.png messages: 353694 nosy: ECAS India priority: normal severity: normal status: open title: ERROR WHILE BUILDING pyworld for x86_64-linux-gnu-gcc type: compile error versions: Python 3.7 Added file: https://bugs.python.org/file48635/Screenshot from 2019-10-01 18-53-25.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 16:50:46 2019 From: report at bugs.python.org (Norman Denayer) Date: Tue, 01 Oct 2019 20:50:46 +0000 Subject: [New-bugs-announce] [issue38341] Add SMTPNotSupportedError in the exports of smtplib Message-ID: <1569963046.98.0.477841717728.issue38341@roundup.psfhosted.org> New submission from Norman Denayer : Long story short: smtplib.SMTPNotSupportedError seems the only exception not present in __all__ variable exposed by smtplib.py Context: I currently face an issue running mypy on one of my module: ...tools/email.py:46: error: Module has no attribute "SMTPNotSupportedError" except smtplib.SMTPNotSupportedError: Digging into the context of this error, I note this exception is not exposed in the list __all__. Regards, Norman ---------- components: email messages: 353712 nosy: Norman.Denayer, barry, r.david.murray priority: normal severity: normal status: open title: Add SMTPNotSupportedError in the exports of smtplib type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 18:22:11 2019 From: report at bugs.python.org (Anthony Tuininga) Date: Tue, 01 Oct 2019 22:22:11 +0000 Subject: [New-bugs-announce] [issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' Message-ID: <1569968531.94.0.379845933414.issue38342@roundup.psfhosted.org> New submission from Anthony Tuininga : Running the suggested code found at https://docs.python.org/3.8/whatsnew/3.8.html regarding the new importlib.metadata module from importlib.metadata import version, requires, files version('requests') yields the error Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.8/importlib/metadata/__init__.py", line 365, in version return distribution(package).version File "/usr/local/lib/python3.8/importlib/metadata/__init__.py", line 338, in distribution return Distribution.from_name(package) File "/usr/local/lib/python3.8/importlib/metadata/__init__.py", line 159, in from_name dists = resolver(name) File "", line 1381, in find_distributions ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' (/usr/local/lib/python3.8/importlib/metadata/__init__.py) ---------- components: Library (Lib) messages: 353714 nosy: atuining priority: normal severity: normal status: open title: ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 1 19:01:39 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 01 Oct 2019 23:01:39 +0000 Subject: [New-bugs-announce] [issue38343] Version name in PC/layout read incorrectly for RC Message-ID: <1569970899.08.0.367684181352.issue38343@roundup.psfhosted.org> New submission from Steve Dower : I noticed that when the nuget.org packages published for 3.8.0rc1, they were given the version "3.8.0". 3.7.5rc1 was okay because it's still using the old approach to setting the version. This needs to be fixed before any more RCs are released. I'll see if I can get the incorrectly versioned files removed from nuget and replace them with RCs. ---------- assignee: steve.dower components: Windows keywords: 3.8regression messages: 353715 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Version name in PC/layout read incorrectly for RC type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 02:30:23 2019 From: report at bugs.python.org (James Abel) Date: Wed, 02 Oct 2019 06:30:23 +0000 Subject: [New-bugs-announce] [issue38344] activate.bat else needs to be on the same line as the if Message-ID: <1569997823.02.0.0977203709428.issue38344@roundup.psfhosted.org> New submission from James Abel : In activate.bat, the else needs to be on the same line as the if ---------- components: Windows messages: 353722 nosy: James Abel, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: activate.bat else needs to be on the same line as the if type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 02:30:42 2019 From: report at bugs.python.org (Robert Kearns) Date: Wed, 02 Oct 2019 06:30:42 +0000 Subject: [New-bugs-announce] [issue38345] Add end lines to pyclbr objects Message-ID: <1569997842.45.0.505629355226.issue38345@roundup.psfhosted.org> Change by Robert Kearns : ---------- components: Library (Lib) nosy: RobertKearns priority: normal severity: normal status: open title: Add end lines to pyclbr objects type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 04:52:49 2019 From: report at bugs.python.org (Jim Jeon) Date: Wed, 02 Oct 2019 08:52:49 +0000 Subject: [New-bugs-announce] [issue38346] Wrong behavior when using `assert_called_with` with mutable object Message-ID: <1570006369.69.0.450054962888.issue38346@roundup.psfhosted.org> New submission from Jim Jeon : When `assert_called_with` is used with mutable object, test fails if the object has changed. I think this is not what it meant to do. https://docs.python.org/dev/library/unittest.mock-examples.html#coping-with-mutable-arguments The same situation is explained in this document. But I don't understand why they did not fix and just are proposing some solutions to the users. ---------- components: Tests files: Screen Shot 2019-10-02 at 5.22.05 PM.png messages: 353727 nosy: Jim Jeon priority: normal severity: normal status: open title: Wrong behavior when using `assert_called_with` with mutable object type: enhancement versions: Python 3.7 Added file: https://bugs.python.org/file48638/Screen Shot 2019-10-02 at 5.22.05 PM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 05:15:35 2019 From: report at bugs.python.org (=?utf-8?b?UsO8ZGlnZXIgUGzDvG0=?=) Date: Wed, 02 Oct 2019 09:15:35 +0000 Subject: [New-bugs-announce] [issue38347] pathfix.py does not find Python scripts that have '-' in its filename Message-ID: <1570007735.24.0.378926810144.issue38347@roundup.psfhosted.org> New submission from R?diger Pl?m : Tools/scripts/pathfix.py does not find Python scripts that contain a '-' in their filename when working recursively. This is caused by the regular expression used to detect whether a filename is a Python script: r'^[a-zA-Z0-9_]+\.py$' r'^[a-zA-Z0-9_-]+\.py$' fixes this. I am not sure if you want to allow further characters in script names like spaces or other special characters. The pull request I will create will only fix the '-' issue. ---------- components: Demos and Tools messages: 353728 nosy: rpluem priority: normal severity: normal status: open title: pathfix.py does not find Python scripts that have '-' in its filename type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 11:14:59 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 02 Oct 2019 15:14:59 +0000 Subject: [New-bugs-announce] [issue38348] Make python -m ast more configurable Message-ID: <1570029299.56.0.0303865742584.issue38348@roundup.psfhosted.org> New submission from Batuhan : Allow user to set indent level and parsing status of type comments ---------- components: Library (Lib) messages: 353741 nosy: BTaskaya, serhiy.storchaka priority: normal severity: normal status: open title: Make python -m ast more configurable versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:10:03 2019 From: report at bugs.python.org (jackotonye) Date: Wed, 02 Oct 2019 16:10:03 +0000 Subject: [New-bugs-announce] [issue38349] Email example using imaginary library installation error. The install shows that it only supports python 2.x but is listed for python 3.6+ Message-ID: <1570032603.68.0.429442517445.issue38349@roundup.psfhosted.org> New submission from jackotonye : https://docs.python.org/3.7/library/email.examples.html ---------- assignee: docs at python components: Documentation messages: 353743 nosy: docs at python, jackotonye priority: normal severity: normal status: open title: Email example using imaginary library installation error. The install shows that it only supports python 2.x but is listed for python 3.6+ type: resource usage versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:35:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 16:35:07 +0000 Subject: [New-bugs-announce] [issue38350] ./configure --with-pydebug should use -O0 rather than -Og Message-ID: <1570034107.68.0.232468214894.issue38350@roundup.psfhosted.org> New submission from STINNER Victor : In Python 2.7, when using ./configure --with-pydebug, Python is built using -O0 compiler optimization level: disable all optimizations. The comment is quite explicit: "Optimization messes up debuggers, so turn it off for debug builds". if test "$Py_DEBUG" = 'true' ; then # Optimization messes up debuggers, so turn it off for # debug builds. OPT="-g -O0 -Wall $STRICT_PROTO" else OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" fi In Python 3, -Og is preferred over -O0 for pydebug, if -Og is available: if test "$Py_DEBUG" = 'true' ; then # Optimization messes up debuggers, so turn it off for # debug builds. if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then OPT="-g -Og -Wall" else OPT="-g -O0 -Wall" fi else OPT="-g $WRAP -O3 -Wall" fi Problem: in my experience, gdb traceback doesn't make sense sometimes, and gdb fails to inspect some function arguments and some variables which are displayed as . See a very concrete example with a test_gdb failure on x86-64 when Python is compiled using gcc -Og: https://bugzilla.redhat.com/show_bug.cgi?id=1734327#c22 My colleague who is working on gdb suggests to use -O0: https://bugzilla.redhat.com/show_bug.cgi?id=1734327#c27 Since I started contributing to Python, I always forced gcc -O0 because any other optimization level caused me many issues in gdb. I'm using -O0 for 10 years with sucess. The GCC documentation says "It is a better choice than -O0 for producing debuggable code because some compiler passes that collect debug information are disabled at -O0." But my experience says the opposite. Note: instead of -g, we could use -g3 to include debug information for macros and defines. -- I'm proposing to change the *default* compiler flags from -Og to -O0. Obviously, Linux distributions and developers are free to override the compiler optimization level. For example: ./configure --with-pydebug CFLAGS="-Og" ensures that Python is always built using -Og. I propose to modify 3.7, 3.8 and master branches. ---------- components: Build messages: 353746 nosy: vstinner priority: normal severity: normal status: open title: ./configure --with-pydebug should use -O0 rather than -Og versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 12:45:36 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 02 Oct 2019 16:45:36 +0000 Subject: [New-bugs-announce] [issue38351] Modernize email example from %-formatting to f-string Message-ID: <1570034736.68.0.500723145519.issue38351@roundup.psfhosted.org> New submission from Mariatta : A string was formatted with %s in the code example https://github.com/python/cpython/blob/b3e7045f8314e7b62cd95861d207fe2f97e47198/Doc/includes/email-simple.py#L15 ``` msg['Subject'] = 'The contents of %s' % textfile ``` It would be great to modernize that into fstring. Doc can be read at: https://docs.python.org/3.7/library/email.examples.html ---------- assignee: docs at python components: Documentation keywords: easy, newcomer friendly messages: 353749 nosy: Mariatta, docs at python priority: normal severity: normal stage: needs patch status: open title: Modernize email example from %-formatting to f-string versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 14:31:17 2019 From: report at bugs.python.org (Karl Kornel) Date: Wed, 02 Oct 2019 18:31:17 +0000 Subject: [New-bugs-announce] [issue38352] In typing docs, note explicit import needed for IO and Pattern/Match Message-ID: <1570041077.58.0.399304866649.issue38352@roundup.psfhosted.org> New submission from Karl Kornel : Hello! In https://github.com/python/cpython/blob/master/Lib/typing.py#L115-L117, there is a note about the io and re classes not being included in typing.__all__. I am a relatively new user of typing, and I did `from typing import *` in my code. I ran the code through mypy first, which reported no problems, but then running Python 3.6 failed with a NameError (name 'IO' is not defined). Reading through the typing source, it's clear that this was an intentional decision. So, instead of reporting a bug, I'd like to request a documentation enhancement! The docs for typing make no mention of typing.io or typing.re. So, my request is: In the sections for the IO/TextIO/BinaryIO and Pattern/Match classes, include text warning the user that these types are not imported when you do `from typing import *`. ---------- assignee: docs at python components: Documentation messages: 353763 nosy: Karl Kornel, docs at python priority: normal severity: normal status: open title: In typing docs, note explicit import needed for IO and Pattern/Match type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:12:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 21:12:43 +0000 Subject: [New-bugs-announce] [issue38353] Cleanup the path configuration implementation code (getpath.c) Message-ID: <1570050763.22.0.787922067096.issue38353@roundup.psfhosted.org> New submission from STINNER Victor : Place holder issue for changes related to path configuration cleanup changes (Modules/getpath.c). ---------- components: Interpreter Core messages: 353774 nosy: vstinner priority: normal severity: normal status: open title: Cleanup the path configuration implementation code (getpath.c) versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 17:32:12 2019 From: report at bugs.python.org (Enji Cooper) Date: Wed, 02 Oct 2019 21:32:12 +0000 Subject: [New-bugs-announce] [issue38354] Fix for bug 30378 regressed SysLogHandler Message-ID: <1570051932.55.0.313239800858.issue38354@roundup.psfhosted.org> New submission from Enji Cooper : The change made for bug 30378 caused a regression in our code by making lookups for SysLogHandler addresses at init time, instead of making them more lazy. Example: >>> import logging.handlers >>> LOGGER = logging.getLogger("logger") >>> LOGGER.addHandler(logging.handlers.SysLogHandler(address=('resolvessometimesbutnotthefirsttime.com', logging.handlers.SYSLOG_UDP_PORT))) Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python2.7/logging/handlers.py", line 767, in __init__ ress = socket.getaddrinfo(host, port, 0, socktype) socket.gaierror: [Errno -2] Name or service not known This is exacerbated by the fact that a lot of code the organization I work for (and to be honest, I have written in the past) initializes global loggers once at import time. If the SysLogHandler is added to the global logger and the DNS resolution isn't possible (/etc/hosts is empty on Unix or does not contain the entry, and DNS out is to lunch), it will fall on its face at initialization time. There needs to be a more graceful way of initializing loggers like this, or a way of delaying the host resolution, so it fails gracefully and doesn't crash the entire program (restoring the previous behavior). Example: SMTPHandler doesn't do name resolution until it calls emit, which seems like a much more logical place to do the operation (especially since DNS records can change or become invalid). ---------- components: Library (Lib) messages: 353775 nosy: calcheng, ngie priority: normal severity: normal status: open title: Fix for bug 30378 regressed SysLogHandler type: crash versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:37:37 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 02 Oct 2019 22:37:37 +0000 Subject: [New-bugs-announce] [issue38355] ntpath.realpath() fails on sys.executable Message-ID: <1570055857.28.0.434394542652.issue38355@roundup.psfhosted.org> New submission from Steve Dower : The change to error handling did not include ERROR_CANT_ACCESS_FILE, but this error occurs in the Store package install. After suppressing this error, it then occurs again when stripping the prefix - we should just check for the same error here to determine whether it's safe to remove the prefix of a file we can't access. ---------- assignee: steve.dower components: Windows keywords: 3.8regression messages: 353782 nosy: lukasz.langa, paul.moore, steve.dower, tim.golden, zach.ware priority: release blocker severity: normal status: open title: ntpath.realpath() fails on sys.executable versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 18:53:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Oct 2019 22:53:01 +0000 Subject: [New-bugs-announce] [issue38356] test_asyncio: SubprocessThreadedWatcherTests leaks threads Message-ID: <1570056781.39.0.894014377654.issue38356@roundup.psfhosted.org> New submission from STINNER Victor : Warning seen o AMD64 Ubuntu Shared 3.x buildbot: https://buildbot.python.org/all/#/builders/141/builds/2593 test_devnull_output (test.test_a=syncio.test_subprocess.SubprocessThreadedWatcherTests) ... Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) The ThreadedChildWatcher class of asyncio.unix_events doesn't seem to have a method to join all threads. It should be done in tests to prevent "leaking" threads which can have side effects on following tests. ---------- components: Tests, asyncio messages: 353784 nosy: asvetlov, vstinner, yselivanov priority: normal severity: normal status: open title: test_asyncio: SubprocessThreadedWatcherTests leaks threads versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 2 21:34:08 2019 From: report at bugs.python.org (Artificial) Date: Thu, 03 Oct 2019 01:34:08 +0000 Subject: [New-bugs-announce] [issue38357] print adding extra bytes in hex above x7F Message-ID: <1570066448.41.0.0345074372849.issue38357@roundup.psfhosted.org> New submission from Artificial : Any hex str of value above \x7F causes an extra byte to printed. ---------- files: Screenshot from 2019-10-02 20-31-50.png messages: 353796 nosy: Artificial priority: normal severity: normal status: open title: print adding extra bytes in hex above x7F type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48641/Screenshot from 2019-10-02 20-31-50.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 04:50:12 2019 From: report at bugs.python.org (Puneet Bawa) Date: Thu, 03 Oct 2019 08:50:12 +0000 Subject: [New-bugs-announce] [issue38358] ASSERTION ERROR WHILE USING TENSORFLOW Message-ID: <1570092612.13.0.03397983919.issue38358@roundup.psfhosted.org> New submission from Puneet Bawa : -is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:From /home/puneet/kaldi-workspace/gan/Voice_Converter_CycleGAN/module.py:62: conv2d (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version. Instructions for updating: Use `tf.keras.layers.Conv2D` instead. WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:From /home/puneet/kaldi-workspace/gan/Voice_Converter_CycleGAN/module.py:211: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.dense instead. WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:From /home/puneet/kaldi-workspace/gan/Voice_Converter_CycleGAN/model.py:93: The name tf.trainable_variables is deprecated. Please use tf.compat.v1.trainable_variables instead. WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity > could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting >: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:From /home/puneet/kaldi-workspace/gan/Voice_Converter_CycleGAN/model.py:107: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead. ---------- components: Build messages: 353831 nosy: Puneet Bawa priority: normal severity: normal status: open title: ASSERTION ERROR WHILE USING TENSORFLOW versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 05:53:25 2019 From: report at bugs.python.org (Andrew Ushakov) Date: Thu, 03 Oct 2019 09:53:25 +0000 Subject: [New-bugs-announce] [issue38359] pyw.exe opens console window in Windows 10 Message-ID: <1570096405.52.0.325874974028.issue38359@roundup.psfhosted.org> New submission from Andrew Ushakov : pyw.exe (Python Launcher for Windows Version 3.8.121.1013) opens a console window at startup. To reproduce, run command below from the console: D:>pyw -c "import time; time.sleep(10)" By the way command: D:>pythomw -c "import time; time.sleep(10)" works as expected, silently. ---------- components: Windows messages: 353836 nosy: Andrew Ushakov, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: pyw.exe opens console window in Windows 10 type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 07:20:54 2019 From: report at bugs.python.org (Joshua Root) Date: Thu, 03 Oct 2019 11:20:54 +0000 Subject: [New-bugs-announce] [issue38360] single-argument form of -isysroot should be supported Message-ID: <1570101654.53.0.395218631906.issue38360@roundup.psfhosted.org> New submission from Joshua Root : The path associated with the -isysroot compiler flag can be supplied either as a separate argument or in the same argument as -isysroot itself. The places in library code that do special handling of this flag should support both forms, but currently only support the two separate arguments form. This means that the flag may not be removed when pointing to a nonexistent SDK or when a different SDK is specified in the user's CFLAGS, and at worst a ValueError is raised in compiler_fixup. ---------- components: Distutils, macOS messages: 353838 nosy: dstufft, eric.araujo, jmr, ned.deily, ronaldoussoren priority: normal pull_requests: 16146 severity: normal status: open title: single-argument form of -isysroot should be supported type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 07:38:58 2019 From: report at bugs.python.org (Vaclav Bartos) Date: Thu, 03 Oct 2019 11:38:58 +0000 Subject: [New-bugs-announce] [issue38361] syslog: Default "ident" in syslog.openlog() shouldn't contain slash Message-ID: <1570102738.99.0.163183464343.issue38361@roundup.psfhosted.org> New submission from Vaclav Bartos : When `syslog.openlog()` is called without parameters (or `syslog.syslog()` is called directly), the `ident` parameter should be set to "sys.argv[0] with leading path components stripped" (citation from docs). I suppose this means that when sys.argv[0] is "/some/path/to/script", the ident should be set to "script" (this is the behavior in Python 2.7) However, in Python 3.x, it gets set to "/script", i.e. the last slash is included in the string. I suppose this is not intended, it is just a "one-off" error in parsing the string. The fix is trivial, see the linked GitHub PR. To reproduce the bug: $ python3 >>> import sys >>> import syslog >>> sys.argv[0] = "/some/path/to/script" >>> syslog.syslog("TEST MESSAGE") >>> $ tail -n 1 /var/log/messages Oct 3 11:11:46 localhost /script: TEST MESSAGE ---------- components: Extension Modules messages: 353839 nosy: vaclavbartos priority: normal pull_requests: 16147 severity: normal status: open title: syslog: Default "ident" in syslog.openlog() shouldn't contain slash type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 07:44:52 2019 From: report at bugs.python.org (=?utf-8?b?0KHQstC10YLQu9C+0LzQuNGAINCR0LDQu9C10LLRgdC60Lg=?=) Date: Thu, 03 Oct 2019 11:44:52 +0000 Subject: [New-bugs-announce] [issue38362] platform.system() comparison problem Message-ID: <1570103092.18.0.780844249271.issue38362@roundup.psfhosted.org> New submission from ????????? ???????? : Hi, I am using platform.system(). On linux I am using python3.6. >>> platform.system() 'Linux' >>> platform.system() is 'Linux' False >>> platform.system() == 'Linux' True On Windows with python 3.7: [?10/?3/?2019 2:42 PM] >>> platform.system() 'Windows' >>> platform.system() is 'Windows' True >>> platform.system() == 'Windows' True Is this a known problem? ---------- components: Library (Lib) messages: 353840 nosy: ????????? ???????? priority: normal severity: normal status: open title: platform.system() comparison problem type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 08:10:17 2019 From: report at bugs.python.org (Stephen Tucker) Date: Thu, 03 Oct 2019 12:10:17 +0000 Subject: [New-bugs-announce] [issue38363] No Module named ..." and UTF-8 Byte Order Marks Message-ID: New submission from Stephen Tucker : Hi, I am running Python 2.7.10 on Windows 10. I have discovered that if a .py source text file (that is, a Module text file) starts with a UTF-8 Byte Order Mark, the module does not get "found" by the import statement. I have just spent an inordinate amount of time reaching this conclusion. I realise that 2.7.10 is probably not being supported any more, however, please let me ask the questions anyway: Could ... Either: ... the error message please be more helpful? (Like, for example, "Module begins with a Byte Order Mark") Or: ... the BOM be allowed at the start of a Module? Thanks. Stephen Tucker. ---------- messages: 353841 nosy: Stephen_Tucker priority: normal severity: normal status: open title: No Module named ..." and UTF-8 Byte Order Marks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 09:28:44 2019 From: report at bugs.python.org (Martijn Pieters) Date: Thu, 03 Oct 2019 13:28:44 +0000 Subject: [New-bugs-announce] [issue38364] inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects Message-ID: <1570109324.07.0.792957059658.issue38364@roundup.psfhosted.org> New submission from Martijn Pieters : This is a follow-up to #33261, which added general support for detecting generator / coroutine / async generator functions wrapped in partials. It appears that partialmethod objects were missed out. While a partialmethod object will produce a functools.partial() object on binding to an instance, the .func attribute of that partial is a bound method, not a function, and the current _has_code_flag implementation unwraps methods *before* it unwraps partials. Next, binding to a class produces a partialmethod._make_unbound_method.._method wrapper function. _unwrap_partial can't unwrap this, as it doesn't handle this case; it could look for the `_partialmethod` attribute and follow that to find the `.func` attribute. Test case: import inspect import functools class Foo: async def bar(self, a): return a ham = partialmethod(bar, "spam") print(inspect.iscoroutinefunction(Foo.bar) # True print(inspect.iscoroutinefunction(Foo.ham) # False instance = Foo() print(inspect.iscoroutinefunction(instance.bar) # True print(inspect.iscoroutinefunction(instance.ham) # False ---------- components: Library (Lib) messages: 353849 nosy: mjpieters priority: normal severity: normal status: open title: inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 11:27:22 2019 From: report at bugs.python.org (Stephen Tucker) Date: Thu, 03 Oct 2019 15:27:22 +0000 Subject: [New-bugs-announce] [issue38365] Issue 38363 - False Alarm - Sorry! Message-ID: New submission from Stephen Tucker : Hi, Issue 38363 is a false alarm - I am sorry to have wasted your time. My mistake was that the file that had the BOM in it also had a space at the end of the filename. I removed the space and the module was found OK. Sorry again. Stephen Tucker. ---------- messages: 353854 nosy: Stephen_Tucker priority: normal severity: normal status: open title: Issue 38363 - False Alarm - Sorry! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 19:04:49 2019 From: report at bugs.python.org (Io Mintz) Date: Thu, 03 Oct 2019 23:04:49 +0000 Subject: [New-bugs-announce] [issue38366] dataclasses: generate the _hash_action table from the if-else tree Message-ID: <1570143889.18.0.0994959118678.issue38366@roundup.psfhosted.org> New submission from Io Mintz : The dataclasses._hash_action table is currently a bit hard to read. It could be generated once from the if-else tree written in https://bugs.python.org/issue32929#msg312829 instead, which would both be easier to read and easier to maintain, while still maintaining the efficiency of the current dictionary. ---------- components: Library (Lib) messages: 353887 nosy: iomintz priority: normal pull_requests: 16163 severity: normal status: open title: dataclasses: generate the _hash_action table from the if-else tree type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 3 20:10:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Oct 2019 00:10:21 +0000 Subject: [New-bugs-announce] [issue38367] test_regrtest hanged on AMD64 Windows10 3.x Message-ID: <1570147821.98.0.530432590053.issue38367@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/3/builds/3617 ... 0:25:50 load avg: 0.00 running: test_regrtest (13 min 48 sec) 0:26:20 load avg: 0.00 running: test_regrtest (14 min 18 sec) 0:26:50 load avg: 0.00 running: test_regrtest (14 min 48 sec) 0:27:02 load avg: 0.00 [419/419/1] test_regrtest crashed (Exit code 1) (...) 0:27:02 load avg: 0.00 Re-running failed tests in verbose mode 0:27:02 load avg: 0.00 Re-running test_regrtest in verbose mode Timeout (0:15:00)! Thread 0x00002ee0 (most recent call first): File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 1457 in _readerthread File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 882 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 944 in _bootstrap_inner File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 902 in _bootstrap Thread 0x00002140 (most recent call first): File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 1039 in _wait_for_tstate_lock File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 1023 in join File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 1486 in _communicate File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 1113 in communicate File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 499 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 504 in run_command File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 529 in run_python File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 584 in run_tests File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 610 in test_module_autotest File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 616 in _callTestMethod File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 659 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 719 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\runner.py", line 176 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 2032 in _run_suite File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 2128 in run_unittest File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 209 in _test_module File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 234 in _runtest_inner2 File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 270 in _runtest_inner File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 140 in _runtest File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 193 in runtest File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest_mp.py", line 67 in run_tests_worker File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 654 in _main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 634 in main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 712 in main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\regrtest.py", line 43 in _main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\regrtest.py", line 47 in File "D:\buildarea\3.x.bolen-windows10\build\lib\runpy.py", line 85 in _run_code File "D:\buildarea\3.x.bolen-windows10\build\lib\runpy.py", line 192 in _run_module_as_main (...) 1 re-run test: test_regrtest Total duration: 27 min 35 sec Tests result: FAILURE then SUCCESS Traceback (most recent call last): File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 1049, in temp_dir yield path File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 1101, in temp_cwd yield cwd_dir File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 634, in main self._main(tests, kwargs) File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 707, in _main sys.exit(0) SystemExit: 0 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 336, in _force_run return func(*args) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\buildarea\\3.x.bolen-windows10\\build\\build\\test_python_9260\\test_python_worker_11168' ---------- components: Tests messages: 353889 nosy: vstinner priority: normal severity: normal status: open title: test_regrtest hanged on AMD64 Windows10 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 04:36:01 2019 From: report at bugs.python.org (Doug O'Riordan) Date: Fri, 04 Oct 2019 08:36:01 +0000 Subject: [New-bugs-announce] [issue38368] Crash when subclassing ctypes.Union Message-ID: <1570178161.94.0.1951756088.issue38368@roundup.psfhosted.org> New submission from Doug O'Riordan : Ran into Segfaults while trying to use pysnmp with 3.8.0rc1. The code is running fine on 3.8.0b04. $ python3.8 Python 3.8.0rc1 (default, Oct 2 2019, 14:15:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ctypes >>> class in6_addr_U(ctypes.Union): ... _fields_ = [ ... ('__u6_addr8', ctypes.c_uint8 * 16), ... ('__u6_addr16', ctypes.c_uint16 * 8), ... ('__u6_addr32', ctypes.c_uint32 * 4), ... ] ... Segmentation fault $ docker run -it python:3.8.0rc1-slim Python 3.8.0rc1 (default, Oct 2 2019, 23:38:42) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ctypes >>> class in6_addr_U(ctypes.Union): ... _fields_ = [ ... ('__u6_addr8', ctypes.c_uint8 * 16), ... ('__u6_addr16', ctypes.c_uint16 * 8), ... ('__u6_addr32', ctypes.c_uint32 * 4), ... ] ... $ The code is from here: https://github.com/etingof/pysnmp/blob/master/pysnmp/carrier/sockmsg.py#L47-L52 ---------- components: ctypes messages: 353906 nosy: oriordan priority: normal severity: normal status: open title: Crash when subclassing ctypes.Union type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 05:18:54 2019 From: report at bugs.python.org (Paul Moore) Date: Fri, 04 Oct 2019 09:18:54 +0000 Subject: [New-bugs-announce] [issue38369] Python 3.7.4 venv command does not install pip Message-ID: <1570180734.57.0.0824297518984.issue38369@roundup.psfhosted.org> New submission from Paul Moore : The venv module with Python 3.4 on Windows doesn't install pip - even though the --without-pip flag is not specified. This appears to be a regression since pip is installed when using 3.7: >C:\Utils\PythonVersions\Python-3.7.3\python.exe -m venv ve-373 >dir .\ve-373\Scripts\pip.exe Directory: C:\Work\Scratch\vv\ve-373\Scripts Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 04/10/2019 10:08 102765 pip.exe >py -m venv ve-374 >dir .\ve-374\Scripts\pip.exe dir : Cannot find path 'C:\Work\Scratch\vv\ve-374\Scripts\pip.exe' because it does not exist. At line:1 char:1 + dir .\ve-374\Scripts\pip.exe + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\Work\Scratch...Scripts\pip.exe:String) [Get-ChildItem], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand >py -V Python 3.7.4 ---------- assignee: steve.dower components: Library (Lib) messages: 353911 nosy: paul.moore, steve.dower priority: normal severity: normal status: open title: Python 3.7.4 venv command does not install pip type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 07:47:21 2019 From: report at bugs.python.org (plugin nieulq) Date: Fri, 04 Oct 2019 11:47:21 +0000 Subject: [New-bugs-announce] [issue38370] An array as attribute of an object is shared between instances Message-ID: <1570189641.68.0.415571181009.issue38370@roundup.psfhosted.org> New submission from plugin nieulq : I am using this version on Windows : Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]. When an attribute of an object is an array, the array is shared between instances as shown in my example. When executed, the output generated by the script is: Value1 Value2 Value3 Value4 -------------------------------- Value1 Value2 Value3 Value4 It should be : Value1 Value2 -------------------------------- Value3 Value4 ---------- components: Windows messages: 353928 nosy: paul.moore, plugin nieulq, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: An array as attribute of an object is shared between instances type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 11:33:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 15:33:41 +0000 Subject: [New-bugs-announce] [issue38371] Tkinter: deprecate the split() method Message-ID: <1570203221.73.0.664458057352.issue38371@roundup.psfhosted.org> New submission from Serhiy Storchaka : The tkapp.split() method has weird behavior. It splits a string recursively, so the type of items and the depth of nesting depends on spaces in string values. For example: >>> import tkinter >>> root = tkinter.Tcl() >>> root.tk.split('Hi') 'Hi' >>> root.tk.split('Hello "Good bye"') ('Hello', ('Good', 'bye')) It may work as you meant in some cases (if items at the same level either all have spaces or all do not have spaces), but return unexpected result for untested cases. It is more robust to use the tkapp.splitlist() method, which split exactly one level and always returns a tuple of strings. It can be used recursively if you need nested lists. >>> root.tk.splitlist('Hi') ('Hi',) >>> root.tk.splitlist('Hello "Good bye"') ('Hello', 'Good bye') >>> [root.tk.splitlist(x) for x in root.tk.splitlist('Hello "Good bye"')] [('Hello',), ('Good', 'bye')] ---------- components: Tkinter messages: 353948 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Tkinter: deprecate the split() method versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 12:54:45 2019 From: report at bugs.python.org (=?utf-8?b?0JHQtdCw0YLRgNC40YEg0JHQvtC90LXQstCw?=) Date: Fri, 04 Oct 2019 16:54:45 +0000 Subject: [New-bugs-announce] [issue38372] Undefined behavior when changing dict while iterating it Message-ID: <1570208085.28.0.0436589933875.issue38372@roundup.psfhosted.org> New submission from ??????? ?????? : When changing a dict while iterating through it by removing one key and inserting other which is calculated based on the old one, the dict is changed unexpectedly. The following function: ``` def test(d: dict): for i in d: d[i+1] = d.pop(i) ``` when called with input dict `{1: 'test'}` transforms the dict to: - `{6: 'test'}` in Python3.7.4; - `{8: 'test'}` in Python3.5.3 and Python2.7. If I change the function to add 2 to the key ( `d[i+2] = d.pop(i)` ) and use the same input `{1: 'test'}` the dict is changed to: - `{11: 'test'}` in Python3.7; - `{9: 'test'}` in Python3.5. Similar thing happens with strings: ``` def test(d: dict): for i in d: d[i+'x'] = d.pop(i) ``` When called with input dict `{'a': 'test'}` it transforms it to: - `{'axxxxx': 'test'}` in Python3.7.4; - `{'axx': 'test'}` in Python3.5.3. ---------- components: Library (Lib) messages: 353954 nosy: ??????? ?????? priority: normal severity: normal status: open title: Undefined behavior when changing dict while iterating it type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 18:43:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Oct 2019 22:43:43 +0000 Subject: [New-bugs-announce] [issue38373] List overallocation strategy Message-ID: <1570229023.08.0.986734049649.issue38373@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently list uses the following formula for allocating an array for items (if size != 0): allocated = size + (size >> 3) + (3 if size < 9 else 6) If add items by 1 the growth pattern is: 0, 4, 8, 16, 25, 35, 46, 58, 72, 88, ... I think this strategy can be improved. 1. There is no much sense in allocating the space for 25 items. The standard Python allocator returns addresses aligned to 16 bytes on 64-bit platform. It will allocate a space for 26 items. It is more efficient if the starting address is a multiple of some power of two, and perhaps larger than the pointer size. So it may be better to allocate a multiple of two or four items. Few first sizes are multiple of four, so this is good multiplier. I suggest to use the following expression: allocated = (size + (size >> 3) + 6) & ~3 It adds bits AND, but removes conditional value. 2. It is common enough case if the list is created from a sequence of a known size and do not adds items anymore. Or if it is created by concatenating of few sequences. In such cases the list can overallocate a space which will never be used. For example: >>> import sys >>> sys.getsizeof([1, 2, 3]) 80 >>> sys.getsizeof([*(1, 2, 3)]) 104 List display allocates a space for exactly 3 items. But a list created from a tuple allocates a space for 6 items. Other example. Let extend a list by 10 items at a time. size allocated 10 17 20 28 30 39 40 51 50 51 60 73 70 73 80 96 90 96 100 118 We need to reallocate an array after first four steps. 17 is too small for 20, 28 is too small for 30, 39 is too small for 40. So overallocating does not help, it just spends a space. My idea, that if we adds several items at a time and need to reallocate an array, we check if the overallocated size is enough for adding the same amount of items next time. If it is not enough, we do not overallocate. The final algorithm is: allocated = (size + (size >> 3) + 6) & ~3 if size - old_size > allocated - size: allocated = (size + 3) & ~3 It will save a space if extend a list by many items few times. ---------- components: Interpreter Core messages: 353976 nosy: rhettinger, serhiy.storchaka, tim.peters priority: normal severity: normal status: open title: List overallocation strategy type: resource usage versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 4 18:55:21 2019 From: report at bugs.python.org (Martijn Pieters) Date: Fri, 04 Oct 2019 22:55:21 +0000 Subject: [New-bugs-announce] [issue38374] Remove weakref.ReferenceError entry from documentation Message-ID: <1570229721.54.0.2203597595.issue38374@roundup.psfhosted.org> New submission from Martijn Pieters : The weakref documentation still mentions weakref.ReferenceError: https://docs.python.org/3/library/weakref.html#weakref.ReferenceError But this alias for the built-in ReferenceError exception was removed in the 3.0 development cycle (https://github.com/python/cpython/commit/2633c69fae7e413b2b64b01d8c0c901ae649a225#diff-b7975e9ef5a6be5f64e9bb391de03057), the last version where `weakref.ReferenceError` still exists is Python 2.7. Please remove it, it's just confusing now. ---------- assignee: docs at python components: Documentation messages: 353977 nosy: docs at python, mjpieters priority: normal severity: normal status: open title: Remove weakref.ReferenceError entry from documentation versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 07:56:36 2019 From: report at bugs.python.org (Massimo) Date: Sat, 05 Oct 2019 11:56:36 +0000 Subject: [New-bugs-announce] [issue38375] Enum lookup fails for callable values Message-ID: <1570276596.73.0.237929240562.issue38375@roundup.psfhosted.org> New submission from Massimo : ``` from enum import Enum class T(Enum): TEST = 1 print(T["TEST"]) class S(Enum): TEST = lambda a: a print(S["TEST"]) ``` fails with `KeyError: 'TEST'` on the last line. ---------- components: Interpreter Core messages: 354003 nosy: typish priority: normal severity: normal status: open title: Enum lookup fails for callable values type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 08:43:51 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 05 Oct 2019 12:43:51 +0000 Subject: [New-bugs-announce] [issue38376] ./configure --with-assertions generates a broken build Message-ID: <1570279431.23.0.578903771856.issue38376@roundup.psfhosted.org> New submission from Vinay Sajip : Following ./configure --prefix=$HOME/.local --with-assertions and then running make leads to an error: $ make gcc -pthread -c -Wno-unused-result -Wsign-compare -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Objects/codeobject.o Objects/codeobject.c gcc -pthread -c -Wno-unused-result -Wsign-compare -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Objects/complexobject.o Objects/complexobject.c gcc -pthread -c -Wno-unused-result -Wsign-compare -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Objects/descrobject.o Objects/descrobject.c In file included from ./Include/object.h:746:0, from ./Include/pytime.h:6, from ./Include/Python.h:85, from Objects/descrobject.c:3: ./Include/object.h:111:38: error: expected ?)? before ?*? token #define _PyObject_CAST(op) ((PyObject*)(op)) ^ ./Include/cpython/object.h:337:36: note: in definition of macro ?PyType_HasFeature? #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) ^ ./Include/unicodeobject.h:115:18: note: in expansion of macro ?PyType_FastSubclass? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/object.h:122:34: note: in expansion of macro ?_PyObject_CAST? #define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type) ^ ./Include/unicodeobject.h:115:38: note: in expansion of macro ?Py_TYPE? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:1042:56: note: in expansion of macro ?PyUnicode_Check? #define _PyUnicode_CheckConsistency(op, check_content) PyUnicode_Check(op) ^ ./Include/internal/pycore_object.h:14:17: note: in expansion of macro ?_PyUnicode_CheckConsistency? PyAPI_FUNC(int) _PyUnicode_CheckConsistency(PyObject *op, int check_content); ^ ./Include/object.h:111:40: error: expected ?)? before ?(? token #define _PyObject_CAST(op) ((PyObject*)(op)) ^ ./Include/cpython/object.h:337:36: note: in definition of macro ?PyType_HasFeature? #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) ^ ./Include/unicodeobject.h:115:18: note: in expansion of macro ?PyType_FastSubclass? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/object.h:122:34: note: in expansion of macro ?_PyObject_CAST? #define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type) ^ ./Include/unicodeobject.h:115:38: note: in expansion of macro ?Py_TYPE? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:1042:56: note: in expansion of macro ?PyUnicode_Check? #define _PyUnicode_CheckConsistency(op, check_content) PyUnicode_Check(op) ^ ./Include/internal/pycore_object.h:14:17: note: in expansion of macro ?_PyUnicode_CheckConsistency? PyAPI_FUNC(int) _PyUnicode_CheckConsistency(PyObject *op, int check_content); ^ ./Include/object.h:122:52: error: expected ?)? before ?->? token #define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type) ^ ./Include/cpython/object.h:337:36: note: in definition of macro ?PyType_HasFeature? #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) ^ ./Include/unicodeobject.h:115:18: note: in expansion of macro ?PyType_FastSubclass? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:115:38: note: in expansion of macro ?Py_TYPE? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:1042:56: note: in expansion of macro ?PyUnicode_Check? #define _PyUnicode_CheckConsistency(op, check_content) PyUnicode_Check(op) ^ ./Include/internal/pycore_object.h:14:17: note: in expansion of macro ?_PyUnicode_CheckConsistency? PyAPI_FUNC(int) _PyUnicode_CheckConsistency(PyObject *op, int check_content); ^ ./Include/cpython/object.h:337:38: error: expected ?)? before ?->? token #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) ^ ./Include/object.h:351:35: note: in expansion of macro ?PyType_HasFeature? #define PyType_FastSubclass(t,f) PyType_HasFeature(t,f) ^ ./Include/unicodeobject.h:115:18: note: in expansion of macro ?PyType_FastSubclass? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:1042:56: note: in expansion of macro ?PyUnicode_Check? #define _PyUnicode_CheckConsistency(op, check_content) PyUnicode_Check(op) ^ ./Include/internal/pycore_object.h:14:17: note: in expansion of macro ?_PyUnicode_CheckConsistency? PyAPI_FUNC(int) _PyUnicode_CheckConsistency(PyObject *op, int check_content); ^ ./Include/cpython/object.h:337:56: error: expected ?)? before ?!=? token #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) ^ ./Include/object.h:351:35: note: in expansion of macro ?PyType_HasFeature? #define PyType_FastSubclass(t,f) PyType_HasFeature(t,f) ^ ./Include/unicodeobject.h:115:18: note: in expansion of macro ?PyType_FastSubclass? PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ ./Include/unicodeobject.h:1042:56: note: in expansion of macro ?PyUnicode_Check? #define _PyUnicode_CheckConsistency(op, check_content) PyUnicode_Check(op) ^ ./Include/internal/pycore_object.h:14:17: note: in expansion of macro ?_PyUnicode_CheckConsistency? PyAPI_FUNC(int) _PyUnicode_CheckConsistency(PyObject *op, int check_content); ^ Makefile:1711: recipe for target 'Objects/descrobject.o' failed make: *** [Objects/descrobject.o] Error 1 BTW, this happens even if Py_DEBUG=true is defined. System where the failure occurred: Ubuntu 16.04, 64-bit. ---------- components: Build messages: 354006 nosy: vinay.sajip priority: normal severity: normal status: open title: ./configure --with-assertions generates a broken build type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 09:47:18 2019 From: report at bugs.python.org (Matej Cepl) Date: Sat, 05 Oct 2019 13:47:18 +0000 Subject: [New-bugs-announce] [issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm Message-ID: <1570283238.14.0.402660591178.issue38377@roundup.psfhosted.org> New submission from Matej Cepl : ====================================================================== ERROR: test_get_event_loop_new_process (test.test_asyncio.test_events.TestCGetEventLoop) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/test/test_asyncio/test_events.py", line 2647, in test_get_event_loop_new_process self.loop.run_until_complete(main()), File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/asyncio/base_events.py", line 608, in run_until_complete return future.result() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/test/test_asyncio/test_events.py", line 2640, in main pool = concurrent.futures.ProcessPoolExecutor() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/concurrent/futures/process.py", line 555, in __init__ self._call_queue = _SafeQueue( File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/concurrent/futures/process.py", line 165, in __init__ super().__init__(max_size, ctx=ctx) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/queues.py", line 42, in __init__ self._rlock = ctx.Lock() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/context.py", line 68, in Lock return Lock(ctx=self.get_context()) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/synchronize.py", line 162, in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/synchronize.py", line 57, in __init__ sl = self._semlock = _multiprocessing.SemLock( OSError: [Errno 38] Function not implemented ====================================================================== ERROR: test_get_event_loop_new_process (test.test_asyncio.test_events.TestPyGetEventLoop) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/test/test_asyncio/test_events.py", line 2647, in test_get_event_loop_new_process self.loop.run_until_complete(main()), File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/asyncio/base_events.py", line 608, in run_until_complete return future.result() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/test/test_asyncio/test_events.py", line 2640, in main pool = concurrent.futures.ProcessPoolExecutor() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/concurrent/futures/process.py", line 555, in __init__ self._call_queue = _SafeQueue( File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/concurrent/futures/process.py", line 165, in __init__ super().__init__(max_size, ctx=ctx) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/queues.py", line 42, in __init__ self._rlock = ctx.Lock() File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/context.py", line 68, in Lock return Lock(ctx=self.get_context()) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/synchronize.py", line 162, in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) File "/home/abuild/rpmbuild/BUILD/Python-3.8.0rc1/Lib/multiprocessing/synchronize.py", line 57, in __init__ sl = self._semlock = _multiprocessing.SemLock( OSError: [Errno 38] Function not implemented ---------------------------------------------------------------------- The problem is that in the OpenBuildService (the build system of SUSE distributions) /dev/shm is limited to: abuild at milic:~/rpmbuild/BUILD/Python-3.8.0rc1> ls -ld /dev/shm drwxr-xr-x 1 root root 0 Oct 5 13:23 /dev/shm abuild at milic:~/rpmbuild/BUILD/Python-3.8.0rc1> Provided PR will skip test if /dev/shm doesn?t exist or it doesn?t sufficient permissions. ---------- components: asyncio messages: 354010 nosy: asvetlov, mcepl, yselivanov priority: normal severity: normal status: open title: test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 11:04:03 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Oct 2019 15:04:03 +0000 Subject: [New-bugs-announce] [issue38378] os.sendfile() has improperly named parameter Message-ID: <1570287843.24.0.0727618245068.issue38378@roundup.psfhosted.org> New submission from Serhiy Storchaka : os.sendfile() has a keyword-or-positional parameter named "in". Since it is a keyword in Python, it is not possible to pass it as a keyword argument. You can only pass it as a positional argument or using a var-keyword argument (unlikely anybody uses the latter). The preceding parameter, "out", also can not be passed by keyword because of this. It is weird, but usually does not cause a problem. You cannot use a keyword argument, period. But it prevents os.sendfile() from converting to Argument Clinic, because Argument Clinic does not allow using Python keywords as parameter names (I already created a patch for conversion, but in needs to solve this issue first). There are two ways to solve this issue. 1. Rename parameter "in" (and maybe "out" for consistency). "out_fd" and "in_fd" look good names (they are use in Linux manpage). 2. Make "out" and "in" positional-only parameters. ---------- components: Extension Modules messages: 354012 nosy: serhiy.storchaka priority: normal severity: normal status: open title: os.sendfile() has improperly named parameter type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 13:31:26 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 05 Oct 2019 17:31:26 +0000 Subject: [New-bugs-announce] [issue38379] finalizer resurrection in gc Message-ID: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> New submission from Tim Peters : While people are thinking about gc, zleak.py shows a small bug, and a possible opportunity for improvement, in the way gc treats finalizers that resurrect objects. The bug: the stats keep claiming gc is collecting an enormous number of objects, but in fact it's not collecting any. Objects in the unreachable set shouldn't add to the "collected" count unless they _are_ collected. Output: resurrecting collect 2000002 gen 2 stats {'collections': 2, 'collected': 2000002, 'uncollectable': 0} resurrecting collect 4000004 gen 2 stats {'collections': 3, 'collected': 6000006, 'uncollectable': 0} resurrecting collect 6000006 gen 2 stats {'collections': 4, 'collected': 12000012, 'uncollectable': 0} resurrecting collect 8000008 gen 2 stats {'collections': 5, 'collected': 20000020, 'uncollectable': 0} resurrecting collect 10000010 gen 2 stats {'collections': 6, 'collected': 30000030, 'uncollectable': 0} ... Memory use grows without bound, and collections take ever longer. The opportunity: if any finalizer resurrects anything, gc gives up. But the process of computing whether anything was resurrected also determines which initially-trash objects are reachable from the risen dead. Offhand I don't see why we couldn't proceed collecting what remains trash. Then zleak.py would reclaim everything instead of nothing. Sketch: rather than just set a flag, check_garbage() could move now-reachable objects to the old generation (and, for each one moved, decrement the count of collected objects). Then delete_garbage() could proceed on what remains in the unreachable list. ---------- components: Interpreter Core files: zleak.py messages: 354020 nosy: nascheme, pitrou, tim.peters priority: normal severity: normal stage: needs patch status: open title: finalizer resurrection in gc type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file48644/zleak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 18:12:20 2019 From: report at bugs.python.org (Big Stone) Date: Sat, 05 Oct 2019 22:12:20 +0000 Subject: [New-bugs-announce] [issue38380] Update SQLite to 3.30 in Windows and macOS installer builds Message-ID: <1570313540.41.0.0224198940573.issue38380@roundup.psfhosted.org> New submission from Big Stone : there is a security fix in sqlite-3.30 https://nvd.nist.gov/vuln/detail/CVE-2019-16168#VulnChangeHistorySection https://www.sqlite.org/releaselog/3_30_0.html ---------- messages: 354023 nosy: Big Stone priority: normal severity: normal status: open title: Update SQLite to 3.30 in Windows and macOS installer builds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 18:23:55 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 Oct 2019 22:23:55 +0000 Subject: [New-bugs-announce] [issue38381] Possible wordcode optimization for STORE/LOAD pairs Message-ID: <1570314235.55.0.575306260981.issue38381@roundup.psfhosted.org> New submission from Raymond Hettinger : In the show code below, the STORE_FAST x is FOLLOWED by LOAD_FAST x. This is a common word code pairing. Perhaps a new combined opcode would help: case TARGET(LOAD_AND_STORE_FAST): { PyObject *value = GETLOCAL(oparg); if (value == NULL) { format_exc_check_arg(tstate, PyExc_UnboundLocalError, UNBOUNDLOCAL_ERROR_MSG, PyTuple_GetItem(co->co_varnames, oparg)); goto error; } Py_INCREF(value); SETLOCAL(oparg, value); FAST_DISPATCH(); } The combined opcode saves one one trip around the eval-loop and it saves unnecessary stack manipulations (a PUSH() immediately followed by a POP()). The code generation would likely need to be a compiler or AST step because it crosses basic block boundaries. Care would need to be taken to not adversely affect tracing the code in a debugger. Note in the following code, the "x" is never used after the STORE/LOAD pair. In theory, the two opcodes could be dropped entirely; however, would affect a call to "locals()". -------- Code disassembly ------ >>> def f(s): for x in g: yield x**2 >>> dis(f) 2 0 LOAD_GLOBAL 0 (g) 2 GET_ITER >> 4 FOR_ITER 14 (to 20) 6 STORE_FAST 1 (x) 3 8 LOAD_FAST 1 (x) 10 LOAD_CONST 1 (2) 12 BINARY_POWER 14 YIELD_VALUE 16 POP_TOP 18 JUMP_ABSOLUTE 4 >> 20 LOAD_CONST 0 (None) 22 RETURN_VALUE ---------- components: Interpreter Core messages: 354024 nosy: rhettinger priority: normal severity: normal status: open title: Possible wordcode optimization for STORE/LOAD pairs type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 5 21:46:18 2019 From: report at bugs.python.org (Warren Weckesser) Date: Sun, 06 Oct 2019 01:46:18 +0000 Subject: [New-bugs-announce] [issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0 Message-ID: <1570326378.93.0.0728676630318.issue38382@roundup.psfhosted.org> New submission from Warren Weckesser : The function statistics.harmonic_mean is supposed to raise a StatisticsError if any element in the input is negative. It fails to do so if the negative element is preceded by a zero. When there is a zero before the negative element, the function returns 0: >>> from statistics import harmonic_mean >>> harmonic_mean([0, -1, 3]) 0 If the zero occurs after the negative value, the StatisticsError exception is correctly raised: >>> harmonic_mean([-1, 0, 3]) Traceback (most recent call last): File "", line 1, in File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 406, in harmonic_mean T, total, count = _sum(1/x for x in _fail_neg(data, errmsg)) File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 164, in _sum for typ, values in groupby(data, type): File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 406, in T, total, count = _sum(1/x for x in _fail_neg(data, errmsg)) File "/Users/warren/repos/git/forks/cpython/Lib/statistics.py", line 289, in _fail_neg raise StatisticsError(errmsg) statistics.StatisticsError: harmonic mean does not support negative values >>> The problem is in this code in the function harmonic_mean: try: T, total, count = _sum(1/x for x in _fail_neg(data, errmsg)) except ZeroDivisionError: return 0 When the zero occurs before the negative value, the ZeroDivisionError is raised before the negative value has been seen by the generator _fail_neg, and the function returns 0. ---------- components: Library (Lib) messages: 354028 nosy: WarrenWeckesser priority: normal severity: normal status: open title: statistics.harmonic_mean fails to raise error with negative input that follows a 0 type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 06:51:34 2019 From: report at bugs.python.org (hai shi) Date: Sun, 06 Oct 2019 10:51:34 +0000 Subject: [New-bugs-announce] [issue38383] undefined behavior in tailmatch() of bytes_methods.c Message-ID: <1570359094.2.0.728788628974.issue38383@roundup.psfhosted.org> New submission from hai shi : `if (start + slen > len)` would cause undefined behavior? such as: start=PY_SSIZE_T_MAX, slen=1 REFS: [1] https://github.com/python/cpython/blob/master/Objects/bytes_methods.c#L746 ---------- components: Interpreter Core messages: 354032 nosy: shihai1991 priority: normal severity: normal status: open title: undefined behavior in tailmatch() of bytes_methods.c type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 09:39:09 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 06 Oct 2019 13:39:09 +0000 Subject: [New-bugs-announce] [issue38384] An assertion failure in test_pickle Message-ID: <1570369149.47.0.841206648458.issue38384@roundup.psfhosted.org> New submission from Zackery Spytz : When running test_pickle, I sometimes see an assertion failure. ./python -m test test_pickle 0:00:00 load avg: 1.04 Run tests sequentially 0:00:00 load avg: 1.04 [1/1] test_pickle python: Objects/typeobject.c:3151: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. Fatal Python error: Aborted Current thread 0x00007f8158632140 (most recent call first): File "/home/lubuntu2/cpython/Lib/test/pickletester.py", line 3400 in test_unpickling_buffering_readline File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 617 in _callTestMethod File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 663 in run File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 725 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/test/support/testresult.py", line 162 in run File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 2032 in _run_suite File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 2128 in run_unittest File "/home/lubuntu2/cpython/Lib/test/test_pickle.py", line 525 in test_main File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2 File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 153 in _runtest File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 193 in runtest File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 417 in run_tests_sequential File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 515 in run_tests File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 687 in _main File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 634 in main File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 712 in main File "/home/lubuntu2/cpython/Lib/test/__main__.py", line 2 in File "/home/lubuntu2/cpython/Lib/runpy.py", line 85 in _run_code File "/home/lubuntu2/cpython/Lib/runpy.py", line 192 in _run_module_as_main Aborted (core dumped) In _Unpickler_SetInputStream(), _PyObject_LookupAttrId() is called three times in a row without any error handling. If an exception occurs during the first or second call, _PyObject_LookupAttrId() will be called with a live exception. ---------- components: Extension Modules messages: 354038 nosy: ZackerySpytz priority: normal severity: normal status: open title: An assertion failure in test_pickle type: crash versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 15:10:16 2019 From: report at bugs.python.org (Eric O. LEBIGOT) Date: Sun, 06 Oct 2019 19:10:16 +0000 Subject: [New-bugs-announce] [issue38385] statistics: incorrect documentation Message-ID: <1570389016.13.0.165369947537.issue38385@roundup.psfhosted.org> New submission from Eric O. LEBIGOT : The documentation for the statistics package indicates that many of its functions (like median()) accept iterators. They seem to actually accept something more convenient, namely iterables. Thus, iterator could probably be usefully replaced by iterable on many of the functions (when applicable, which I would expect is everywhere). ---------- assignee: docs at python components: Documentation messages: 354043 nosy: docs at python, lebigot priority: normal severity: normal status: open title: statistics: incorrect documentation versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:03:41 2019 From: report at bugs.python.org (yangzongwu) Date: Sun, 06 Oct 2019 23:03:41 +0000 Subject: [New-bugs-announce] [issue38386] ModuleNotFoundError: No module named '_ctypes' Message-ID: <1570403021.12.0.499983378492.issue38386@roundup.psfhosted.org> New submission from yangzongwu : I have try the following, but it is no useful sudo apt install libffi-dev but when i import _ctypes under python,it is OK yzw at yzw-virtual-machine:~/Desktop/Test$ python3 Python 3.6.8 (default, Aug 20 2019, 17:12:48) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import _ctypes >>> logs: yzw at yzw-virtual-machine:~/Desktop/Test$ buildozer android clean # Ensure build layout No buildozer.spec found in the current directory. Abandon. yzw at yzw-virtual-machine:~/Desktop/Test$ yzw at yzw-virtual-machine:~/Desktop/Test$ buildozer android clean # Ensure build layout No buildozer.spec found in the current directory. Abandon. yzw at yzw-virtual-machine:~/Desktop/Test$ buildozer init File buildozer.spec created, ready to customize! yzw at yzw-virtual-machine:~/Desktop/Test$ buildozer -v android debug # Check configuration tokens # Ensure build layout # Create directory /home/yzw/Desktop/Test/bin # Check configuration tokens # Preparing build # Check requirements for android # Run 'dpkg --version' # Cwd None Debian 'dpkg' package management program version 1.19.0.5 (amd64). This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty. # Search for Git (git) # -> found at /usr/bin/git # Search for Cython (cython) # -> found at /home/yzw/.local/bin/cython # Search for Java compiler (javac) # -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac # Search for Java keytool (keytool) # -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool # Install platform # Run '/usr/bin/python3 -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\' \'pep517\' \'pytoml\' \'virtualenv\'' # Cwd None # Apache ANT found at /home/yzw/.buildozer/android/platform/apache-ant-1.9.4 # Android SDK found at /home/yzw/.buildozer/android/platform/android-sdk # Android NDK found at /home/yzw/.buildozer/android/platform/android-ndk-r17c # Check application requirements # Check garden requirements # Compile platform # Run '/usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/yzw/Desktop/Test/.buildozer/android/platform/build" --ndk-api=21' # Cwd /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Will compile for the following archs: armeabi-v7a [INFO]: Found Android API target in $ANDROIDAPI: 27 [INFO]: Available Android APIs are (27) [INFO]: Requested API target 27 is available, continuing. [INFO]: Found NDK dir in $ANDROIDNDK: /home/yzw/.buildozer/android/platform/android-ndk-r17c [INFO]: Found NDK version 17c [INFO]: Getting NDK API version (i.e. minimum supported API) from user argument [INFO]: Found virtualenv at /home/yzw/.local/bin/virtualenv [INFO]: ccache is missing, the build will not be optimized in the future. [INFO]: Found the following toolchain versions: ['4.9'] [INFO]: Picking the latest gcc toolchain, here 4.9 [INFO]: No existing dists meet the given requirements! [INFO]: No dist exists that meets your requirements, so one will be built. [INFO]: Found a single valid recipe set: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy'] [INFO]: The selected bootstrap is sdl2 [INFO]: # Creating dist with sdl2 bootstrap [INFO]: Dist will have name myapp and requirements (python3, kivy) [INFO]: Dist contains the following requirements as recipes: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy'] [INFO]: Dist will also contain modules () installed from pip [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3 [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Recipe build order is ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy'] [INFO]: # Downloading recipes [INFO]: Downloading hostpython3 [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 57 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/hostpython3 [INFO]: -> running basename https://www.python.or...(and 35 more) [INFO]: hostpython3 download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading libffi [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 52 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/libffi [INFO]: -> running basename https://github.com/li...(and 33 more) [INFO]: libffi download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading openssl [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/openssl [INFO]: -> running basename https://www.openssl.o...(and 30 more) [INFO]: openssl download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading sdl2_image [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 56 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/sdl2_image [INFO]: -> running basename https://www.libsdl.o...(and 53 more) [INFO]: sdl2_image download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading sdl2_mixer [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 56 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/sdl2_mixer [INFO]: -> running basename https://www.libsdl.o...(and 53 more) [INFO]: sdl2_mixer download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading sdl2_ttf [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 54 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/sdl2_ttf [INFO]: -> running basename https://www.libsdl.or...(and 49 more) [INFO]: sdl2_ttf download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading sqlite3 [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/sqlite3 [INFO]: -> running basename https://www.sqlite.or...(and 38 more) [INFO]: sqlite3 download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading python3 [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/python3 [INFO]: -> running basename https://www.python.or...(and 35 more) [INFO]: python3 download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading sdl2 [INFO]: -> running mkdir -p /home/yzw/Desktop/Tes...(and 49 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/sdl2 [INFO]: -> running basename https://www.libsdl.or...(and 27 more) [INFO]: sdl2 download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading setuptools [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 56 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/setuptools [INFO]: -> running basename https://pypi.python....(and 54 more) [INFO]: setuptools download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading six [INFO]: -> running mkdir -p /home/yzw/Desktop/Tes...(and 48 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/six [INFO]: -> running basename https://pypi.python.o...(and 42 more) [INFO]: six download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading pyjnius [INFO]: -> running mkdir -p /home/yzw/Desktop/Te...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/pyjnius [INFO]: -> running basename https://github.com/ki...(and 30 more) [INFO]: pyjnius download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Downloading android [INFO]: Skipping android download as no URL is set [INFO]: Downloading kivy [INFO]: -> running mkdir -p /home/yzw/Desktop/Tes...(and 49 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/packages/kivy [INFO]: -> running basename https://github.com/ki...(and 26 more) [INFO]: kivy download already cached, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: # Building all recipes for arch armeabi-v7a [INFO]: # Unpacking recipes [INFO]: Unpacking hostpython3 for armeabi-v7a [INFO]: -> running basename https://www.python.or...(and 35 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop [INFO]: hostpython3 is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking libffi for armeabi-v7a [INFO]: -> running basename https://github.com/li...(and 33 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/libffi/armeabi-v7a__ndk_target_21 [INFO]: libffi is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking openssl for armeabi-v7a [INFO]: -> running basename https://www.openssl.o...(and 30 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/openssl/armeabi-v7a__ndk_target_21 [INFO]: openssl is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking sdl2_image for armeabi-v7a [INFO]: -> running basename https://www.libsdl.o...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni [INFO]: sdl2_image is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking sdl2_mixer for armeabi-v7a [INFO]: -> running basename https://www.libsdl.o...(and 53 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni [INFO]: sdl2_mixer is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking sdl2_ttf for armeabi-v7a [INFO]: -> running basename https://www.libsdl.or...(and 49 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni [INFO]: sdl2_ttf is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking sqlite3 for armeabi-v7a [INFO]: -> running basename https://www.sqlite.or...(and 38 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/sqlite3/armeabi-v7a__ndk_target_21 [INFO]: sqlite3 is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking python3 for armeabi-v7a [INFO]: -> running basename https://www.python.or...(and 35 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21 [INFO]: python3 is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking sdl2 for armeabi-v7a [INFO]: -> running basename https://www.libsdl.or...(and 27 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni [INFO]: sdl2 is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking setuptools for armeabi-v7a [INFO]: -> running basename https://pypi.python....(and 54 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21 [INFO]: setuptools is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking six for armeabi-v7a [INFO]: -> running basename https://pypi.python.o...(and 42 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/six-python3/armeabi-v7a__ndk_target_21 [INFO]: six is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Unpacking pyjnius for armeabi-v7a [INFO]: -> running basename https://github.com/ki...(and 30 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/pyjnius-python3-sdl2/armeabi-v7a__ndk_target_21 [INFO]: pyjnius is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: -> running rm -rf /home/yzw/Desktop/Test...(and 109 more) [INFO]: -> running cp -a /home/yzw/Desktop/Test/...(and 215 more) [INFO]: Unpacking kivy for armeabi-v7a [INFO]: -> running basename https://github.com/ki...(and 26 more) [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/kivy-python3/armeabi-v7a__ndk_target_21 [INFO]: kivy is already unpacked, skipping [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: # Prebuilding recipes [INFO]: Prebuilding hostpython3 for armeabi-v7a [INFO]: hostpython3 has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding libffi for armeabi-v7a [INFO]: libffi has no prebuild_armeabi_v7a, skipping [INFO]: Applying patches for libffi[armeabi-v7a] [INFO]: libffi already patched, skipping [INFO]: Prebuilding openssl for armeabi-v7a [INFO]: openssl has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding sdl2_image for armeabi-v7a [INFO]: sdl2_image has no prebuild_armeabi_v7a, skipping [INFO]: Applying patches for sdl2_image[armeabi-v7a] [INFO]: sdl2_image already patched, skipping [INFO]: Prebuilding sdl2_mixer for armeabi-v7a [INFO]: sdl2_mixer has no prebuild_armeabi_v7a, skipping [INFO]: Applying patches for sdl2_mixer[armeabi-v7a] [INFO]: sdl2_mixer already patched, skipping [INFO]: Prebuilding sdl2_ttf for armeabi-v7a [INFO]: sdl2_ttf has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding sqlite3 for armeabi-v7a [INFO]: sqlite3 has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding python3 for armeabi-v7a [INFO]: python3 has no prebuild_armeabi_v7a, skipping [INFO]: Applying patches for python3[armeabi-v7a] [INFO]: python3 already patched, skipping [INFO]: Prebuilding sdl2 for armeabi-v7a [INFO]: sdl2 has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding setuptools for armeabi-v7a [INFO]: setuptools has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding six for armeabi-v7a [INFO]: six has no prebuild_armeabi_v7a, skipping [INFO]: Prebuilding pyjnius for armeabi-v7a [INFO]: pyjnius has no prebuild_armeabi_v7a, skipping [INFO]: Applying patches for pyjnius[armeabi-v7a] [INFO]: pyjnius already patched, skipping [INFO]: Prebuilding android for armeabi-v7a [INFO]: android has no prebuild_armeabi_v7a, skipping [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/android-python3-sdl2/armeabi-v7a__ndk_target_21/android [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Prebuilding kivy for armeabi-v7a [INFO]: kivy has no prebuild_armeabi_v7a, skipping [INFO]: # Building recipes [INFO]: Building hostpython3 for armeabi-v7a [INFO]: Skipping hostpython3 (3.7.1) build, as it has already been completed [INFO]: Building libffi for armeabi-v7a [INFO]: libffi said it is already built, skipping [INFO]: Building openssl for armeabi-v7a [INFO]: openssl said it is already built, skipping [INFO]: Building sdl2_image for armeabi-v7a [INFO]: Building sdl2_mixer for armeabi-v7a [INFO]: Building sdl2_ttf for armeabi-v7a [INFO]: Building sqlite3 for armeabi-v7a [INFO]: sqlite3 said it is already built, skipping [INFO]: Building python3 for armeabi-v7a [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/android-build [WARNING]: Doing some hacky stuff to link properly [INFO]: -> running cp /home/yzw/.buildozer/andro...(and 83 more) [INFO]: -> running cp /home/yzw/.buildozer/andro...(and 81 more) [WARNING]: lld not found, linking without it. Consider installing lld if linker errors occur. [INFO]: Activating flags for sqlite3 [INFO]: Activating flags for libffi [INFO]: Activating flags for openssl [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Building sdl2 for armeabi-v7a [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni [INFO]: -> running ndk-build V=1 [INFO]: <- directory context /home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android [INFO]: Building setuptools for armeabi-v7a [INFO]: setuptools apparently isn't already in site-packages [INFO]: Installing setuptools into site-packages [INFO]: -> directory context /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools [INFO]: -> running python setup.py install -O2 -...(and 106 more) Exception in thread background thread for pid 57350: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 1540, in wrap fn(*args, **kwargs) File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 2459, in background_thread handle_exit_code(exit_code) File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 2157, in fn return self.command.handle_command_exit_code(exit_code) File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code raise exc sh.ErrorReturnCode_1: RAN: /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py install -O2 --root=/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/python-installs/myapp --install-lib=. STDOUT: Traceback (most recent call last): File "setup.py", line 11, in import setuptools File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/__init__.py", line 20, in from setuptools.dist import Distribution, Feature File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/dist.py", line 36, in from setuptools import windows_support File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/windows_support.py", line 2, in import ctypes File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Lib/ctypes/__init__.py", line 7, in from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes' STDERR: Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1192, in main() File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main ToolchainCL() File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 668, in __init__ getattr(self, args.subparser_name.replace('-', '_'))(args) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func build_dist_from_args(ctx, dist, args) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 206, in build_dist_from_args args, "ignore_setup_py", False File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes recipe.build_arch(arch) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 844, in build_arch self.install_python_package(arch) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 863, in install_python_package _env=hpenv, *self.setup_extra_args) File "/home/yzw/Desktop/Test/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 180, in shprint for line in output: File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 863, in next self.wait() File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 792, in wait self.handle_command_exit_code(exit_code) File "/home/yzw/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code raise exc sh.ErrorReturnCode_1: RAN: /home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py install -O2 --root=/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/python-installs/myapp --install-lib=. STDOUT: Traceback (most recent call last): File "setup.py", line 11, in import setuptools File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/__init__.py", line 20, in from setuptools.dist import Distribution, Feature File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/dist.py", line 36, in from setuptools import windows_support File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/windows_support.py", line 2, in import ctypes File "/home/yzw/Desktop/Test/.buildozer/android/platform/build/build/other_builds/hostpython3/desktop/hostpython3/Lib/ctypes/__init__.py", line 7, in from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes' STDERR: # Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/yzw/Desktop/Test/.buildozer/android/platform/build" --ndk-api=21 # # Buildozer failed to execute the last command # The error might be hidden in the log above this error # Please read the full log, and search for it before # raising an issue with buildozer itself. # In case of a bug report, please add a full log with log_level = 2 ---------- components: Build messages: 354052 nosy: yangzongwu priority: normal severity: normal status: open title: ModuleNotFoundError: No module named '_ctypes' type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:43:50 2019 From: report at bugs.python.org (Brad Solomon) Date: Sun, 06 Oct 2019 23:43:50 +0000 Subject: [New-bugs-announce] [issue38387] Document PyDoc_STRVAR Message-ID: <1570405430.86.0.169338229908.issue38387@roundup.psfhosted.org> New submission from Brad Solomon : The C-API reference would benefit from a short mention of PyDoc_STRVAR usage, since it is used so frequently within Modules/. ---------- assignee: docs at python components: Documentation messages: 354053 nosy: bsolomon1124, docs at python priority: normal pull_requests: 16195 severity: normal status: open title: Document PyDoc_STRVAR type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 6 19:51:13 2019 From: report at bugs.python.org (Dima Tisnek) Date: Sun, 06 Oct 2019 23:51:13 +0000 Subject: [New-bugs-announce] [issue38388] Pickle protocol v 5 needs to be documented Message-ID: <1570405873.92.0.178526679084.issue38388@roundup.psfhosted.org> New submission from Dima Tisnek : Python 3.8 brings new pickle protocol, version 5. It's not documented. ``` (venv) ? ~/m/proj> python Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pickle >>> pickle.HIGHEST_PROTOCOL 4 >>> ^D (venv) ? ~/m/proj> python3.8 Python 3.8.0rc1 (v3.8.0rc1:34214de6ab, Oct 1 2019, 12:56:49) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pickle >>> pickle.HIGHEST_PROTOCOL 5 >>> ^D ``` Yet there's no mention of "protocol version 5" at: https://github.com/python/cpython/blob/master/Doc/library/pickle.rst https://docs.python.org/3.9/library/pickle.html#data-stream-format https://docs.python.org/3.8/library/pickle.html#data-stream-format ---------- assignee: docs at python components: Documentation messages: 354054 nosy: Dima.Tisnek, docs at python priority: normal severity: normal status: open title: Pickle protocol v 5 needs to be documented versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 00:29:16 2019 From: report at bugs.python.org (Tamirys Pino) Date: Mon, 07 Oct 2019 04:29:16 +0000 Subject: [New-bugs-announce] [issue38389] Bug on sorted with count key Message-ID: <1570422556.48.0.0127805381731.issue38389@roundup.psfhosted.org> New submission from Tamirys Pino : >>> data=[2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12, 5] >>> data [2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12, 5] >>> sorted(data) [2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 12, 12] >>> sorted(data, key=data.count) [4, 5, 12, 12, 5, 2, 2, 2, 3, 3, 3, 3] [4, 5, 12, 12, 5, 2, 2, 2, 3, 3, 3, 3] should be [4, 5, 5, 12, 12, 2, 2, 2, 3, 3, 3, 3] ---------- messages: 354063 nosy: Tamirys Pino priority: normal severity: normal status: open title: Bug on sorted with count key type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:14:51 2019 From: report at bugs.python.org (hai shi) Date: Mon, 07 Oct 2019 09:14:51 +0000 Subject: [New-bugs-announce] [issue38390] Got an compile warning in dictobject.c Message-ID: <1570439691.81.0.591764842739.issue38390@roundup.psfhosted.org> New submission from hai shi : The warning detail: Objects/dictobject.c: In function ?_PyDictView_Intersect?: Objects/dictobject.c:4189:15: warning: unused variable ?tmp? [-Wunused-variable] PyObject *tmp; ^ ---------- components: Build messages: 354068 nosy: shihai1991 priority: normal severity: normal status: open title: Got an compile warning in dictobject.c type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 05:36:21 2019 From: report at bugs.python.org (=?utf-8?q?Lo=C3=AFc_Etienne?=) Date: Mon, 07 Oct 2019 09:36:21 +0000 Subject: [New-bugs-announce] [issue38391] Typo in tutorial code (does not compile) Message-ID: <1570440981.11.0.0420917562712.issue38391@roundup.psfhosted.org> New submission from Lo?c Etienne : https://docs.python.org/3.7/extending/newtypes_tutorial.html Is: PY_DECREF(m); Should be: Py_DECREF(m); ---------- components: Demos and Tools messages: 354069 nosy: Lo?c Etienne priority: normal severity: normal status: open title: Typo in tutorial code (does not compile) versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 06:48:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Oct 2019 10:48:58 +0000 Subject: [New-bugs-announce] [issue38392] Ensure that objects entering the GC are valid Message-ID: <1570445338.58.0.651902608854.issue38392@roundup.psfhosted.org> New submission from STINNER Victor : A bug in Python/hamt.c was only discovered 4 months after the code was added to Python: * https://mail.python.org/pipermail/python-dev/2018-June/153857.html * https://bugs.python.org/issue33803 The problem was that an object was tracked by the GC, whereas calling its traverse method crashed Python... depending when the traverse method is called exactly. Pseudo-code: PyObject_GC_Track(); ... obj2 = PyObject_GC_NewVar(...); ... The problem is that PyObject_GC_NewVar() can trigger a GC collection which uses the partially initialized object, and then we get a cryptic crash in the GC (usually seen in visit_decref()). I propose to make PyObject_GC_Track() stricter: validate that the object seems to be "valid" or "fully initialized". From the GC point of view, it means that calling tp_traverse must not crash. Attached PR is a concrete implementation. This issue is a follow-up of my previously failed attempt bpo-36389 "Add gc.enable_object_debugger(): detect corrupted Python objects in the GC". While bpo-36389 attempts to discoverd corrupted objects once a GC collection is triggered, this issue is restricted to objects entering the GC. First problem: my PR breaks Modules/pyexpat.c whereas the code is not strictly a bug: in Python 3.8, it's ok to put a partially initialized object into the GC if no GC collection can be triggered before the object is fully initialized. In Modules/pyexpat.c case, the code looks safe from that point of view. It means that such change is a backward incompatible change. IMHO it's a good step forward, since it is likely to discovered hidden bugs. ---------- components: Interpreter Core messages: 354074 nosy: vstinner priority: normal severity: normal status: open title: Ensure that objects entering the GC are valid versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 09:27:24 2019 From: report at bugs.python.org (pmp-p) Date: Mon, 07 Oct 2019 13:27:24 +0000 Subject: [New-bugs-announce] [issue38393] building modules from 3.8.0rc1 fails in a venv when system 3.8 is present Message-ID: <1570454844.33.0.763324170679.issue38393@roundup.psfhosted.org> New submission from pmp-p : when trying to build rc1 from a b4 venv to prepare a python host for cross compilation on ubuntu xenial flavour x64 i got : cd /tmp python3.7 -m venv testenv cd testenv/ . bin/activate (testenv) /tmp/testenv $ tar xf /tmp/Python-3.8.0rc1.tar.xz && cd Python-3.8.0rc1 CC=clang ./configure --prefix=/tmp/python3.host --with-system-ffi --disable-ipv6 --without-ensurepip --with-c-locale-coercion --disable-shared && make ./python -E ./setup.py build step will fail for the reason i suspect is srcdir is taken from system python3.8 if installed ( /usr/local in that case ) $ ./python -E Python 3.8.0rc1 (default, Oct 7 2019, 15:16:07) [Clang 6.0.0 (tags/RELEASE_600/final)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sysconfig >>> sysconfig.get_config_var('srcdir') '/usr/local/lib/python3.8/config-3.8-x86_64-linux-gnu' >>> ---------- messages: 354095 nosy: pmpp, vstinner priority: normal severity: normal status: open title: building modules from 3.8.0rc1 fails in a venv when system 3.8 is present type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 10:01:54 2019 From: report at bugs.python.org (Florian Krause) Date: Mon, 07 Oct 2019 14:01:54 +0000 Subject: [New-bugs-announce] [issue38394] time.get_clock_info reports "adjustable=False" for implementation="CLOCK_MONOTONIC" Message-ID: <1570456914.26.0.677053488358.issue38394@roundup.psfhosted.org> New submission from Florian Krause : clock_gettime(CLOCK_MONOTONIC) is adjustable via NTP, as described here: https://linux.die.net/man/2/clock_gettime (and also mentioned in PEP 418). Yet, time.get_clock_info reports it as "adjustable=False" (this even seems to be hardcoded for all clocks on Linux). ---------- components: Library (Lib) messages: 354097 nosy: Florian Krause priority: normal severity: normal status: open title: time.get_clock_info reports "adjustable=False" for implementation="CLOCK_MONOTONIC" type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 10:49:09 2019 From: report at bugs.python.org (Sam Gross) Date: Mon, 07 Oct 2019 14:49:09 +0000 Subject: [New-bugs-announce] [issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount Message-ID: <1570459749.44.0.879317891234.issue38395@roundup.psfhosted.org> New submission from Sam Gross : The implementation of weakref.proxy's methods call back into the Python API using a "borrowed reference" of the weakly referenced object (acquired via PyWeakref_GET_OBJECT). This API call may delete the last reference to the object (either directly or via GC), leaving a dangling pointer, which can be subsequently dereferenced. Tested with Python 3.8.0b4 (debug build) The following code crashes with a debug build of Python 3.8.0b4 on Linux. import weakref obj = None class MyObj: def __iter__(self): global obj del obj return NotImplemented obj = MyObj() p = weakref.proxy(obj) print(5 in p) This particular test case does not crash with a release build (on Linux). The implementation of `in` on a proxy object calls proxy_contains: return PySequence_Contains(PyWeakref_GET_OBJECT(proxy), value); https://github.com/python/cpython/blob/v3.8.0b4/Objects/weakrefobject.c#L556 This eventually calls _PySequence_IterSearch. The call to PyObject_GetIter can call arbitrary code, which can lead to seq (the proxy's referent) being deleted. The subsequent call to type_error dereferences a dead object. it = PyObject_GetIter(seq); if (it == NULL) { type_error("argument of type '%.200s' is not iterable", seq); return -1; } https://github.com/python/cpython/blob/v3.8.0b4/Objects/abstract.c#L2003-L2007 I believe some functions, like proxy_length, may be immune to this problem because they do not access the borrowed referent after calling into user code. However, this is hard to verify from reading the code and may be fragile -- small changes to PyObject_Length/Size, for example, might . See also https://bugs.python.org/issue16602 ---------- components: Interpreter Core messages: 354102 nosy: colesbury priority: normal severity: normal status: open title: proxy_contains (weakref.proxy) can access an object with 0 refcount type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 11:55:56 2019 From: report at bugs.python.org (Batuhan) Date: Mon, 07 Oct 2019 15:55:56 +0000 Subject: [New-bugs-announce] [issue38396] ast.literal_eval doesn't give information about node except the type of it Message-ID: <1570463756.86.0.131436803473.issue38396@roundup.psfhosted.org> New submission from Batuhan : def _convert_num(node): if isinstance(node, Constant): if type(node.value) in (int, float, complex): return node.value > raise ValueError('malformed node or string: ' + repr(node)) E ValueError: malformed node or string: <_ast.Name object at 0x7f0e7ebab320> When a malformed node passes into literal_eval, it raises ValueError with repr of node (which is just a memory address and type). I think using dump(node) at there is a better option, like node = <_ast.Name object at 0x7fa8279847d0> def _convert_num(node): if isinstance(node, Constant): if type(node.value) in (int, float, complex): return node.value > raise ValueError('malformed node or string: ' + dump(node)) E ValueError: malformed node or string: Name(id='a', ctx=Load()) ---------- components: Library (Lib) messages: 354103 nosy: BTaskaya priority: normal severity: normal status: open title: ast.literal_eval doesn't give information about node except the type of it versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:06:40 2019 From: report at bugs.python.org (retnikt) Date: Mon, 07 Oct 2019 16:06:40 +0000 Subject: [New-bugs-announce] [issue38397] __init_subclass__ causes TypeError when used with more standard library metaclasses (such as EnumMeta) Message-ID: <1570464400.89.0.0085195281122.issue38397@roundup.psfhosted.org> New submission from retnikt : Essentially the same as https://bugs.python.org/issue29581 (more detail is there), but for the additional meta-classes enum.EnumMeta and probably typing.NamedTupleMeta (discussion needed - is there a use-case for this?) The __new__ method on these metaclasses should include **kwargs at the end of the method definition and pass them on to the super call in order to allow the special method __init_subclass__ to be defined with custom parameters on classes using the metaclass. (also, perhaps the issue for typing should be reported separately on github python/typing instead) ---------- components: Library (Lib) messages: 354104 nosy: retnikt priority: normal severity: normal status: open title: __init_subclass__ causes TypeError when used with more standard library metaclasses (such as EnumMeta) versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:09:58 2019 From: report at bugs.python.org (PyScripter) Date: Mon, 07 Oct 2019 16:09:58 +0000 Subject: [New-bugs-announce] [issue38398] PyUnicode functions are not exported by python 2 in Ubuntu Message-ID: <1570464598.55.0.274340335252.issue38398@roundup.psfhosted.org> New submission from PyScripter : As per title PyUnicode functions, such as PyUnicode_FromWideChar, are not exported on Ubuntu and possibly other Linux systems. This is a show stopper for embedded Python. To confirm: >>> import ctypes >>> hasattr(ctypes.pythonapi, "PyUnicode_FromWideChar") It should return True, but it returns False. ? I have tested with the default Ubuntu python 2.7.15 and with compiled python 2.7.16. Note that the problem does not exist in python3 and also python 2.7 and 3.x in Windows. So it is only python 2.7 in Ubuntu. ---------- components: Library (Lib) messages: 354105 nosy: pyscripter priority: normal severity: normal status: open title: PyUnicode functions are not exported by python 2 in Ubuntu type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 12:51:31 2019 From: report at bugs.python.org (AwesomeCronk) Date: Mon, 07 Oct 2019 16:51:31 +0000 Subject: [New-bugs-announce] [issue38399] Error message persists when reimporting library Message-ID: <1570467091.43.0.986668758934.issue38399@roundup.psfhosted.org> New submission from AwesomeCronk : I am working on a hexdump library in Python 3.7.4. Whenever an issue is triggered, the error message shows up. I can usually edit and correct the file(library), but when I reimport the library and rerun the function, it throws the same error on the same line number, even if the line was removed or commented out. ---------- components: Interpreter Core files: pythonerror.png messages: 354120 nosy: AwesomeCronk priority: normal severity: normal status: open title: Error message persists when reimporting library type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48645/pythonerror.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 19:01:37 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 07 Oct 2019 23:01:37 +0000 Subject: [New-bugs-announce] [issue38400] Python segfaults when configured with --with-pydebug --with-trace-refs Message-ID: <1570489297.7.0.2347429078.issue38400@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : configure --with-pydebug --with-trace-refs && make Modules/gcmodule.c:378: visit_decref: Assertion "!_PyObject_IsFreed(op)" failed Fatal Python error: _PyObject_AssertFailed Python runtime state: preinitialized Current thread 0x00007f6e2863e740 (most recent call first): /bin/sh: line 5: 28078 Aborted (core dumped) ./python -E -S -m sysconfig --generate-posix-vars generate-posix-vars failed make: * [Makefile:592: pybuilddir.txt] Error 1 ---------- components: Interpreter Core messages: 354151 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: Python segfaults when configured with --with-pydebug --with-trace-refs versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 7 20:24:53 2019 From: report at bugs.python.org (John Parejko) Date: Tue, 08 Oct 2019 00:24:53 +0000 Subject: [New-bugs-announce] [issue38401] Make dataclass attribute docstrings accessible Message-ID: <1570494293.05.0.934356434949.issue38401@roundup.psfhosted.org> New submission from John Parejko : Dataclasses provide a very straightforward way to specify structured data. One can trivally document a dataclass's attributes via triple-quoted attribute docstrings per PEP 257. However, those docstrings are not accessible to pydoc, so they are lost to users of the dataclass. For example, the attribute docstrings in the below dataclass should be available when looking at `help(SpectralData)`, but that help command does not show the docstrings. ``` @dataclasses.dataclass class SpectralData: """Class to hold data and metadata from a fiber spectrograph.""" wavelength: astropy.units.Quantity """The wavelength array produced by the instrument.""" spectrum: np.ndarray """The flux array in instrumental units.""" duration: float """The duration of the exposure in seconds.""" ``` ---------- assignee: docs at python components: Documentation messages: 354154 nosy: John Parejko2, docs at python priority: normal severity: normal status: open title: Make dataclass attribute docstrings accessible type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 00:01:58 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Oct 2019 04:01:58 +0000 Subject: [New-bugs-announce] [issue38402] crypt: check error from library call Message-ID: <1570507318.72.0.325157356882.issue38402@roundup.psfhosted.org> New submission from Benjamin Peterson : (split off from #36161) The crypt module currently doesn't check for errors from crypt or crypt_r. It should. ---------- messages: 354166 nosy: benjamin.peterson priority: normal severity: normal status: open title: crypt: check error from library call versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 00:21:41 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 08 Oct 2019 04:21:41 +0000 Subject: [New-bugs-announce] [issue38403] nuspec iconUrl field is deprecated Message-ID: <1570508501.54.0.80221217734.issue38403@roundup.psfhosted.org> New submission from Steve Dower : The iconUrl field has to be replaced with an icon field, and we need to include the file in the package now. Details at https://docs.microsoft.com/en-us/nuget/reference/nuspec#icon ---------- assignee: steve.dower components: Windows messages: 354167 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: nuspec iconUrl field is deprecated type: behavior versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 00:44:33 2019 From: report at bugs.python.org (Poker Online Jakarta) Date: Tue, 08 Oct 2019 04:44:33 +0000 Subject: [New-bugs-announce] [issue38404] Poker Online Message-ID: <1570509873.23.0.248422964885.issue38404@roundup.psfhosted.org> New submission from Poker Online Jakarta : poker online [url=https://www.jakartapoker.net/]poker online[/url] ---------- components: Argument Clinic messages: 354169 nosy: larry, pokeronlinejakarta priority: normal severity: normal status: open title: Poker Online type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 04:18:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 08:18:02 +0000 Subject: [New-bugs-announce] [issue38405] Nested subclasses of typing.NamedTuple are not pickleable Message-ID: <1570522682.37.0.234893155024.issue38405@roundup.psfhosted.org> New submission from Serhiy Storchaka : Example: >>> from typing import NamedTuple >>> import pickle >>> class A: ... class B(NamedTuple): ... x: int ... >>> pickle.dumps(A.B) Traceback (most recent call last): File "", line 1, in _pickle.PicklingError: Can't pickle : attribute lookup B on __main__ failed ---------- components: Library (Lib) messages: 354176 nosy: gvanrossum, levkivskyi, serhiy.storchaka priority: normal severity: normal status: open title: Nested subclasses of typing.NamedTuple are not pickleable type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 04:36:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 08:36:22 +0000 Subject: [New-bugs-announce] [issue38406] Missed some public names in help(typing) Message-ID: <1570523782.74.0.0305216426842.issue38406@roundup.psfhosted.org> New submission from Serhiy Storchaka : Special forms NoReturn, Final, Literal and class ForwardRef are not shown in the help() output. ---------- components: Library (Lib) messages: 354177 nosy: gvanrossum, levkivskyi, serhiy.storchaka priority: normal severity: normal status: open title: Missed some public names in help(typing) versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 04:59:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Oct 2019 08:59:44 +0000 Subject: [New-bugs-announce] [issue38407] Add docstrings for typing.SupportsXXX classes Message-ID: <1570525184.08.0.803412577085.issue38407@roundup.psfhosted.org> New submission from Serhiy Storchaka : typing.SupportsXXX classes do not have docstrings and help() shows the docstring of the parent class instead, which is wrong ("Base class for protocol classes..."). ---------- components: Library (Lib) messages: 354179 nosy: gvanrossum, levkivskyi, serhiy.storchaka priority: normal severity: normal status: open title: Add docstrings for typing.SupportsXXX classes versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 05:51:03 2019 From: report at bugs.python.org (James Allsopp) Date: Tue, 08 Oct 2019 09:51:03 +0000 Subject: [New-bugs-announce] [issue38408] urlparse gives no method to build a url with a port Message-ID: <1570528263.82.0.631134670905.issue38408@roundup.psfhosted.org> New submission from James Allsopp : Hi, I like to build my Url's using url unparse, e.g. site_to_test = urllib.parse.urlunparse((scheme, host, page, '', '', '')) r = requests.get(site_to_test) However, we reach a lot of sites through SSH tunnels, as our network is heavily locked down, and need to specify a port. Unfortunately, we can parse a url with a port, and get site_to_test.port = '9097' we can't run it the other way, e.g. this fails. site_to_test = urllib.parse.urlunparse((scheme, host, page, '', '', '',port=9097)) This should be easy to fix and there's a use case for it. Thanks ---------- components: Library (Lib) messages: 354180 nosy: James Allsopp priority: normal severity: normal status: open title: urlparse gives no method to build a url with a port versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 09:59:54 2019 From: report at bugs.python.org (Bob Dowling) Date: Tue, 08 Oct 2019 13:59:54 +0000 Subject: [New-bugs-announce] [issue38409] Typo in doc string for str.strip Message-ID: <1570543194.25.0.196797196101.issue38409@roundup.psfhosted.org> New submission from Bob Dowling : The doc string for str.strip() has a typo: the "d" at the end of "removed" is missing. help(str.strip) Currently: Return a copy of the string with leading and trailing whitespace remove. Should be: Return a copy of the string with leading and trailing whitespace removed. I have attached an offered patch. ---------- components: Library (Lib) files: str_strip.patch keywords: patch messages: 354209 nosy: Bob Dowling priority: normal severity: normal status: open title: Typo in doc string for str.strip type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48648/str_strip.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 10:06:14 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 08 Oct 2019 14:06:14 +0000 Subject: [New-bugs-announce] [issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}() Message-ID: <1570543574.99.0.942798410146.issue38410@roundup.psfhosted.org> New submission from Zackery Spytz : _PyEval_SetAsyncGenFinalizer() and _PyEval_SetAsyncGenFirstiter() don't include proper error handling for their PySys_Audit() calls. This could lead to leaked exceptions and fatal errors. ---------- components: Interpreter Core messages: 354210 nosy: ZackerySpytz priority: normal severity: normal status: open title: Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer,Firstiter}() type: crash versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 11:15:47 2019 From: report at bugs.python.org (Jack Robison) Date: Tue, 08 Oct 2019 15:15:47 +0000 Subject: [New-bugs-announce] [issue38411] SQLITE_MISUSE race condition in sqlite3 is misleadingly raised as a binding error Message-ID: <1570547747.91.0.842919846552.issue38411@roundup.psfhosted.org> New submission from Jack Robison : There is a race condition in the sqlite3 module that is misleadingly raised as sqlite3.InterfaceError('Error binding parameter 0 - probably unsupported type.') There are two issues here, one is the incorrectly raise error (https://bugs.python.org/issue16379), the other is the underlying SQLITE_MISUSE caused by the race condition. I believe this is a race between sqlite3 vs python garbage collection due to the releasing of the GIL. If the GIL releasing is removed from sqlite3, I cannot reproduce the race. Here is a script to reproduce the error, as the number of runners or queries_per_executemany is increased the error happens more frequently. The minimal test case only needs two executemanys where each has two queries to run. import asyncio import sqlite3 from concurrent.futures.thread import ThreadPoolExecutor async def misuse_sqlite(runners=2, queries_per_executemany=2): loop = asyncio.get_event_loop() expected_error = 'Error binding parameter 0 - probably unsupported type.' exceptions = [] executor = ThreadPoolExecutor(1) db = executor.submit(sqlite3.connect, ':memory:', isolation_level=None).result() executor.submit(db.executescript, "create table test (id text primary key);") def query_in_executor(): return asyncio.wrap_future(executor.submit(executemany)) def executemany(): try: return db.executemany("select * from test where id=?", ((str(i),) for i in range(queries_per_executemany))) except Exception as err: exceptions.append(err) for _ in range(runners): loop.call_soon(query_in_executor) await asyncio.sleep(0.01) assert all(str(err) == expected_error and isinstance(err, sqlite3.InterfaceError) for err in exceptions) executor.submit(db.close).result() executor.shutdown() return len(exceptions) > 0 attempts = 0 while True: attempts += 1 if asyncio.run(misuse_sqlite()): print('error hit on attempt', attempts) break ---------- components: Library (Lib) messages: 354218 nosy: Jack Robison priority: normal severity: normal status: open title: SQLITE_MISUSE race condition in sqlite3 is misleadingly raised as a binding error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 13:32:00 2019 From: report at bugs.python.org (belegnar) Date: Tue, 08 Oct 2019 17:32:00 +0000 Subject: [New-bugs-announce] [issue38412] csv.reader failed to split string with spaces and quoted delimiter Message-ID: <1570555920.82.0.491270320818.issue38412@roundup.psfhosted.org> New submission from belegnar : ``` >>> list(csv.reader(['param1,"param21,param22",param3'])) [['param1', 'param21,param22', 'param3']] >>> list(csv.reader(['param1, "param21,param22", param3'])) [['param1', ' "param21', 'param22"', ' param3']] ``` version 3.7.4 on linux ---------- components: Library (Lib) messages: 354224 nosy: belegnar priority: normal severity: normal status: open title: csv.reader failed to split string with spaces and quoted delimiter type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:30:42 2019 From: report at bugs.python.org (Vladimir Ryabtsev) Date: Tue, 08 Oct 2019 19:30:42 +0000 Subject: [New-bugs-announce] [issue38413] Remove or change "Multithreading" section Message-ID: <1570563042.6.0.0902531064636.issue38413@roundup.psfhosted.org> New submission from Vladimir Ryabtsev : This is regarding the page https://docs.python.org/3.7/library/sqlite3.html. I believe this section on the very bottom of the page has been kept here for pretty long time, during that both SQLite and the sqlite3 module evolved and improved. Now the content contradicts to the description of function "connect()" in the part describing "check_same_thread" parameter. The function description says that using connections from multiple threads is allowed with serialization handled by the user (and it is true), while the bottom "Mutithreading" section says sharing connections is not allowed. I think we can remove "Mutithreading" section entirely unless there is something important to add to what already mentioned. ---------- assignee: docs at python components: Documentation messages: 354227 nosy: Vladimir Ryabtsev, docs at python priority: normal severity: normal status: open title: Remove or change "Multithreading" section versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 15:57:40 2019 From: report at bugs.python.org (Umar Asghar) Date: Tue, 08 Oct 2019 19:57:40 +0000 Subject: [New-bugs-announce] [issue38414] Ordering a nested dictionary in python with json format Message-ID: <1570564660.13.0.727592441748.issue38414@roundup.psfhosted.org> New submission from Umar Asghar : Python does not preserve ordering in JSON format. I have tested it out but it's not working. Here is my code. # Python3 code to demonstrate # Sort nested dictionary by key # using OrderedDict() + sorted() from collections import OrderedDict from operator import getitem import json # initializing dictionary test_dict = {'Nikhil' : { 'roll' : 24, 'marks' : 17}, 'Akshat' : {'roll' : 54, 'marks' : 12}, 'Akash' : { 'roll' : 12, 'marks' : 15}} # printing original dict print("The original dictionary : " + str(test_dict)) # using OrderedDict() + sorted() # Sort nested dictionary by key res = OrderedDict(sorted(test_dict.items(), key = lambda x: getitem(x[1], 'marks'))) print("The sorted dictionary by marks is : " + str(res)) # Output # The sorted dictionary by marks is : OrderedDict([('Akshat', {'marks': 12, 'roll': 54}), ('Akash', {'marks': 15, 'roll': 12}), ('Nikhil', {'marks': 17, 'roll': 24})]) res = json.dumps(res) # print result print("The sorted dictionary by marks is : (json)") print(json.loads(res)) # Output # The sorted dictionary by marks is : # {'Akash': {'marks': 15, 'roll': 12}, 'Akshat': {'marks': 12, 'roll': 54}, 'Nikhil': {'marks': 17, 'roll': 24}} Does anyone suggest any solution for it? It's different than a simple dictionary. It only targets the nested dictionary ordering. Please don't mark it a duplication of simple dictionary ordering with JSON. thanks ---------- messages: 354228 nosy: Umar Asghar priority: normal severity: normal status: open title: Ordering a nested dictionary in python with json format _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 16:45:49 2019 From: report at bugs.python.org (Jason Fried) Date: Tue, 08 Oct 2019 20:45:49 +0000 Subject: [New-bugs-announce] [issue38415] @asynccontextmanager decorated functions are not callable like @contextmanager Message-ID: <1570567549.28.0.993731185011.issue38415@roundup.psfhosted.org> New submission from Jason Fried : The standard contextmanager decorator produces a wrapper that itself can be used as a decorator ``` @contextmanager def some_context(): ... yield @some_context() def some_function(): # we are inside a with some_context() now. ... ``` When I created a version of asynccontextmanager internally before it was available in the stdLib I copied this behavior and I have people internally to facebook using this behavior, Was there a reason this behavior was not replicated to asynccontextmanager? I have a diff an tests to add ---------- components: Library (Lib) messages: 354232 nosy: fried, yselivanov priority: normal severity: normal status: open title: @asynccontextmanager decorated functions are not callable like @contextmanager type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 17:14:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Oct 2019 21:14:26 +0000 Subject: [New-bugs-announce] [issue38416] test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x Message-ID: <1570569266.33.0.0795173642593.issue38416@roundup.psfhosted.org> New submission from STINNER Victor : It seems like the 15 min timeout for the overall test_largefile is too short for the very slow AMD64 FreeBSD 10-STABLE Non-Debug 3.x buildbot. The test creates two files of 2.5 GB on the disk. One solution is to skip the test on this buildbot worker. For example, using a test resource like "largefile","cpu" resource, or another one. Maybe only skip TestSocketSendfile.test_it(), or even skip for the whole file. Currently, the whole file requires the "largefile" resource, but only on Windows and macOS. Right now, the buildbot worker runs the test suite using: ./python ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest --fail-env-changed --timeout=900 -j2 -j4 So all resources are enabled. -- https://buildbot.python.org/all/#/builders/167/builds/1695 test_it (test.test_largefile.TestCopyfile) ... ok Timeout (0:15:00)! Thread 0x0000000806c95400 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test_largefile.py", line 193 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/threading.py", line 882 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/threading.py", line 944 in _bootstrap_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/threading.py", line 902 in _bootstrap Thread 0x0000000801c06400 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/socket.py", line 386 in _sendfile_use_sendfile File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/socket.py", line 483 in sendfile File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test_largefile.py", line 207 in test_it File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/case.py", line 616 in _callTestMethod File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/case.py", line 659 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/case.py", line 719 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/unittest/runner.py", line 176 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/support/__init__.py", line 2032 in _run_suite File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/support/__init__.py", line 2128 in run_unittest File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/runtest.py", line 209 in _test_module File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2 File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/runtest.py", line 153 in _runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/runtest.py", line 193 in runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/main.py", line 318 in rerun_failed_tests File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/main.py", line 691 in _main File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/main.py", line 634 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/libregrtest/main.py", line 712 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/__main__.py", line 2 in File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/runpy.py", line 85 in _run_code File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/runpy.py", line 192 in _run_module_as_main test_it (test.test_largefile.TestSocketSendfile) ... *** Error code 1 ---------- components: Tests messages: 354234 nosy: giampaolo.rodola, pablogsal, vstinner priority: normal severity: normal status: open title: test_largefile.TestSocketSendfile.test_it() failed with 15 min timeout on AMD64 FreeBSD 10-STABLE Non-Debug 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 18:55:39 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 08 Oct 2019 22:55:39 +0000 Subject: [New-bugs-announce] [issue38417] Add support for settting umask in subprocess children Message-ID: <1570575339.67.0.686572067981.issue38417@roundup.psfhosted.org> New submission from Gregory P. Smith : Another use of the deprecated unsafe preexec_fn was to call os.umask in the child prior to exec. As seen in https://github.com/freeipa/freeipa/pull/3769 (see the code in there). We should add an explicit feature for this to avoid people's desire for preexec_fn or for the heavyweight workaround of an intermediate shell calling umask before doing another exec. Any common preexec_fn uses that we can encode into supported parameters will help our ability to remove the ill fated preexec_fn misfeature in the future. ---------- messages: 354238 nosy: gregory.p.smith priority: high severity: normal stage: needs patch status: open title: Add support for settting umask in subprocess children type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 22:28:04 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 09 Oct 2019 02:28:04 +0000 Subject: [New-bugs-announce] [issue38418] Audit event for os.system is incorrect Message-ID: <1570588084.56.0.375267797277.issue38418@roundup.psfhosted.org> New submission from Steve Dower : It's documented as "os.system" but implemented as just "system". ---------- assignee: steve.dower messages: 354245 nosy: lukasz.langa, steve.dower priority: normal severity: normal status: open title: Audit event for os.system is incorrect versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 8 23:48:05 2019 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 09 Oct 2019 03:48:05 +0000 Subject: [New-bugs-announce] [issue38419] The path of check-c-globals.py on README is wrong Message-ID: <1570592885.04.0.292567951687.issue38419@roundup.psfhosted.org> New submission from Dong-hee Na : See https://github.com/python/cpython/blob/01171ebd966b0cd6352057799ad876dd1e07942e/Tools/c-analyzer/README#L37 ---------- keywords: newcomer friendly messages: 354246 nosy: corona10 priority: normal severity: normal status: open title: The path of check-c-globals.py on README is wrong _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 04:22:42 2019 From: report at bugs.python.org (wang xuancong) Date: Wed, 09 Oct 2019 08:22:42 +0000 Subject: [New-bugs-announce] [issue38420] defaultdict does not support parametric lambda Message-ID: <1570609362.26.0.380213879875.issue38420@roundup.psfhosted.org> New submission from wang xuancong : A very common use of defaultdict is that if the key exist, use the corresponding mapped target, if the key does not exist, use the key itself. However, current Python 2/3 defaultdict does not support parametric lambda function: >>> from collections import * >>> aa=defaultdict(lambda t:t) >>> aa defaultdict( at 0x10a55c950>, {}) >>> aa[0] Traceback (most recent call last): File "", line 1, in TypeError: () missing 1 required positional argument: 't' >>> I would like to suggest that use the dict's query key as the first argument in the default lambda function. And use the dict itself as the 2nd argument in the default lambda function (e.g., if the key exist, use the mapped target, otherwise, use the size of the current defaultdict). I think that will make Python much more powerful than any other programming language. Anyone can think of any additional information for the default lambda function? Thanks! ---------- messages: 354255 nosy: xuancong84 priority: normal severity: normal status: open title: defaultdict does not support parametric lambda type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 08:45:03 2019 From: report at bugs.python.org (David Kernan) Date: Wed, 09 Oct 2019 12:45:03 +0000 Subject: [New-bugs-announce] [issue38421] email.utils.parsetime_tz does not return "None" Message-ID: <1570625103.37.0.0601159046628.issue38421@roundup.psfhosted.org> New submission from David Kernan : email.utils.parsetime_tz() is a function which attempts to parse a date, and returns a 10-item tuple. The first 9 items represents a time, and the last item represents the timezone offset from UTC. In Python 2, the original behavior was to return the date, and a "None" value when there was no timezone - this is documented here: https://docs.python.org/3/library/email.utils.html#email.utils.parsedate_tz In Python 3 however, the code specifically prevents "None" from being returned in place of a UTC offset: https://github.com/python/cpython/blob/3.7/Lib/email/_parseaddr.py#L53-#L54 The Python 3 documentation for email.utils.parsetime_tz() - is still the same as the 2.7 documentation, and specifically mentions that should a timezone be missing from the string, the last item will be "None" This isn't the case: Python 3.6.8: >>> import email.utils >>> date_string = 'Wed, 09 Oct 2019 08:32:37' >>> email.utils.parsedate_tz(date_string) (2019, 10, 9, 8, 32, 37, 0, 1, -1, 0) ---- Python 2.7.16: >>> import email.utils >>> date_string = 'Wed, 09 Oct 2019 08:32:37' >>> email.utils.parsedate_tz(date_string) (2019, 10, 9, 8, 32, 37, 0, 1, -1, None) --- Is this an error in code, or is it a mistake in the documentation? ---------- components: email messages: 354265 nosy: David Kernan, barry, r.david.murray priority: normal severity: normal status: open title: email.utils.parsetime_tz does not return "None" versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 11:15:39 2019 From: report at bugs.python.org (Ram Rachum) Date: Wed, 09 Oct 2019 15:15:39 +0000 Subject: [New-bugs-announce] [issue38422] Clarify docstrings of pathlib suffix(es) Message-ID: <1570634139.23.0.159522926495.issue38422@roundup.psfhosted.org> New submission from Ram Rachum : I'm writing a PR for this right now. ---------- components: Library (Lib) messages: 354279 nosy: cool-RR priority: normal severity: normal status: open title: Clarify docstrings of pathlib suffix(es) versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 13:14:39 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Wed, 09 Oct 2019 17:14:39 +0000 Subject: [New-bugs-announce] [issue38423] Event loop implementation docs advertise set_event_loop Message-ID: <1570641279.2.0.929881138502.issue38423@roundup.psfhosted.org> New submission from Hrvoje Nik?i? : The docs of SelectorEventLoop and ProactorEventLoop contain examples that call asyncio.set_event_loop: selector = selectors.SelectSelector() loop = asyncio.SelectorEventLoop(selector) asyncio.set_event_loop(loop) But this won't have any effect on code that uses asyncio.run(), because asyncio.run() creates a fresh event loop. Since asyncio.run() is the recommended way to execute async code and is used consistently throughout the documentation, this might be confusing to someone who tries to e.g. use the proactor loop on Windows. I propose the following: * add a disclaimer that instantiating the event loop won't affect calls to asyncio.run(), and that loop.run_until_complete() must be used; and * link to asyncio.set_event_loop_policy(), which does work with asyncio.run(), but doesn't allow fine-tuning the details, such as which selector to use for the SelectorEventLoop. ---------- assignee: docs at python components: Documentation, asyncio messages: 354288 nosy: asvetlov, docs at python, hniksic, yselivanov priority: normal severity: normal status: open title: Event loop implementation docs advertise set_event_loop versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 9 21:39:01 2019 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 10 Oct 2019 01:39:01 +0000 Subject: [New-bugs-announce] [issue38424] typing.Generator shorthand Message-ID: <1570671541.73.0.307162838122.issue38424@roundup.psfhosted.org> New submission from Dima Tisnek : Currently to annotate a generator, something like `Generator[str, None, None]` is required. Which is a bit confusing and verbose. Can we allow shorthand, like `Generator[str]` for simple cases? I'm not entirely certain what the semantics ought to be... Maybe Generator[t1, t2=Any, t3=None] ? ---------- components: Library (Lib) messages: 354307 nosy: Dima.Tisnek priority: normal severity: normal status: open title: typing.Generator shorthand type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 01:02:14 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Oct 2019 05:02:14 +0000 Subject: [New-bugs-announce] =?utf-8?q?=5Bissue38425=5D_Remove_warning=3A?= =?utf-8?q?_=E2=80=98res=E2=80=99_may_be_used_uninitialized_in_this_functi?= =?utf-8?q?on?= Message-ID: <1570683734.97.0.750890713695.issue38425@roundup.psfhosted.org> New submission from Dong-hee Na : Python/Python-ast.c: In function ?PyAST_obj2mod?: Python/Python-ast.c:10253:12: warning: ?res? may be used uninitialized in this function [-Wmaybe-uninitialized] CentOS Linux release 7.6.1810 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36) ---------- assignee: corona10 messages: 354312 nosy: corona10 priority: normal severity: normal status: open title: Remove warning: ?res? may be used uninitialized in this function versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 01:31:15 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Oct 2019 05:31:15 +0000 Subject: [New-bugs-announce] [issue38426] declare visit_validate in Py_DEBUG macro Message-ID: <1570685475.13.0.949767572532.issue38426@roundup.psfhosted.org> New submission from Dong-hee Na : I've got the warining like this. Modules/gcmodule.c:1925:1: warning: ?visit_validate? defined but not used [-Wunused-function] visit_validate(PyObject *op, void *parent_raw) This looks like only used in pydebug. I'd like to propose declaring this function only in #ifdef Py_DEBUG. My environment is CentOS Linux release 7.6.1810 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36) ---------- assignee: corona10 components: Interpreter Core messages: 354313 nosy: corona10, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: declare visit_validate in Py_DEBUG macro type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 02:00:23 2019 From: report at bugs.python.org (Shengjing Zhu) Date: Thu, 10 Oct 2019 06:00:23 +0000 Subject: [New-bugs-announce] [issue38427] Issue URL on translated Python docs site is always pointed to English version Message-ID: <1570687223.02.0.730833049002.issue38427@roundup.psfhosted.org> New submission from Shengjing Zhu : On footer of https://docs.python.org/fr/3.8, "Found a bug?" links to https://docs.python.org/3/bugs.html It should be https://docs.python.org/fr/3.8/bugs.html as 3.7 version. ---------- assignee: docs at python components: Documentation messages: 354314 nosy: docs at python, zhsj priority: normal severity: normal status: open title: Issue URL on translated Python docs site is always pointed to English version versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:35:51 2019 From: report at bugs.python.org (Rebecca Fair) Date: Thu, 10 Oct 2019 08:35:51 +0000 Subject: [New-bugs-announce] [issue38428] Can't gracefully ctrl+C multiprocessing pool on Python3 & Windows Message-ID: <1570696551.92.0.213022823921.issue38428@roundup.psfhosted.org> New submission from Rebecca Fair : I want to be able to Ctrl+C to exit a multiprocessing Pool.map gracefully, and have made a solution based on this Stack Overflow answer: https://stackoverflow.com/questions/11312525/catch-ctrlc-sigint-and-exit-multiprocesses-gracefully-in-python However, this solution works on Linux, and on Windows 10 with Python 2.7, but not on Windows 10 with Python 3.7. The Ctrl+C is just ignored and I have to kill the processes manually. I've attached the minimum code required to reproduce the problem. Is this a bug, expected, or is there a workaround? I believe it might be caused by the behaviour of threading.Condition.wait() being changed in commit 7c3e577 but I don't know enough about signalling to say any more than that ---------- components: Windows files: bug.py messages: 354344 nosy: paul.moore, rebeccafair, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Can't gracefully ctrl+C multiprocessing pool on Python3 & Windows versions: Python 3.7 Added file: https://bugs.python.org/file48653/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 04:47:11 2019 From: report at bugs.python.org (Haruka Ma) Date: Thu, 10 Oct 2019 08:47:11 +0000 Subject: [New-bugs-announce] [issue38429] Failed to compile with --enable-framework on macOS on master Message-ID: <1570697231.32.0.587121640762.issue38429@roundup.psfhosted.org> New submission from Haruka Ma : Since commit https://github.com/python/cpython/commit/c02b41b1fb115c87693530ea6a480b2e15460424 , some syntax errors are preventing cpython from compiling with --enable-framework on. Specifically, the errors are in Modules/getpath.c on line 1134 and 1165. I've made some inline comments on github as well. ---------- components: macOS messages: 354348 nosy: Haruka Ma, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Failed to compile with --enable-framework on macOS on master type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 05:41:34 2019 From: report at bugs.python.org (Evgeny Nizhibitsky) Date: Thu, 10 Oct 2019 09:41:34 +0000 Subject: [New-bugs-announce] [issue38430] Memory leak in ThreadPoolExecutor + run_in_executor Message-ID: <1570700494.14.0.073826419802.issue38430@roundup.psfhosted.org> New submission from Evgeny Nizhibitsky : I have run into a memory leak caused by using run_in_executor + ThreadPoolExecutor while running some stability tests with custom web services. It was 1 MB leaked for 1k requests made for my case and I've extracted the root cause and converted it into minimal script with both mentioned parts + just NOP function to "run". The script can easily eat up to 1 GB of memory in less then 1 minute now. It uses external psutil library to report the memory allocated but it can be easily commented out and the leak will stay anyway. One can found that script attached + Dockerfile/Makefile for reproducibility. I've also reproduced it in my own conda-based 3.7 environment as well as the master branch of cpython. ---------- components: asyncio files: python-leak.zip messages: 354351 nosy: Evgeny Nizhibitsky, asvetlov, yselivanov priority: normal severity: normal status: open title: Memory leak in ThreadPoolExecutor + run_in_executor type: resource usage versions: Python 3.6, Python 3.7, Python 3.9 Added file: https://bugs.python.org/file48654/python-leak.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 11:31:02 2019 From: report at bugs.python.org (Samuel Colvin) Date: Thu, 10 Oct 2019 15:31:02 +0000 Subject: [New-bugs-announce] [issue38431] dataclasses.InitVar breaks with typing.Optional Message-ID: <1570721462.15.0.939525387822.issue38431@roundup.psfhosted.org> New submission from Samuel Colvin : The following code works fine with python 3.7 but breaks with 3.8: ``` import dataclasses from typing import Optional @dataclasses.dataclass class TestingDataclass: base_path: dataclasses.InitVar[Optional[str]] = None ``` Exception traceback: ``` Traceback (most recent call last): File "test.py", line 6, in class TestingDataclass: File "/usr/local/lib/python3.8/dataclasses.py", line 995, in dataclass return wrap(cls) File "/usr/local/lib/python3.8/dataclasses.py", line 987, in wrap return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen) File "/usr/local/lib/python3.8/dataclasses.py", line 967, in _process_class str(inspect.signature(cls)).replace(' -> None', '')) File "/usr/local/lib/python3.8/inspect.py", line 3050, in __str__ formatted = str(param) File "/usr/local/lib/python3.8/inspect.py", line 2568, in __str__ formatannotation(self._annotation)) File "/usr/local/lib/python3.8/inspect.py", line 1202, in formatannotation return repr(annotation) File "/usr/local/lib/python3.8/dataclasses.py", line 213, in __repr__ return f'dataclasses.InitVar[{self.type.__name__}]' File "/usr/local/lib/python3.8/typing.py", line 757, in __getattr__ raise AttributeError(attr) AttributeError: __name__ ``` The code runs fine with `str` instead of `Optional[str]`. Tested locally with `Python 3.8.0rc1 (tags/v3.8.0rc1:34214de6ab, Oct 10 2019, 16:15:14)`. The same error can be seen (in a more involved context) on travis [here](https://travis-ci.org/samuelcolvin/pydantic/jobs/596131963) ---------- components: Library (Lib) messages: 354388 nosy: samuelcolvin priority: normal severity: normal status: open title: dataclasses.InitVar breaks with typing.Optional type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:01:41 2019 From: report at bugs.python.org (Behzad Seyfi) Date: Thu, 10 Oct 2019 16:01:41 +0000 Subject: [New-bugs-announce] [issue38432] ZeroDivisionError when inf is expected Message-ID: <1570723301.17.0.789552752187.issue38432@roundup.psfhosted.org> New submission from Behzad Seyfi : >>> 1/1e-323 inf >>> 1/1e-324 Traceback (most recent call last): File "", line 1, in ZeroDivisionError: float division by zero in a 1/x fraction, up to x = 1e-324 it is inf but when x = 1e-325 or little it throws ZeroDivisionError. It is not acceptable and accountable behaviour for inf definition. ---------- components: Interpreter Core messages: 354391 nosy: Behzad Seyfi priority: normal severity: normal status: open title: ZeroDivisionError when inf is expected type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:17:42 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Oct 2019 16:17:42 +0000 Subject: [New-bugs-announce] [issue38433] 2.7.17rc1 tcl/tk version regression on Windows Message-ID: <1570724262.85.0.67744981479.issue38433@roundup.psfhosted.org> New submission from Terry J. Reedy : In my current 2.7.16+ Windows 10-64 repository build, and on at least one 8.1-64 buildbot, the tcl/tk version is 8.5.19 >>> tk.Tk().tk.call('info', 'patchlevel') '8.5.19' In my installed 2.7.17rc1, it is the older 8.5.15. It would seem to me that we should install the same latest 8.5 bugfix release that we test with. (Or test with what we release ;-) I presume the discrepancy is unintended due to an incomplete final 2.7 tcl/tk update. ---------- components: Build, Tkinter messages: 354394 nosy: benjamin.peterson, serhiy.storchaka, terry.reedy, zach.ware priority: release blocker severity: normal status: open title: 2.7.17rc1 tcl/tk version regression on Windows versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 12:25:03 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Oct 2019 16:25:03 +0000 Subject: [New-bugs-announce] [issue38434] sys.addaudithook event is not documented Message-ID: <1570724703.62.0.219483741722.issue38434@roundup.psfhosted.org> New submission from Steve Dower : The sys.addaudithook raises an audit event 'sys.addaudithook'. The docs for the function refer to the event, as it has slightly different semantics than most, but it is not named explicitly and does not appear in the table of events. ---------- assignee: docs at python components: Documentation messages: 354396 nosy: docs at python, steve.dower priority: normal severity: normal stage: needs patch status: open title: sys.addaudithook event is not documented type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 14:18:17 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 10 Oct 2019 18:18:17 +0000 Subject: [New-bugs-announce] [issue38435] Start the deprecation cycle for subprocess preexec_fn Message-ID: <1570731497.4.0.313201495913.issue38435@roundup.psfhosted.org> New submission from Gregory P. Smith : subprocess's preexec_fn feature needs to enter PendingDeprecationWarning state in 3.9, to become a DeprecationWarning in 3.10, with a goal of removing it in 3.11. Rationale: We now live in a world full of threads, it is entirely unsafe to call back into the python interpreter within the forked child before exec per POSIX specification. We've also already made preexec_fn no longer supported from CPython subinterpreters in 3.8. If there are not already issues open for desired features of subprocess that do not yet have replacements or workarounds for *specific* actions that preexec_fn is being used for in your application, please open feature requests for those. (ex: calling umask is https://bugs.python.org/issue38417, and group, uid, gid setting has already landed in 3.9) ---------- assignee: gregory.p.smith messages: 354397 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: Start the deprecation cycle for subprocess preexec_fn type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:16:04 2019 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 10 Oct 2019 19:16:04 +0000 Subject: [New-bugs-announce] [issue38436] Improved performance for list addition. Message-ID: <1570734964.11.0.75032337331.issue38436@roundup.psfhosted.org> New submission from Brandt Bucher : The attached PR adds a fast path for BINARY_ADD instructions involving two lists, where the left list has a refcount of exactly 1. In this case, we instead do a PySequence_InPlaceConcat operation. This has the affect of avoiding quadratic complexity for list summations, by keeping only one intermediate result and extending it in-place. For (potentially large) lists: a + b + c + d ... Currently executed as: tmp = a + b tmp = tmp + c tmp = tmp + d ... With this change: tmp = a + b tmp += c tmp += d ... Here are the pyperformance results (optimizations enabled): Slower (6): - pickle_list: 3.63 us +- 0.08 us -> 3.78 us +- 0.10 us: 1.04x slower (+4%) - xml_etree_generate: 102 ms +- 2 ms -> 104 ms +- 3 ms: 1.02x slower (+2%) - xml_etree_parse: 166 ms +- 4 ms -> 169 ms +- 9 ms: 1.02x slower (+2%) - scimark_sparse_mat_mult: 5.42 ms +- 0.11 ms -> 5.47 ms +- 0.16 ms: 1.01x slower (+1%) - pickle_dict: 23.6 us +- 0.8 us -> 23.8 us +- 0.4 us: 1.01x slower (+1%) - scimark_fft: 413 ms +- 6 ms -> 416 ms +- 6 ms: 1.01x slower (+1%) Faster (25): - 2to3: 394 ms +- 18 ms -> 381 ms +- 8 ms: 1.03x faster (-3%) - python_startup_no_site: 12.0 ms +- 0.2 ms -> 11.7 ms +- 0.2 ms: 1.03x faster (-3%) - nqueens: 121 ms +- 2 ms -> 118 ms +- 3 ms: 1.03x faster (-2%) - pathlib: 36.0 ms +- 1.3 ms -> 35.1 ms +- 0.9 ms: 1.02x faster (-2%) - pickle_pure_python: 523 us +- 15 us -> 511 us +- 13 us: 1.02x faster (-2%) - deltablue: 8.54 ms +- 0.25 ms -> 8.35 ms +- 0.27 ms: 1.02x faster (-2%) - logging_silent: 220 ns +- 6 ns -> 215 ns +- 8 ns: 1.02x faster (-2%) - raytrace: 566 ms +- 8 ms -> 554 ms +- 11 ms: 1.02x faster (-2%) - hexiom: 11.2 ms +- 0.3 ms -> 11.0 ms +- 0.2 ms: 1.02x faster (-2%) - go: 294 ms +- 6 ms -> 288 ms +- 5 ms: 1.02x faster (-2%) - python_startup: 15.7 ms +- 0.4 ms -> 15.4 ms +- 0.5 ms: 1.02x faster (-2%) - float: 136 ms +- 4 ms -> 134 ms +- 6 ms: 1.02x faster (-2%) - scimark_sor: 232 ms +- 8 ms -> 228 ms +- 5 ms: 1.02x faster (-2%) - fannkuch: 554 ms +- 8 ms -> 545 ms +- 9 ms: 1.02x faster (-2%) - meteor_contest: 115 ms +- 2 ms -> 113 ms +- 3 ms: 1.02x faster (-2%) - telco: 6.58 ms +- 0.22 ms -> 6.48 ms +- 0.15 ms: 1.02x faster (-2%) - regex_effbot: 3.76 ms +- 0.08 ms -> 3.70 ms +- 0.09 ms: 1.02x faster (-2%) - chaos: 129 ms +- 3 ms -> 127 ms +- 2 ms: 1.01x faster (-1%) - regex_v8: 26.3 ms +- 0.4 ms -> 25.9 ms +- 0.6 ms: 1.01x faster (-1%) - regex_compile: 200 ms +- 5 ms -> 197 ms +- 5 ms: 1.01x faster (-1%) - logging_simple: 9.78 us +- 0.19 us -> 9.65 us +- 0.26 us: 1.01x faster (-1%) - sqlite_synth: 3.24 us +- 0.10 us -> 3.20 us +- 0.06 us: 1.01x faster (-1%) - unpickle: 16.4 us +- 0.5 us -> 16.2 us +- 0.5 us: 1.01x faster (-1%) - logging_format: 10.8 us +- 0.2 us -> 10.7 us +- 0.3 us: 1.01x faster (-1%) - json_loads: 30.2 us +- 0.8 us -> 29.9 us +- 0.6 us: 1.01x faster (-1%) Benchmark hidden because not significant (14): json_dumps, nbody, pickle, pidigits, regex_dna, richards, scimark_lu, scimark_monte_carlo, spectral_norm, unpack_sequence, unpickle_list, unpickle_pure_python, xml_etree_iterparse, xml_etree_process This is related to my earlier work in bpo-36229, however this is a much less invasive change that's limited to ceval.c, where our knowledge of context is much better. ---------- components: Interpreter Core messages: 354399 nosy: brandtbucher priority: normal severity: normal status: open title: Improved performance for list addition. type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 15:39:02 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 10 Oct 2019 19:39:02 +0000 Subject: [New-bugs-announce] [issue38437] Set GC_DEBUG for debug builds of the interpreter Message-ID: <1570736342.37.0.0664122521403.issue38437@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : While working on bpo-38379 I had to manually set the GC_DEBUG macro to 1 to activate the extra checks that 'validate_list' does. These checks are super useful to make sure all the gc lists used are consistent and in the expected state with the expected masks. For this reason, I propose to always activate GC_DEBUG for debug builds of the interpreter. It will have a performance impact, but the debugging benefits are substantial. ---------- messages: 354401 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: Set GC_DEBUG for debug builds of the interpreter versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 16:24:39 2019 From: report at bugs.python.org (Bob Alexander) Date: Thu, 10 Oct 2019 20:24:39 +0000 Subject: [New-bugs-announce] [issue38438] argparse "usage" overly-complex with nargs="*" Message-ID: <1570739079.02.0.395133592841.issue38438@roundup.psfhosted.org> New submission from Bob Alexander : This program: import argparse ap = argparse.ArgumentParser() ap.add_argument("arg", nargs="*") ap.parse_args() Gives usage message: usage: help_complexity.py [-h] [arg [arg ...]] It's correct, but unnecessarily complex and challenging to the user. If I were manually writing the usage, arg... would do, or maybe [arg ...] to be consistent with other messages?? ---------- components: Library (Lib) messages: 354402 nosy: bobjalex priority: normal severity: normal status: open title: argparse "usage" overly-complex with nargs="*" type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 10 19:14:55 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 10 Oct 2019 23:14:55 +0000 Subject: [New-bugs-announce] [issue38439] IDLE menu icon is blurry on GNOME Message-ID: <1570749295.67.0.980962290264.issue38439@roundup.psfhosted.org> New submission from Miro Hron?ok : See the attached screenshot. All the GNOME apps have scalable icons, only the IDLE icon is scaled up from 48x48 pixels. I've found similar issue32129, but apparently the accepted resolution was to change a bit of code somewhere, not to provide higher resolution icons. ---------- assignee: terry.reedy components: IDLE files: idle.png messages: 354415 nosy: hroncok, terry.reedy priority: normal severity: normal status: open title: IDLE menu icon is blurry on GNOME versions: Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48655/idle.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 00:27:28 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 Oct 2019 04:27:28 +0000 Subject: [New-bugs-announce] [issue38440] Possible news issues with IDLE Message-ID: <1570768048.83.0.927013766779.issue38440@roundup.psfhosted.org> New submission from Raymond Hettinger : I've been exercising the 3.8.0rc1 version of IDLE and noticed two anomalies but have not had a chance to investigate further: * Periodically in a long shell session, the cursor jumps to the beginning of the cumulative text output. This necessitates a lot of scrolling to get back down to the active part of the session. * The pop-up message box for interrupting currently running code will appear several times in succession. Dismissing the box doesn't clear a queue of events, so the message may occur several times in a row. ---------- assignee: terry.reedy components: IDLE messages: 354418 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: Possible news issues with IDLE versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:26:31 2019 From: report at bugs.python.org (Aurora) Date: Fri, 11 Oct 2019 07:26:31 +0000 Subject: [New-bugs-announce] [issue38441] failing to build the Documentation Message-ID: <1570778791.42.0.554605100784.issue38441@roundup.psfhosted.org> New submission from Aurora : I'm failing to build the cpython/Doc dir. The full build log is as follows: mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build -b epub -d build/doctrees -D latex_elements.papersize= -W . build/epub Running Sphinx v2.2.0 making output directory... done building [mo]: targets for 0 po files that are out of date building [epub]: targets for 476 source files that are out of date updating environment: [new config] 476 added, 0 changed, 0 removed reading sources... [100%] whatsnew/index Warning, treated as error: /home/aurora/A.Code/Python/Reference/python/cpython/Doc/library/email.message.rst:4:duplicate object description of email.message, other instance in library/email.compat32-message, use :noindex: for one of them make: *** [Makefile:46: build] Error 2 Running on Debian Experimental kernel v5.3 ---------- assignee: docs at python components: Documentation messages: 354425 nosy: aurora, docs at python priority: normal severity: normal status: open title: failing to build the Documentation type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:38:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Oct 2019 07:38:37 +0000 Subject: [New-bugs-announce] [issue38442] Doc/whatsnew/3.8.rst has an execution bit Message-ID: <1570779517.76.0.861587491217.issue38442@roundup.psfhosted.org> New submission from Serhiy Storchaka : It likely happened when it was edited on Windows. ---------- assignee: docs at python components: Documentation messages: 354428 nosy: docs at python, lukasz.langa, serhiy.storchaka priority: normal severity: normal status: open title: Doc/whatsnew/3.8.rst has an execution bit versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 03:53:54 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 11 Oct 2019 07:53:54 +0000 Subject: [New-bugs-announce] [issue38443] unavailable --with-universal-archs= macOS confgure options fail cryptically Message-ID: <1570780434.84.0.507087684939.issue38443@roundup.psfhosted.org> New submission from Ned Deily : ./configure's --with-universal-archs= supports a number of different CPU architecture combinations. However most of them are no longer supported on current macOS systems. If you choose an option with archs not available in the build tool chain in use, the configure script fails in various cryptic ways, usually with multiple configure test failures like: checking dlfcn.h presence... yes configure: WARNING: dlfcn.h: present but cannot be compiled configure: WARNING: dlfcn.h: check for missing prerequisite headers? configure: WARNING: dlfcn.h: see the Autoconf documentation configure: WARNING: dlfcn.h: section "Present But Cannot Be Compiled" configure: WARNING: dlfcn.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## ./configure should be more user-friendly here. At a minimum, it should report near the beginning exactly which archs are going to be tested; it already reports the --with-universal-archs value. Even better it should explicitly test for support of each arch in the build tool chain in use and stop if any of the requested archs are not available. ---------- components: Build, macOS messages: 354429 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: unavailable --with-universal-archs= macOS confgure options fail cryptically versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 06:39:38 2019 From: report at bugs.python.org (Shmuel H.) Date: Fri, 11 Oct 2019 10:39:38 +0000 Subject: [New-bugs-announce] [issue38444] dataclass: always generate default __init__ on __default_init__ Message-ID: <1570790378.12.0.986632197987.issue38444@roundup.psfhosted.org> New submission from Shmuel H. : Currently, `dataclasses.dataclass` will generate `__init__` only where the user has not defined one. However, sometimes, with frozen classes or dataclasses with a lot of members, redefinition of this function is not trivial, especially if the only purpose is to change the default behaviour for only one member: ```python from dataclasses import dataclass @dataclass(frozen=True) class Dataclass: #...big list of members member20: int def __init__(self, member20: str, **kwargs): # self.member20 = int(member20) object.__setattr__(self, "member20", int(member20)) # Now we have to trivially initialize # 20 other members like that :[ ``` My idea is to generate the default `__init__` into `__default_init__` even, if the user has defined their own version. That will allow them to use it like that: ```python from dataclasses import dataclass @dataclass(frozen=True) class Dataclass: #...big list of members member20: int def __init__(self, member20: str, **kwargs): # Oh, that's better :) self.__default_init__(member20=int(member20), **kwargs) ``` Implementing that is pretty trivial (I can do that if this change will be approved). Please let me know what you think about that. ---------- components: Library (Lib) messages: 354437 nosy: Shmuel H. priority: normal severity: normal status: open title: dataclass: always generate default __init__ on __default_init__ type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 07:16:42 2019 From: report at bugs.python.org (Nika) Date: Fri, 11 Oct 2019 11:16:42 +0000 Subject: [New-bugs-announce] [issue38445] os.path.exists() takes bool as argument and returns True Message-ID: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> New submission from Nika : os.path.exists() accepts either True or False as argument and returns True. Reproducible on Windows, e. g., in jupyter notebook or in Eclipse, although not in IDLE, which returns False, as expected. import os print(os.path.exists(False)) ---------- messages: 354440 nosy: Nika priority: normal severity: normal status: open title: os.path.exists() takes bool as argument and returns True type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 07:29:11 2019 From: report at bugs.python.org (Dan Snider) Date: Fri, 11 Oct 2019 11:29:11 +0000 Subject: [New-bugs-announce] [issue38446] Ambiguous signature for builtins.__build_class__ Message-ID: <1570793351.47.0.198943437011.issue38446@roundup.psfhosted.org> New submission from Dan Snider : The function has the following signature documented: __build_class__(func, name, *bases, metaclass=None, **kwds) This implies that `func` and `name` are not positional only parameters when in fact, they are. Another problem with that signature is that None is not a valid value for the metaclass parameter. ---------- messages: 354442 nosy: bup priority: normal severity: normal status: open title: Ambiguous signature for builtins.__build_class__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:01:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 13:01:44 +0000 Subject: [New-bugs-announce] [issue38447] test_multiprocessing_spawn: Dangling processes: {} on AMD64 RHEL7 Refleaks 3.7 Message-ID: <1570798904.01.0.669672054648.issue38447@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 RHEL7 Refleaks 3.7: https://buildbot.python.org/all/#/builders/311/builds/22 0:15:09 load avg: 12.21 [311/416/1] test_multiprocessing_spawn failed (env changed) (14 min 39 sec) -- running: test_shelve (5 min 11 sec), test_sqlite (1 min), test_cmd_line_script (1 min 26 sec), test_asyncio (3 min 13 sec), test_io (8 min 6 sec), test_pickle (53.8 sec), test_concurrent_futures (12 min 52 sec) beginning 6 repetitions 123456 ....Warning -- Dangling processes: {} Warning -- Dangling processes: {} .Warning -- Dangling processes: {} . ---------- components: Tests messages: 354447 nosy: vstinner priority: normal severity: normal status: open title: test_multiprocessing_spawn: Dangling processes: {} on AMD64 RHEL7 Refleaks 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 09:08:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Oct 2019 13:08:53 +0000 Subject: [New-bugs-announce] [issue38448] test_concurrent_futures: reap_children() reaped child process 26487 on AMD64 RHEL8 Refleaks 3.x Message-ID: <1570799333.75.0.17786723855.issue38448@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 RHEL8 Refleaks 3.x: https://buildbot.python.org/all/#/builders/272/builds/23 0:27:13 load avg: 4.88 [416/419/1] test_concurrent_futures failed (env changed) (17 min 11 sec) -- running: test_capi (7 min 28 sec), test_gdb (8 min 49 sec), test_asyncio (23 min 23 sec) beginning 6 repetitions 123456 .Warning -- reap_children() reaped child process 26487 ..... Warning -- multiprocessing.process._dangling was modified by test_concurrent_futures Before: set() After: {} ---------- components: Tests messages: 354448 nosy: vstinner priority: normal severity: normal status: open title: test_concurrent_futures: reap_children() reaped child process 26487 on AMD64 RHEL8 Refleaks 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 10:06:40 2019 From: report at bugs.python.org (Yaroslav Halchenko) Date: Fri, 11 Oct 2019 14:06:40 +0000 Subject: [New-bugs-announce] [issue38449] regression - mimetypes guess_type is confused by ; in the filename Message-ID: <1570802800.7.0.378651276775.issue38449@roundup.psfhosted.org> New submission from Yaroslav Halchenko : Our tests in DataLad started to fail while building on Debian with Python 3.7.5rc1 whenever they passed just fine previously with 3.7.3rc1. Analysis boiled down to mimetypes $> ./python3.9 -c 'import mimetypes; mimedb = mimetypes.MimeTypes(strict=False); print(mimedb.guess_type(";1.tar.gz"))' (None, None) $> ./python3.9 -c 'import mimetypes; mimedb = mimetypes.MimeTypes(strict=False); print(mimedb.guess_type("1.tar.gz"))' ('application/x-tar', 'gzip') $> git describe v3.8.0b1-1174-g2b7dc40b2af Ref: - original issue in DataLad: https://github.com/datalad/datalad/issues/3769 ---------- components: Library (Lib) messages: 354455 nosy: Yaroslav.Halchenko priority: normal severity: normal status: open title: regression - mimetypes guess_type is confused by ; in the filename type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 12:02:58 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Fri, 11 Oct 2019 16:02:58 +0000 Subject: [New-bugs-announce] [issue38450] 3.8 Release Notes: IDLE section dupe Message-ID: <1570809778.37.0.687630988781.issue38450@roundup.psfhosted.org> New submission from Sebastian Rittau : In the 3.8 release notes (https://docs.python.org/3.8/whatsnew/3.8.html), the section "IDLE and idlelib" is duplicated as "idlelib and IDLE". Also, the section "gc" and "gzip" between them are not sorted alphabetically like the rest of the list. ---------- assignee: docs at python components: Documentation messages: 354464 nosy: docs at python, srittau priority: normal severity: normal status: open title: 3.8 Release Notes: IDLE section dupe versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:50:10 2019 From: report at bugs.python.org (Pouria) Date: Fri, 11 Oct 2019 17:50:10 +0000 Subject: [New-bugs-announce] [issue38451] Datetime definition does not work in function definition as list definition Message-ID: <1570816210.41.0.305155920593.issue38451@roundup.psfhosted.org> Change by Pouria : ---------- components: Library (Lib) nosy: Pouria_ff priority: normal severity: normal status: open title: Datetime definition does not work in function definition as list definition type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 13:50:10 2019 From: report at bugs.python.org (Pouria) Date: Fri, 11 Oct 2019 17:50:10 +0000 Subject: [New-bugs-announce] [issue38451] Datetime definition does not work in function definition as list definition Message-ID: <1570816210.41.0.305155920593.issue38451@roundup.psfhosted.org> Change by Pouria : ---------- components: Library (Lib) nosy: Pouria_ff priority: normal severity: normal status: open title: Datetime definition does not work in function definition as list definition type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 17:28:59 2019 From: report at bugs.python.org (Danylo) Date: Fri, 11 Oct 2019 21:28:59 +0000 Subject: [New-bugs-announce] [issue38452] unittest setUpClass missing 1 required positional argument: 'cls' Message-ID: <1570829339.09.0.69466145285.issue38452@roundup.psfhosted.org> New submission from Danylo : Currently, unittest setUpClass and tearDownClass methods are incorrectly called from within its core. ``` class TestUltrasonicEnv(unittest.TestCase): def setUpClass(cls): pass def tearDownClass(cls): pass ``` Traceback (the same for teadDownClass) ``` File "/home/dizcza/anaconda3/envs/robotsim/lib/python3.7/unittest/suite.py", line 163, in _handleClassSetUp setUpClass() TypeError: setUpClass() missing 1 required positional argument: 'cls' ``` The traceback is self-descriptive. ---------- components: Tests messages: 354501 nosy: dizcza priority: normal severity: normal status: open title: unittest setUpClass missing 1 required positional argument: 'cls' versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 11 18:27:20 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 11 Oct 2019 22:27:20 +0000 Subject: [New-bugs-announce] [issue38453] ntpath.realpath() should make absolute path earlier Message-ID: <1570832840.2.0.910161330311.issue38453@roundup.psfhosted.org> New submission from Steve Dower : Because the abspath() call is deferred until the end of the resolution process, if the current working directory is not already a real path, it will not be fully resolved. By passing it through abspath() at the start of the function, we ensure that the correct path is resolved. This will help resolve some inconsistencies in the test suite when tests are launched with a short filename (FILENA~1) in the working directory (though some other fixes are probably needed to help here). ---------- components: Windows messages: 354509 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: ntpath.realpath() should make absolute path earlier type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 01:06:32 2019 From: report at bugs.python.org (Batuhan) Date: Sat, 12 Oct 2019 05:06:32 +0000 Subject: [New-bugs-announce] [issue38454] test_listdir is failing on ubuntu with WSL Message-ID: <1570856792.9.0.835565691535.issue38454@roundup.psfhosted.org> New submission from Batuhan : Run tests sequentially 0:00:00 load avg: 0.52 [1/1] test_os test test_os failed -- Traceback (most recent call last): File "/home/isidentical/cpython/Lib/test/test_os.py", line 2059, in test_listdir self.assertEqual(found, expected) AssertionError: Items in the first set but not the second: '@test_12966_tmp-?' Items in the second set but not the first: '@test_12966_tmp-\udcff' test_os failed == Tests result: FAILURE == 1 test failed: test_os Total duration: 2 sec 587 ms Tests result: FAILURE System: - Ubuntu 18.04 bionic - x86_64 Linux 4.4.0-18362-Microsoft ---------- components: Tests messages: 354518 nosy: BTaskaya, steve.dower priority: normal severity: normal status: open title: test_listdir is failing on ubuntu with WSL versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 15:11:40 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 12 Oct 2019 19:11:40 +0000 Subject: [New-bugs-announce] =?utf-8?q?=5Bissue38455=5D_=E2=80=98memset?= =?utf-8?b?4oCZIG9mZnNldCBbMTcsIDg4XSBmcm9tIHRoZSBvYmplY3QgYXQg4oCYYWRk?= =?utf-8?q?rbuf=E2=80=99_is_out_of_the_bounds_of_referenced_subobject?= Message-ID: <1570907500.34.0.810333858419.issue38455@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Compiling 3.8 in release mode emits this warning: In function ?getsockaddrarg?, inlined from ?sock_bind? at /home/pablogsal/github/python/3.8/Modules/socketmodule.c:3066:10: /home/pablogsal/github/python/3.8/Modules/socketmodule.c:2288:9: warning: ?memset? offset [17, 88] from the object at ?addrbuf? is out of the bounds of referenced subobject ?sa? with type ?struct sockaddr? at offset 0 [-Warray-bounds] 2288 | memset(sa, 0, sizeof(*sa)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ---------- messages: 354547 nosy: lukasz.langa, pablogsal, vstinner priority: normal severity: normal status: open title: ?memset? offset [17, 88] from the object at ?addrbuf? is out of the bounds of referenced subobject versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:27:44 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 12 Oct 2019 21:27:44 +0000 Subject: [New-bugs-announce] [issue38456] Reduce the time test_subprocess takes to complete. Message-ID: <1570915664.41.0.600749429007.issue38456@roundup.psfhosted.org> New submission from Gregory P. Smith : test_subprocess is one of our long running tests, this slows down CI and buildbots. There is room for improvement in its total execution time. Use this issue as a rollup issue for any such work. we need to keep it reliable, just focus on reducing either user/sys cpu time or wall time. ---------- assignee: gregory.p.smith components: Tests messages: 354554 nosy: gregory.p.smith priority: low severity: normal status: open title: Reduce the time test_subprocess takes to complete. type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 17:48:12 2019 From: report at bugs.python.org (Yuval S) Date: Sat, 12 Oct 2019 21:48:12 +0000 Subject: [New-bugs-announce] [issue38457] __package__ is None in __init__.py until an import is used Message-ID: <1570916892.54.0.164577302417.issue38457@roundup.psfhosted.org> New submission from Yuval S : In Python 2.7, the __package__ variable isn't set when __init__.py is run, until an import is done. In Python 3.5, it is set correctly. e.g. # mkdir x && echo "print(__package__)" | tee x/__init__.py x/test.py # python2 x.test None x # python3 x.test x x # echo -e "import os\n$(cat x/__init__.py)" > x/__init__.py # python2 x.test x x This is very old, as it's there at least since 2010: https://stackoverflow.com/questions/4437394/package-is-none-when-importing-a-python-module I would expect Python 2 and 3 to behave the same. ---------- components: Library (Lib) messages: 354555 nosy: Yuval S priority: normal severity: normal status: open title: __package__ is None in __init__.py until an import is used versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 12 19:54:11 2019 From: report at bugs.python.org (DEVOR BLAKE DANIELS) Date: Sat, 12 Oct 2019 23:54:11 +0000 Subject: [New-bugs-announce] [issue38458] lists Message-ID: <1570924451.06.0.602805161238.issue38458@roundup.psfhosted.org> New submission from DEVOR BLAKE DANIELS : l=[2,3,4] p=l p[0]=5 when I change p[0] to 5,l[0] is also changed to 5. I use slicing to get around this ,but when dealing with lists like s[][],slicing does not work ---------- files: three.py messages: 354558 nosy: dev40573 priority: normal severity: normal status: open title: lists type: behavior Added file: https://bugs.python.org/file48657/three.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 04:31:23 2019 From: report at bugs.python.org (John Lennon) Date: Sun, 13 Oct 2019 08:31:23 +0000 Subject: [New-bugs-announce] [issue38459] typing: Classes that inherit `Generic[...]` indirectly aren't considered generic. Message-ID: <1570955483.97.0.910944150391.issue38459@roundup.psfhosted.org> New submission from John Lennon : Given the file `example.py` with the following contents: ```python from typing import Generic, TypeVar KT = TypeVar("KT") VT = TypeVar("VT") class GenericMapping(Generic[KT, VT]): pass class SomeImplMapping(GenericMapping): pass a: GenericMapping[int, float] b: SomeImplMapping[int, float] ``` I would expect `SomeImplMapping` to be generic as well as `GenericMapping`. However, currently this code fails with the following error: ```sh Traceback (most recent call last): File "adt.py", line 18, in b: SomeImplMapping[int, float] File "/usr/local/lib/python3.7/typing.py", line 254, in inner return func(*args, **kwds) File "/usr/local/lib/python3.7/typing.py", line 841, in __class_getitem__ _check_generic(cls, params) File "/usr/local/lib/python3.7/typing.py", line 204, in _check_generic raise TypeError(f"{cls} is not a generic class") TypeError: is not a generic class ``` If I understand everything correctly, that's because `typing` doesn't check bases of the class to have `__parameters__` attribute: https://github.com/python/cpython/blob/master/Lib/typing.py#L210 I did not found the restriction that only direct childs of `Generic[..]` class can be generic in the docs, so I think this is a bug. ---------- components: Library (Lib) messages: 354568 nosy: John Lennon priority: normal severity: normal status: open title: typing: Classes that inherit `Generic[...]` indirectly aren't considered generic. type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 08:20:54 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 12:20:54 +0000 Subject: [New-bugs-announce] [issue38460] 3.8 Release Notes: document asyncio exception changes Message-ID: <1570969254.43.0.827620904639.issue38460@roundup.psfhosted.org> New submission from Sebastian Rittau : In Python 3.8 asyncio exceptions were consolidated into the new module "asyncio.exceptions". Previously they were spread out over several modules. While the documentation always mandated to import the exceptions from top-level "asyncio", code that incorrectly imported directly from the submodules will break. ---------- assignee: docs at python components: Documentation messages: 354577 nosy: docs at python, srittau priority: normal severity: normal status: open title: 3.8 Release Notes: document asyncio exception changes versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:06:44 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 13:06:44 +0000 Subject: [New-bugs-announce] [issue38461] 3.8 Release Notes: "curses" misspelled as "ncurses" Message-ID: <1570972004.47.0.506267753893.issue38461@roundup.psfhosted.org> New submission from Sebastian Rittau : The "curses" module is misspelled and sorted as "ncurses" in the release notes. ---------- messages: 354579 nosy: srittau priority: normal severity: normal status: open title: 3.8 Release Notes: "curses" misspelled as "ncurses" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:31:35 2019 From: report at bugs.python.org (Roy Smith) Date: Sun, 13 Oct 2019 13:31:35 +0000 Subject: [New-bugs-announce] [issue38462] Typo (nam ing) in import system docs Message-ID: <1570973495.13.0.272264963981.issue38462@roundup.psfhosted.org> New submission from Roy Smith : In https://docs.python.org/3.5/reference/import.html#importsystem, section "5.2 Packages", second sentence, the word "naming" is broken across two lines. In 3.7.5rc1 as well. Didn't check any others. ---------- assignee: docs at python components: Documentation messages: 354581 nosy: docs at python, roysmith priority: normal severity: normal status: open title: Typo (nam ing) in import system docs versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 09:47:22 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 13:47:22 +0000 Subject: [New-bugs-announce] [issue38463] 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing Message-ID: <1570974442.94.0.731112598518.issue38463@roundup.psfhosted.org> New submission from Sebastian Rittau : The link to SSLContext.post_handshake_auth in the "ssl" section in the release notes is missing. ---------- assignee: docs at python components: Documentation messages: 354582 nosy: docs at python, srittau priority: normal severity: normal status: open title: 3.8 Release Notes: Link to SSLContext.post_handshake_auth missing versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:20:27 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 14:20:27 +0000 Subject: [New-bugs-announce] [issue38464] documentation for NormalDist.quantiles(): missing argument Message-ID: <1570976427.94.0.852447580797.issue38464@roundup.psfhosted.org> New submission from Sebastian Rittau : The documentation for NormalDist.quantiles() (https://docs.python.org/3.8/library/statistics.html#statistics.NormalDist) is missing the "n" argument from the definition. ---------- assignee: docs at python components: Documentation messages: 354584 nosy: docs at python, rhettinger, srittau priority: normal severity: normal status: open title: documentation for NormalDist.quantiles(): missing argument versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 10:57:15 2019 From: report at bugs.python.org (hai shi) Date: Sun, 13 Oct 2019 14:57:15 +0000 Subject: [New-bugs-announce] [issue38465] The type of ob_exports in PyByteArrayObject become Py_ssize_t. Message-ID: <1570978635.87.0.596564542888.issue38465@roundup.psfhosted.org> New submission from hai shi : for a code example: ``` v = [] b = bytearray(0xffff) for i in range(2**31+1) # the ob_exports would be overflow in 32 bit machine when i = 2**31. v.append(memoryview(b)) ``` IMHO, i thought converting the type of ob_exports to Py_ssize_t is fine. PS: I have no actual user scenario. ---------- components: Interpreter Core messages: 354586 nosy: shihai1991 priority: normal severity: normal status: open title: The type of ob_exports in PyByteArrayObject become Py_ssize_t. type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 11:40:26 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 15:40:26 +0000 Subject: [New-bugs-announce] [issue38466] threading.excepthook doc talks about "object" Message-ID: <1570981226.47.0.762418362865.issue38466@roundup.psfhosted.org> New submission from Sebastian Rittau : The documentation of threading.excepthook (https://docs.python.org/3.8/library/threading.html#threading.excepthook) talks about "object", when it only has a "thread" attribute: "Storing object using a custom hook can resurrect it if it is set to an object which is being finalized. Avoid storing object after the custom hook completes to avoid resurrecting objects." I believe this is a copy and paste error from sys.unraisablehook. ---------- assignee: docs at python components: Documentation messages: 354588 nosy: docs at python, srittau, vstinner priority: normal severity: normal status: open title: threading.excepthook doc talks about "object" versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:04:33 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Sun, 13 Oct 2019 16:04:33 +0000 Subject: [New-bugs-announce] [issue38467] Misspelled argument names for typing.get_origin and get_args Message-ID: <1570982673.75.0.804199303932.issue38467@roundup.psfhosted.org> New submission from Sebastian Rittau : The arguments for typing.get_origin() and typing.get_args() are named "typ" in the documentation (https://docs.python.org/3.8/library/typing.html#typing.get_origin), while they are named "tp" in the implementation. Important if used as keyword argument. ---------- assignee: docs at python components: Documentation messages: 354590 nosy: docs at python, srittau priority: normal severity: normal status: open title: Misspelled argument names for typing.get_origin and get_args versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 12:13:45 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Sun, 13 Oct 2019 16:13:45 +0000 Subject: [New-bugs-announce] [issue38468] Refactor python-config.in - use getvar() Message-ID: <1570983225.71.0.166757825145.issue38468@roundup.psfhosted.org> New submission from Joannah Nanjekye : Use getvar for all still existing sysconfig.get_config_var() calls. ---------- messages: 354591 nosy: nanjekyejoannah priority: normal severity: normal status: open title: Refactor python-config.in - use getvar() versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 16:54:11 2019 From: report at bugs.python.org (Pierre Quentel) Date: Sun, 13 Oct 2019 20:54:11 +0000 Subject: [New-bugs-announce] [issue38469] PEP 572 : assignment expression to a global variable in a comprehension Message-ID: <1571000051.15.0.611092311064.issue38469@roundup.psfhosted.org> New submission from Pierre Quentel : PEP 572 says that "an assignment expression occurring in a (...) comprehension (...) binds the target in the containing scope, honoring a nonlocal or global declaration for the target in that scope, if one exists." In Appendix B, the PEP shows this example : def f(): global TARGET a = [TARGET := EXPR for VAR in ITERABLE] So I don't understand why this fails: Python 3.8.0rc1 (tags/v3.8.0rc1:34214de, Oct 1 2019, 18:42:37) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> x = 0 >>> def f(): ... global x ... [x := i for i in range(5)] ... File "", line 3 SyntaxError: no binding for nonlocal 'x' found >>> Is this a bug or am I missing something ? ---------- components: Interpreter Core messages: 354601 nosy: quentel priority: normal severity: normal status: open title: PEP 572 : assignment expression to a global variable in a comprehension type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 13 20:45:36 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 Oct 2019 00:45:36 +0000 Subject: [New-bugs-announce] [issue38470] test_compileall fails in AMD64 Windows7 SP1 3.x Message-ID: <1571013936.71.0.668005842061.issue38470@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : This buildbot has been failing for a long time (example failure https://buildbot.python.org/all/#/builders/40/builds/3291) since https://github.com/python/cpython/commit/4267c989e7fc6cd528e8a1d04a07fac5cca85ec7: ====================================================================== FAIL: test_compile_dir_maxlevels (test.test_compileall.CompileallTestsWithSourceEpoch) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_py_compile.py", line 30, in wrapper return fxn(*args, **kwargs) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_compileall.py", line 257, in test_compile_dir_maxlevels self.assertTrue(os.path.isfile(self.bc_path_long)) AssertionError: False is not true ====================================================================== FAIL: test_compile_dir_maxlevels (test.test_compileall.CompileallTestsWithoutSourceEpoch) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_py_compile.py", line 20, in wrapper return fxn(*args, **kwargs) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_compileall.py", line 257, in test_compile_dir_maxlevels self.assertTrue(os.path.isfile(self.bc_path_long)) AssertionError: False is not true ---------------------------------------------------------------------- Can someone try to fix the error, otherwise we would need to revert commit 4267c989e7fc6cd528e8a1d04a07fac5cca85ec7. ---------- components: Tests, Windows messages: 354609 nosy: hroncok, pablogsal, paul.moore, petr.viktorin, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: test_compileall fails in AMD64 Windows7 SP1 3.x type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 06:42:35 2019 From: report at bugs.python.org (Paul Martin) Date: Mon, 14 Oct 2019 10:42:35 +0000 Subject: [New-bugs-announce] [issue38471] _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called Message-ID: <1571049755.46.0.456741846567.issue38471@roundup.psfhosted.org> New submission from Paul Martin : Expected behaviour for DatagramTransport (from_SelectorDatagramTransport): transport.close() called. If there is data in the write buffer, don't call connection_lost. When all data is written and the buffer is empty, check if connection has been lost and if so, call connection_lost However for _ProactorDatagramTransport, if close is called with data in the buffer, _loop_writing returns immediately, so it never gets to the point of sending the remaining data or calling connection_lost. The code for calling connection_lost inside _loop_writing is completely unreachable, because the method immediately returns if the connection has been lost. ---------- components: Windows, asyncio messages: 354626 nosy: asvetlov, paul.moore, primal, steve.dower, tim.golden, yselivanov, zach.ware priority: normal severity: normal status: open title: _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 08:28:35 2019 From: report at bugs.python.org (Alex Grund) Date: Mon, 14 Oct 2019 12:28:35 +0000 Subject: [New-bugs-announce] [issue38472] GCC detection in setup.py is broken Message-ID: <1571056115.0.0.505317698716.issue38472@roundup.psfhosted.org> New submission from Alex Grund : `setup.py` runs ` -E -v - /dev/null` to figure out include and library paths from the compiler in the function `add_gcc_paths`. However sample output from the compiler is: Es werden eingebaute Spezifikationen verwendet. COLLECT_GCC=g++ Ziel: x86_64-pc-linux-gnu Konfiguriert mit: ../configure --enable-languages=c,c++,fortran --enable-lto --enable-checking=release --disable-multilib --enable-shared=yes --enable-static=yes --enable-threads=posix --enable-plugins --enable-gold=default --enable-ld --with-plugin-ld=ld.gold --prefix=/sw/installed/GCCcore/9.1.0 --with-local-prefix=/sw/installed/GCCcore/9.1.0 --enable-bootstrap --with-isl=/dev/shm/easybuild-build/GCCcore/9.1.0/dummy-/gcc-9.1.0/stage2_stuff Thread-Modell: posix gcc-Version 9.1.0 (GCC) COLLECT_GCC_OPTIONS='-E' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /software/haswell/GCCcore/9.1.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/9.1.0/cc1 -E -quiet -v -iprefix /software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/ - -mtune=generic -march=x86-64 nicht vorhandenes Verzeichnis ?/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/include? wird ignoriert doppeltes Verzeichnis ?/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/../../lib/gcc/x86_64-pc-linux-gnu/9.1.0/include? wird ignoriert doppeltes Verzeichnis ?/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/../../lib/gcc/x86_64-pc-linux-gnu/9.1.0/include-fixed? wird ignoriert nicht vorhandenes Verzeichnis ?/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/../../lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/include? wird ignoriert doppeltes Verzeichnis ?/sw/installed/GCCcore/9.1.0/include? wird ignoriert da es ein Nicht-Systemverzeichnis ist, das ein Systemverzeichnis dupliziert Suche f?r ?#include "..."? beginnt hier: Suche f?r ?#include <...>? beginnt hier: /sw/installed/binutils/2.32-GCCcore-9.1.0/include /sw/installed/zlib/1.2.11-GCCcore-9.1.0/include /software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/include /software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/include-fixed /sw/installed/GCCcore/9.1.0/include /usr/include Ende der Suchliste. COMPILER_PATH=/software/haswell/GCCcore/9.1.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/9.1.0/:/software/haswell/GCCcore/9.1.0/bin/../libexec/gcc/ LIBRARY_PATH=/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/:/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/:/sw/installed/GCCcore/9.1.0/lib64/../lib64/:/sw/installed/GCCcore/9.1.0/lib/../lib64/:/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/sw/installed/binutils/2.32-GCCcore-9.1.0/lib/:/sw/installed/zlib/1.2.11-GCCcore-9.1.0/lib/:/sw/installed/GCCcore/9.1.0/lib64/:/sw/installed/GCCcore/9.1.0/lib/:/software/haswell/GCCcore/9.1.0/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-E' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' So the correct matcher would be "gcc-Version", maybe in addition to "gcc version" Due to this the setup fails to build e.g. bzip2 modules as the include and lib paths are passed in via CPATH and LIBRARY_PATH only (module system on HPC system) ---------- components: Build messages: 354629 nosy: Alex Grund priority: normal severity: normal status: open title: GCC detection in setup.py is broken type: compile error versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 10:25:09 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 14 Oct 2019 14:25:09 +0000 Subject: [New-bugs-announce] [issue38473] AttributeError on asserting autospecced mock object added using attach_mock Message-ID: <1571063109.86.0.136370910863.issue38473@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : The following program causes AttributeError while retrieving the spec signature of a call. It seems that not all mocks specced should have _spec_signature where if autospec is used and the mock is attached with attach_mock then the "mock" attribute has the correct object from which _spec_signature has to be derived. On the attribute being not present we can fallback to the sig being None. This can be workaround by disabling autospec but since this is present in 3.7.5RC1 and 3.8.0RC1 I am tagging it as regression. I am also attaching a patch with script to reproduce this that should pass with the patch. I will try to make a PR tonight. Sorry for the last minute report I just stumbled upon this while debugging https://bugs.python.org/issue21478#msg354489. This change was introduced as part of https://bugs.python.org/issue36871 by me. I am tagging the nosy list from issue for review of the patch. import unittest from unittest.mock import patch, Mock, call, ANY class Foo: def set_foo(self, val): pass class FooTest(unittest.TestCase): @patch(f"{__name__}.Foo.set_foo", autospec=True) def test_autospec_attach_mock_assert(self, mock_set_foo): manager = Mock() manager.attach_mock(mock_set_foo, "set_foo_func") obj = Foo() obj.set_foo(3) manager.assert_has_calls([call.set_foo_func(ANY, 3)]) if __name__ == "__main__": unittest.main() ? Python-3.7.5rc1 ./python autospec_regression.py E ====================================================================== ERROR: test_autospec_attach_mock_assert (__main__.FooTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/xtreak/Python-3.7.5rc1/Lib/unittest/mock.py", line 1255, in patched return func(*args, **keywargs) File "autospec_regression.py", line 16, in test_autospec_attach_mock_assert manager.assert_has_calls([call.set_foo_func(ANY, 3)]) File "/home/xtreak/Python-3.7.5rc1/Lib/unittest/mock.py", line 897, in assert_has_calls expected = [self._call_matcher(c) for c in calls] File "/home/xtreak/Python-3.7.5rc1/Lib/unittest/mock.py", line 897, in expected = [self._call_matcher(c) for c in calls] File "/home/xtreak/Python-3.7.5rc1/Lib/unittest/mock.py", line 812, in _call_matcher sig = self._get_call_signature_from_name(_call[0]) File "/home/xtreak/Python-3.7.5rc1/Lib/unittest/mock.py", line 798, in _get_call_signature_from_name sig = child._spec_signature AttributeError: 'function' object has no attribute '_spec_signature' ---------------------------------------------------------------------- Ran 1 test in 0.003s FAILED (errors=1) Patch : ? Python-3.7.5rc1 diff -u Lib/unittest/mock.py Lib/unittest/mock_patched.py --- Lib/unittest/mock.py 2019-10-01 22:53:17.000000000 +0530 +++ Lib/unittest/mock_patched.py 2019-10-14 19:18:00.038416294 +0530 @@ -795,7 +795,16 @@ break else: children = child._mock_children - sig = child._spec_signature + # If an autospecced object is attached using attach_mock the + # child would be a function with mock object as attribute from + # which signature has to be derived. If there is no signature + # attribute then fallback to None to ensure old signature is + # not used. + child = _extract_mock(child) + try: + sig = child._spec_signature + except AttributeError: + sig = None return sig ---------- components: Library (Lib) keywords: 3.7regression, 3.8regression messages: 354635 nosy: cjw296, gregory.p.smith, lisroach, lukasz.langa, mariocj89, michael.foord, ned.deily, xtreak priority: normal severity: normal status: open title: AttributeError on asserting autospecced mock object added using attach_mock versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 14:30:34 2019 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 14 Oct 2019 18:30:34 +0000 Subject: [New-bugs-announce] [issue38474] digit check logic can be replaced by Py_ISDIGIT on prepare_s Message-ID: <1571077834.59.0.937971525821.issue38474@roundup.psfhosted.org> New submission from Dong-hee Na : digit check logic can be replaced by Py_ISDIGIT on prepare_s. ---------- assignee: corona10 messages: 354643 nosy: corona10 priority: normal severity: normal status: open title: digit check logic can be replaced by Py_ISDIGIT on prepare_s _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 15:31:02 2019 From: report at bugs.python.org (DEVOR BLAKE DANIELS) Date: Mon, 14 Oct 2019 19:31:02 +0000 Subject: [New-bugs-announce] [issue38475] Break Statement Message-ID: <1571081462.55.0.733459298847.issue38475@roundup.psfhosted.org> New submission from DEVOR BLAKE DANIELS : The break statement in my AiO() function seems to cause my Uinput() function to malfunction. ---------- components: Windows files: three.py messages: 354645 nosy: dev40573, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Break Statement versions: Python 3.8 Added file: https://bugs.python.org/file48659/three.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 17:52:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Oct 2019 21:52:47 +0000 Subject: [New-bugs-announce] [issue38476] test_multiprocessing_fork.test_terminate() failed on AMD64 Debian PGO 3.x Message-ID: <1571089967.06.0.895638026997.issue38476@roundup.psfhosted.org> New submission from STINNER Victor : test_multiprocessing_fork.test_terminate() failed twice on AMD64 Debian PGO 3.x: https://buildbot.python.org/all/#/builders/47/builds/3699 0:23:37 load avg: 0.01 [419/419/1] test_multiprocessing_fork crashed (Exit code 1) Timeout (0:15:00)! Thread 0x00007f0272748700 (most recent call first): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 379 in _recv File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 414 in _recv_bytes File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 250 in recv File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 599 in _handle_results File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 882 in run File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 944 in _bootstrap_inner File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 902 in _bootstrap Thread 0x00007f027a8a6500 (most recent call first): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 674 in _help_stuff_finish File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 689 in _terminate_pool File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/util.py", line 201 in __call__ File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 656 in terminate File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/test/_test_multiprocessing.py", line 2521 in test_terminate ... 0:23:37 load avg: 0.01 Re-running test_multiprocessing_fork in verbose mode ... test_starmap (test.test_multiprocessing_fork.WithProcessesTestPool) ... ok test_starmap_async (test.test_multiprocessing_fork.WithProcessesTestPool) ... ok Timeout (0:15:00)! Thread 0x00007f251d553700 (most recent call first): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 379 in _recv File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 414 in _recv_bytes File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/connection.py", line 250 in recv File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 599 in _handle_results File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 882 in run File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 944 in _bootstrap_inner File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/threading.py", line 902 in _bootstrap Thread 0x00007f2523e76500 (most recent call first): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 674 in _help_stuff_finish File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 689 in _terminate_pool File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/util.py", line 201 in __call__ File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/multiprocessing/pool.py", line 656 in terminate File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.pgo/build/Lib/test/_test_multiprocessing.py", line 2521 in test_terminate ---------- components: Tests messages: 354669 nosy: vstinner priority: normal severity: normal status: open title: test_multiprocessing_fork.test_terminate() failed on AMD64 Debian PGO 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 21:42:50 2019 From: report at bugs.python.org (Louis Huemiller) Date: Tue, 15 Oct 2019 01:42:50 +0000 Subject: [New-bugs-announce] [issue38477] magiccube2x2 permutations 28% slower with Python 3.8.0rc1 vs 3.7 Message-ID: <1571103770.08.0.648523147203.issue38477@roundup.psfhosted.org> New submission from Louis Huemiller : Have created a program that by brute force determines all reachable states of a 2-by-2 MagicCube, sometimes referred to as a 2x2 Rubick's cube. On one of my servers, which is described in the attached file 20191011b_configuration, this program takes 19520.03 seconds to execute under Python2.7.15+, while under 3.8.0rc1 it takes 21887.53 seconds. This program is taking 12.13% longer to execute with 3.8.0rc1 versus 2.7.15+. The exact versions of Python as reported by sys.version are: 2.7.15+ (default, Oct 7 2019, 17:39:04) [GCC 7.4.0] 3.8.0rc1 (default, Oct 1 2019, 21:48:24) [GCC 7.4.0] Used the following script to execute this program under Python 2.7, 3.6, 3.7, and 3.8: mkdir -p ./results echo "======== git log ========" > ./results/20191011b_configuration git log -n4 >> ./results/20191011b_configuration echo "" >> ./results/20191011b_configuration echo "======== uname ========" >> ./results/20191011b_configuration uname -a >> ./results/20191011b_configuration echo "" >> ./results/20191011b_configuration echo "======== lsb_release ========" >> ./results/20191011b_configuration lsb_release -a >> ./results/20191011b_configuration echo "" >> ./results/20191011b_configuration echo "======== lshw ========" >> ./results/20191011b_configuration sudo lshw >> ./results/20191011b_configuration make clean make ./target/permutations2x2 > \ ./results/20191011b_magiccube2x2_permutations_cxx_unordered_map 2>&1 python3.8 ./permutations2x2 > \ ./results/20191011b_magiccube2x2_permutations_python3.8.0rc1 2>&1 python3.7 ./permutations2x2 > \ ./results/20191011b_magiccube2x2_permutations_python3.7 2>&1 python3.6 ./permutations2x2 > \ ./results/20191011b_magiccube2x2_permutations_python3.6 2>&1 python2.7 ./permutations2x2 > ./results/20191011b_magiccube2x2_permutations_python2.7 2>&1 Doing egrep "^# Total_Time:" on each of the output files, shows that the various executions took the following amount of time: cxx_unordered_map:# Total_Time: 1098.25 python2.7:# Total_Time: 19520.03 python3.6:# Total_Time: 19562.28 python3.7:# Total_Time: 17012.67 python3.8.0rc1:# Total_Time: 21887.53 Under Python2.7 and Python3.6 the program ran in approximately the same amount of time, while under Python3.7 it ran 12.8% faster than execution with Python2.7. Finally, the python3.8.0rc1 execution is noticeably slower than all the other executions, at 12.1% lower than Python2.7 and 28.6% slower than Python3.7. The source for the magic_cube2x2 program is available under gist.github.com at: https://gist.github.com/lhuemill/f1273291e5f5e85e4b42e5c7614e60ef This program creates a fairly large dictionary of 88.179840M entries. Each entry has a key of a string of length 29 and a value string of with a maximum length of 22 characters. A quick back-of-the-envelope calculation shows that this dictionary would use approximately 9GB of memory, but for some reason, all of the Python executions use approximately 22.6GB of memory. Even the C++ version is using 20.2GB when the permutations are stored in an unordered_map and 20.55GB when stored in a map. Quite surprising that the C++ is using over twice the expected amount of memory. CAUTION: When executing this program with less than the needed amount of physical memory, be careful that swap is not backed by a flash device. Doing so will likely cause a significant amount of I/O to the flash device and likely quickly wear it out. ---------- files: 20191005b_configuration messages: 354682 nosy: Louis Huemiller priority: normal severity: normal status: open title: magiccube2x2 permutations 28% slower with Python 3.8.0rc1 vs 3.7 type: performance versions: Python 3.8 Added file: https://bugs.python.org/file48660/20191005b_configuration _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 14 22:26:32 2019 From: report at bugs.python.org (Brian Shaginaw) Date: Tue, 15 Oct 2019 02:26:32 +0000 Subject: [New-bugs-announce] [issue38478] inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter Message-ID: <1571106392.69.0.85003046785.issue38478@roundup.psfhosted.org> New submission from Brian Shaginaw : >>> import inspect >>> def foo(bar, /, **kwargs): ... print(bar, kwargs) ... >>> foo(1, bar=2) 1 {'bar': 2} >>> inspect.signature(foo).bind(1, bar=2) Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/inspect.py", line 3025, in bind return self._bind(args, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/inspect.py", line 2964, in _bind raise TypeError( TypeError: multiple values for argument 'bar' Python 3.8 introduced positional-only parameters, which allow parameter names to remain available for use in **kwargs. It looks like `inspect.signature.bind` does not recognize this, and thinks the parameter is being passed twice, which causes the above TypeError. Expected result: ---------- components: Library (Lib) messages: 354683 nosy: brian.shaginaw priority: normal severity: normal status: open title: inspect.signature.bind does not correctly handle keyword argument with same name as positional-only parameter type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 01:31:30 2019 From: report at bugs.python.org (Young Y) Date: Tue, 15 Oct 2019 05:31:30 +0000 Subject: [New-bugs-announce] [issue38479] Segmentation fault: 11 Python3.6 on Macbook Message-ID: <1571117490.83.0.0706569063391.issue38479@roundup.psfhosted.org> New submission from Young Y : Segmentation fault: 11Process: Python [5343] Path: /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 3.6.5 (3.6.5) Code Type: X86-64 (Native) Parent Process: bash [3524] Responsible: Python [5343] User ID: 501 Date/Time: 2019-10-15 13:26:45.395 +0800 OS Version: Mac OS X 10.14.1 (18B75) Report Version: 12 Anonymous UUID: 4552DCD6-6528-6E1A-0C86-24A09F7835F8 Time Awake Since Boot: 9600 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000201c49b57 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [5343] VM Regions Near 0x201c49b57: VM_ALLOCATE 0000000181c4a000-0000000181c4b000 [ 4K] r-x/rwx SM=PRV --> __UNIXSTACK 00007fff5b000000-00007fff5c000000 [ 16.0M] rw-/rwx SM=ALI /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python Application Specific Information: dyld: launch, running initializers /Library/Application Support/Cylance/Desktop/CyMemDef.dylib Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 ??? 0x0000000201c49b57 0 + 8619596631 1 CyMemDef.dylib 0x0000000100a77737 _vm_protect(unsigned int, unsigned long, unsigned long, unsigned int, int) + 149 2 CyMemDef.dylib 0x0000000100a73e3e mach_override_setup + 219 3 CyMemDef.dylib 0x0000000100a79297 injector(inject_s*, unsigned long) + 355 4 CyMemDef.dylib 0x0000000100a790a5 MemDefMemory_initialize() + 35 5 CyMemDef.dylib 0x0000000100a77050 memdefosx_initialize + 28 6 dyld 0x00007fff5f67dcc8 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 518 7 dyld 0x00007fff5f67dec6 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40 8 dyld 0x00007fff5f6790da ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 358 9 dyld 0x00007fff5f67906d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 249 10 dyld 0x00007fff5f678254 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 134 11 dyld 0x00007fff5f6782e8 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 74 12 dyld 0x00007fff5f667774 dyld::initializeMainExecutable() + 199 13 dyld 0x00007fff5f66c78f dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 6237 14 dyld 0x00007fff5f6664f6 dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 1154 15 dyld 0x00007fff5f666036 _dyld_start + 54 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000100a94178 rbx: 0x0000000101c4ab3a rcx: 0x0000000000000000 rdx: 0x0000000000000008 rdi: 0x0000000000000103 rsi: 0x0000000101c4ab3a rbp: 0x00007fff5bffdef0 rsp: 0x00007fff5bffdaa8 r8: 0x0000000000000005 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000246 r12: 0x0000000000000005 r13: 0x0000000000000103 r14: 0x0000000000000000 r15: 0x0000000000000008 rip: 0x0000000201c49b57 rfl: 0x0000000000010246 cr2: 0x0000000201c49b57 Logical CPU: 1 Error Code: 0x00000014 Trap Number: 14 Binary Images: 0x100000000 - 0x100000ff7 +org.python.python (3.6.5 - 3.6.5) /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python 0x100003000 - 0x100450fe7 com.apple.CoreFoundation (6.9 - 1560.12) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x1006fb000 - 0x100922fef +org.python.python (3.6.5, [c] 2001-2018 Python Software Foundation. - 3.6.5) /Library/Frameworks/Python.framework/Versions/3.6/Python 0x100a6b000 - 0x100a6cffb libSystem.B.dylib (1252.200.5) /usr/lib/libSystem.B.dylib 0x100a72000 - 0x100a83ff7 +CyMemDef.dylib (0) <7F2E0690-20B4-335A-AE40-D51A0FD1582F> /Library/Application Support/Cylance/*/CyMemDef.dylib 0x100ab5000 - 0x10123bfe7 libobjc.A.dylib (750.1) <9CE27EC3-3A12-35D1-8F2F-3550B9668259> /usr/lib/libobjc.A.dylib 0x1013f3000 - 0x1013f4ff7 libDiagnosticMessagesClient.dylib (107) /usr/lib/libDiagnosticMessagesClient.dylib 0x1013fa000 - 0x10165dffb libicucore.A.dylib (62108.0.1) <969815D4-A345-31BB-82B7-0C3B58CA7E90> /usr/lib/libicucore.A.dylib 0x10174b000 - 0x10175dffb libz.1.dylib (70.200.4) <99A3D725-8388-38B4-B66C-5E9006E6F072> /usr/lib/libz.1.dylib 0x101763000 - 0x101778fff libc++abi.dylib (400.17) /usr/lib/libc++abi.dylib 0x10178f000 - 0x1017e6ff7 libc++.1.dylib (400.9.4) /usr/lib/libc++.1.dylib 0x101847000 - 0x10184bff3 libcache.dylib (81) /usr/lib/system/libcache.dylib 0x101851000 - 0x10185bff3 libcommonCrypto.dylib (60118.220.1) <1099E427-6E81-3059-87AF-6F5FD81CA998> /usr/lib/system/libcommonCrypto.dylib 0x101869000 - 0x101870fff libcompiler_rt.dylib (63.4) /usr/lib/system/libcompiler_rt.dylib 0x10187e000 - 0x101887ff3 libcopyfile.dylib (146.200.3) <4BCDADBF-79F5-3829-B47D-64DA0D44BCBF> /usr/lib/system/libcopyfile.dylib 0x10188e000 - 0x101912fdf libcorecrypto.dylib (602.220.6) /usr/lib/system/libcorecrypto.dylib 0x10192f000 - 0x101969ff7 libdispatch.dylib (1008.220.2) /usr/lib/system/libdispatch.dylib 0x10199a000 - 0x1019c9fff libdyld.dylib (635.2) <1B79A5CE-125F-301F-A441-C1869573AED0> /usr/lib/system/libdyld.dylib 0x1019ec000 - 0x1019ecffb libkeymgr.dylib (30) /usr/lib/system/libkeymgr.dylib 0x1019f1000 - 0x1019f1ff7 liblaunch.dylib (1336.220.5) <95EB6EAF-2DC5-344F-BADB-CA4E35E4E503> /usr/lib/system/liblaunch.dylib 0x1019f8000 - 0x1019fdfff libmacho.dylib (921) /usr/lib/system/libmacho.dylib 0x101a04000 - 0x101a06ffb libquarantine.dylib (86.220.1) <6AE5AEEC-A9FD-3CF8-92DD-12B5AFBE12DE> /usr/lib/system/libquarantine.dylib 0x101a0d000 - 0x101a0eff3 libremovefile.dylib (45.200.2) /usr/lib/system/libremovefile.dylib 0x101a14000 - 0x101a2bff3 libsystem_asl.dylib (356.200.4) /usr/lib/system/libsystem_asl.dylib 0x101a39000 - 0x101a39fff libsystem_blocks.dylib (73) <26419398-C30C-30F1-B656-A92AFA9560F6> /usr/lib/system/libsystem_blocks.dylib 0x101a3e000 - 0x101ac6fff libsystem_c.dylib (1272.200.26) <3DEEE96E-6DF6-35AD-8654-D69AC26B907B> /usr/lib/system/libsystem_c.dylib 0x101aef000 - 0x101af2ff7 libsystem_configuration.dylib (963.200.27) <02CC3996-B34E-333C-8806-AE2699D34424> /usr/lib/system/libsystem_configuration.dylib 0x101af9000 - 0x101afcff7 libsystem_coreservices.dylib (66) <254B6849-2C8F-302C-8616-B8324A11AB30> /usr/lib/system/libsystem_coreservices.dylib 0x101b02000 - 0x101b08ffb libsystem_darwin.dylib (1272.200.26) <974E9EF7-DE72-34B7-B056-0A81C10DF8EB> /usr/lib/system/libsystem_darwin.dylib 0x101b13000 - 0x101b19ff7 libsystem_dnssd.dylib (878.200.35) /usr/lib/system/libsystem_dnssd.dylib 0x101b1f000 - 0x101b6bff3 libsystem_info.dylib (517.200.9) <0707C387-D7DE-372E-8FF1-3DE5C91932D6> /usr/lib/system/libsystem_info.dylib 0x101b82000 - 0x101bcdff7 libsystem_m.dylib (3158.200.7) <43D1796B-954F-37D6-B1AC-9D80DF0655A2> /usr/lib/system/libsystem_m.dylib 0x101bdc000 - 0x101c00ff7 libsystem_malloc.dylib (166.220.1) <3B196122-4E0D-3E3F-AA3E-5115B976DE26> /usr/lib/system/libsystem_malloc.dylib 0x101c0f000 - 0x101c1aff3 libsystem_networkextension.dylib (767.220.1) /usr/lib/system/libsystem_networkextension.dylib 0x101c27000 - 0x101c2efff libsystem_notify.dylib (172.200.21) /usr/lib/system/libsystem_notify.dylib 0x101c35000 - 0x101c38ff7 libsystem_sandbox.dylib (851.220.9) <4D6433A8-C703-3ED9-82EB-B9E481A0FD2F> /usr/lib/system/libsystem_sandbox.dylib 0x101c3f000 - 0x101c41ff3 libsystem_secinit.dylib (30.220.1) <6C681113-8C48-3256-BEF6-0C3723DEB926> /usr/lib/system/libsystem_secinit.dylib 0x101c47000 - 0x101c6eff7 libsystem_kernel.dylib (4903.221.2) <0E882078-7330-3B49-AA5D-3CDB5645A4E5> /usr/lib/system/libsystem_kernel.dylib 0x101c89000 - 0x101c92fef libsystem_platform.dylib (177.200.16) /usr/lib/system/libsystem_platform.dylib 0x101c9b000 - 0x101ca5fff libsystem_pthread.dylib (330.220.2) <4958273C-4273-3501-8137-E44249E10D9C> /usr/lib/system/libsystem_pthread.dylib 0x101cb0000 - 0x101cb7ff7 libsystem_symptoms.dylib (820.227.2) <3147D594-F41F-35FD-BF0B-6B8B66A407DE> /usr/lib/system/libsystem_symptoms.dylib 0x101cbe000 - 0x101cd3ff7 libsystem_trace.dylib (906.220.1) /usr/lib/system/libsystem_trace.dylib 0x101ce3000 - 0x101ce8ffb libunwind.dylib (35.4) <41222EF6-2233-3CF4-947A-15D48CB8C030> /usr/lib/system/libunwind.dylib 0x101cf0000 - 0x101d20fff libxpc.dylib (1336.220.5) /usr/lib/system/libxpc.dylib 0x7fff5f665000 - 0x7fff5f6e36a7 dyld (635.2) <1780094A-8FE2-3EAA-B4A3-C4CF14BC5196> /usr/lib/dyld External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 26541 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=25.4M resident=0K(0%) swapped_out_or_unallocated=25.4M(100%) Writable regions: Total=25.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=25.5M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Kernel Alloc Once 8K 2 MALLOC 9260K 8 MALLOC guard page 16K 5 VM_ALLOCATE 4K 2 __DATA 4316K 59 __LINKEDIT 4768K 46 __TEXT 20.7M 48 __UNICODE 564K 2 __UNIXSTACK 16.0M 2 shared memory 8K 3 =========== ======= ======= TOTAL 55.2M 167 Model: MacBookPro14,1, BootROM 184.0.0.0.0, 2 processors, Intel Core i5, 2.3 GHz, 16 GB, SMC 2.43f6 Graphics: Intel Iris Plus Graphics 640, Intel Iris Plus Graphics 640, Built-In Memory Module: BANK 0/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C31473332443450472D30393320 Memory Module: BANK 1/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C31473332443450472D30393320 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x170), Broadcom BCM43xx 1.0 (7.77.61.1 AirPortDriverBrcmNIC-1305.2) Bluetooth: Version 6.0.9f2, 3 services, 27 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB 3.0 Bus USB Device: USB 2.0 BILLBOARD Thunderbolt Bus: MacBook Pro, Apple Inc., 39.2 ---------- messages: 354686 nosy: Young Y priority: normal severity: normal status: open title: Segmentation fault: 11 Python3.6 on Macbook versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:34:20 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 15 Oct 2019 07:34:20 +0000 Subject: [New-bugs-announce] [issue38480] resource.setrlimit() should raise PermissionError Message-ID: <1571124860.16.0.598909630124.issue38480@roundup.psfhosted.org> New submission from Giampaolo Rodola' : >>> import resource >>> high = 300 * 1024 * 1024 >>> resource.setrlimit(resource.RLIMIT_MEMLOCK, (high, high)) Traceback (most recent call last): File "", line 1, in ValueError: not allowed to raise maximum limit >>> Internally EPERM is translated into ValueError (should have been PermissionError). resource.prlimit(), on the other hand, is not affected (correctly raises PermissionError): >>> resource.prlimit(os.getpid(), resource.RLIMIT_MEMLOCK, (high, high)) Traceback (most recent call last): File "", line 1, in PermissionError: [Errno 1] Operation not permitted It seems 'ValueError' was used in order to provide a more informative error message, but IMO it was a bad call. Proposal is to change this in 3.9 only, and document it under whatsnew/porting. ---------- components: Library (Lib) messages: 354701 nosy: giampaolo.rodola priority: normal severity: normal status: open title: resource.setrlimit() should raise PermissionError versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 03:36:40 2019 From: report at bugs.python.org (=?utf-8?b?5qWa6Im6?=) Date: Tue, 15 Oct 2019 07:36:40 +0000 Subject: [New-bugs-announce] [issue38481] Class static property not static Message-ID: <1571125000.71.0.339898408736.issue38481@roundup.psfhosted.org> New submission from ?? <1090217062 at qq.com>: code: ------------------------------------------------------------------ class D: num = 0 def __init__(self): self.num += 1 print('D num', self.num) for i in range(5): D() --------------------------------------------------------------- console print: --------------------------------------------------------------- Connected to pydev debugger (build 183.5429.31) D num 1 D num 1 D num 1 D num 1 D num 1 Process finished with exit code 0 ---------- components: Windows messages: 354702 nosy: chuyi, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Class static property not static type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 04:21:30 2019 From: report at bugs.python.org (Jim Carroll) Date: Tue, 15 Oct 2019 08:21:30 +0000 Subject: [New-bugs-announce] [issue38482] BUG in codecs.BufferedIncrementalDecoder Message-ID: <1571127690.05.0.477916235895.issue38482@roundup.psfhosted.org> New submission from Jim Carroll : While working with codecs.iterdecode(), encountered "can't concat int to bytes". The source of the problem is BufferedIncrementalDecoder stores it's internal buffer as a bytes (ie: b""), but decode() can be passed either a byte string or in the case of iterdecode() an int. The solution is to test for this in the decode and if passed an int to coerce to bytes (see attach patch) Platform: Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32 Code to demonstrate the issue: >>> import codecs >>> source = ''.join([chr(x) for x in range(256)]) >>> enc = b''.join(codecs.iterencode(source, 'utf-8')) >>> list(''.join(codecs.iterdecode(enc, 'utf-8'))) Traceback (most recent call last): File "", line 1, in File "C:\Python37\lib\codecs.py", line 1048, in iterdecode output = decoder.decode(input) File "C:\Python37\lib\codecs.py", line 321, in decode data = self.buffer + input TypeError: can't concat int to bytes ---------- components: Library (Lib) files: codecs.patch keywords: patch messages: 354707 nosy: jamercee priority: normal severity: normal status: open title: BUG in codecs.BufferedIncrementalDecoder versions: Python 3.7 Added file: https://bugs.python.org/file48661/codecs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 06:51:40 2019 From: report at bugs.python.org (Cooper Lees) Date: Tue, 15 Oct 2019 10:51:40 +0000 Subject: [New-bugs-announce] [issue38483] [venv] Add ~/.venvrc to change module defaults Message-ID: <1571136700.53.0.3102397559.issue38483@roundup.psfhosted.org> New submission from Cooper Lees : I'd like to propose adding a run commands (.venvrc) file support to the venv library. File Location: `~/.venvrc` This file will support all current CLI arguments and override the defaults for each CLI if present in the file. I will also endeavour to add test for POSIX + Windows systems. I propose using `configparser` and an `.ini` style config for the `.venvrc`. My main use for this is to allow myself to default to always using `--upgrade-deps` when I create new venvs. Thoughts? Concerns? ---------- components: Library (Lib) messages: 354712 nosy: cooperlees priority: normal severity: normal status: open title: [venv] Add ~/.venvrc to change module defaults type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 08:37:14 2019 From: report at bugs.python.org (Sebastian Rittau) Date: Tue, 15 Oct 2019 12:37:14 +0000 Subject: [New-bugs-announce] [issue38484] HTMLParser.handle_starttag should mention that value can be None Message-ID: <1571143034.46.0.408177469405.issue38484@roundup.psfhosted.org> New submission from Sebastian Rittau : The documentation for HTMLParser.handle_starttag (https://docs.python.org/3/library/html.parser.html#html.parser.HTMLParser.handle_starttag) should mention that the value of an attribute can be `None` for argument-less attributes. I can submit a PR if wanted. ---------- assignee: docs at python components: Documentation messages: 354719 nosy: docs at python, srittau priority: normal severity: normal status: open title: HTMLParser.handle_starttag should mention that value can be None versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 10:22:34 2019 From: report at bugs.python.org (Jim Carroll) Date: Tue, 15 Oct 2019 14:22:34 +0000 Subject: [New-bugs-announce] [issue38485] BUG Modules/_io/texio.c Message-ID: <1571149354.19.0.486917734419.issue38485@roundup.psfhosted.org> New submission from Jim Carroll : The io.TextIOWrapper class initializes a codec.IncrementalEncoder and uses it to encode str, but it never calls the encoder's encode('', final=True). According to the docs https://docs.python.org/3.5/library/codecs.html#codecs.IncrementalEncoder.encode: ``If this is the last call to encode() final must be true (the default is false).`` Without a call to encode('', final=True), codecs cannot be created that use codecs.BufferedIncrementalEncoder which depend on being called with final=True to flush any internal buffers. Platform: Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32 ---------- messages: 354733 nosy: jamercee priority: normal severity: normal status: open title: BUG Modules/_io/texio.c versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 12:02:16 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 15 Oct 2019 16:02:16 +0000 Subject: [New-bugs-announce] [issue38486] Dead links in mailbox doc Message-ID: <1571155336.35.0.351516835001.issue38486@roundup.psfhosted.org> New submission from Inada Naoki : Reported on mailing list: https://mail.python.org/archives/list/docs at python.org/thread/NIXFQMWFNSNO6RXPINY56CQQ5L7QIRUV/ qmail.org is dead. The mailbox doc [1] contains two links to man pages in qmail.org. Can we just remove them? [1] https://docs.python.org/3/library/mailbox.html ---------- assignee: docs at python components: Documentation messages: 354738 nosy: docs at python, inada.naoki priority: normal severity: normal status: open title: Dead links in mailbox doc versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 15 13:12:40 2019 From: report at bugs.python.org (Marcos Dione) Date: Tue, 15 Oct 2019 17:12:40 +0000 Subject: [New-bugs-announce] [issue38487] expat infinite loop Message-ID: <1571159560.58.0.207422547054.issue38487@roundup.psfhosted.org> New submission from Marcos Dione : I'm trying to add external entities support to xmltodict[1]. For that I extended the handler to have a ExternalEntityRefHandler handler. After reading a couple of files, the script lock in a tight loop. I ran the script with gdb (!!) and found that expat think that two of the parsers are parent of each other. I setup a breakpoint in XML_ExternalEntityParserCreate() (yes, this is expat, I know) right after the new parser uses the old parser as parent (xmlparse.c:1279 in my system). Here are the backtraces and values I found: --- >8 --- landuse-lowzoom None styles-otm/landuse-lowzoom.xml None #0 XML_ExternalEntityParserCreate (oldParser=0xadc4d0, context=context at entry=0x7ffff6c871e0 "landuse-lowzoom", encodingName=encodingName at entry=0x0) at ../../src/lib/xmlparse.c:1281 #1 0x000000000044ec90 in pyexpat_xmlparser_ExternalEntityParserCreate_impl (encoding=0x0, context=0x7ffff6c871e0 "landuse-lowzoom", self=0x7ffff6d556e0) at ../Modules/pyexpat.c:943 #2 pyexpat_xmlparser_ExternalEntityParserCreate (self=0x7ffff6d556e0, args=, nargs=) at ../Modules/clinic/pyexpat.c.h:137 [...] #15 0x000000000044d80d in my_ExternalEntityRefHandler (parser=, context=0xae1d2c "landuse-lowzoom", base=, systemId=, publicId=) at ../Modules/pyexpat.c:659 #16 0x00007ffff7d990c8 in doContent (parser=parser at entry=0xadc4d0, startTagLevel=startTagLevel at entry=0, enc=, s=s at entry=0xae08dd "\n\t `Py_XDECREF(c.c_normalize);` ---------- components: Interpreter Core messages: 355545 nosy: shihai1991 priority: normal severity: normal status: open title: Using Py_XDECREF to replace Py_DECREF in PyAST_FromNodeObject() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 10:56:23 2019 From: report at bugs.python.org (hai shi) Date: Mon, 28 Oct 2019 14:56:23 +0000 Subject: [New-bugs-announce] [issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject Message-ID: <1572274583.69.0.135811249474.issue38617@roundup.psfhosted.org> New submission from hai shi : 1) param is unpredictable; 2) the compiler_free() use Py_XDECREF(c->c_filename) in PyAST_CompileObject(); ---------- components: Interpreter Core messages: 355547 nosy: shihai1991 priority: normal severity: normal status: open title: Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:08:30 2019 From: report at bugs.python.org (hai shi) Date: Mon, 28 Oct 2019 15:08:30 +0000 Subject: [New-bugs-announce] [issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject() Message-ID: <1572275310.19.0.141379413528.issue38618@roundup.psfhosted.org> New submission from hai shi : I don't know why don't use refcount ` /* borrowed reference */ c.c_filename = filename; ` in https://github.com/python/cpython/blob/master/Python/ast.c#L786-L787 like ` Py_INCREF(filename); c.c_filename = filename; ` in https://github.com/python/cpython/blob/master/Python/compile.c#L333 ---------- components: Interpreter Core messages: 355548 nosy: shihai1991 priority: normal severity: normal status: open title: Why not use refcount of c.c_filename in PyAST_FromNodeObject() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 11:50:18 2019 From: report at bugs.python.org (Felipe) Date: Mon, 28 Oct 2019 15:50:18 +0000 Subject: [New-bugs-announce] [issue38619] [Doc] UUID.hex is lowercase Message-ID: <1572277818.51.0.346216542748.issue38619@roundup.psfhosted.org> New submission from Felipe : The hex property of `UUID` is implemented as `'%032x' % self.int` Is it specified that this will always be lowercase? If so, can we add a note to the documentation indicating so? ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 355553 nosy: docs at python, fov priority: normal severity: normal status: open title: [Doc] UUID.hex is lowercase type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:17:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Oct 2019 16:17:26 +0000 Subject: [New-bugs-announce] [issue38620] Shell python-config --includes returns the same path twice Message-ID: <1572279446.17.0.15456686003.issue38620@roundup.psfhosted.org> New submission from STINNER Victor : When the shell script implementation of python-config was introduced, $PLATINCDIR variable was added: commit 874211978c8097b8e747c90fa3ff41aacabe340f Author: doko at python.org Date: Sat Jan 26 11:39:31 2013 +0100 - Issue #16235: Implement python-config as a shell script. ... +INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" +PLATINCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" ... + --includes) + echo "$INCDIR $PLATINCDIR" + ;; + --cflags) + echo "$INCDIR $PLATINCDIR $BASECFLAGS $CFLAGS $OPT" + ;; ... But this variable is always equal to $INCDIR: it doesn't seem possible to change its value. What is the purpose of emitting the same path twice? Example on Fedora 30: $ file /usr/bin/python3.8-x86_64-config /usr/bin/python3.8-x86_64-config: a /usr/bin/sh script, .. $ /usr/bin/python3.8-x86_64-config --includes -I/usr/include/python3.8 -I/usr/include/python3.8 => /usr/include/python3.8 is giving twice ---------- components: Build messages: 355561 nosy: doko, vstinner priority: normal severity: normal status: open title: Shell python-config --includes returns the same path twice versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 12:47:43 2019 From: report at bugs.python.org (Fred Drake) Date: Mon, 28 Oct 2019 16:47:43 +0000 Subject: [New-bugs-announce] [issue38621] Bad decoding of encoded-words in unstructured email headers Message-ID: <1572281263.86.0.289924184677.issue38621@roundup.psfhosted.org> New submission from Fred Drake : I've encountered a problem parsing an email with this Subject: header: Subject: Be sure to redeem your =?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year email._header_value_parser.get_unstructured defers to get_encoded_word, passing the argument '=?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year' get_encoded_word eventually calls email._encoded_words.decode with the argument '=?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year?=' This doesn't seem right, but I'm unsure of the syntactic priority of =XX and ?= in this case. The policy for this is email.policy.SMTP + email.policy.strict (not sure if that's ideal; I'm retrieving messages from mbox files and over IMAP). ---------- assignee: r.david.murray messages: 355564 nosy: barry, fdrake, r.david.murray priority: normal severity: normal status: open title: Bad decoding of encoded-words in unstructured email headers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 14:18:57 2019 From: report at bugs.python.org (tholl) Date: Mon, 28 Oct 2019 18:18:57 +0000 Subject: [New-bugs-announce] [issue38622] _ctypes.dlsym (py_dl_sym) does not trigger audit hooks Message-ID: <1572286737.48.0.245277798688.issue38622@roundup.psfhosted.org> New submission from tholl : The dlsym operation generally (e.g. when done through a ctypes.CDLL object) triggers the "ctypes.dlsym" audit event. However, using _ctypes.dlsym directly does not trigger this event. This appears to be an oversight, given that _ctypes.dlopen *does* trigger the "ctypes.dlopen" audit event. A (very minimal) patch is attached. I was not entirely sure what format the DLL handle should take when it is passed to the audit function, so for now it just turns it back into a number via PyLong_FromVoidPtr (i.e. into the same format in which it is passed into _ctypes.dlsym in the first place). ---------- components: Extension Modules files: audit.patch keywords: patch messages: 355583 nosy: tholl priority: normal severity: normal status: open title: _ctypes.dlsym (py_dl_sym) does not trigger audit hooks versions: Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48684/audit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:39:25 2019 From: report at bugs.python.org (Peter Bittner) Date: Mon, 28 Oct 2019 22:39:25 +0000 Subject: [New-bugs-announce] [issue38623] Python documentation should mention how to find site-packages Message-ID: <1572302365.38.0.0160311403424.issue38623@roundup.psfhosted.org> New submission from Peter Bittner : A popular question on StackOverflow is, "How do I find the location of my Python site-packages directory?" [1] While this may hint at a deeper problem that needs to be solved, a user suggested [2] the accepted answer to be added to Python's official documentation. The most appropriate place I could find to add related information is ``Doc/tutorial/modules.rst``. [1] https://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory/46071447 [2] https://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory/46071447#comment103247041_46071447 ---------- assignee: docs at python components: Documentation messages: 355599 nosy: bittner, docs at python priority: normal severity: normal status: open title: Python documentation should mention how to find site-packages type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 18:54:26 2019 From: report at bugs.python.org (Inyeol Lee) Date: Mon, 28 Oct 2019 22:54:26 +0000 Subject: [New-bugs-announce] [issue38624] pathlib .suffix, .suffixes, .stem unexpected behavior for pathname with trailing dot Message-ID: <1572303266.25.0.298826612475.issue38624@roundup.psfhosted.org> New submission from Inyeol Lee : Python3.8 pathlib treats dot between path stem and suffix as part of suffix in general: >>> a = pathlib.Path('foo.txt') >>> a.stem, a.suffix ('foo', '.txt') >>> a.with_suffix('') PosixPath('foo') However, if pathname ends with dot, it treats the trailing dot as part of stem, not part of suffix: >>> b = pathlib.Path('bar.') >>> b.stem, b.suffix ('bar.', '') This looks like a bug. It should return ('bar', '.'). There are couple of unexpected behavior related to this: >>> pathlib.Path('foo.txt').with_suffix('.') ... ValueError: Invalid suffix '.' <== Why not PosixPath('foo.') ? >>> c = pathlib.Path('foo..') >>> c.stem, c.suffix, c.suffixes ('foo..', '', []) I think above should return ('foo.', '.', ['.', '.']) Tested with macOS 10.15 and Python3.8. Python3.7 behaves the same. ---------- components: Library (Lib) messages: 355600 nosy: inyeollee priority: normal severity: normal status: open title: pathlib .suffix, .suffixes, .stem unexpected behavior for pathname with trailing dot type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 19:25:13 2019 From: report at bugs.python.org (Graham Coster) Date: Mon, 28 Oct 2019 23:25:13 +0000 Subject: [New-bugs-announce] [issue38625] SpooledTemporaryFile does not seek correctly after being rolled over Message-ID: <1572305113.57.0.424265086892.issue38625@roundup.psfhosted.org> Change by Graham Coster : ---------- components: Library (Lib) files: spooled-temp-file-does-not-seek-correctly-after-being-rolled.py nosy: Gary Fernie, James Hennessy, graham.coster, inada.naoki, martin.panter, nubirstein, r.david.murray, serhiy.storchaka, terry.reedy priority: normal severity: normal status: open title: SpooledTemporaryFile does not seek correctly after being rolled over type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48685/spooled-temp-file-does-not-seek-correctly-after-being-rolled.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 28 23:03:16 2019 From: report at bugs.python.org (Windson Yang) Date: Tue, 29 Oct 2019 03:03:16 +0000 Subject: [New-bugs-announce] [issue38626] small change at bisect_left function for easy understanding Message-ID: <1572318196.84.0.0964323507502.issue38626@roundup.psfhosted.org> New submission from Windson Yang : bisect_left should be similar to bisect_right. However, the current implement didn't reflect it. A little bit update for the bisect_left function could make the user easy to understand their relation. def bisect_left(a, x, lo=0, hi=None): if lo < 0: raise ValueError('lo must be non-negative') if hi is None: hi = len(a) while lo < hi: mid = (lo+hi)//2 # <= should be the only difference between bisect_left and bisect_right if x <= a[mid]: hi = mid else: lo = mid+1 return lo ---------- components: Library (Lib) messages: 355606 nosy: Windson Yang priority: normal severity: normal status: open title: small change at bisect_left function for easy understanding versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 01:55:17 2019 From: report at bugs.python.org (Sebastian Linke) Date: Tue, 29 Oct 2019 05:55:17 +0000 Subject: [New-bugs-announce] [issue38627] Add copy() method to pathlib Message-ID: <1572328517.33.0.0527318368455.issue38627@roundup.psfhosted.org> New submission from Sebastian Linke : pathlib.Path() could wrap shutil.copy() with something like this: def copy(self, target): if not self.is_file(): # No support for directories here raise ValueError("Path must point to a regular file") # copy() appends filename when Path is copied to a directory # see shutil.copy() docstring and source for details target = shutil.copy(self, target) return self.__class__(target) ---------- components: Library (Lib) messages: 355616 nosy: seblin priority: normal severity: normal status: open title: Add copy() method to pathlib type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 05:17:23 2019 From: report at bugs.python.org (Ayappan) Date: Tue, 29 Oct 2019 09:17:23 +0000 Subject: [New-bugs-announce] [issue38628] Issue with ctypes in AIX Message-ID: <1572340643.38.0.935669039099.issue38628@roundup.psfhosted.org> New submission from Ayappan : There seems to be a behavioral issue with ctypes in AIX. The specific symptom is that passing structures containing arrays to a C function by value appears to be broken. Consider the below program., #!/usr/bin/env python3 from ctypes import * libc = CDLL('libc.a(shr_64.o)') class MemchrArgsHack(Structure): _fields_ = [("s", c_char_p), ("c", c_ulong), ("n", c_ulong)] memchr_args_hack = MemchrArgsHack() memchr_args_hack.s = b"abcdef" memchr_args_hack.c = ord('d') memchr_args_hack.n = 7 class MemchrArgsHack2(Structure): _fields_ = [("s", c_char_p), ("c_n", c_ulong * 2)] memchr_args_hack2 = MemchrArgsHack2() memchr_args_hack2.s = b"abcdef" memchr_args_hack2.c_n[0] = ord('d') memchr_args_hack2.c_n[1] = 7 print( CFUNCTYPE(c_char_p, c_char_p, c_uint, c_ulong, c_void_p)(('memchr', libc))(b"abcdef", c_uint(ord('d')), c_ulong(7), None)) print( CFUNCTYPE(c_char_p, MemchrArgsHack, c_void_p)(('memchr', libc))(memchr_args_hack, None)) print( CFUNCTYPE(c_char_p, MemchrArgsHack2, c_void_p)(('memchr', libc))(memchr_args_hack2, None)) This one uses memchr from the C library and passing it structures that would map to the registers that correspond to the arguments of memchr. This works for the first structure type in the reproducer; however, using the second structure type (which should be treated the same way) does not work. In the failing case, the last register that should be used for the structure is not populated from the structure. The reproducer passes an extra argument so that the register is instead populated from that argument for the failing case (instead of working because the register still contains the correct value from a previous call). The output should be the same for all three calls, but we get: b'def' b'def' None The last line is None, because memchr got 0 (the None passed on the call) for its length argument. ---------- components: ctypes messages: 355632 nosy: Ayappan priority: normal severity: normal status: open title: Issue with ctypes in AIX type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 06:18:17 2019 From: report at bugs.python.org (Ran Benita) Date: Tue, 29 Oct 2019 10:18:17 +0000 Subject: [New-bugs-announce] [issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real Message-ID: <1572344297.94.0.916739375163.issue38629@roundup.psfhosted.org> New submission from Ran Benita : The numbers.Real ABC requires the __ceil__ and __floor__ methods (https://github.com/python/cpython/blob/v3.8.0/Lib/numbers.py#L178-L186), however, the float type does not have them. In regular Python, this is not a problem, because math.ceil() and math.floor() special-case float and work on it directly, and numbers.Real is implemented on float by explicitly registering it (so it's not checked that all required methods are implemented). Where it becomes a (minor) problem is in typeshed, where the type checker *does* check that all abstract methods are implemented. So, because float is missing these two, typeshed cannot have float implement numbers.Real. Refs: https://github.com/python/typeshed/issues/3195 ---------- components: Interpreter Core, Library (Lib) messages: 355642 nosy: bluetech priority: normal severity: normal status: open title: float is missing __ceil__() and __floor__(), required by numbers.Real type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 07:18:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2019 11:18:26 +0000 Subject: [New-bugs-announce] [issue38630] subprocess.Popen.send_signal() should poll the process Message-ID: <1572347906.82.0.50492662575.issue38630@roundup.psfhosted.org> New submission from STINNER Victor : subprocess.Popen.send_signal() doesn't check if the process exited since the poll() method has been called for the last time. If the process exit just before os.kill() is called, the signal can be sent to the wrong process if the process identified is recycled. Attached PR simply calls poll() once to reduce the time window when this race condition can occur, but it doesn't fully kill the race condition. -- See also the new "pidfd" API which only landed very recently in the Linux kernel to prevent this issue: * https://lwn.net/Articles/773459/ "Toward race-free process signaling" (this articles describes this issue) * https://lwn.net/Articles/789023/ "New system calls: pidfd_open() and close_range()" * https://kernel-recipes.org/en/2019/talks/pidfds-process-file-descriptors-on-linux/ "pidfds: Process file descriptors on Linux" by Chrisitan Brauner Illumos, OpenBSD, NetBSD and FreeBSD have similar concepts. I don't propose to use pidfd here, but it's just to highlight that it's a real issue and that kernels are evolving to provide more reliable solutions against the kill(pid, sig) race condition ;-) ---------- components: Library (Lib) messages: 355645 nosy: vstinner priority: normal severity: normal status: open title: subprocess.Popen.send_signal() should poll the process versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 08:38:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 29 Oct 2019 12:38:55 +0000 Subject: [New-bugs-announce] [issue38631] Replace Py_FatalError() with regular Python exceptions Message-ID: <1572352735.51.0.915792481752.issue38631@roundup.psfhosted.org> New submission from STINNER Victor : I replaced dozens of Py_FatalError() calls with better error reporting, but there are still many places calling Py_FatalError(). The problem of Py_FatalError() is when Python is embedded into an application: Python must not kill the whole process. Well, even in the "regular" Python (/usr/bin/python3), Python should not exit immediately on an error. For example, the readline module calls Py_FatalError() on memory allocation failure, whereas PyErr_NoMemory() could be used: PyErr_NoMemory() should work since it should not allocate memory. ---------- components: Interpreter Core messages: 355651 nosy: vstinner priority: normal severity: normal status: open title: Replace Py_FatalError() with regular Python exceptions versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 09:03:17 2019 From: report at bugs.python.org (Zack Weinberg) Date: Tue, 29 Oct 2019 13:03:17 +0000 Subject: [New-bugs-announce] [issue38632] setup.py sdist should honor SOURCE_DATE_EPOCH Message-ID: <1572354197.87.0.67466678891.issue38632@roundup.psfhosted.org> New submission from Zack Weinberg : Reproducibility has so far been concerned primarily with binary packages, but it's also desirable for source tarballs to be reproducible starting from a version-control checkout. This is particularly important for Python, where 'setup.py sdist' can run arbitrary code and generated files (e.g. Cython-generated C) are often included in sdists. As a small step toward this goal, please add support for the SOURCE_DATE_EPOCH environment variable to distutils.command.sdist. The most natural way to implement this would be with an additional user option, perhaps called 'timestamp_limit', which takes a date and time argument. File modification timestamps in the generated tarball or zipfile will be adjusted to be no later than that time. If 'timestamp_limit' is not set, it defaults to the value of os.environ['SOURCE_DATE_EPOCH']. The specification for SOURCE_DATE_EPOCH may be found at https://reproducible-builds.org/specs/source-date-epoch/ . ---------- components: Distutils messages: 355652 nosy: dstufft, eric.araujo, zwol priority: normal severity: normal status: open title: setup.py sdist should honor SOURCE_DATE_EPOCH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 10:34:38 2019 From: report at bugs.python.org (Peter) Date: Tue, 29 Oct 2019 14:34:38 +0000 Subject: [New-bugs-announce] [issue38633] shutil.copystat fails with PermissionError in WSL Message-ID: <1572359678.82.0.846153471805.issue38633@roundup.psfhosted.org> New submission from Peter : Using shutil.copystat (and therefore also shutil.copytree) in WSL on any directories from a mounted Windows drive (i.e. /mnt/c/...) raises an shutil.Error "[Errno 13] Permission denied". It seems to fail when copying the extended filesystem attribute "system.wsl_case_sensitive" using os.setxattr() here: https://github.com/python/cpython/blob/da6ce58dd5ac109485af45878fca6bfd265b43e9/Lib/shutil.py#L322 Note that this only happens when both src and dst are on the mounted drive. If only one is on the drive and the other is e.g. in the home directory /home/username/, it will not raise an error. Quick way to test: cd /mnt/c/ && mkdir test1 && mkdir test2 && python -c "import shutil; shutil.copystat('test1', 'test2')" ---------- components: Library (Lib), Windows messages: 355655 nosy: paul.moore, pspeter, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: shutil.copystat fails with PermissionError in WSL type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 11:17:05 2019 From: report at bugs.python.org (serge-sans-paille) Date: Tue, 29 Oct 2019 15:17:05 +0000 Subject: [New-bugs-announce] [issue38634] Symbol resolution conflict when embeding python in an application using libedit Message-ID: <1572362225.21.0.644355885677.issue38634@roundup.psfhosted.org> New submission from serge-sans-paille : See https://bugs.llvm.org/show_bug.cgi?id=43830, but basically the follwing code: ``` // a.c #include int main() { Py_Initialize(); PyRun_SimpleString("import readline; print(readline.__doc__)"); return 0; } ``` compiled like this: ``` % gcc a.c `./install/bin/python3-config --cflags --ldflags --libs` -lpython3.9 ``` runs fine: ``` % ./a.out Importing this module enables command line editing using GNU readline. ``` However the following: ``` % gcc a.c `./install/bin/python3-config --cflags --ldflags --libs` -ledit -lpython3.9 ``` compiles but segfaults at runtime. ---------- messages: 355656 nosy: serge-sans-paille priority: normal severity: normal status: open title: Symbol resolution conflict when embeding python in an application using libedit type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 16:35:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Oct 2019 20:35:00 +0000 Subject: [New-bugs-announce] [issue38635] Simplify decoding the ZIP64 extra field and make it tolerant to extra data Message-ID: <1572381300.43.0.604148893279.issue38635@roundup.psfhosted.org> New submission from Serhiy Storchaka : The decoding code can be much shorter and efficient. Also, the Info-ZIP unzip utility is tolerant to extra bytes. We can be too. ---------- components: Library (Lib) messages: 355676 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Simplify decoding the ZIP64 extra field and make it tolerant to extra data type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 17:14:08 2019 From: report at bugs.python.org (Stephen Paul Chappell) Date: Tue, 29 Oct 2019 21:14:08 +0000 Subject: [New-bugs-announce] [issue38636] "Alt + T" and "Alt + U" Broken in IDLE on Windows Message-ID: <1572383648.52.0.228001978432.issue38636@roundup.psfhosted.org> New submission from Stephen Paul Chappell : In the latest Python 3.8.0 installation when running IDLE on Windows, pressing "Alt + T" generates the following error: Exception in Tkinter callback Traceback (most recent call last): File "C:\Program Files\Python38\Lib\tkinter\__init__.py", line 1883, in __call__ return self.func(*args) File "C:\Program Files\Python38\Lib\idlelib\multicall.py", line 176, in handler r = l[i](event) TypeError: toggle_tabs_event() missing 1 required positional argument: 'event' Similarly, pressing "Alt + U" will generate a very similar error: Exception in Tkinter callback Traceback (most recent call last): File "C:\Program Files\Python38\Lib\tkinter\__init__.py", line 1883, in __call__ return self.func(*args) File "C:\Program Files\Python38\Lib\idlelib\multicall.py", line 176, in handler r = l[i](event) TypeError: change_indentwidth_event() missing 1 required positional argument: 'event' ---------- assignee: terry.reedy components: IDLE, Windows messages: 355678 nosy: Zero, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal status: open title: "Alt + T" and "Alt + U" Broken in IDLE on Windows type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 29 22:05:46 2019 From: report at bugs.python.org (toywei) Date: Wed, 30 Oct 2019 02:05:46 +0000 Subject: [New-bugs-announce] [issue38637] fix GROWTH_RATE comments bug Message-ID: <1572401146.1.0.358314054297.issue38637@roundup.psfhosted.org> New submission from toywei : It also exists in 3.7/3.6/3.3. ---------- assignee: docs at python components: Documentation messages: 355688 nosy: docs at python, toywei priority: normal pull_requests: 16516 severity: normal status: open title: fix GROWTH_RATE comments bug type: resource usage versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 05:21:06 2019 From: report at bugs.python.org (Alexander Kurakin) Date: Wed, 30 Oct 2019 09:21:06 +0000 Subject: [New-bugs-announce] [issue38638] Backtrace of exit phase of context managers Message-ID: <1572427266.54.0.98752253476.issue38638@roundup.psfhosted.org> New submission from Alexander Kurakin : class CM: def __init__(self): pass def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): raise RuntimeError() if __name__ == '__main__': with CM() as cm: print('Hello') $ python3 cm.py Hello Traceback (most recent call last): File "cm.py", line 14, in print('Hello') # <-- File "cm.py", line 10, in __exit__ raise RuntimeError() RuntimeError Is it correct that print presents in backtrace? Well it's the last line but... Thanks. ---------- components: Interpreter Core messages: 355698 nosy: kuraga priority: normal severity: normal status: open title: Backtrace of exit phase of context managers type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 05:29:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 09:29:36 +0000 Subject: [New-bugs-announce] [issue38639] Optimize floor() and ceil() for floats Message-ID: <1572427776.81.0.21510885347.issue38639@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently math.floor(), math.ceil() and math.trunc() look up special methods __floor__, __ceil__ and __trunc__ correspondingly and execute them if found. Otherwise they execute common code for floats. There are no special slots for these methods, so looking up these names in type dicts takes some time. It is a waste of time for most common case -- float objects. The proposed PR adds checks PyFloat_CheckExact() before looking up the special method. Some microbenchmarks: $ ./python -m pyperf timeit -s "from math import floor" --duplicate 100 "floor(12345.6)" Before: Mean +- std dev: 63.2 ns +- 1.7 ns After: Mean +- std dev: 51.8 ns +- 1.3 ns $ ./python -m pyperf timeit -s "from math import ceil" --duplicate 100 "ceil(12345.6)" Before: Mean +- std dev: 61.1 ns +- 1.5 ns After: Mean +- std dev: 51.9 ns +- 1.1 ns $ ./python -m pyperf timeit -s "from math import trunc" --duplicate 100 "trunc(12345.6)" Before: Mean +- std dev: 72.0 ns +- 1.5 ns After: Mean +- std dev: 34.7 ns +- 1.4 ns We should also check how this optimization affects other types: $ ./python -m pyperf timeit -s "from math import floor" --duplicate 100 "floor(12345)" Before: Mean +- std dev: 56.3 ns +- 1.3 ns After: Mean +- std dev: 56.3 ns +- 1.4 ns $ ./python -m pyperf timeit -s "from math import ceil" --duplicate 100 "ceil(12345)" Before: Mean +- std dev: 55.7 ns +- 1.6 ns After: Mean +- std dev: 56.8 ns +- 1.6 ns $ ./python -m pyperf timeit -s "from math import trunc" --duplicate 100 "trunc(12345)" Before: Mean +- std dev: 54.7 ns +- 1.3 ns After: Mean +- std dev: 56.7 ns +- 1.5 ns ---------- components: Interpreter Core messages: 355699 nosy: mark.dickinson, serhiy.storchaka priority: normal severity: normal status: open title: Optimize floor() and ceil() for floats type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 05:48:06 2019 From: report at bugs.python.org (Hugo Dupras) Date: Wed, 30 Oct 2019 09:48:06 +0000 Subject: [New-bugs-announce] [issue38640] while False: break => SyntaxError: 'break' outside loop Message-ID: <1572428886.51.0.45563670991.issue38640@roundup.psfhosted.org> New submission from Hugo Dupras : In python 3.8 the following code raises an exception, which was not the case with previous python. ``` while False: ... break ``` It raises the following exception: SyntaxError: 'break' outside loop. This `while False` loop was used to temporary disable a while loop in our code base. Workaround to fix this: ``` enable=False while enable: ... break ``` (or use the walrus operator) ---------- components: Interpreter Core messages: 355700 nosy: jabesq priority: normal severity: normal status: open title: while False: break => SyntaxError: 'break' outside loop type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 09:19:43 2019 From: report at bugs.python.org (Vlad Emelianov) Date: Wed, 30 Oct 2019 13:19:43 +0000 Subject: [New-bugs-announce] [issue38641] lib2to3 does not support py38 return/yield syntax with starred expressions Message-ID: <1572441583.83.0.896942127015.issue38641@roundup.psfhosted.org> New submission from Vlad Emelianov : Lib2to3 does not support changes made in https://bugs.python.org/issue32117 ```python def test(): my_list = ["value2", "value3"] yield "value1", *my_list return "value1", *my_list ``` The idea is to use `testlist_star_expr` instead of `testlist`. This is a backwards compatible change, because testlist_star_expr supports test as well like testlist does. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 355713 nosy: Vlad Emelianov priority: normal pull_requests: 16521 severity: normal status: open title: lib2to3 does not support py38 return/yield syntax with starred expressions type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:06:00 2019 From: report at bugs.python.org (Marco Ippolito) Date: Wed, 30 Oct 2019 14:06:00 +0000 Subject: [New-bugs-announce] [issue38642] python3.7.3 seems to cause add-apt-repository to rejct or not find gi library Message-ID: <1572444360.24.0.26930433052.issue38642@roundup.psfhosted.org> New submission from Marco Ippolito : Following the indications found here: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository I was trying to install Docker Engine in Ubuntu 18.04.02 Server Edition. The first installation's steps went fine but I encountered this error message: (base) marco at pc:~$ sudo add-apt-repository \ > "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ > $(lsb_release -cs) \ > stable" Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 11, in from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler File "/usr/lib/python3/dist-packages/softwareproperties /SoftwareProperties.py", line 67, in from gi.repository import Gio File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in from . import _gi ImportError: cannot import name '_gi' from 'gi' (/usr/lib/python3/dist- packages/gi/__init__.py) But import gi in python3 works fine: (base) marco at pc:~$ python3 Python 3.7.3 (default, Mar 27 2019, 22:11:17) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import gi >>> After changing the first line of /usr/bin/add-apt-repository in order to point to 3.6 version : #!/usr/bin/python3.6 everything went fine: (base) marco at pc:~$ sudo add-apt-repository \ > "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ > $(lsb_release -cs) \ > stable" Hit:1 http://gb.archive.ubuntu.com/ubuntu bionic InRelease Get:2 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB] Get:3 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:4 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:5 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [9594 B] Get:6 http://gb.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [985 kB] Get:7 http://gb.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1017 kB] Hit:8 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease Hit:9 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease Get:10 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Fetched 2328 kB in 11s (217 kB/s) Reading package lists... Done (base) marco at pc:~$ sudo apt-get update Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Hit:2 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease Hit:3 http://gb.archive.ubuntu.com/ubuntu bionic InRelease Hit:4 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease Hit:5 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease Hit:6 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease Hit:7 https://download.docker.com/linux/ubuntu bionic InRelease Reading package lists... Done (base) marco at pc:~$ sudo apt-get install docker-ce docker-ce-cli containerd.io Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: aufs-tools cgroupfs-mount pigz The following NEW packages will be installed aufs-tools cgroupfs-mount containerd.io docker-ce docker-ce-cli pigz 0 to upgrade, 6 to newly install, 0 to remove and 0 not to upgrade. Need to get 85.6 MB of archives. After this operation, 384 MB of additional disk space will be used. Do you want to continue? [Y/n] Y So it seems that python3.7.3 has something which causes add-apt-repository to reject/not find gi library ---------- messages: 355714 nosy: Marco Ippolito priority: normal severity: normal status: open title: python3.7.3 seems to cause add-apt-repository to rejct or not find gi library type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:20:36 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 30 Oct 2019 14:20:36 +0000 Subject: [New-bugs-announce] [issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base Message-ID: <1572445236.44.0.527192204316.issue38643@roundup.psfhosted.org> New submission from Zackery Spytz : If a base other than 2, 8, or 16 is passed to PyNumber_ToBase(), an assertion failure will occur. An exception should be raised instead. This was mentioned in bpo-38249 (msg353039). ---------- components: Interpreter Core messages: 355715 nosy: ZackerySpytz priority: normal severity: normal status: open title: Assertion failures when calling PyNumber_ToBase() with an invalid base type: crash versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 10:31:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Oct 2019 14:31:24 +0000 Subject: [New-bugs-announce] [issue38644] Pass explicitly tstate to function calls Message-ID: <1572445884.39.0.966254854932.issue38644@roundup.psfhosted.org> New submission from STINNER Victor : Follow-up of bpo-36710 for function calls. ---------- components: Interpreter Core messages: 355716 nosy: vstinner priority: normal severity: normal status: open title: Pass explicitly tstate to function calls versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 11:07:25 2019 From: report at bugs.python.org (Michael Zhang) Date: Wed, 30 Oct 2019 15:07:25 +0000 Subject: [New-bugs-announce] [issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error Message-ID: <1572448045.56.0.183251608823.issue38645@roundup.psfhosted.org> New submission from Michael Zhang : Discovered this while trying to use a function in `boto3`. Seems like when tzlocal() is passed with a 0 to datetime.datetime.fromtimestamp(), it throws an "[Errno 22] Invalid argument" error. Using 3.7.4 via Anaconda on Windows 10, and tzlocal().tznames's local timezone for me is EST/EDT. Can replicate through this: ``` import datetime from dateutil.tz import tzlocal print(datetime.datetime.fromtimestamp(0, tzlocal())) ``` ---------- messages: 355720 nosy: mzhang13 priority: normal severity: normal status: open title: datetime.datetime.fromtimestamp(0, tzlocal()) throws error type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 13:29:23 2019 From: report at bugs.python.org (Tom Lane) Date: Wed, 30 Oct 2019 17:29:23 +0000 Subject: [New-bugs-announce] [issue38646] Invalid check on the result of pthread_self() leads to libpython startup failure Message-ID: <1572456563.05.0.622338652634.issue38646@roundup.psfhosted.org> New submission from Tom Lane : Assorted code in the Python core supposes that the result of pthread_self() cannot be equal to PYTHREAD_INVALID_THREAD_ID, ie (void *) -1. If it is, you get a crash at interpreter startup. Unfortunately, this supposition is directly contrary to the POSIX specification for pthread_self(), which defines no failure return value; and it is violated by NetBSD's implementation in some circumstances. In particular, we (the Postgres project) are observing that libpython.so fails when dynamically loaded into a host executable that does not itself link libpthread. NetBSD's code always returns -1 if libpthread was not present at main program start, as they do not support forking new threads in that case. They assert (and I can't disagree) that their implementation conforms to POSIX. A lazy man's solution might be to change PYTHREAD_INVALID_THREAD_ID to some other value like -3, but that's not fixing the core problem that you're violating POSIX by testing for any specific value at all. Details and background info can be found in this email thread: https://www.postgresql.org/message-id/flat/25662.1560896200%40sss.pgh.pa.us ---------- components: Interpreter Core messages: 355723 nosy: tgl priority: normal severity: normal status: open title: Invalid check on the result of pthread_self() leads to libpython startup failure type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 13:32:47 2019 From: report at bugs.python.org (Yoshihiro Nagano) Date: Wed, 30 Oct 2019 17:32:47 +0000 Subject: [New-bugs-announce] [issue38647] Why only the MacOSXOSAScript in webbrowser does not have the name property? Message-ID: <1572456767.92.0.8897291562.issue38647@roundup.psfhosted.org> New submission from Yoshihiro Nagano : Hello. I am using the webbrowser library in macOS and just found that only the MacOSXOSAScript object has `_name` property instead of `name.` All of the other class, which is inherited from the BaseBrowser, has `name` property. Are there any specific reasons for this API? Or, are there any ways to access the name of the browser object independent from the browser type? The corresponding implementation is shown below: https://github.com/python/cpython/blob/4cb08b6c0ae6989d169dd48c2b24087941f6d0b0/Lib/webbrowser.py#L641-L643 Thank you. ---------- components: Library (Lib), macOS messages: 355725 nosy: Yoshihiro Nagano, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Why only the MacOSXOSAScript in webbrowser does not have the name property? type: behavior versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 14:27:32 2019 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 30 Oct 2019 18:27:32 +0000 Subject: [New-bugs-announce] [issue38648] Py_tp_free is specified twice in Python-ast.c Message-ID: <1572460052.6.0.456691292805.issue38648@roundup.psfhosted.org> New submission from Maxwell Bernstein : This looks like a typo due to copy-paste. ---------- messages: 355726 nosy: tekknolagi priority: normal severity: normal status: open title: Py_tp_free is specified twice in Python-ast.c versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 15:37:05 2019 From: report at bugs.python.org (David Lambert) Date: Wed, 30 Oct 2019 19:37:05 +0000 Subject: [New-bugs-announce] [issue38649] tkinter messagebox is sloppy Message-ID: <1572464225.7.0.112082789313.issue38649@roundup.psfhosted.org> New submission from David Lambert : Does aksokcancel return "true" or True ? The docstring should say True This is pervasive throughout the module. tkinter has such a mishmash of numbers supplied as strings, strings supplied as constants making this carelessness egregious. On the topic of constants, the messagebox module redefines OK. You might argue that the definition didn't change. I suspect this issue applies to all versions of tkinter or Tkinter having the messagebox. # types ABORTRETRYIGNORE = "abortretryignore" OK = "ok" ... # replies ... OK = "ok" def askokcancel(title=None, message=None, **options): "Ask if operation should proceed; return true if the answer is ok" s = _show(title, message, QUESTION, OKCANCEL, **options) return s == OK ---------- assignee: docs at python components: Documentation messages: 355729 nosy: David Lambert, docs at python priority: normal severity: normal status: open title: tkinter messagebox is sloppy type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 16:01:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Oct 2019 20:01:43 +0000 Subject: [New-bugs-announce] [issue38650] Add constantness to PyStructSequence_UnnamedField Message-ID: <1572465703.12.0.701099038847.issue38650@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently the variable PyStructSequence_UnnamedField has type "char *". It is used as a special value for setting to the name field of PyStructSequence_Field. But the type of the name field is "const char *". I propose to change the declaration of PyStructSequence_UnnamedField to "const char * const". Makes it referring to immutable character string and make it itself immutable. It is binary compatible change, but some user code can complain at compilation time if it uses PyStructSequence_UnnamedField in unusual way (assigns to the "char *" variable, etc). It is very unlikely. ---------- components: Interpreter Core messages: 355731 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Add constantness to PyStructSequence_UnnamedField versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 30 16:39:55 2019 From: report at bugs.python.org (Daniel Johnson) Date: Wed, 30 Oct 2019 20:39:55 +0000 Subject: [New-bugs-announce] [issue38651] Add WolfSSL support Message-ID: <1572467995.9.0.965883938595.issue38651@roundup.psfhosted.org> New submission from Daniel Johnson : WolfSSL is an SSL library targeted at embedded development that focuses on size and speed. It's also FIPS certified which is is important for anyone working with federal agencies. WolfSSL website: https://www.wolfssl.com/ WolfSSL github: https://github.com/wolfSSL/wolfssl I have two ideas currently on how Python could support WolfSSL: 1.) Shim WolfSSL's OpenSSL compatibility layer in. They don't provide a complete shim for OpenSSL and I'm not sure if they provide all the symbols Python would care about. 2.) Provide an optional configuration to use WolfSSL and it's API instead of OpenSSL. Would either options be something the Python maintainers would be interested in? I'm testing the waters to see if this is something anyone is interested in. Thank you for the time! ---------- assignee: christian.heimes components: SSL messages: 355733 nosy: Daniel Johnson, christian.heimes priority: normal severity: normal status: open title: Add WolfSSL support versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 02:14:41 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 31 Oct 2019 06:14:41 +0000 Subject: [New-bugs-announce] [issue38652] Remove/update provisional note for asyncio.BufferedProtocol Message-ID: <1572502481.2.0.695475270667.issue38652@roundup.psfhosted.org> New submission from Kyle Stanley : In the documentation (https://docs.python.org/3.9/library/asyncio-protocol.html#buffered-streaming-protocols) for asyncio.BufferedProtocol there is a provisional API note. This should be updated/removed for 3.8 and 3.9 since it became a part of the stable API in 3.8. Current: > New in version 3.7: Important: this has been added to asyncio in Python 3.7 on a provisional basis! This is as an experimental API that might be changed or removed completely in Python 3.8. I would propose to changing it to: > New in version 3.7. ---------- assignee: docs at python components: Documentation messages: 355739 nosy: aeros, asvetlov, docs at python, yselivanov priority: normal severity: normal status: open title: Remove/update provisional note for asyncio.BufferedProtocol versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 07:28:28 2019 From: report at bugs.python.org (Hartmut Goebel) Date: Thu, 31 Oct 2019 11:28:28 +0000 Subject: [New-bugs-announce] [issue38653] pkgutil.extend_path fails with zipped eggs if not at first place Message-ID: <1572521308.12.0.490608170281.issue38653@roundup.psfhosted.org> New submission from Hartmut Goebel : I have a test site containing nested namespace packages in zipped and unzipped eggs_ - nspkg3_aaa.egg - unzipped egg, namespaces: nspkg3 - nspkg3_bbb.egg - zipped egg , namespaces: nspkg3, nspkg3.bbb - nspkg3_ccc.egg - unzipped egg, namespaces: nspkg3 When using order "aaa, bbb, ccc" in PYTHONPATH, importing "nspkg3.bbb" FAILS, whereas when using order "bbb, aaa, ccc" in PYTHONPATH, importing "nspkg3.bbb" PASSES, I would expect "nspk3.bbb" to ba importable 8as a namespace package) no matter which possition it has in PYTHONPATH. How to reproduce Preperation: get hands on the eggs in question: $ wget https://github.com/pyinstaller/pyinstaller/archive/v3.5.zip $ unzip v3.5.zip $ cd pyinstaller-3.5/tests/functional/modules/nspkg3-pkg/ Order "aaa, bbb, ccc": fails $ PYTHONPATH=nspkg3_aaa.egg:nspkg3_bbb.egg:nspkg3_ccc.egg python3.7 -c "import nspkg3.bbb.zzz" Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'nspkg3.bbb' Order "bbb, aaa, ccc": passes: $ PYTHONPATH=nspkg3_bbb.egg:nspkg3_aaa.egg:nspkg3_ccc.egg python3.7 -c "import nspkg3.bbb.zzz" this is module nspkg3.bbb.zzz Further information I did some research and found that the zipped egg (bbb) is *not added* to the package path when using order "aaa, bbb, ccc": Order "aaa, bbb, ccc": bbb is missing here $ PYTHONPATH=nspkg3_aaa.egg:nspkg3_bbb.egg:nspkg3_ccc.egg \ python3.7 -c "import nspkg3 ; print(nspkg3.__path__)" ['?/nspkg3_aaa.egg/nspkg3', '?/nspkg3_ccc.egg/nspkg3'] Order "bbb, aaa, ccc": bbb is included $ PYTHONPATH=nspkg3_bbb.egg:nspkg3_aaa.egg:nspkg3_ccc.egg \ python3.7 -c "import nspkg3 ; print(nspkg3.__path__)" ['?/nspkg3_bbb.egg/nspkg3', '?/nspkg3_aaa.egg/nspkg3', '?/nspkg3_ccc.egg/nspkg3'] Also tested with Python 2.7: Same results ---------- components: Library (Lib) messages: 355745 nosy: htgoebel priority: normal severity: normal status: open title: pkgutil.extend_path fails with zipped eggs if not at first place type: behavior versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 09:17:53 2019 From: report at bugs.python.org (Efanzh) Date: Thu, 31 Oct 2019 13:17:53 +0000 Subject: [New-bugs-announce] [issue38654] `urllib.request.Request` uses mutable value as default value Message-ID: <1572527873.7.0.615539123104.issue38654@roundup.psfhosted.org> New submission from Efanzh : The `headers` argument of the `__init__` method of `urllib.request.Request` class uses `{}` as default value, which is mutable. It is not a good idea. ---------- components: Library (Lib) messages: 355750 nosy: EFanZh priority: normal pull_requests: 16537 severity: normal status: open title: `urllib.request.Request` uses mutable value as default value type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 10:04:51 2019 From: report at bugs.python.org (pascalhofmann) Date: Thu, 31 Oct 2019 14:04:51 +0000 Subject: [New-bugs-announce] [issue38655] ipaddress.ip_network('0.0.0.0/0').is_private == True Message-ID: <1572530691.84.0.462430681921.issue38655@roundup.psfhosted.org> New submission from pascalhofmann : ipaddress.ip_network('0.0.0.0/0').is_private returns True, even though 0.0.0.0/0 clearly is no private network. ---------- components: Library (Lib) messages: 355753 nosy: pascalhofmann priority: normal severity: normal status: open title: ipaddress.ip_network('0.0.0.0/0').is_private == True type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 15:05:11 2019 From: report at bugs.python.org (toonn) Date: Thu, 31 Oct 2019 19:05:11 +0000 Subject: [New-bugs-announce] [issue38656] mimetypes for python 3.7.5 fails to detect matroska video Message-ID: <1572548711.23.0.824957089431.issue38656@roundup.psfhosted.org> New submission from toonn : A user reported an error to us which seems to derive from the ``mimetypes`` library failing to guess the mime type for ``.mkv`` matroska video files: https://github.com/ranger/ranger/issues/1744#issuecomment-548514373 This is a regression because the same query successfully identifies the filename as being of the ``video/x-mastroska`` mime type. ---------- components: Library (Lib) messages: 355763 nosy: toonn priority: normal severity: normal status: open title: mimetypes for python 3.7.5 fails to detect matroska video type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 16:36:00 2019 From: report at bugs.python.org (Pete Wicken) Date: Thu, 31 Oct 2019 20:36:00 +0000 Subject: [New-bugs-announce] [issue38657] String format for hexadecimal notation breaks padding with alternative form Message-ID: <1572554160.44.0.882070489525.issue38657@roundup.psfhosted.org> New submission from Pete Wicken : When formatting an integer as a hexadecimal value, the '#' alternate form modifier inserts a preceding '0x'. If this is used in combination with padding modifiers, the '0x' is counted as part of the overall width, which does not feel like the natural behaviour as extra calculation is required to get the correct post '0x' precision. Example: In [7]: f'{num:04x}' Out[7]: '0800' In [8]: f'{num:#04x}' Out[8]: '0x800' To get the hexadecimal representation padded to 4 digits, you have to account for the preceding 0x: In [10]: f'{num:#06x}' Out[10]: '0x0800' ---------- messages: 355767 nosy: Wicken priority: normal severity: normal status: open title: String format for hexadecimal notation breaks padding with alternative form type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 17:38:53 2019 From: report at bugs.python.org (ThePokestarFan) Date: Thu, 31 Oct 2019 21:38:53 +0000 Subject: [New-bugs-announce] [issue38658] Python Program crashes when running in fore and back ground Message-ID: <1572557933.17.0.948616559199.issue38658@roundup.psfhosted.org> New submission from ThePokestarFan : I have a Python process that should not die that is multiprocessed. I have a queue process that feeds the queue every so often, but my program should use up queue items faster than the queue adds them. I have four worker threads that make requests to an API and update an SQL table with the results. However, if I use nohup and run it, it crashes. Even if I directly run it, it crashes. It used to run forever when I loaded it in PyCharm, but even that crashes it. ---------- components: macOS files: crash.txt messages: 355769 nosy: ThePokestarFan, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Python Program crashes when running in fore and back ground type: crash versions: Python 3.8 Added file: https://bugs.python.org/file48688/crash.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 31 21:12:48 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 01 Nov 2019 01:12:48 +0000 Subject: [New-bugs-announce] [issue38659] enum classes cause slow startup time Message-ID: <1572570768.69.0.355804772721.issue38659@roundup.psfhosted.org> New submission from Gregory P. Smith : Creating an enum subclass (ie: defining an enum) is slow. This dramatically impacts startup time of Python programs that import a bunch of potentially needed constant definitions at startup before any proper code executes. How slow? So slow that a module defining a ~300 enums takes nearly 100ms just to import from its pyc file. Example code: https://github.com/googleads/google-ads-python/blob/96fd08bb62435f1930df4871033ba8689333b67f/google/ads/google_ads/v2/services/enums.py We've known this, we should do something about it. (Even if it means implementing the guts of the magic enum machinery in C.) ie, it came up in https://bugs.python.org/issue28637 as a stdlib startup time regression and is likely to come up in similar contexts elsewhere. ---------- components: Library (Lib) messages: 355777 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: enum classes cause slow startup time type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________