From report at bugs.python.org Mon Jul 1 00:03:40 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 04:03:40 +0000 Subject: [issue37452] Microsoft store package has an invalid ExecutablePath registry entry In-Reply-To: <1561907089.3.0.284531317846.issue37452@roundup.psfhosted.org> Message-ID: <1561953820.12.0.993530275436.issue37452@roundup.psfhosted.org> Steve Dower added the comment: Unfortunately, we don't control that path - it comes from a parameter substitution. I'll have to see whether there's another parameter we can use. All of this stuff is in undocumented territory, unfortunately... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 01:48:31 2019 From: report at bugs.python.org (Yoong Hor Meng) Date: Mon, 01 Jul 2019 05:48:31 +0000 Subject: [issue37460] importlib.import_module("test.test_curses") could not import by libregrtest In-Reply-To: <1561950950.76.0.931039385859.issue37460@roundup.psfhosted.org> Message-ID: <1561960111.09.0.368574746813.issue37460@roundup.psfhosted.org> Yoong Hor Meng added the comment: I installed libncurses5-dev and ran configure again: ./configure \ --with-openssl=/usr --enable-optimizations It could be build without skipping test_curses. It seems that regrtest.py looks for libncurses5-dev during configure state. ... Run tests sequentially 0:00:00 load avg: 0.52 [ 1/423] test_grammar 0:00:00 load avg: 0.52 [ 2/423] test_opcodes 0:00:00 load avg: 0.52 [ 3/423] test_dict 0:00:02 load avg: 0.52 [ 4/423] test_builtin 0:00:05 load avg: 0.52 [ 5/423] test_exceptions 0:00:26 load avg: 0.52 [ 6/423] test_types 0:00:27 load avg: 0.52 [ 7/423] test_unittest 0:00:57 load avg: 0.52 [ 8/423] test_doctest -- test_unittest passed in 30 sec 585 ms 0:01:17 load avg: 0.52 [ 9/423] test_doctest2 0:01:17 load avg: 0.52 [ 10/423] test_support 0:02:22 load avg: 0.52 [ 11/423] test___all__ -- test_support passed in 1 min 4 sec 0:02:33 load avg: 0.52 [ 12/423] test___future__ 0:02:33 load avg: 0.52 [ 13/423] test__locale 0:02:34 load avg: 0.52 [ 14/423] test__opcode 0:02:34 load avg: 0.52 [ 15/423] test__osx_support 0:02:35 load avg: 0.52 [ 16/423] test__xxsubinterpreters 0:02:46 load avg: 0.52 [ 17/423] test_abc 0:02:47 load avg: 0.52 [ 18/423] test_abstract_numbers 0:02:48 load avg: 0.52 [ 19/423] test_aifc 0:02:50 load avg: 0.52 [ 20/423] test_argparse 0:03:01 load avg: 0.52 [ 21/423] test_array 0:03:09 load avg: 0.52 [ 22/423] test_asdl_parser 0:03:10 load avg: 0.52 [ 23/423] test_ast 0:03:20 load avg: 0.52 [ 24/423] test_asyncgen 0:03:22 load avg: 0.52 [ 25/423] test_asynchat 0:03:25 load avg: 0.52 [ 26/423] test_asyncio Future exception was never retrieved future: BrokenPipeError Future exception was never retrieved future: BrokenPipeError Future exception was never retrieved future: BrokenPipeError Future exception was never retrieved future: BrokenPipeError test test_asyncio failed 0:07:47 load avg: 0.52 [ 27/423] test_asyncore -- test_asyncio failed in 4 min 22 sec 0:07:47 load avg: 0.52 [ 28/423] test_atexit -- test_asyncore skipped 0:07:50 load avg: 0.52 [ 29/423] test_audioop 0:07:50 load avg: 0.52 [ 30/423] test_audit 0:08:06 load avg: 0.52 [ 31/423] test_augassign 0:08:07 load avg: 0.52 [ 32/423] test_base64 0:08:12 load avg: 0.52 [ 33/423] test_baseexception 0:08:13 load avg: 0.52 [ 34/423] test_bdb 0:08:14 load avg: 0.52 [ 35/423] test_bigaddrspace 0:08:15 load avg: 0.52 [ 36/423] test_bigmem 0:08:16 load avg: 0.52 [ 37/423] test_binascii 0:08:17 load avg: 0.52 [ 38/423] test_binhex 0:08:17 load avg: 0.52 [ 39/423] test_binop 0:08:18 load avg: 0.52 [ 40/423] test_bisect 0:08:19 load avg: 0.52 [ 41/423] test_bool 0:08:20 load avg: 0.52 [ 42/423] test_buffer 0:08:57 load avg: 0.52 [ 43/423] test_bufio -- test_buffer passed in 37 sec 284 ms 0:09:15 load avg: 0.52 [ 44/423] test_bytes 0:09:24 load avg: 0.52 [ 45/423] test_bz2 ... I ran all this in wsl. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 01:50:21 2019 From: report at bugs.python.org (Yoong Hor Meng) Date: Mon, 01 Jul 2019 05:50:21 +0000 Subject: [issue37460] importlib.import_module("test.test_curses") could not import by libregrtest In-Reply-To: <1561950950.76.0.931039385859.issue37460@roundup.psfhosted.org> Message-ID: <1561960221.91.0.0186181418714.issue37460@roundup.psfhosted.org> Yoong Hor Meng added the comment: I just find it strange that libncursesw5-dev is used during compilation but libncurses5-dev is used for testing. ---------- stage: -> resolved status: open -> closed type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 01:59:30 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 01 Jul 2019 05:59:30 +0000 Subject: [issue37457] python3.7 re.split() module bug In-Reply-To: <1561943352.7.0.22084826449.issue37457@roundup.psfhosted.org> Message-ID: <1561960770.72.0.828022667944.issue37457@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:04:25 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 06:04:25 +0000 Subject: [issue36168] DOC: Fix capitalization in string.rst In-Reply-To: <1551529262.87.0.31703753151.issue36168@roundup.psfhosted.org> Message-ID: <1561961065.34.0.868692494269.issue36168@roundup.psfhosted.org> miss-islington added the comment: New changeset 12b436e3b079fb3e3a7197c089df90a77e3bdd77 by Miss Islington (bot) (Krishna Oza) in branch 'master': bpo-36168: Lowercase the word "subsequent" in get_value doc (GH-14485) https://github.com/python/cpython/commit/12b436e3b079fb3e3a7197c089df90a77e3bdd77 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:29:21 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 06:29:21 +0000 Subject: [issue37428] SSLContext.post_handshake_auth implicitly enables cert validation In-Reply-To: <1561631609.42.0.922673247425.issue37428@roundup.psfhosted.org> Message-ID: <1561962561.36.0.94994551059.issue37428@roundup.psfhosted.org> miss-islington added the comment: New changeset f0f5930ac88482ef896283db5be9b8d508d077db by Miss Islington (bot) (Christian Heimes) in branch 'master': bpo-37428: Don't set PHA verify flag on client side (GH-14421) https://github.com/python/cpython/commit/f0f5930ac88482ef896283db5be9b8d508d077db ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:29:31 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 06:29:31 +0000 Subject: [issue37428] SSLContext.post_handshake_auth implicitly enables cert validation In-Reply-To: <1561631609.42.0.922673247425.issue37428@roundup.psfhosted.org> Message-ID: <1561962571.52.0.783368153224.issue37428@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14309 pull_request: https://github.com/python/cpython/pull/14493 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:30:30 2019 From: report at bugs.python.org (aeros167) Date: Mon, 01 Jul 2019 06:30:30 +0000 Subject: [issue37462] Default starting directory for os.walk() Message-ID: <1561962630.68.0.390698602335.issue37462@roundup.psfhosted.org> New submission from aeros167 : As a quality of life enhancement, it would beneficial to set a default starting directory for os.walk() to use when one is not specified. I would suggest for this to be the system's current working directory. The implementation would be rather straightforward, and should not cause any compatibility issues. In the function definition for walk in os.py, it would simply need to be changed from "def walk(top, topdown=True, onerror=None, followlinks=False)" to "def walk(top=".", topdown=True, onerror=None, followlinks=False)". As a separate topic but relevant to os.walk(), the current name of the positional argument which specifies the starting directory is currently called "top". However, a more descriptive word for the argument would probably be "root", "dir", "directory", or "start". The term "top" is quite generic and is not used to describe a filesystem position. Personally, I'm the most in favor of "root" as it describes the highest parent node of a tree, and provides an accurate description of its purpose. However, I will hold off on adding a PR for this change until some feedback is added, as it is not essential to the initial issue. Changing the name of argument could cause potential compatibility issues if the name is specified when using os.walk(), such as in "os.walk(top="dirpath")". However, doing so would be significantly unconventional. In the majority of common use cases, os.walk() only uses the first argument, so there is no need to specify the keyword. Even when more than one is used, usually the first argument is specified by position rather than keyword. ---------- components: Library (Lib) messages: 346961 nosy: aeros167 priority: normal severity: normal status: open title: Default starting directory for os.walk() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:31:15 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2019 06:31:15 +0000 Subject: [issue37428] SSLContext.post_handshake_auth implicitly enables cert validation In-Reply-To: <1561631609.42.0.922673247425.issue37428@roundup.psfhosted.org> Message-ID: <1561962675.61.0.299032721065.issue37428@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +14310 pull_request: https://github.com/python/cpython/pull/14494 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:32:28 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 06:32:28 +0000 Subject: [issue37440] httplib should enable post-handshake authentication for TLS 1.3 In-Reply-To: <1561732145.9.0.0353203933987.issue37440@roundup.psfhosted.org> Message-ID: <1561962748.1.0.367469671059.issue37440@roundup.psfhosted.org> miss-islington added the comment: New changeset d1bd6e79da1ee56dc1b902d804216ffd267399db by Miss Islington (bot) (Christian Heimes) in branch 'master': bpo-37440: Enable TLS 1.3 post-handshake auth in http.client (GH-14448) https://github.com/python/cpython/commit/d1bd6e79da1ee56dc1b902d804216ffd267399db ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:32:35 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 06:32:35 +0000 Subject: [issue37440] httplib should enable post-handshake authentication for TLS 1.3 In-Reply-To: <1561732145.9.0.0353203933987.issue37440@roundup.psfhosted.org> Message-ID: <1561962755.81.0.106595796765.issue37440@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14311 pull_request: https://github.com/python/cpython/pull/14495 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:32:41 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 06:32:41 +0000 Subject: [issue37440] httplib should enable post-handshake authentication for TLS 1.3 In-Reply-To: <1561732145.9.0.0353203933987.issue37440@roundup.psfhosted.org> Message-ID: <1561962761.9.0.91460703665.issue37440@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14313 pull_request: https://github.com/python/cpython/pull/14496 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:32:41 2019 From: report at bugs.python.org (aeros167) Date: Mon, 01 Jul 2019 06:32:41 +0000 Subject: [issue37462] Default starting directory for os.walk() In-Reply-To: <1561962630.68.0.390698602335.issue37462@roundup.psfhosted.org> Message-ID: <1561962761.79.0.258908912777.issue37462@roundup.psfhosted.org> Change by aeros167 : ---------- keywords: +patch pull_requests: +14312 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14497 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:38:16 2019 From: report at bugs.python.org (aeros167) Date: Mon, 01 Jul 2019 06:38:16 +0000 Subject: [issue37462] Default starting directory for os.walk() In-Reply-To: <1561962630.68.0.390698602335.issue37462@roundup.psfhosted.org> Message-ID: <1561963096.16.0.149699739049.issue37462@roundup.psfhosted.org> aeros167 added the comment: Created a new PR which sets the default value of top to the current working directory. (https://github.com/python/cpython/pull/14497) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:44:28 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 06:44:28 +0000 Subject: [issue32934] logging.handlers.BufferingHandler capacity is unclearly specified In-Reply-To: <1519467889.68.0.467229070634.issue32934@psf.upfronthosting.co.za> Message-ID: <1561963468.96.0.704225078394.issue32934@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +14314 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14498 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:47:04 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2019 06:47:04 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname Message-ID: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> New submission from Christian Heimes : inet_aton accepts trailing characterrs after a valid IP ( https://bugzilla.redhat.com/show_bug.cgi?id=1347549). This, in combination with its use inside ssl.match_hostname, allows the following code to work when it should fail: import ssl cert = {'subjectAltName': (('IP Address', '1.1.1.1'),)} ssl.match_hostname(cert, '1.1.1.1 ; this should not work but does') The bug was initially found by Dominik Czarnota and reported by Paul Kehrer. The issue was introduced in commit aef1283ba428e33397d87cee3c54a5110861552d / bpo-32819. Only 3.7 and newer are affected. It's a potential security bug although low severity. For one Python 3.7 and newer no longer use ssl.match_hostname() to verify hostnames and IP addresses of a certificate. Matching is performed by OpenSSL. ---------- assignee: christian.heimes components: SSL keywords: 3.7regression messages: 346964 nosy: alex, christian.heimes, dstufft, janssen, lukasz.langa, ned.deily priority: release blocker severity: normal stage: needs patch status: open title: socket.inet_aton IP parsing issue in ssl.match_hostname type: security versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:50:48 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2019 06:50:48 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1561963848.96.0.663042086296.issue37463@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +14315 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14499 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 02:51:43 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 06:51:43 +0000 Subject: [issue37428] SSLContext.post_handshake_auth implicitly enables cert validation In-Reply-To: <1561631609.42.0.922673247425.issue37428@roundup.psfhosted.org> Message-ID: <1561963903.23.0.185009511884.issue37428@roundup.psfhosted.org> miss-islington added the comment: New changeset cf7617460a920dd75ced017792045d3ae77648ad by Miss Islington (bot) in branch '3.7': [3.7] bpo-37428: Don't set PHA verify flag on client side (GH-14421) (GH-14493) https://github.com/python/cpython/commit/cf7617460a920dd75ced017792045d3ae77648ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 03:00:32 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Jul 2019 07:00:32 +0000 Subject: [issue37454] Clarify docs for math.log1p() In-Reply-To: <1561933178.32.0.315765765879.issue37454@roundup.psfhosted.org> Message-ID: <1561964432.03.0.849235126567.issue37454@roundup.psfhosted.org> Mark Dickinson added the comment: > however, for x < 0.0 it is always worse That's quite surprising. Which platform? And can you give some example inputs and outputs? With a good math library, I'd expect `log1p(x)` to almost always be at least as accurate as `log(1 + x)`, and substantially _more_ accurate for small x (say abs(x) < 1e-5). If that's not happening, we may want to substitute our own implementation for the system implementation on some platforms (in the same was as we did for lgamma, erf, and friends). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 03:07:49 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 07:07:49 +0000 Subject: [issue37440] httplib should enable post-handshake authentication for TLS 1.3 In-Reply-To: <1561732145.9.0.0353203933987.issue37440@roundup.psfhosted.org> Message-ID: <1561964869.71.0.828031128392.issue37440@roundup.psfhosted.org> miss-islington added the comment: New changeset ee72dda9616258b57c19eb5af00f3e80a3fb8e22 by Miss Islington (bot) in branch '3.8': [3.8] bpo-37440: Enable TLS 1.3 post-handshake auth in http.client (GH-14448) (GH-14495) https://github.com/python/cpython/commit/ee72dda9616258b57c19eb5af00f3e80a3fb8e22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 03:07:55 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 07:07:55 +0000 Subject: [issue37440] httplib should enable post-handshake authentication for TLS 1.3 In-Reply-To: <1561732145.9.0.0353203933987.issue37440@roundup.psfhosted.org> Message-ID: <1561964875.64.0.502037192085.issue37440@roundup.psfhosted.org> miss-islington added the comment: New changeset 6be91102f75aa4b4b8c1e55960aa22008ff9e319 by Miss Islington (bot) in branch '3.7': [3.7] bpo-37440: Enable TLS 1.3 post-handshake auth in http.client (GH-14448) (GH-14496) https://github.com/python/cpython/commit/6be91102f75aa4b4b8c1e55960aa22008ff9e319 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 03:18:55 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Jul 2019 07:18:55 +0000 Subject: [issue37454] Clarify docs for math.log1p() In-Reply-To: <1561933178.32.0.315765765879.issue37454@roundup.psfhosted.org> Message-ID: <1561965535.33.0.4802873053.issue37454@roundup.psfhosted.org> Mark Dickinson added the comment: Ah, now I've looked at the script. There's an issue with using `random.random()` to create "small" values for testing, since its result is always an integer multiple of 2**-53. That means in particular that if x = random.random(), then 1 - x is always *exactly* representable (and 1 + x is also exactly representable approximately half of the time), so there's no loss of accuracy in the intermediate step of computing log(1 + x) if x = -random.random(). Here's what I get if I run your script exactly as it stands (Python 3.7.3, macOS 10.14.5) mirzakhani:Desktop mdickinson$ python test.py Counter({'equal': 51839, 'offset_log': 41988, 'regular_log': 6173}) Counter({'equal': 93727, 'regular_log': 6273}) But if I replace each `random.random()` call with `1e-3 * random.random()`, in order to test small values of `x`, here's what I get: mirzakhani:Desktop mdickinson$ python test.py Counter({'offset_log': 99945, 'equal': 55}) Counter({'offset_log': 99893, 'equal': 107}) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 03:19:57 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Jul 2019 07:19:57 +0000 Subject: [issue37462] Default starting directory for os.walk() In-Reply-To: <1561962630.68.0.390698602335.issue37462@roundup.psfhosted.org> Message-ID: <1561965597.05.0.923624447812.issue37462@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is not obvious that the majority of os.walk() calls are with the current working directory. And if you need to walk from the current working directory, it is not hard to pass "." explicitly. Even if your program contains a lot of os.walk(".") you could not use this feature until drop support of Python 3.8. So I think the value of this feature is tiny. It is not worth the effort for implementing, documenting, reviewing and maintaining it. On other hand, it increases the burden for learning Python. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 03:25:53 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Jul 2019 07:25:53 +0000 Subject: [issue37428] SSLContext.post_handshake_auth implicitly enables cert validation In-Reply-To: <1561631609.42.0.922673247425.issue37428@roundup.psfhosted.org> Message-ID: <1561965953.48.0.057490910947.issue37428@roundup.psfhosted.org> Christian Heimes added the comment: New changeset f22c4cf11d10f52faa86e0b308dd28f11819efd8 by Christian Heimes in branch '3.8': [3.8] bpo-37428: Don't set PHA verify flag on client side (GH-14494) https://github.com/python/cpython/commit/f22c4cf11d10f52faa86e0b308dd28f11819efd8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:19:39 2019 From: report at bugs.python.org (Chandan Kumar) Date: Mon, 01 Jul 2019 08:19:39 +0000 Subject: [issue37464] multiple comparison Message-ID: <1561969179.72.0.936663483495.issue37464@roundup.psfhosted.org> New submission from Chandan Kumar : a=1.0 b=0.0 c=0.0 if (a> d and b): print('hi') else: print("bye") its going to else part a=1.0 b=0.1 c=0.2 then its going to if part a==1.0 b=0 c=0.1 then again its going to else part ---------- assignee: docs at python components: Documentation messages: 346972 nosy: Chandan, docs at python priority: normal severity: normal status: open title: multiple comparison type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:19:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 08:19:56 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1561969196.96.0.893239047965.issue37380@roundup.psfhosted.org> STINNER Victor added the comment: > To me, it doesn't seem dangerous to backport that, but I would love to hear what Eryk and others think :) In my experience, any change is dangerous :-) The initial bug doesn't contain any reproducer. I'm talking about: > If one of the processes in that list is gone, then (...) "The handle is invalid" (...) will prevent you from creating any new processes with Popen after that It's the first time that I see such bug report. It seems like subprocess works for most people :-) Can you elobrate how to reproduce this issue to justify a backport? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:20:20 2019 From: report at bugs.python.org (Enrico Zini) Date: Mon, 01 Jul 2019 08:20:20 +0000 Subject: [issue37465] Incorrect documentation for `s#` arguments in C API argument parsing Message-ID: <1561969220.64.0.698927964651.issue37465@roundup.psfhosted.org> New submission from Enrico Zini : In https://docs.python.org/3.9/c-api/arg.html, in the documentation for parsing argument, there is: s# (str, read-only bytes-like object) [const char *, int or Py_ssize_t] In my amd64 system, `Py_ssize_t` is a different type than `int`, and passing a `Py_ssize_t` causes undefine behaviour. I assume this has been switched to an `int` in the API, and that thisinstance of the documentation has not been updated accordingly. At the bottom of the page in the documentation of `Py_BuildValue`, `s#` is correctly documented as using an `int` and no `Py_ssize_t`, for example. ---------- assignee: docs at python components: Documentation messages: 346974 nosy: docs at python, enrico priority: normal severity: normal status: open title: Incorrect documentation for `s#` arguments in C API argument parsing 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 Jul 1 04:21:01 2019 From: report at bugs.python.org (Chandan Kumar) Date: Mon, 01 Jul 2019 08:21:01 +0000 Subject: [issue37464] multiple comparison In-Reply-To: <1561969179.72.0.936663483495.issue37464@roundup.psfhosted.org> Message-ID: <1561969261.74.0.667200752522.issue37464@roundup.psfhosted.org> Change by Chandan Kumar : ---------- type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:24:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 08:24:09 +0000 Subject: [issue37199] Test suite fails when Ipv6 is unavailable In-Reply-To: <1559926830.72.0.215725323123.issue37199@roundup.psfhosted.org> Message-ID: <1561969449.69.0.214597936106.issue37199@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.7 is still supported, if it's a bugfix, 3.7 should be fixed as well: https://devguide.python.org/#status-of-python-branches Christian Heimes asked for a change after the PR was merged: https://github.com/python/cpython/pull/14480#pullrequestreview-256080790 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:31:05 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 01 Jul 2019 08:31:05 +0000 Subject: [issue37465] Incorrect documentation for `s#` arguments in C API argument parsing In-Reply-To: <1561969220.64.0.698927964651.issue37465@roundup.psfhosted.org> Message-ID: <1561969865.98.0.201616467407.issue37465@roundup.psfhosted.org> Inada Naoki added the comment: See note in https://docs.python.org/3.9/c-api/arg.html#strings-and-buffers """ Note: For all # variants of formats (s#, y#, etc.), the type of the length argument (int or Py_ssize_t) is controlled by defining the macro PY_SSIZE_T_CLEAN before including Python.h. If the macro was defined, length is a Py_ssize_t rather than an int. This behavior will change in a future Python version to only support Py_ssize_t and drop int support. It is best to always define PY_SSIZE_T_CLEAN. """ ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:40:20 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Jul 2019 08:40:20 +0000 Subject: [issue37464] multiple comparison In-Reply-To: <1561969179.72.0.936663483495.issue37464@roundup.psfhosted.org> Message-ID: <1561970420.48.0.368736308189.issue37464@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: a=1.0 b=0.0 c=0.0 if (a> d and b): print('hi') else: print("bye") d is not defined here and it throws a NameError for me. Can you please attach the full scripts that can be used to reproduce the behavior in the report. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:43:48 2019 From: report at bugs.python.org (Nicholas Musolino) Date: Mon, 01 Jul 2019 08:43:48 +0000 Subject: [issue33234] Improve list() pre-sizing for inputs with known lengths In-Reply-To: <1522964813.15.0.682650639539.issue33234@psf.upfronthosting.co.za> Message-ID: <1561970628.22.0.114958398362.issue33234@roundup.psfhosted.org> Change by Nicholas Musolino : ---------- pull_requests: +14316 pull_request: https://github.com/python/cpython/pull/14432 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:48:49 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 01 Jul 2019 08:48:49 +0000 Subject: [issue37464] multiple comparison In-Reply-To: <1561969179.72.0.936663483495.issue37464@roundup.psfhosted.org> Message-ID: <1561970929.29.0.385784628472.issue37464@roundup.psfhosted.org> SilentGhost added the comment: Your issue seems to be related to evaluation of 0.0 as falsy value. See documentation at https://docs.python.org/3/library/stdtypes.html#truth-value-testing ---------- assignee: docs at python -> nosy: +SilentGhost -docs at python resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:54:51 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Mon, 01 Jul 2019 08:54:51 +0000 Subject: [issue36168] DOC: Fix capitalization in string.rst In-Reply-To: <1551529262.87.0.31703753151.issue36168@roundup.psfhosted.org> Message-ID: <1561971291.29.0.288387105438.issue36168@roundup.psfhosted.org> Sanyam Khurana added the comment: Mariatta, I see it also needs a backport to 3.8 We can close it once the backport is completed. ---------- nosy: +CuriousLearner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:55:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 08:55:28 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1561971328.54.0.47490834861.issue37463@roundup.psfhosted.org> STINNER Victor added the comment: > It's a potential security bug although low severity. What is the worst that can happen with this issue? Other the client doesn't validate the cert at all, and so this issue has no impact, or the client validates the cert and trusts the CA, but the host isn't fully validated... Ok, but could someone abuse "1.1.1.1 ; this should not work but does"? Does a web browser accept such hostname? Or can it be used to inject SQL or a shell command for example? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:58:38 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 01 Jul 2019 08:58:38 +0000 Subject: [issue37458] ast: Different FormattedValue expressions have same col_offset information In-Reply-To: <1561947041.86.0.747696740213.issue37458@roundup.psfhosted.org> Message-ID: <1561971518.38.0.836750647237.issue37458@roundup.psfhosted.org> Eric V. Smith added the comment: I'm working on overhauling how these are calculated. But it's complex, and is taking a while. ---------- assignee: -> eric.smith nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:07:11 2019 From: report at bugs.python.org (Enrico Zini) Date: Mon, 01 Jul 2019 09:07:11 +0000 Subject: [issue37465] Incorrect documentation for `s#` arguments in C API argument parsing In-Reply-To: <1561969220.64.0.698927964651.issue37465@roundup.psfhosted.org> Message-ID: <1561972031.86.0.144069442788.issue37465@roundup.psfhosted.org> Enrico Zini added the comment: Oh! Fair enough, I had missed it. Does the note also involve `Py_BuildValue`? If so, the documentation of `Py_BuildValue` should probably be updated; if not, I think it would be clearer if the note mentioned that it only applies to parsing, not building, values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:17:44 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 01 Jul 2019 09:17:44 +0000 Subject: [issue37406] Disable runtime checks in release mode In-Reply-To: <1561504591.64.0.387503975069.issue37406@roundup.psfhosted.org> Message-ID: <1561972664.34.0.878651854006.issue37406@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Python's exception mechanism is a much better way to signal and handle such errors at the application level. I disagree. There is a difference between exceptions which are possible in normal usage of the code and real bugs, which shouldn't ever happen. A NULL argument to a C API function is not an ordinary exception, it's a real bug. Even if we raise a Python exception for that, it should never be handled in a try/exception block like an ordinary exception. > Using assert() in C is a pretty bad alternative, since this crashes the whole process. I *prefer* debugging an assert() failure (which is pretty easy with a decent debugger) rather than debugging a Python exception raised from C (which typically does NOT give a useful traceback). ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:29:02 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 01 Jul 2019 09:29:02 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1561973342.54.0.639504537159.issue36390@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +14317 pull_request: https://github.com/python/cpython/pull/14500 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:30:21 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 01 Jul 2019 09:30:21 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1561973421.21.0.239220435905.issue36390@roundup.psfhosted.org> Tal Einat added the comment: Looking at the code yet again, there are several places where replacing classifyws() as I suggested would make it clunkier. So let's leave it there, at least in editor.py. Still, the classifyws() implementation can be greatly simplified. See PR GH-14500 (with tests based on those Cheryl wrote). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:30:39 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 Jul 2019 09:30:39 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1561973439.77.0.0820611714443.issue37380@roundup.psfhosted.org> Eryk Sun added the comment: >> If one of the processes in that list is gone, then (...) "The handle >> is invalid" (...) will prevent you from creating any new processes >> with Popen after that > > It's the first time that I see such bug report. IIRC it's the second time I've seen that issue reported. It should be rare. It should only occur if some other code in our process or another process closes our _handle value. It's not our bug. Here's an example in 3.7: >>> p = subprocess.Popen('python -c "input()"', stdin=subprocess.PIPE) >>> del p >>> subprocess._active [] >>> subprocess._active[0]._handle.Close() The process is active, but something closed our handle. The next time Popen.__init__ calls _cleanup, _internal_poll raises OSError due to the invalid handle: >>> subprocess.call('python -V') Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python37\lib\subprocess.py", line 323, in call with Popen(*popenargs, **kwargs) as p: File "C:\Program Files\Python37\lib\subprocess.py", line 664, in __init__ _cleanup() File "C:\Program Files\Python37\lib\subprocess.py", line 228, in _cleanup res = inst._internal_poll(_deadstate=sys.maxsize) File "C:\Program Files\Python37\lib\subprocess.py", line 1216, in _internal_poll if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0: OSError: [WinError 6] The handle is invalid I wouldn't want _internal_poll to silence this error, but maybe it could be translated into a warning. That said, since there's no need to wait on a process in Windows, there's no need for __del__ to insert a running process in a list of active process, in which case there's nothing for _cleanup to do. Given we're in __del__, our private _handle is about to be closed, at least it will be in CPython. Other implementations should wait() or use a with statement, in order to explicitly close the process handle. The latter isn't implemented currently, but you opened issue 37410 to address this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:35:33 2019 From: report at bugs.python.org (myungsekyo) Date: Mon, 01 Jul 2019 09:35:33 +0000 Subject: [issue37466] Move casting prompt after its validation in _raw_input() Message-ID: <1561973733.3.0.964071328037.issue37466@roundup.psfhosted.org> New submission from myungsekyo : I think it is more efficient to cast `variable prompt` into string after its validation in _raw_input(). Because If it is None or empty string then it is not used. ``` import timeit MAX = 10000000 start = timeit.default_timer() for i in range(MAX): _raw_input() end = timeit.default_timer() print('estimated : {}'.format(end - start)) ``` I tested on 10 millions inputs with above code. and the result is as follows. Before: estimated : 5.060587857999053 estimated : 5.0425375679988065 estimated : 4.850400277999142 estimated : 4.888060468998447 estimated : 4.849542597999971 estimated : 4.822679259999859 estimated : 5.053791769001691 estimated : 4.914149145999545 estimated : 4.9584080040003755 estimated : 4.944711199001176 After: estimated : 4.014042392998817 estimated : 3.987057284997718 estimated : 4.081281360999128 estimated : 4.06813505899845 estimated : 4.040622504999192 estimated : 4.1239150339970365 estimated : 4.174400065003283 estimated : 4.015272281998477 estimated : 4.034917910001241 estimated : 4.08582956799728 ---------- components: IO messages: 346986 nosy: myungsekyo priority: normal severity: normal status: open title: Move casting prompt after its validation in _raw_input() type: performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:37:56 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 01 Jul 2019 09:37:56 +0000 Subject: [issue37462] Default starting directory for os.walk() In-Reply-To: <1561962630.68.0.390698602335.issue37462@roundup.psfhosted.org> Message-ID: <1561973876.66.0.784205195718.issue37462@roundup.psfhosted.org> Tal Einat added the comment: I agree with Serhiy: In this case, it seems to me that "explicit is better than implicit" should be the guiding principle. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:39:19 2019 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Jul 2019 09:39:19 +0000 Subject: [issue37466] Move casting prompt after its validation in _raw_input() In-Reply-To: <1561973733.3.0.964071328037.issue37466@roundup.psfhosted.org> Message-ID: <1561973959.96.0.679990800896.issue37466@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14318 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14502 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:49:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 09:49:18 +0000 Subject: [issue37467] print_exception() crash when lxml 4.2.5 raises a parser error In-Reply-To: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> Message-ID: <1561974558.7.0.696438291869.issue37467@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file48450/sf.xml _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:49:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 09:49:11 +0000 Subject: [issue37467] print_exception() crash when lxml 4.2.5 raises a parser error Message-ID: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> New submission from STINNER Victor : Using attached sf.py and sf.xml, I can crash Python. lxml builds a fake traceback to inject the XML filename the XML line number where the parsing error occurs. The problem is that the filename is a bytes object, whereas print_exception() expects the filename to be a Unicode string. Attached PR fix the crash. Fedora bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1665490 Example: $ python3 sf.py Traceback (most recent call last): File "sf.py", line 6, in xml2 = etree.parse("sf.xml") File "src/lxml/etree.pyx", line 3426, in lxml.etree.parse File "src/lxml/parser.pxi", line 1840, in lxml.etree._parseDocument File "src/lxml/parser.pxi", line 1866, in lxml.etree._parseDocumentFromURL File "src/lxml/parser.pxi", line 1770, in lxml.etree._parseDocFromFile File "src/lxml/parser.pxi", line 1163, in lxml.etree._BaseParser._parseDocFromFile File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult File "src/lxml/parser.pxi", line 651, in lxml.etree._raiseParseError Segmentation fault (core dumped) (gdb) frame 6 #6 0x00007ffff7c85898 in print_exception (value=None, f=<_io.TextIOWrapper at remote 0x7fffea910708>) at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Python/pythonrun.c:753 753 /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Python/pythonrun.c: No such file or directory. (gdb) l 748 in /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Python/pythonrun.c (gdb) p filename $1 = b'sf.xml' (gdb) p *filename $2 = { ob_refcnt = 2, ob_type = 0x7ffff7db5da0 } Extract of print_exception(): PyObject *message, *filename, *text; int lineno, offset; if (!parse_syntax_error(value, &message, &filename, &lineno, &offset, &text)) PyErr_Clear(); else { PyObject *line; Py_DECREF(value); value = message; line = PyUnicode_FromFormat(" File \"%S\", line %d\n", // <====== HERE filename, lineno); Py_DECREF(filename); More gdb traceback: Program received signal SIGSEGV, Segmentation fault. find_maxchar_surrogates (num_surrogates=, maxchar=, end=0xfffffffffffffffd , begin=0x1 ) at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Objects/unicodeobject.c:1660 1660 /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Objects/unicodeobject.c: No such file or directory. Missing separate debuginfos, use: dnf debuginfo-install abrt-libs-2.12.0-2.fc30.x86_64 augeas-libs-1.12.0-1.fc30.x86_64 bzip2-libs-1.0.6-29.fc30.x86_64 dbus-libs-1.12.16-1.fc30.x86_64 elfutils-libelf-0.176-3.fc30.x86_64 elfutils-libs-0.176-3.fc30.x86_64 expat-2.2.6-2.fc30.x86_64 glib2-2.60.4-1.fc30.x86_64 libacl-2.2.53-3.fc30.x86_64 libcap-2.26-5.fc30.x86_64 libdb-5.3.28-37.fc30.x86_64 libffi-3.1-19.fc30.x86_64 libgcc-9.1.1-1.fc30.x86_64 libgcrypt-1.8.4-3.fc30.x86_64 libgpg-error-1.33-2.fc30.x86_64 libmount-2.33.2-1.fc30.x86_64 libreport-2.10.0-3.fc30.x86_64 libselinux-2.9-1.fc30.x86_64 libstdc++-9.1.1-1.fc30.x86_64 libtar-1.2.20-17.fc30.x86_64 libtool-ltdl-2.4.6-29.fc30.x86_64 libuuid-2.33.2-1.fc30.x86_64 libxcrypt-4.4.6-2.fc30.x86_64 libxml2-2.9.9-2.fc30.x86_64 libxslt-1.1.33-1.fc30.x86_64 libzstd-1.4.0-1.fc30.x86_64 lz4-libs-1.8.3-2.fc30.x86_64 pcre-8.43-2.fc30.x86_64 popt-1.16-17.fc30.x86_64 python3-abrt-2.12.0-2.fc30.x86_64 python3-dbus-1.2.8-5.fc30.x86_64 python3-libreport-2.10.0-3.fc30.x86_64 python3-lxml-4.2.5-2.fc30.x86_64 python3-systemd-234-8.fc30.x86_64 python3-xmlsec-1.3.3-5.fc30.x86_64 rpm-libs-4.14.2.1-4.fc30.1.x86_64 systemd-libs-241-8.git9ef65cb.fc30.x86_64 xmlsec1-1.2.27-2.fc30.x86_64 xmlsec1-openssl-1.2.27-2.fc30.x86_64 xz-libs-5.2.4-5.fc30.x86_64 zlib-1.2.11-15.fc30.x86_64 (gdb) where #0 0x00007ffff7c321ad in find_maxchar_surrogates (num_surrogates=, maxchar=, end=0xfffffffffffffffd , begin=0x1 ) at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Objects/unicodeobject.c:1660 #1 0x00007ffff7c321ad in _PyUnicode_Ready (unicode=b'sf.xml') at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Objects/unicodeobject.c:1699 #2 0x00007ffff7afad8e in unicode_fromformat_write_str (precision=-1, width=-1, str=, writer=0x7fffffffcb20) at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Objects/unicodeobject.c:2596 #3 0x00007ffff7afad8e in unicode_fromformat_arg (vargs=0x7fffffffcb80, f=, writer=0x7fffffffcb20) at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Objects/unicodeobject.c:2807 #4 0x00007ffff7afad8e in PyUnicode_FromFormatV (format=, vargs=) at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Objects/unicodeobject.c:2914 #5 0x00007ffff7b82a99 in PyUnicode_FromFormat (format=format at entry=0x7ffff7c9b045 " File \"%U\", line %d\n") at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Objects/unicodeobject.c:2966 #6 0x00007ffff7c85898 in print_exception (value=None, f=<_io.TextIOWrapper at remote 0x7fffea910708>) at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Python/pythonrun.c:753 #7 0x00007ffff7c85898 in print_exception_recursive (f=<_io.TextIOWrapper at remote 0x7fffea910708>, value=, code=1) at remote 0x7fffea046828>, seen=) at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Python/pythonrun.c:901 #8 0x00007ffff7c8b8bb in PyErr_Display (exception=, value=, code=1) at remote 0x7fffea046828>, tb=) at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Python/pythonrun.c:935 #9 0x00007ffff7c8b93c in sys_excepthook (self=, args=) at /usr/src/debug/python3-3.7.3-3.fc30.x86_64/Python/sysmodule.c:332 (...) ---------- files: sf.py messages: 346988 nosy: vstinner priority: normal severity: normal status: open title: print_exception() crash when lxml 4.2.5 raises a parser error type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48449/sf.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:56:15 2019 From: report at bugs.python.org (Pierre Glaser) Date: Mon, 01 Jul 2019 09:56:15 +0000 Subject: [issue37209] Add what's new entries for pickle enhancements In-Reply-To: <1560083927.43.0.0939739725641.issue37209@roundup.psfhosted.org> Message-ID: <1561974975.62.0.0922735643813.issue37209@roundup.psfhosted.org> Change by Pierre Glaser : ---------- keywords: +patch pull_requests: +14319 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:59:11 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 01 Jul 2019 09:59:11 +0000 Subject: [issue37466] Move casting prompt after its validation in _raw_input() In-Reply-To: <1561973733.3.0.964071328037.issue37466@roundup.psfhosted.org> Message-ID: <1561975151.51.0.239653439702.issue37466@roundup.psfhosted.org> Tal Einat added the comment: This is a subtle change with the potential to affect more than just performance. Also, in this case, the performance is likely negligible in every actual use-case. This might actually be more correct, though. For example, one would expect passing prompt=None to result in no prompt displayed, rather than "None". ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:08:20 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 01 Jul 2019 10:08:20 +0000 Subject: [issue37466] Move casting prompt after its validation in _raw_input() In-Reply-To: <1561973733.3.0.964071328037.issue37466@roundup.psfhosted.org> Message-ID: <1561975700.85.0.972699697561.issue37466@roundup.psfhosted.org> Steven D'Aprano added the comment: I don't think that will work. If the user passes a non-string which is falsey, your patch will attempt to write it directly to the stream without converting it to a string. Try ``_raw_input(0)`` as an example. Tal Einat: > one would expect passing prompt=None to result in no prompt displayed I wouldn't. That's not how getpass works now, or input. By the way, myungsekyo, that's not the best way to use timeit to time code snippets. You are timing the overhead of the loop, ten million lookups of the name "_raw_input", and most importantly, ten million times that _raw_input halts waiting for input from the user. Surely you didn't sit there hitting Enter over and over again? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:08:29 2019 From: report at bugs.python.org (aeros167) Date: Mon, 01 Jul 2019 10:08:29 +0000 Subject: [issue37462] Default starting directory for os.walk() In-Reply-To: <1561962630.68.0.390698602335.issue37462@roundup.psfhosted.org> Message-ID: <1561975709.13.0.576436494442.issue37462@roundup.psfhosted.org> aeros167 added the comment: Oh okay, that's fair enough. I can definitely understand that assigning the current directory as the default does not provide a significant change in improved functionality, and it is not implicit that os.walk() would use the current directory as the default option. Even if this change was approved, it is likely that many would never notice a difference. After reading the criticisms, I can also understand that the value of this feature would be too niche and does not justify the maintenance. It may also lead to some unnecessary confusion. Thanks for the constructive feedback serhiy and taleinat. I'm quite new to making contributions to Python (only a couple of minor merged PRs) and working on open source projects in general. This was my first attempt at coming up with an original issue for Python. As a result, I'm not entirely certain as to what qualifies as being adequately valuable enough to justify creating an issue. I have some basic understanding from others that I've looked over, but it seems like it might be a bit of a trial by error process. Before attempting to create any more original issues, I'll work on existing issues and the suggestions of others to develop a better practical understanding of the standards. I'll close this issue and the pull request, but I'll be sure to read over any other responses that are made. I definitely appreciate the criticism. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:15:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 10:15:06 +0000 Subject: [issue37467] print_exception() crash when lxml/xmlsec raises a parser error In-Reply-To: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> Message-ID: <1561976106.06.0.0411152988485.issue37467@roundup.psfhosted.org> STINNER Victor added the comment: The bug can be reproduced on the master branch of Python. I tested with versions: * lxml 4.3.4 * xmlsec 1.3.3 The filename comes from a lxml.etree.XMLSyntaxError exception which inherits from SyntaxError. The bug can be reproduced without lxml nor xmlsec, just with attached excepthook_syntaxerror.py: $ ./python excepthook_syntaxerror.py Traceback (most recent call last): File "/home/vstinner/prog/python/master/excepthook_syntaxerror.py", line 3, in raise SyntaxError("msg", (b"bytes_filename", 123, 0, "text")) Objects/unicodeobject.c:492: _PyUnicode_CheckConsistency: Assertion "((((((PyObject*)(op))->ob_type))->tp_flags & ((1UL << 28))) != 0)" failed Enable tracemalloc to get the memory block allocation traceback object : b'bytes_filename' type : bytes refcount: 4 address : 0x7fe22fe7ce50 Fatal Python error: _PyObject_AssertFailed Current thread 0x00007fe23cfbf740 (most recent call first): File "/home/vstinner/prog/python/master/excepthook_syntaxerror.py", line 5 in Aborted (core dumped) excepthook_syntaxerror.py uses: raise SyntaxError("msg", (b"bytes_filename", 123, 0, "text")) ---------- title: print_exception() crash when lxml 4.2.5 raises a parser error -> print_exception() crash when lxml/xmlsec raises a parser error versions: +Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48451/excepthook_syntaxerror.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:33:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 10:33:56 +0000 Subject: [issue37467] sys.excepthook (PyErr_Display) does crash with SyntaxError which has a bytes filename In-Reply-To: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> Message-ID: <1561977236.26.0.988140328891.issue37467@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: print_exception() crash when lxml/xmlsec raises a parser error -> sys.excepthook (PyErr_Display) does crash with SyntaxError which has a bytes filename _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:35:10 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 01 Jul 2019 10:35:10 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1561977310.7.0.759114746152.issue37221@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 4a2edc34a405150d0b23ecfdcb401e7cf59f4650 by Petr Viktorin (Pablo Galindo) in branch 'master': bpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set PyCode_New as a compatibility wrapper (GH-13959) https://github.com/python/cpython/commit/4a2edc34a405150d0b23ecfdcb401e7cf59f4650 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:35:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 10:35:46 +0000 Subject: [issue37467] sys.excepthook (PyErr_Display) does crash with SyntaxError which has a bytes filename In-Reply-To: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> Message-ID: <1561977346.59.0.460701290173.issue37467@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +14320 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14504 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:36:52 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 10:36:52 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1561977412.62.0.473153867718.issue37221@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14321 pull_request: https://github.com/python/cpython/pull/14505 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:41:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 10:41:39 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1561977699.63.0.440481111141.issue37380@roundup.psfhosted.org> STINNER Victor added the comment: > subprocess._active[0]._handle.Close() Why would you do that? You should not access the private _active list, nor access the private _handle attribute. I understand that it's a way to trigger such bug, but is it possible to trigger this bug without accessing any private attribute? > I wouldn't want _internal_poll to silence this error, but maybe it could be translated into a warning I disagree with that. It's very bad is suddenly the handle becomes invalid for no obvious reason. It's better to get an hard error (exception) in such case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:44:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 10:44:41 +0000 Subject: [issue37406] Disable runtime checks in release mode In-Reply-To: <1561504591.64.0.387503975069.issue37406@roundup.psfhosted.org> Message-ID: <1561977881.01.0.702492982906.issue37406@roundup.psfhosted.org> STINNER Victor added the comment: FYI I'm finishing an article to explain the problem that I am trying to solve here. Sorry for the delay, I will reply later :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:46:49 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 01 Jul 2019 10:46:49 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1561978009.75.0.937313347868.issue10945@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- keywords: +patch pull_requests: +14322 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14506 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:50:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 10:50:37 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1561978237.77.0.999498504821.issue37221@roundup.psfhosted.org> STINNER Victor added the comment: https://github.com/cython/cython/pull/3009 was merged. Is it part of Cython 0.29.11 released yesterday? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:54:48 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 01 Jul 2019 10:54:48 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1561978488.71.0.707739202968.issue37221@roundup.psfhosted.org> Petr Viktorin added the comment: > https://github.com/cython/cython/pull/3009 was merged. (to master, so far) > Is it part of Cython 0.29.11 released yesterday? It should be, see: https://cython.readthedocs.io/en/latest/src/changes.html#id2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 06:59:14 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 01 Jul 2019 10:59:14 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1561978754.66.0.0644950383493.issue10945@roundup.psfhosted.org> Miro Hron?ok added the comment: I've opened a PR thet removes the support for bdist_wininst on non-Windows. Apparently, it was broken since the beginning of Py3k anyway. The support can be reintroduced once it is actually fixed (or never). https://github.com/python/cpython/pull/14506 ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:03:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 11:03:29 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1561979009.33.0.943685145084.issue10945@roundup.psfhosted.org> STINNER Victor added the comment: > I've opened a PR thet removes the support for bdist_wininst on non-Windows. Apparently, it was broken since the beginning of Py3k anyway. The support can be reintroduced once it is actually fixed (or never). It would be better to use the Unicode (wide character) flavor of the Windows API to avoid completely any explicitly encoding, and only pass Unicode strings. But This issue is open for 8 years and it seems like nobody cares enough to invest time to implement such change. So I'm fine with trivial PR 14506. It doesn't change the status quo: bdist_win was always broken on non-Windows platforms since Python 3.0, but the PR makes the status quo more obvious which is a good thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:06:42 2019 From: report at bugs.python.org (aeros167) Date: Mon, 01 Jul 2019 11:06:42 +0000 Subject: [issue37462] Default starting directory for os.walk() In-Reply-To: <1561962630.68.0.390698602335.issue37462@roundup.psfhosted.org> Message-ID: <1561979202.68.0.740527089515.issue37462@roundup.psfhosted.org> aeros167 added the comment: For any future issues, is it more appropriate to leave the issue status on pending until the proposal is approved? This may not apply if the issue was specifically mentioned or requested by a core developer, but it may be better to use pending for any original issues that I propose until they have received feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:10:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 11:10:49 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1561979449.55.0.745974216839.issue10945@roundup.psfhosted.org> STINNER Victor added the comment: I started a discussion on the Packaging list: "Deprecate bdist_wininst" https://discuss.python.org/t/deprecate-bdist-wininst/1929 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:26:47 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 01 Jul 2019 11:26:47 +0000 Subject: [issue37462] Default starting directory for os.walk() In-Reply-To: <1561962630.68.0.390698602335.issue37462@roundup.psfhosted.org> Message-ID: <1561980407.06.0.541667025193.issue37462@roundup.psfhosted.org> Tal Einat added the comment: Hi Kyle, First off, thanks for bringing this up, and for taking our feedback so well! > Before attempting to create any more original issues, I'll work on existing issues and the suggestions of others to develop a better practical understanding of the standards. Do not be discouraged that one of the first suggestions you've made has been rejected; this is normal and happens all of the time. In the future, you could also bring up such ideas for discussion on the python-ideas mailing list to "test the water" before opening an issue. > For any future issues, is it more appropriate to leave the issue status on pending until the proposal is approved? In the future, you don't have to set the status to anything special when creating a new issue. The default, "open", is what it should be to begin with. ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:28:48 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 01 Jul 2019 11:28:48 +0000 Subject: [issue37466] Move casting prompt after its validation in _raw_input() In-Reply-To: <1561973733.3.0.964071328037.issue37466@roundup.psfhosted.org> Message-ID: <1561980528.37.0.013324992881.issue37466@roundup.psfhosted.org> Tal Einat added the comment: >> one would expect passing prompt=None to result in no prompt displayed > I wouldn't. That's not how getpass works now, or input. Ah, thanks for the input, Steve. In that case, this should likely not be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:29:18 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 01 Jul 2019 11:29:18 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1561980558.28.0.716698761743.issue37221@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset cb083f7cdf604c1d9d264f387f9e8846bc953eb3 by ?ukasz Langa (Miss Islington (bot)) in branch '3.8': bpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set PyCode_New as a compatibility wrapper (GH-13959) (#14505) https://github.com/python/cpython/commit/cb083f7cdf604c1d9d264f387f9e8846bc953eb3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:41:25 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 11:41:25 +0000 Subject: [issue32934] logging.handlers.BufferingHandler capacity is unclearly specified In-Reply-To: <1519467889.68.0.467229070634.issue32934@psf.upfronthosting.co.za> Message-ID: <1561981285.05.0.212267155167.issue32934@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 84de34e39eb9e49b2ae691c6f67df8d7da3561de by Vinay Sajip in branch 'master': bpo-32934: Clarified meaning of 'capacity' for BufferingHandler and MemoryHandler. (GH-14498) https://github.com/python/cpython/commit/84de34e39eb9e49b2ae691c6f67df8d7da3561de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:42:08 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 11:42:08 +0000 Subject: [issue32934] logging.handlers.BufferingHandler capacity is unclearly specified In-Reply-To: <1519467889.68.0.467229070634.issue32934@psf.upfronthosting.co.za> Message-ID: <1561981328.56.0.98106457756.issue32934@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14323 pull_request: https://github.com/python/cpython/pull/14507 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:42:16 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 11:42:16 +0000 Subject: [issue32934] logging.handlers.BufferingHandler capacity is unclearly specified In-Reply-To: <1519467889.68.0.467229070634.issue32934@psf.upfronthosting.co.za> Message-ID: <1561981336.97.0.703907800357.issue32934@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14324 pull_request: https://github.com/python/cpython/pull/14508 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 07:44:01 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 Jul 2019 11:44:01 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1561981441.99.0.291165141925.issue37380@roundup.psfhosted.org> Eryk Sun added the comment: >> subprocess._active[0]._handle.Close() > > Why would you do that? You should not access the private _active list, > nor access the private _handle attribute. I understand that it's a way > to trigger such bug, but is it possible to trigger this bug without > accessing any private attribute? The example is just emulating a problem from someone else's code that's closing our handle. Typically this situation occurs because the code is holding onto a handle value for a kernel object (File, Section, Job, Process, Thread, Event, etc) that got closed. The handle value eventually gets reused, such as for our _handle. >> I wouldn't want _internal_poll to silence this error, but maybe it >> could be translated into a warning > > I disagree with that. It's very bad is suddenly the handle becomes > invalid for no obvious reason. It's better to get an hard error > (exception) in such case. I agree, but the exception breaks Popen.__init__. It would have to be ignored or translated to a warning somewhere if we continues to poll a list of active processes every time __init__() is called. But since the latter is unnecessary in Windows, I suggested to just skip it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:12:02 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 12:12:02 +0000 Subject: [issue32934] logging.handlers.BufferingHandler capacity is unclearly specified In-Reply-To: <1519467889.68.0.467229070634.issue32934@psf.upfronthosting.co.za> Message-ID: <1561983122.95.0.605116714355.issue32934@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 471d785dc759eb2e9c06f077f323cf136d32506b by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-32934: Clarified meaning of 'capacity' for BufferingHandler and MemoryHandler. (GH-14498) (GH-14508) https://github.com/python/cpython/commit/471d785dc759eb2e9c06f077f323cf136d32506b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:12:13 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 12:12:13 +0000 Subject: [issue32934] logging.handlers.BufferingHandler capacity is unclearly specified In-Reply-To: <1519467889.68.0.467229070634.issue32934@psf.upfronthosting.co.za> Message-ID: <1561983133.8.0.94500115895.issue32934@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 3db5c5c7630af92336a8c0a269e05607cd68f9e7 by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-32934: Clarified meaning of 'capacity' for BufferingHandler and MemoryHandler. (GH-14498) (GH-14507) https://github.com/python/cpython/commit/3db5c5c7630af92336a8c0a269e05607cd68f9e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:12:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 12:12:43 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1561983163.88.0.32654418705.issue10945@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 72cd653c4ed7a4f8f8fb06ac364b08a97085a2b5 by Victor Stinner (Miro Hron?ok) in branch 'master': bpo-10945: Drop support for bdist_wininst on non-Windows systems (GH-14506) https://github.com/python/cpython/commit/72cd653c4ed7a4f8f8fb06ac364b08a97085a2b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:12:54 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 12:12:54 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1561983174.91.0.689956285328.issue10945@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14325 pull_request: https://github.com/python/cpython/pull/14509 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:12:59 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 12:12:59 +0000 Subject: [issue32934] logging.handlers.BufferingHandler capacity is unclearly specified In-Reply-To: <1519467889.68.0.467229070634.issue32934@psf.upfronthosting.co.za> Message-ID: <1561983179.15.0.224889216231.issue32934@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:13:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 12:13:12 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1561983192.14.0.86098514882.issue10945@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14326 pull_request: https://github.com/python/cpython/pull/14510 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:37:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 12:37:49 +0000 Subject: [issue37468] Don't install wininst*.exe on non-Windows platforms Message-ID: <1561984669.65.0.392603753819.issue37468@roundup.psfhosted.org> New submission from STINNER Victor : bdist_wininst only works on Windows: see bpo-10945 and commit 72cd653c4ed7a4f8f8fb06ac364b08a97085a2b5. So $PREFIX/lib/python3.9/distutils/command/wininst-*.exe are useless on Linux (for example). Attached PR modify "make install" to not longer install wininst-*.exe files. I propose to only modify Python 3.9. Even if bdist_wininst only works on Windows on Python 3.*, I don't feel the need to modify other branches. I also started a "Deprecate bdist_wininst" discussion on the Packaging list: https://discuss.python.org/t/deprecate-bdist-wininst/1929 -- Currently, I get these .exe files: $ find /opt/py39dbg/ -name "*.exe" /opt/py39dbg/lib/python3.9/site-packages/setuptools/gui.exe /opt/py39dbg/lib/python3.9/site-packages/setuptools/gui-64.exe /opt/py39dbg/lib/python3.9/site-packages/setuptools/gui-32.exe /opt/py39dbg/lib/python3.9/site-packages/setuptools/cli.exe /opt/py39dbg/lib/python3.9/site-packages/setuptools/cli-64.exe /opt/py39dbg/lib/python3.9/site-packages/setuptools/cli-32.exe /opt/py39dbg/lib/python3.9/site-packages/pip/_vendor/distlib/w64.exe /opt/py39dbg/lib/python3.9/site-packages/pip/_vendor/distlib/w32.exe /opt/py39dbg/lib/python3.9/site-packages/pip/_vendor/distlib/t64.exe /opt/py39dbg/lib/python3.9/site-packages/pip/_vendor/distlib/t32.exe /opt/py39dbg/lib/python3.9/distutils/command/wininst-10.0-amd64.exe /opt/py39dbg/lib/python3.9/distutils/command/wininst-10.0.exe /opt/py39dbg/lib/python3.9/distutils/command/wininst-14.0-amd64.exe /opt/py39dbg/lib/python3.9/distutils/command/wininst-14.0.exe /opt/py39dbg/lib/python3.9/distutils/command/wininst-6.0.exe /opt/py39dbg/lib/python3.9/distutils/command/wininst-7.1.exe /opt/py39dbg/lib/python3.9/distutils/command/wininst-8.0.exe /opt/py39dbg/lib/python3.9/distutils/command/wininst-9.0-amd64.exe /opt/py39dbg/lib/python3.9/distutils/command/wininst-9.0.exe site-packages/setuptools/ and site-packages/pip/ are out of the scope of this issue. With my PR: vstinner at apu$ find /opt/py39dbg/ -name "*.exe" /opt/py39dbg/lib/python3.9/site-packages/setuptools/gui.exe /opt/py39dbg/lib/python3.9/site-packages/setuptools/gui-64.exe /opt/py39dbg/lib/python3.9/site-packages/setuptools/gui-32.exe /opt/py39dbg/lib/python3.9/site-packages/setuptools/cli.exe /opt/py39dbg/lib/python3.9/site-packages/setuptools/cli-64.exe /opt/py39dbg/lib/python3.9/site-packages/setuptools/cli-32.exe /opt/py39dbg/lib/python3.9/site-packages/pip/_vendor/distlib/w64.exe /opt/py39dbg/lib/python3.9/site-packages/pip/_vendor/distlib/w32.exe /opt/py39dbg/lib/python3.9/site-packages/pip/_vendor/distlib/t64.exe /opt/py39dbg/lib/python3.9/site-packages/pip/_vendor/distlib/t32.exe /opt/py39dbg/lib/python3.9/distutils/command/wininst-*.exe files are gone. -- wininst-*.exe files are created from PC/bdist_wininst/ program. October 2018, there was a discussion about the license of these files: https://mail.python.org/pipermail/python-dev/2018-October/155507.html The Fedora package of Python 3.7 already explicitly removes these .exe files: * https://bugzilla.redhat.com/show_bug.cgi?id=525469 * https://src.fedoraproject.org/rpms/python3/c/1092d478f540ba9d510316205eca201e5c5d07e9?branch=master * https://bugzilla.redhat.com/show_bug.cgi?id=1426250 * https://bugzilla.redhat.com/show_bug.cgi?id=1426257 ---------- components: Library (Lib) messages: 347010 nosy: vstinner priority: normal severity: normal status: open title: Don't install wininst*.exe on non-Windows platforms versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:42:15 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 12:42:15 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1561984935.54.0.41556043921.issue10945@roundup.psfhosted.org> miss-islington added the comment: New changeset 45c10da40912e04c0d0de02af4b23438ed0de49b by Miss Islington (bot) in branch '3.7': bpo-10945: Drop support for bdist_wininst on non-Windows systems (GH-14506) https://github.com/python/cpython/commit/45c10da40912e04c0d0de02af4b23438ed0de49b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:45:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 12:45:17 +0000 Subject: [issue37468] Don't install wininst*.exe on non-Windows platforms In-Reply-To: <1561984669.65.0.392603753819.issue37468@roundup.psfhosted.org> Message-ID: <1561985117.15.0.738322611727.issue37468@roundup.psfhosted.org> STINNER Victor added the comment: Debian doesn't distribute wininst*.exe binaries in their python* packages. debian/rules explicitly removes thesee files: find $(d) -name 'wininst*.exe' | xargs -r rm -f -- RHEL7 issue closed as WONTFIX: https://bugzilla.redhat.com/show_bug.cgi?id=1566459 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:48:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 12:48:40 +0000 Subject: [issue37468] Don't install wininst*.exe on non-Windows platforms In-Reply-To: <1561984669.65.0.392603753819.issue37468@roundup.psfhosted.org> Message-ID: <1561985320.81.0.149561244064.issue37468@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +14327 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14511 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 08:54:25 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 12:54:25 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1561985665.45.0.31186046723.issue10945@roundup.psfhosted.org> miss-islington added the comment: New changeset be5bb52f5f2d4da4b9d6f42399f7275ab47910f3 by Miss Islington (bot) in branch '3.8': bpo-10945: Drop support for bdist_wininst on non-Windows systems (GH-14506) https://github.com/python/cpython/commit/be5bb52f5f2d4da4b9d6f42399f7275ab47910f3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:07:10 2019 From: report at bugs.python.org (Marcin Niemira) Date: Mon, 01 Jul 2019 13:07:10 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1561986430.44.0.449801703664.issue37461@roundup.psfhosted.org> Marcin Niemira added the comment: Sounds like there is an infinite loop here: ``` Pdb) > /usr/lib/python3.7/email/_header_value_parser.py(2370)get_parameter() -> v.append(token) (Pdb) > /usr/lib/python3.7/email/_header_value_parser.py(2365)get_parameter() -> while value: ``` the ```v.append(token)``` is just growing with ```ValueTerminal(''), ValueTerminal(''), ValueTerminal('')...``` I'd be happy to try to fix this. ---------- nosy: +Marcin Niemira _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:13:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 13:13:19 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1561986799.27.0.1735700519.issue10945@roundup.psfhosted.org> STINNER Victor added the comment: Follow-up issue: bpo-37468 "Don't install wininst*.exe on non-Windows platforms". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:17:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 13:17:17 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1561987037.15.0.478912477476.issue37380@roundup.psfhosted.org> STINNER Victor added the comment: > The example is just emulating a problem from someone else's code that's closing our handle. Typically this situation occurs because the code is holding onto a handle value for a kernel object (File, Section, Job, Process, Thread, Event, etc) that got closed. Without accessing private attributes, I don't see how someone can discover the private handle. So for me, it's more a serious bug in an application, no? Blindly closing random handles doesn't sound like a good idea to me. > The handle value eventually gets reused, such as for our _handle. That's a side effect on the blindly closing random handles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:40:34 2019 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Jul 2019 13:40:34 +0000 Subject: [issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed In-Reply-To: <1560344910.52.0.698180941152.issue37250@roundup.psfhosted.org> Message-ID: <1561988434.63.0.394943832875.issue37250@roundup.psfhosted.org> Change by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:41:45 2019 From: report at bugs.python.org (Martijn Pieters) Date: Mon, 01 Jul 2019 13:41:45 +0000 Subject: [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. Message-ID: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> New submission from Martijn Pieters : The implementation of the logging.handler.QueueHandler and logging.handler.QueueListener does not make use of the task tracking API of queues (queue.task_done(), queue.join()) nor does it care if the queue is unbounded (queue.full(), catching the Full exception). As such, it can work just as well with the new queue.SimpleQueue implementation (new in 3.7, see https://docs.python.org/3/library/queue.html#queue.SimpleQueue), which is fast and lightweight, implemented in C. Can the documentation be updated to make this option explicit? ---------- assignee: docs at python components: Documentation messages: 347017 nosy: docs at python, mjpieters priority: normal severity: normal status: open title: Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:42:59 2019 From: report at bugs.python.org (Martijn Pieters) Date: Mon, 01 Jul 2019 13:42:59 +0000 Subject: [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler Message-ID: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> New submission from Martijn Pieters : The documentation doesn't make it explicit what happens if you use a bounded queue together with logging.handlers.QueueHandler. If the queue is bounded in size and attempts are made to add logrecords faster than a queue listener removes them, then the resulting `queue.Full` exception is passed to `handler.handleError()` and that usually means the record is simply dropped (see https://docs.python.org/3/library/logging.html#logging.Handler.handleError). That may be the desired behaviour, but making it explicit is always better. ---------- assignee: docs at python components: Documentation messages: 347018 nosy: docs at python, mjpieters priority: normal severity: normal status: open title: Make it explicit what happens when using a bounded queue with QueueHandler versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:45:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Jul 2019 13:45:44 +0000 Subject: [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1561988744.38.0.30878966659.issue37470@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:48:21 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Jul 2019 13:48:21 +0000 Subject: [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1561988901.98.0.613082947331.issue37469@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:49:36 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 Jul 2019 13:49:36 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1561988976.7.0.716631986922.issue37380@roundup.psfhosted.org> Eryk Sun added the comment: > Without accessing private attributes, I don't see how someone can > discover the private handle. So for me, it's more a serious bug in an > application, no? Blindly closing random handles doesn't sound like a > good idea to me. Say a library calls CreateEventW and gets handle 32. It passes this handle to some other library, which uses the event and closes the handle when it no longer needs it. But due to a miscommunication in the documentation, the first library thinks the handle remains open. Now handle 32 is free for reuse, but the library doesn't know this. subprocess.Popen subsequently calls CreateProcessW and gets handle 32. Later on, the library closes handle 32, making it invalid, at least until it gets assigned to some other kernel object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:52:00 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Jul 2019 13:52:00 +0000 Subject: [issue37209] Add what's new entries for pickle enhancements In-Reply-To: <1560083927.43.0.0939739725641.issue37209@roundup.psfhosted.org> Message-ID: <1561989120.65.0.657642789579.issue37209@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset ec6c1bd0491590f3c0e2908a7b2dfb91b6acdae9 by Antoine Pitrou (Pierre Glaser) in branch 'master': bpo-37209: Add pickle entry for 3.8 whatsnew (GH-14503) https://github.com/python/cpython/commit/ec6c1bd0491590f3c0e2908a7b2dfb91b6acdae9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:52:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 13:52:12 +0000 Subject: [issue37209] Add what's new entries for pickle enhancements In-Reply-To: <1560083927.43.0.0939739725641.issue37209@roundup.psfhosted.org> Message-ID: <1561989132.21.0.804299078248.issue37209@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14328 pull_request: https://github.com/python/cpython/pull/14512 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:00:16 2019 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Jul 2019 14:00:16 +0000 Subject: [issue37444] Differing exception between builtins and importlib when importing beyond top-level package In-Reply-To: <1561749733.32.0.955430999512.issue37444@roundup.psfhosted.org> Message-ID: <1561989616.72.0.222460206776.issue37444@roundup.psfhosted.org> Nick Coghlan added the comment: ImportError sounds right to me. We already raise that just above this for the "no dots at all" case, so also raising it for the "not enough dots" case makes more sense than leaving them different. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:05:09 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Jul 2019 14:05:09 +0000 Subject: [issue37209] Add what's new entries for pickle enhancements In-Reply-To: <1560083927.43.0.0939739725641.issue37209@roundup.psfhosted.org> Message-ID: <1561989909.77.0.933943322506.issue37209@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset e224d2865aa0f021b25d68de9a6c2be617341f4c by Antoine Pitrou (Miss Islington (bot)) in branch '3.8': bpo-37209: Add pickle entry for 3.8 whatsnew (GH-14503) (GH-14512) https://github.com/python/cpython/commit/e224d2865aa0f021b25d68de9a6c2be617341f4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:22:37 2019 From: report at bugs.python.org (David CARLIER) Date: Mon, 01 Jul 2019 14:22:37 +0000 Subject: [issue37471] mmap module, adding new constant Message-ID: <1561990957.19.0.830363147421.issue37471@roundup.psfhosted.org> Change by David CARLIER : ---------- components: Extension Modules, FreeBSD nosy: devnexen, koobs priority: normal pull_requests: 14329 severity: normal status: open title: mmap module, adding new constant versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:36:19 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 01 Jul 2019 14:36:19 +0000 Subject: [issue37454] Clarify docs for math.log1p() In-Reply-To: <1561933178.32.0.315765765879.issue37454@roundup.psfhosted.org> Message-ID: <1561991779.85.0.934277637776.issue37454@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:41:16 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 01 Jul 2019 14:41:16 +0000 Subject: [issue37471] mmap module, adding new constant Message-ID: <1561992076.14.0.131168836569.issue37471@roundup.psfhosted.org> New submission from Kubilay Kocak : Thanks David! Can this be backported to earlier 3.x's and 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:41:50 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 01 Jul 2019 14:41:50 +0000 Subject: [issue37471] mmap module, add MAP_ALIGNED_SUPER FreeBSD constant In-Reply-To: <1561992076.14.0.131168836569.issue37471@roundup.psfhosted.org> Message-ID: <1561992110.85.0.655044480928.issue37471@roundup.psfhosted.org> Change by Kubilay Kocak : ---------- title: mmap module, adding new constant -> mmap module, add MAP_ALIGNED_SUPER FreeBSD constant _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:44:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 14:44:50 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1561992290.47.0.829211027107.issue37380@roundup.psfhosted.org> STINNER Victor added the comment: > Say a library calls CreateEventW and gets handle 32. It passes this handle to some other library, which uses the event and closes the handle when it no longer needs it. But due to a miscommunication in the documentation, the first library thinks the handle remains open. Now handle 32 is free for reuse, but the library doesn't know this. subprocess.Popen subsequently calls CreateProcessW and gets handle 32. Later on, the library closes handle 32, making it invalid, at least until it gets assigned to some other kernel object. So yeah, it's a severe bug in an application. An application should not close the wrong handle by mistake :-) Thanks for the explanation. So it would be "nice" to backport the change to reduce the impact of such application bug, but it's not really a bug in Python itself. Python cannot fully protect developers for such class of bugs. On Unix, there is a similar bug with applications trying to close a file descriptor which is already closed. It can lead to very severe bugs (crashes): https://bugs.python.org/issue18748 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:48:03 2019 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Jul 2019 14:48:03 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1561992483.67.0.116666697307.issue12782@roundup.psfhosted.org> Nick Coghlan added the comment: Reviewing the thread, we never actually commented on thautwarm's proposal in https://bugs.python.org/issue12782#msg327875 that aims to strip out any INDENT, NEWLINE, and DEDENT tokens that appear between the opening "with" keyword and the statement header terminating ":". The problem with that is that line continuations are actually handled by the tokenizer, *not* the compiler, and the tokenizer already switches off the INDENT/NEWLINE/DEDENT token generation based on the following rules: * tracking opening & closing of triple-quoted strings * tracking opening & closing of parentheses ("()"), brackets ("[]"), and braces ("{}") * detecting a backslash immediately followed by a newline By design, the tokenizer is generally unaware of which NAME tokens are actually keywords - it's only aware of async & await at the moment as part of the backwards compatibility dance that allowed those to be gradually converted to full keywords over the course of a couple of releases. Hence why INDENT/NEWLINE/DEDENT never appear inside expressions in the Grammar: the tokenization rules mean that those tokens will never appear in those locations. And it isn't simply a matter of making the tokenizer aware of the combination of "with" and ":" as a new pairing that ignores linebreaks between them, as ":" can appear in many subexpressions (e.g. lambda functions, slice notation, and the new assignments expressions), and it's only the full parser that has enough context to tell which colon is the one that actually ends the statement header. Thus the design requirement is to come up with a grammar rule that allows this existing code to continue to compile and run correctly: ``` >>> from contextlib import nullcontext >>> with (nullcontext()) as example: ... pass ... >>> ``` While also enabling new code constructs like the following: with (nullcontext() as example): pass with (nullcontext(), nullcontext()): pass with (nullcontext() as example, nullcontext()): pass with (nullcontext(), nullcontext() as example): pass with (nullcontext() as example1, nullcontext() as example2): pass If we can get the Grammar to allow those additional placements of parentheses, then the existing tokenizer will take care of the rest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:50:20 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 01 Jul 2019 14:50:20 +0000 Subject: [issue37471] mmap module: add MAP_ALIGNED_SUPER FreeBSD constant In-Reply-To: <1561992076.14.0.131168836569.issue37471@roundup.psfhosted.org> Message-ID: <1561992620.81.0.349295009016.issue37471@roundup.psfhosted.org> Kubilay Kocak added the comment: Thanks for clarifying Victor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:49:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 14:49:39 +0000 Subject: [issue37471] mmap module: add MAP_ALIGNED_SUPER FreeBSD constant In-Reply-To: <1561992076.14.0.131168836569.issue37471@roundup.psfhosted.org> Message-ID: <1561992579.03.0.649369307937.issue37471@roundup.psfhosted.org> STINNER Victor added the comment: > Can this be backported to earlier 3.x's and 2.7? No, a new constant is a new feature. If we add it to Python 3.7.4, it would mean that an application written with 3.7.4 will fail on 3.7.3 which would be surprising and bad. ---------- nosy: +vstinner title: mmap module, add MAP_ALIGNED_SUPER FreeBSD constant -> mmap module: add MAP_ALIGNED_SUPER FreeBSD constant type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:51:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 14:51:25 +0000 Subject: [issue37467] sys.excepthook (PyErr_Display) does crash with SyntaxError which has a bytes filename In-Reply-To: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> Message-ID: <1561992685.53.0.979043450806.issue37467@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f9b7457bd7f438263e0d2dd1f70589ad56a2585e by Victor Stinner in branch 'master': bpo-37467: Fix PyErr_Display() for bytes filename (GH-14504) https://github.com/python/cpython/commit/f9b7457bd7f438263e0d2dd1f70589ad56a2585e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:51:31 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 14:51:31 +0000 Subject: [issue37467] sys.excepthook (PyErr_Display) does crash with SyntaxError which has a bytes filename In-Reply-To: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> Message-ID: <1561992691.04.0.248436949308.issue37467@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14330 pull_request: https://github.com/python/cpython/pull/14514 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:55:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 14:55:52 +0000 Subject: [issue37467] sys.excepthook (PyErr_Display) does crash with SyntaxError which has a bytes filename In-Reply-To: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> Message-ID: <1561992952.37.0.634682870928.issue37467@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14331 pull_request: https://github.com/python/cpython/pull/14515 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:57:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 14:57:01 +0000 Subject: [issue37467] sys.excepthook (PyErr_Display) does crash with SyntaxError which has a bytes filename In-Reply-To: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> Message-ID: <1561993021.0.0.167358245847.issue37467@roundup.psfhosted.org> STINNER Victor added the comment: Python 2.7 is not affected: const char *filename, *text; int lineno, offset; if (!parse_syntax_error(value, &message, &filename, &lineno, &offset, &text)) PyErr_Clear(); else { char buf[10]; PyFile_WriteString(" File \"", f); if (filename == NULL) PyFile_WriteString("", f); else PyFile_WriteString(filename, f); PyFile_WriteString("\", line ", f); PyOS_snprintf(buf, sizeof(buf), "%d", lineno); PyFile_WriteString(buf, f); PyFile_WriteString("\n", f); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:11:20 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 15:11:20 +0000 Subject: [issue37467] sys.excepthook (PyErr_Display) does crash with SyntaxError which has a bytes filename In-Reply-To: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> Message-ID: <1561993880.94.0.811876681006.issue37467@roundup.psfhosted.org> miss-islington added the comment: New changeset 2683ded568b24fff1139edd9127a349f432292a6 by Miss Islington (bot) in branch '3.8': bpo-37467: Fix PyErr_Display() for bytes filename (GH-14504) https://github.com/python/cpython/commit/2683ded568b24fff1139edd9127a349f432292a6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:17:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 15:17:59 +0000 Subject: [issue37472] Remove Lib/test/outstanding_bugs.py Message-ID: <1561994279.69.0.729318109917.issue37472@roundup.psfhosted.org> New submission from STINNER Victor : Lib/test/outstanding_bugs.py was created by: commit c4e2a9b70ac49cdd8bcc9ca60afac20162f84f24 Author: Georg Brandl Date: Sun Jan 8 14:32:19 2006 +0000 Add a test file (which isn't run by regrtest) for bugs which aren't fixed yet. Includes a first test (for compiler). and has not been touched since: commit bdce938af2af03b2eb0d0e4731f1b8c4b965eaf5 Author: Zachary Ware Date: Fri Dec 20 13:25:07 2013 -0600 Update test.outstanding_bugs.py diff --git a/Lib/test/outstanding_bugs.py b/Lib/test/outstanding_bugs.py index 0849ee5885..7e527a6706 100644 --- a/Lib/test/outstanding_bugs.py +++ b/Lib/test/outstanding_bugs.py @@ -10,79 +10,9 @@ import unittest from test import support # -# One test case for outstanding bugs at the moment: +# No test cases for outstanding bugs at the moment. # (...) I propose to remove this file. We don't manage "outstanding bugs" this way anymore. ---------- components: Tests messages: 347031 nosy: vstinner priority: normal severity: normal status: open title: Remove Lib/test/outstanding_bugs.py versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:20:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 15:20:09 +0000 Subject: [issue37472] Remove Lib/test/outstanding_bugs.py In-Reply-To: <1561994279.69.0.729318109917.issue37472@roundup.psfhosted.org> Message-ID: <1561994409.15.0.286706852852.issue37472@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +14332 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14516 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:24:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 15:24:52 +0000 Subject: [issue37473] importlib: Remove libregrtest hack: "We import importlib *ASAP* in order to test #15386" Message-ID: <1561994692.63.0.367663564424.issue37473@roundup.psfhosted.org> New submission from STINNER Victor : Lib/test/regrtest.py starts with: # We import importlib *ASAP* in order to test #15386 import importlib If there is a bug to test, would it be possible to write a dedicated test, rather than putting the test... in the code of the test runner? Code added by bpo-15386: commit be7e49fd820318509cd8b4dbde479c552f74ef62 Author: Nick Coghlan Date: Fri Jul 20 23:40:09 2012 +1000 Close #15386: There was a loophole that meant importlib.machinery and imp would sometimes reference an uninitialised copy of importlib._bootstrap (...) diff --git a/Lib/runpy.py b/Lib/runpy.py index d612727c6f..39c0e9f7dd 100644 --- a/Lib/runpy.py +++ b/Lib/runpy.py @@ -12,8 +12,8 @@ importers when locating support scripts as well as when importing modules. import os import sys +import importlib.machinery # importlib first so we can test #15386 via -m import imp -import importlib.machinery from pkgutil import read_code, get_loader, get_importer __all__ = [ diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 28655f0e65..3c8359aca1 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -165,6 +165,9 @@ example, to run all the tests except for the gui tests, give the option '-uall,-gui'. """ +# We import importlib *ASAP* in order to test #15386 +import importlib + import builtins import faulthandler import getopt diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 89ec8dcedc..51b52c7e0b 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -1,8 +1,9 @@ +# We import importlib *ASAP* in order to test #15386 +import importlib import builtins import imp from importlib.test.import_ import test_suite as importlib_import_test_suite from importlib.test.import_ import util as importlib_util -import importlib import marshal import os import platform ---------- components: Tests messages: 347032 nosy: brett.cannon, ncoghlan, vstinner priority: normal severity: normal status: open title: importlib: Remove libregrtest hack: "We import importlib *ASAP* in order to test #15386" versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:26:55 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 01 Jul 2019 15:26:55 +0000 Subject: [issue36926] Implement methoddescr_call without _PyMethodDef_RawFastCallDict In-Reply-To: <1557935161.99.0.62795791689.issue36926@roundup.psfhosted.org> Message-ID: <1561994815.91.0.232206131023.issue36926@roundup.psfhosted.org> Jeroen Demeyer added the comment: Superseded by PR 13781 ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:27:25 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 01 Jul 2019 15:27:25 +0000 Subject: [issue37231] Optimize calling special methods In-Reply-To: <1560258460.83.0.570346812053.issue37231@roundup.psfhosted.org> Message-ID: <1561994845.49.0.0837932008527.issue37231@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:28:14 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 01 Jul 2019 15:28:14 +0000 Subject: [issue36924] Simplify implementation of classmethod_descriptor.__call__ In-Reply-To: <1557921506.83.0.125634021475.issue36924@roundup.psfhosted.org> Message-ID: <1561994894.67.0.302847673239.issue36924@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:38:47 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 01 Jul 2019 15:38:47 +0000 Subject: [issue37454] Clarify docs for math.log1p() In-Reply-To: <1561933178.32.0.315765765879.issue37454@roundup.psfhosted.org> Message-ID: <1561995527.45.0.767248177045.issue37454@roundup.psfhosted.org> Tim Peters added the comment: Mark's analysis is spot-on - good eye :-) Here under 3.7.3 [MSC v.1916 64 bit (AMD64)] on win32, in the original script it makes no difference at all for negative "small x" (where, as Mark said, `1 - random.random()` is exactly representable): Counter({'equal': 50058, 'offset_log': 41936, 'regular_log': 8006}) Counter({'equal': 100000}) Changing to Mark's 1e-3 * random.random(): Counter({'offset_log': 99958, 'equal': 42}) Counter({'offset_log': 99884, 'equal': 116}) And going on to use 1e-6 instead: Counter({'offset_log': 100000}) Counter({'offset_log': 100000}) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:41:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 15:41:50 +0000 Subject: [issue37467] sys.excepthook (PyErr_Display) does crash with SyntaxError which has a bytes filename In-Reply-To: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> Message-ID: <1561995710.1.0.652516752439.issue37467@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8cbffc4d96d1da0fbc38da6f34f2da30c5ffd601 by Victor Stinner in branch '3.7': bpo-37467: Fix PyErr_Display() for bytes filename (GH-14504) (GH-14515) https://github.com/python/cpython/commit/8cbffc4d96d1da0fbc38da6f34f2da30c5ffd601 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:42:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 15:42:28 +0000 Subject: [issue37467] sys.excepthook (PyErr_Display) does crash with SyntaxError which has a bytes filename In-Reply-To: <1561974551.02.0.598899276375.issue37467@roundup.psfhosted.org> Message-ID: <1561995748.92.0.112071332795.issue37467@roundup.psfhosted.org> STINNER Victor added the comment: Ok, it's not fixed in all affected maintained branches, I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:45:46 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 01 Jul 2019 15:45:46 +0000 Subject: [issue36904] Implement _PyStack_UnpackDict() with a single allocation In-Reply-To: <1557760974.34.0.94387480475.issue36904@roundup.psfhosted.org> Message-ID: <1561995946.26.0.868210908721.issue36904@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14333 pull_request: https://github.com/python/cpython/pull/14517 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:12:41 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 16:12:41 +0000 Subject: [issue36168] DOC: Fix capitalization in string.rst In-Reply-To: <1551529262.87.0.31703753151.issue36168@roundup.psfhosted.org> Message-ID: <1561997561.54.0.81137783076.issue36168@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14334 pull_request: https://github.com/python/cpython/pull/14519 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:13:29 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 16:13:29 +0000 Subject: [issue37369] Issue with pip in venv on Powershell in Windows In-Reply-To: <1561161256.11.0.32935812019.issue37369@roundup.psfhosted.org> Message-ID: <1561997609.56.0.366867037835.issue37369@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:15:37 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 16:15:37 +0000 Subject: [issue37412] os.getcwdb() doesn't implement PEP 528 (UTF-8) on Windows In-Reply-To: <1561559287.43.0.39764403862.issue37412@roundup.psfhosted.org> Message-ID: <1561997737.25.0.131557406183.issue37412@roundup.psfhosted.org> Steve Dower added the comment: This is fixed now, right? The buildbots seem happy at least. I'll close. ---------- assignee: -> vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:22:35 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 16:22:35 +0000 Subject: [issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum In-Reply-To: <1561686823.22.0.469835611791.issue37436@roundup.psfhosted.org> Message-ID: <1561998155.73.0.613237012581.issue37436@roundup.psfhosted.org> Steve Dower added the comment: You use this by getting the file descriptor/fileno for an open file, and then testing whether it's a file or not: >>> f=open("python.bat") >>> f.fileno() 3 >>> import os >>> os.path.isfile(3) True This is very uncommon on Windows to begin with (file descriptors are emulated by the C Runtime for POSIX compatibility), but it is supported. Enabling Modules/posixmodule.c#L2446 to be able to optionally handle the OverflowError would allow the "exists" type functions to just return False instead of raising, while letting the others continue to raise. I'm going to mark this as "easy (C)" so that we consider it for sprints. But in principle, I'm okay with returning False for invalid values in exists-type functions rather than raising. ---------- components: +Argument Clinic -Library (Lib), Windows keywords: +easy (C) nosy: +larry versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:22:59 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 16:22:59 +0000 Subject: [issue33408] Enable AF_UNIX support in Windows In-Reply-To: <1525257332.06.0.682650639539.issue33408@psf.upfronthosting.co.za> Message-ID: <1561998179.87.0.145376339608.issue33408@roundup.psfhosted.org> Change by Steve Dower : ---------- title: AF_UNIX is now supported in Windows -> Enable AF_UNIX support in Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:25:21 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 01 Jul 2019 16:25:21 +0000 Subject: [issue37199] Test suite fails when Ipv6 is unavailable In-Reply-To: <1559926830.72.0.215725323123.issue37199@roundup.psfhosted.org> Message-ID: <1561998321.48.0.480366450808.issue37199@roundup.psfhosted.org> Andrew Svetlov added the comment: Victor, backporting to 3.7 makes merge conflicts. Do you think that I should backport manually? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:26:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 16:26:31 +0000 Subject: [issue37199] Test suite fails when Ipv6 is unavailable In-Reply-To: <1559926830.72.0.215725323123.issue37199@roundup.psfhosted.org> Message-ID: <1561998391.89.0.881587710055.issue37199@roundup.psfhosted.org> STINNER Victor added the comment: > Do you think that I should backport manually? Zackery Spytz: Can you please try to backport manually to 3.7? But I would prefer to wait until Christian's issue is addressed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:30:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 16:30:21 +0000 Subject: [issue37412] os.getcwdb() doesn't implement PEP 528 (UTF-8) on Windows In-Reply-To: <1561559287.43.0.39764403862.issue37412@roundup.psfhosted.org> Message-ID: <1561998621.95.0.540213458972.issue37412@roundup.psfhosted.org> STINNER Victor added the comment: > This is fixed now, right? The buildbots seem happy at least. I'll close. Yeah, I forgot to close. I got some issues with backports, but the two commits are now merged into 3.8 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:30:51 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 16:30:51 +0000 Subject: [issue36168] DOC: Fix capitalization in string.rst In-Reply-To: <1551529262.87.0.31703753151.issue36168@roundup.psfhosted.org> Message-ID: <1561998651.75.0.35428017494.issue36168@roundup.psfhosted.org> miss-islington added the comment: New changeset 59ec9ee4d7f3c2444efb989e96f5124e1c246de5 by Miss Islington (bot) in branch '3.8': bpo-36168: Lowercase the word "subsequent" in get_value doc (GH-14485) https://github.com/python/cpython/commit/59ec9ee4d7f3c2444efb989e96f5124e1c246de5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:35:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 16:35:12 +0000 Subject: [issue37472] Remove Lib/test/outstanding_bugs.py In-Reply-To: <1561994279.69.0.729318109917.issue37472@roundup.psfhosted.org> Message-ID: <1561998912.51.0.317801194542.issue37472@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e21b45a8e71d06a6a03f99261cab33e72b896bb9 by Victor Stinner in branch 'master': bpo-37472: Remove Lib/test/outstanding_bugs.py (GH-14516) https://github.com/python/cpython/commit/e21b45a8e71d06a6a03f99261cab33e72b896bb9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:36:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 16:36:46 +0000 Subject: [issue37472] Remove Lib/test/outstanding_bugs.py In-Reply-To: <1561994279.69.0.729318109917.issue37472@roundup.psfhosted.org> Message-ID: <1561999006.05.0.316325097842.issue37472@roundup.psfhosted.org> STINNER Victor added the comment: I removed the file in the master branch. I don't think that it's worth it to remove it from other branches, so I just close the issue. FYI I found this file while working on PR 14518: commit 8f4ef3b019ce380022018587571b0f970e668de3 (upstream/master, master) Author: Victor Stinner Date: Mon Jul 1 18:28:25 2019 +0200 Remove unused imports in tests (GH-14518) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:39:26 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Mon, 01 Jul 2019 16:39:26 +0000 Subject: [issue36168] DOC: Fix capitalization in string.rst In-Reply-To: <1551529262.87.0.31703753151.issue36168@roundup.psfhosted.org> Message-ID: <1561999166.12.0.839501692794.issue36168@roundup.psfhosted.org> Sanyam Khurana added the comment: Backport successfully completed. Marking this as fixed. Congrats on your first patch, Krishna! Thank you, everyone! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:52:17 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 16:52:17 +0000 Subject: [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1561999937.63.0.869676981255.issue37469@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +14335 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14521 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:54:38 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 01 Jul 2019 16:54:38 +0000 Subject: [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562000078.99.0.20981056152.issue37459@roundup.psfhosted.org> Barry A. Warsaw added the comment: Good catch. Are you going to submit a PR? ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:55:10 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 01 Jul 2019 16:55:10 +0000 Subject: [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562000110.98.0.528572990603.issue37459@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:13:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 17:13:54 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1562001234.15.0.105465958889.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 36242fd871d0f0977e720d4fae5700774bd8c09a by Victor Stinner in branch 'master': bpo-36763: Add PyConfig_SetWideStringList() (GH-14444) https://github.com/python/cpython/commit/36242fd871d0f0977e720d4fae5700774bd8c09a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:14:15 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 17:14:15 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1562001255.09.0.972623652468.issue36763@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14336 pull_request: https://github.com/python/cpython/pull/14523 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:34:51 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 17:34:51 +0000 Subject: [issue37363] Additional PEP578 hooks In-Reply-To: <1561131749.05.0.996884755083.issue37363@roundup.psfhosted.org> Message-ID: <1562002491.1.0.0468418137015.issue37363@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +14337 pull_request: https://github.com/python/cpython/pull/14524 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:39:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 17:39:03 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? Message-ID: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> New submission from STINNER Victor : Just after calling _PyRuntime_Initialize(), Py_Main() calls: /* 754 requires that FP exceptions run in "no stop" mode by default, * and until C vendors implement C99's ways to control FP exceptions, * Python requires non-stop mode. Alas, some platforms enable FP * exceptions by default. Here we disable them. */ #ifdef __FreeBSD__ fedisableexcept(FE_OVERFLOW); #endif It's done before calling Py_Initialize(). So applications embedding Python don't call it. But "customized Python" which call the new Py_RunMain() with Py_InititializeFromConfig() will not call it neither. I would like to know if this setup code should be moved into Py_Initialize()? Especially into the new PyConfig API: https://docs.python.org/dev/c-api/init_config.html PyConfig got 2 flags to control parameters which affect the whole process: * configure_c_stdio * configure_locale What is the behavior on FreeBSD when fedisableexcept(FE_OVERFLOW) is not called? Note: I'm not sure why this call is only needed on FreeBSD, but not on macOS, OpenBSD or NetBSD (operating systems close to FreeBSD). ---------- components: Interpreter Core messages: 347048 nosy: lemburg, mark.dickinson, stutzbach, vstinner priority: normal severity: normal status: open title: Should Py_Initialize() control the floating point mode? versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:39:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 17:39:46 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1562002786.9.0.0236809293087.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: About the documentation: https://docs.python.org/dev/c-api/init.html doesn't link to http://docs.python.org/dev/c-api/init_config.html The first doc should mention somewhere the new doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:40:02 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 17:40:02 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1562002802.23.0.364702388526.issue36763@roundup.psfhosted.org> miss-islington added the comment: New changeset 96f581cf9d2f1d7888d2fd9bb89f19f10c0477bf by Miss Islington (bot) in branch '3.8': bpo-36763: Add PyConfig_SetWideStringList() (GH-14444) https://github.com/python/cpython/commit/96f581cf9d2f1d7888d2fd9bb89f19f10c0477bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:41:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 17:41:08 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1562002868.3.0.397699204488.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: Another minor implementation issue: calling _PyCoreConfig_Read() twice calls _Py_SetArgcArgv() twice, the second call override the first _Py_SetArgcArgv() call. IMHO it should only be called once, at the first _PyCoreConfig_Read() call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:45:10 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 17:45:10 +0000 Subject: [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562003110.34.0.146003564027.issue37469@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset e6b64b756f940147728ea7808fb686ffcae89176 by Vinay Sajip in branch 'master': bpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener. (GH-14521) https://github.com/python/cpython/commit/e6b64b756f940147728ea7808fb686ffcae89176 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:45:32 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 17:45:32 +0000 Subject: [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562003132.86.0.782108438725.issue37469@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14338 pull_request: https://github.com/python/cpython/pull/14525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:45:39 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 17:45:39 +0000 Subject: [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562003139.14.0.0564988895676.issue37469@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14339 pull_request: https://github.com/python/cpython/pull/14526 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:46:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 17:46:07 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562003167.93.0.611890762876.issue37421@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14340 pull_request: https://github.com/python/cpython/pull/14527 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:52:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 17:52:51 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1562003571.38.0.525797762877.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 67310023f299b5a2fad71fca449b46d280036690 by Victor Stinner in branch 'master': bpo-36763: Use PyConfig_Clear() (GH-14445) https://github.com/python/cpython/commit/67310023f299b5a2fad71fca449b46d280036690 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:53:07 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 17:53:07 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1562003587.58.0.0921660002544.issue36763@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14341 pull_request: https://github.com/python/cpython/pull/14528 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:55:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 17:55:09 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562003709.11.0.601483572935.issue37421@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14342 pull_request: https://github.com/python/cpython/pull/14529 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:56:16 2019 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 01 Jul 2019 17:56:16 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1562003776.58.0.969655953091.issue37221@roundup.psfhosted.org> Stefan Behnel added the comment: > Is it part of Cython 0.29.11 released yesterday? Yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:56:20 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Jul 2019 17:56:20 +0000 Subject: [issue37439] Add random.binomialvariate() In-Reply-To: <1561714089.16.0.904652961331.issue37439@roundup.psfhosted.org> Message-ID: <1562003780.81.0.556506493916.issue37439@roundup.psfhosted.org> Mark Dickinson added the comment: If you want to be able to switch to something more efficient for large `n`, Knuth describes a simple O(log(n)) algorithm in TAOCP volume 4 (and attributes it to J. H. Ahrens). It's essentially a bisection search on the value, using the fact that we can use the beta distribution to generate order statistics. Here's a (too) simple Python implementation. It still needs thorough testing, and could be optimised in many ways - e.g., using sensible crossover point for n and not recursing all the way to n = 0. def binomialvariate(n, p): if n == 0: return 0 a, b = (1 + n)//2, 1 + n//2 x = betavariate(a, b) if x < p: return a + binomialvariate(b - 1, (p - x)/(1 - x)) else: return binomialvariate(a - 1, p/x) >>> binomialvariate(10**10, 0.5) 4999944649 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:01:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 18:01:48 +0000 Subject: [issue37475] What is urllib.request.urlcleanup() function? Message-ID: <1562004108.37.0.0869622537038.issue37475@roundup.psfhosted.org> New submission from STINNER Victor : While working on bpo-37421 "Some tests leak temporary files", I had to write PR 14529 fix: test_urllib urlretrieve() tests now explicitly call urlcleanup() to remove temporary files. If urlretrieve() caller forgets to remove the temporary file, the "temporary" file is left in the temporary directory, until this directory is cleared which may happen soon (next reboot?) or not. When ContentTooShortError is raised, the temporary file is left in the temporary directory: the caller must call urlcleanup() explicitly. It sounds like a bug to me. Is it really a good API if urlcleanup() must be called explicitly? I dislike having a "separated" function for the cleanup, whereas Python could rely on object lifetime to do the cleanup. Should we deprecate this API in favor of a better urllib API? ---------- components: Library (Lib) messages: 347056 nosy: vstinner, xtreak priority: normal severity: normal status: open title: What is urllib.request.urlcleanup() function? versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:03:27 2019 From: report at bugs.python.org (Avinash Sajjanshetty) Date: Mon, 01 Jul 2019 18:03:27 +0000 Subject: [issue37439] Add random.binomialvariate() In-Reply-To: <1561714089.16.0.904652961331.issue37439@roundup.psfhosted.org> Message-ID: <1562004207.46.0.745377556222.issue37439@roundup.psfhosted.org> Change by Avinash Sajjanshetty : ---------- keywords: +patch pull_requests: +14343 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14530 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:06:21 2019 From: report at bugs.python.org (Avinash Sajjanshetty) Date: Mon, 01 Jul 2019 18:06:21 +0000 Subject: [issue37439] Add random.binomialvariate() In-Reply-To: <1561714089.16.0.904652961331.issue37439@roundup.psfhosted.org> Message-ID: <1562004381.63.0.092062790052.issue37439@roundup.psfhosted.org> Avinash Sajjanshetty added the comment: @Mark - Newb here and before I could see your reply, I sent a PR cos I thought simple implementation provided by Raymond Hettinger was good enough. Shall I update the PR? I will add the tests soon. ---------- nosy: +avi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:07:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Jul 2019 18:07:59 +0000 Subject: [issue37468] Don't install wininst*.exe on non-Windows platforms In-Reply-To: <1561984669.65.0.392603753819.issue37468@roundup.psfhosted.org> Message-ID: <1562004479.61.0.819546754527.issue37468@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +dstufft, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:15:10 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Jul 2019 18:15:10 +0000 Subject: [issue37475] What is urllib.request.urlcleanup() function? In-Reply-To: <1562004108.37.0.0869622537038.issue37475@roundup.psfhosted.org> Message-ID: <1562004910.11.0.752227467151.issue37475@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:28:58 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 18:28:58 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1562005738.33.0.715333906537.issue36763@roundup.psfhosted.org> miss-islington added the comment: New changeset 4c227e6a56a9704fe5b4e4509071796f3359f4bb by Miss Islington (bot) in branch '3.8': bpo-36763: Use PyConfig_Clear() (GH-14445) https://github.com/python/cpython/commit/4c227e6a56a9704fe5b4e4509071796f3359f4bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:29:52 2019 From: report at bugs.python.org (hai shi) Date: Mon, 01 Jul 2019 18:29:52 +0000 Subject: [issue37476] Adding a unit test of unicode in test_unicode.py Message-ID: <1562005792.78.0.882905794815.issue37476@roundup.psfhosted.org> New submission from hai shi : As title, Adding a unit test of unicode in test_unicode.py. ---------- components: Tests messages: 347059 nosy: shihai1991 priority: normal severity: normal status: open title: Adding a unit test of unicode in test_unicode.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:32:21 2019 From: report at bugs.python.org (hai shi) Date: Mon, 01 Jul 2019 18:32:21 +0000 Subject: [issue37476] Adding a unit test of unicode in test_unicode.py In-Reply-To: <1562005792.78.0.882905794815.issue37476@roundup.psfhosted.org> Message-ID: <1562005941.67.0.973887954879.issue37476@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14344 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14531 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:37:15 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 01 Jul 2019 18:37:15 +0000 Subject: [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562006235.14.0.952822043746.issue37456@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Hi, Would you like to do a PR updating it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:47:37 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Jul 2019 18:47:37 +0000 Subject: [issue37439] Add random.binomialvariate() In-Reply-To: <1561714089.16.0.904652961331.issue37439@roundup.psfhosted.org> Message-ID: <1562006857.91.0.677399744043.issue37439@roundup.psfhosted.org> Mark Dickinson added the comment: @avi That's Raymond's call, but IMO there's absolutely nothing wrong with getting a reference implementation (with tests, documentation, and all the usual trimmings) in first and then making algorithmic improvements later. Thanks for the PR! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:53:01 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 18:53:01 +0000 Subject: [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562007181.51.0.241406589034.issue37469@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset b0ab95bbe792b38e952688f8fa1657a78b35410e by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener. (GH-14521) (GH-14526) https://github.com/python/cpython/commit/b0ab95bbe792b38e952688f8fa1657a78b35410e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:53:31 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 18:53:31 +0000 Subject: [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562007211.42.0.831051691152.issue37469@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 6cde61369e8174c493ca240cb52ebc9c2a2fe667 by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener. (GH-14521) (GH-14525) https://github.com/python/cpython/commit/6cde61369e8174c493ca240cb52ebc9c2a2fe667 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:54:32 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 18:54:32 +0000 Subject: [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562007272.81.0.0872111487836.issue37469@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:04:34 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 19:04:34 +0000 Subject: [issue37390] Generate table of audit events for docs In-Reply-To: <1561391164.88.0.923938823513.issue37390@roundup.psfhosted.org> Message-ID: <1562007874.89.0.297995212247.issue37390@roundup.psfhosted.org> Steve Dower added the comment: The page is not generating correctly at https://docs.python.org/dev/library/audit_events.html Adding the documentation team, where hopefully someone will know what needs poking. ---------- nosy: +eric.araujo, ezio.melotti, mdk, willingc resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:05:01 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Jul 2019 19:05:01 +0000 Subject: [issue37450] Generalize Euclidean distance function in the math module to Minkowski distance In-Reply-To: <1561876936.33.0.5720685617.issue37450@roundup.psfhosted.org> Message-ID: <1562007901.51.0.283113372926.issue37450@roundup.psfhosted.org> Mark Dickinson added the comment: Agreed. We've moved away from the "Python's math module is just a set of wrappers around the C math library" stage, but it's still important to keep the math module a coherent set of basic building blocks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:10:06 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Jul 2019 19:10:06 +0000 Subject: [issue37439] Add random.binomialvariate() In-Reply-To: <1561714089.16.0.904652961331.issue37439@roundup.psfhosted.org> Message-ID: <1562008206.5.0.665590941238.issue37439@roundup.psfhosted.org> Mark Dickinson added the comment: > [...] and then making algorithmic improvements later. Though thinking about it, there is *one* catch: for the random module, it's nice if reproducibility isn't broken more often than necessary in released versions, so it would be best to do any algorithmic tweaking *before* 3.9.0 is released. But that still gives us some time ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:14:27 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 19:14:27 +0000 Subject: [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562008467.35.0.739412972227.issue37470@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +14345 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14532 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:27:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Jul 2019 19:27:44 +0000 Subject: [issue37475] What is urllib.request.urlcleanup() function? In-Reply-To: <1562004108.37.0.0869622537038.issue37475@roundup.psfhosted.org> Message-ID: <1562009264.84.0.848471907966.issue37475@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I have added Senthil for thoughts. The temporary files is also stored in a module level variable. Looking into the git history there were some changes in e24f96a05973ddbb59d88c03570aef8545c5ef10 . The function is also marked as legacy in __all__ with compat code in 2to3. urlcleanup also sets the global variable _opener to None so it does the extra work of uninstalling the global variable opener set by install_opener which is also not documented. urlretrieve enables retrieving and storing the content in a temporary file to return (tempfilename, headers) to be read later. In case the user doesn't give a filename it implicitly creates a temporary file. There is similar code in urllib.request.URLopener().retrieve [0] too where the temporary files are created implicitly but __del__ is overridden where the temp files are deleted as the program exits. I think it's better to ask the user to give filename and so that the user is responsible for the file but since the behavior is present for a long time there is backwards compatibility in changing this and there might be some code depending on the implicit temporary file created as a feature. One possible way would be to have a wrapper class that creates the temporary file when not given and then deletes it or calls urlcleanup on __del__ to clean it up as the GC is called like URLopener.retrieve? This would be done only when user doesn't give a file and for the temporary files generated by urlretrieve. [0] https://github.com/python/cpython/blob/67310023f299b5a2fad71fca449b46d280036690/Lib/urllib/request.py#L1702 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:42:47 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Jul 2019 19:42:47 +0000 Subject: [issue37390] Generate table of audit events for docs In-Reply-To: <1561391164.88.0.923938823513.issue37390@roundup.psfhosted.org> Message-ID: <1562010167.0.0.486111556675.issue37390@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Strange, I bet that I have seen this rendered table while the issue was closed. The docs table renders fine locally on latest master. Given that Audit event, Arguments and References table header are rendered with the table being replaced I guess somehow env.all_audit_events is empty. Is there something related to storing it with env? I hope docs CI to generate html daily is also done in a clean state like locally. Is it possible to get archives of docs releases to see from when this was missing as in https://docs.python.org/3.9/download.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:45:08 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 19:45:08 +0000 Subject: [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010308.44.0.949811946789.issue37470@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 0f4e8132820947d93eccf31b9e526b81c6ffa53d by Vinay Sajip in branch 'master': bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532) https://github.com/python/cpython/commit/0f4e8132820947d93eccf31b9e526b81c6ffa53d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:45:35 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 19:45:35 +0000 Subject: [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010335.8.0.650406053235.issue37470@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14346 pull_request: https://github.com/python/cpython/pull/14533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:45:42 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 19:45:42 +0000 Subject: [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010342.26.0.0398343976749.issue37470@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14347 pull_request: https://github.com/python/cpython/pull/14534 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:46:22 2019 From: report at bugs.python.org (Caleb Donovick) Date: Mon, 01 Jul 2019 19:46:22 +0000 Subject: [issue36881] isinstance raises TypeError for metaclass with metaclass=ABCMeta In-Reply-To: <1557541744.61.0.162387429511.issue36881@roundup.psfhosted.org> Message-ID: <1562010382.1.0.626073445814.issue36881@roundup.psfhosted.org> Change by Caleb Donovick : ---------- nosy: +donovick _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:46:34 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 01 Jul 2019 19:46:34 +0000 Subject: [issue37462] Default starting directory for os.walk() In-Reply-To: <1561962630.68.0.390698602335.issue37462@roundup.psfhosted.org> Message-ID: <1562010394.8.0.362890657994.issue37462@roundup.psfhosted.org> Kyle Stanley added the comment: Oh okay thanks taleinat. I wasn't aware of the existence of the ideas mailing list, I'll have to check that out next time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:51:24 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 19:51:24 +0000 Subject: [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010684.41.0.971873153446.issue37470@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 844a9d64a4f640d1b20dc6ea54ab375680332d93 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532) (GH-14534) https://github.com/python/cpython/commit/844a9d64a4f640d1b20dc6ea54ab375680332d93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:53:42 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 19:53:42 +0000 Subject: [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010822.9.0.51644292863.issue37470@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 91f9f098fcdb023dbb89d06c8833e89a11cbae4c by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532) (GH-14533) https://github.com/python/cpython/commit/91f9f098fcdb023dbb89d06c8833e89a11cbae4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:54:29 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 19:54:29 +0000 Subject: [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010869.12.0.0966403417178.issue37470@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 16:35:15 2019 From: report at bugs.python.org (Erik Aronesty) Date: Mon, 01 Jul 2019 20:35:15 +0000 Subject: [issue37477] NamedTemporaryFile can hang on windows Message-ID: <1562013315.01.0.238177593391.issue37477@roundup.psfhosted.org> New submission from Erik Aronesty : Depending on the user's permissions, this code can hang, instead of raising an exception: from tempfile import NamedTemporaryFile NamedTemporaryFile(dir="/") The problamatic code is in tempfile.py: When encountering a "[Errno 13] Permission denied: '/tmpmcupmo_g'", the current code uses _os.access(dir, _os.W_OK) in two places to check if access is allowed to write to the directory. On windows, _os.access does not check if the user has permission to write to the folder, it only checks if the folder is read-only (and it doesn't even do a good job at that). So the temp file creator loops for a rather long time, and consumes a massive amount of system resources, because os.TMP_MAX on modern windows versions is 2147483647. This article explains how to check if a directory can-write without trying to write to it: http://blog.aaronballman.com/2011/08/how-to-check-access-rights/ Alternatively, a more careful check of the winerror return value from the open call *might* be sufficient. ---------- messages: 347073 nosy: earonesty priority: normal severity: normal status: open title: NamedTemporaryFile can hang on windows versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 16:35:29 2019 From: report at bugs.python.org (Erik Aronesty) Date: Mon, 01 Jul 2019 20:35:29 +0000 Subject: [issue37477] NamedTemporaryFile can hang on windows In-Reply-To: <1562013315.01.0.238177593391.issue37477@roundup.psfhosted.org> Message-ID: <1562013329.62.0.122063719093.issue37477@roundup.psfhosted.org> Change by Erik Aronesty : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 17:07:32 2019 From: report at bugs.python.org (Martin Panter) Date: Mon, 01 Jul 2019 21:07:32 +0000 Subject: [issue37477] NamedTemporaryFile can hang on windows In-Reply-To: <1562013315.01.0.238177593391.issue37477@roundup.psfhosted.org> Message-ID: <1562015252.75.0.866459076009.issue37477@roundup.psfhosted.org> Martin Panter added the comment: Perhaps a duplicate of Issue 22107? ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 17:09:52 2019 From: report at bugs.python.org (Erik Aronesty) Date: Mon, 01 Jul 2019 21:09:52 +0000 Subject: [issue37477] NamedTemporaryFile can hang on windows In-Reply-To: <1562013315.01.0.238177593391.issue37477@roundup.psfhosted.org> Message-ID: <1562015392.68.0.951435128576.issue37477@roundup.psfhosted.org> Erik Aronesty added the comment: yes, duplicate of https://bugs.python.org/issue22107 ... tried looking first, sry. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 17:12:06 2019 From: report at bugs.python.org (Erik Aronesty) Date: Mon, 01 Jul 2019 21:12:06 +0000 Subject: [issue22107] tempfile module misinterprets access denied error on Windows In-Reply-To: <1406724041.52.0.0365391579019.issue22107@psf.upfronthosting.co.za> Message-ID: <1562015526.25.0.42771094802.issue22107@roundup.psfhosted.org> Erik Aronesty added the comment: Series of operations needed to answer the questions os.access is not answering on windows: bool CanAccessFolder( LPCTSTR folderName, DWORD genericAccessRights ) { bool bRet = false; DWORD length = 0; if (!::GetFileSecurity( folderName, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, NULL, NULL, &length ) && ERROR_INSUFFICIENT_BUFFER == ::GetLastError()) { PSECURITY_DESCRIPTOR security = static_cast< PSECURITY_DESCRIPTOR >( ::malloc( length ) ); if (security && ::GetFileSecurity( folderName, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, security, length, &length )) { HANDLE hToken = NULL; if (::OpenProcessToken( ::GetCurrentProcess(), TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_DUPLICATE | STANDARD_RIGHTS_READ, &hToken )) { HANDLE hImpersonatedToken = NULL; if (::DuplicateToken( hToken, SecurityImpersonation, &hImpersonatedToken )) { GENERIC_MAPPING mapping = { 0xFFFFFFFF }; PRIVILEGE_SET privileges = { 0 }; DWORD grantedAccess = 0, privilegesLength = sizeof( privileges ); BOOL result = FALSE; mapping.GenericRead = FILE_GENERIC_READ; mapping.GenericWrite = FILE_GENERIC_WRITE; mapping.GenericExecute = FILE_GENERIC_EXECUTE; mapping.GenericAll = FILE_ALL_ACCESS; ::MapGenericMask( &genericAccessRights, &mapping ); if (::AccessCheck( security, hImpersonatedToken, genericAccessRights, &mapping, &privileges, &privilegesLength, &grantedAccess, &result )) { bRet = (result == TRUE); } ::CloseHandle( hImpersonatedToken ); } ::CloseHandle( hToken ); } ::free( security ); } } return bRet; } ---------- nosy: +earonesty _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 17:30:09 2019 From: report at bugs.python.org (Martin Panter) Date: Mon, 01 Jul 2019 21:30:09 +0000 Subject: [issue37477] NamedTemporaryFile can hang on windows In-Reply-To: <1562013315.01.0.238177593391.issue37477@roundup.psfhosted.org> Message-ID: <1562016609.47.0.384922434938.issue37477@roundup.psfhosted.org> Change by Martin Panter : ---------- resolution: -> duplicate superseder: -> tempfile module misinterprets access denied error on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:25:33 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Jul 2019 22:25:33 +0000 Subject: [issue31783] Race condition in ThreadPoolExecutor when scheduling new jobs while the interpreter shuts down In-Reply-To: <1507930035.71.0.213398074469.issue31783@psf.upfronthosting.co.za> Message-ID: <1562019933.78.0.110656318344.issue31783@roundup.psfhosted.org> Ned Deily added the comment: Brian, should this fix be backported to 3.8 and 3.7? As it stands now, it will only be showing up in Python 3.9 unless you add the backport labels to the original PR. Unless it cna be shown to be a security issue, it would not be appropriate to backport to 3.6 at this stage. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:32:23 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 01 Jul 2019 22:32:23 +0000 Subject: [issue31783] Race condition in ThreadPoolExecutor when scheduling new jobs while the interpreter shuts down In-Reply-To: <1562019933.78.0.110656318344.issue31783@roundup.psfhosted.org> Message-ID: Brian Quinlan added the comment: I don't know what the backport policy is. The bug is only theoretical AFAIK i.e. someone noticed it through code observation but it has not appeared in the wild. On Mon, Jul 1, 2019 at 3:25 PM Ned Deily wrote: > > Ned Deily added the comment: > > Brian, should this fix be backported to 3.8 and 3.7? As it stands now, it > will only be showing up in Python 3.9 unless you add the backport labels to > the original PR. Unless it cna be shown to be a security issue, it would > not be appropriate to backport to 3.6 at this stage. > > ---------- > nosy: +ned.deily > > _______________________________________ > Python tracker > > _______________________________________ > > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:37:22 2019 From: report at bugs.python.org (SoniEx2) Date: Mon, 01 Jul 2019 22:37:22 +0000 Subject: [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562020642.16.0.152383639057.issue37456@roundup.psfhosted.org> SoniEx2 added the comment: no thanks, I don't like signing CLAs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:40:23 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 01 Jul 2019 22:40:23 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised Message-ID: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> New submission from Kyle Stanley : In the section describing the functionality of os.chdir(), there is no mention of possible errors that can be raised. This differentiates significantly from the sections of other methods, such as os.is_dir(): "This method can raise :exc:`OSError`, such as :exc:`PermissionError`, but :exc:`FileNotFoundError` is caught and not raised." For the purpose of consistency and providing additional useful information, I would suggest doing the same for os.chdir(). os.chdir() differs from os.is_dir() by directly raising the OSErrors FileNotFoundError and NotADirectoryError rather than handling them. I would suggest the addition of the following in os.chdir()'s section: "This method can raise :exc:`OSError`, such as exc:`FileNotFoundError` if the *path* does not lead to a valid file or exc:`NotADirectoryError` if the file specified is not a valid directory." or a less verbose alternative: "This method can raise :exc:`OSError`, such as exc:`FileNotFoundError` and exc:`NotADirectoryError`." If a user is reading the documentation, they might naturally assume that os.chdir() catches the FileNotFoundError, similar to the behavior in os.is_dir(). Also, the NotADirectoryError is not explicitly mentioned anywhere else on the "os.rst" page. If it were to be mentioned anywhere, os.chdir() would probably be the most relevant location to do so. Also, as a general question, what exactly is the standard for mentioning errors in the method sections for the Python documentation? For the purposes of clarity, I think it would be quite useful to explicitly mention errors, and a brief description of situations which raise them. If the behavior of the errors is consistent across of a group of methods, it can instead be mentioned in the header section. However, if the behavior not consistent, such as in this case, I think it is useful to briefly mention how the method deviates. It also seems useful to mention the error at least once if it is not explicitly mentioned elsewhere on the page, even if the parent is mentioned, such as with NotADirectoryError and OSError. This seems to be particularly important to do for the docs in a language such as Python, as it does not require the raise-able/throw-able errors to be mentioned in the code. I have already created a branch in my local fork of the cpython repository which implements this change, but I'll await feedback before submitting the PR. ---------- assignee: docs at python components: Documentation messages: 347080 nosy: aeros167, docs at python priority: normal severity: normal status: open title: Docs: Method os.chdir() does not mention errors that can be raised type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:40:54 2019 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 01 Jul 2019 22:40:54 +0000 Subject: [issue37199] Test suite fails when Ipv6 is unavailable In-Reply-To: <1559926830.72.0.215725323123.issue37199@roundup.psfhosted.org> Message-ID: <1562020854.19.0.866966105858.issue37199@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +14348 pull_request: https://github.com/python/cpython/pull/14535 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:50:33 2019 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 01 Jul 2019 22:50:33 +0000 Subject: [issue37475] What is urllib.request.urlcleanup() function? In-Reply-To: <1562004108.37.0.0869622537038.issue37475@roundup.psfhosted.org> Message-ID: <1562021433.32.0.466419456415.issue37475@roundup.psfhosted.org> Senthil Kumaran added the comment: Hi Victor and Karthikeyan, Both your analysis are correct. - This is a legacy interface, present purely for satisfying the old code, when urlretrieve was advertised as the first/easy to way to use urllib and download something. - At this moment, I think, we should remove those legacy interfaces including urlcleanup. - I think, users can easily using urllib to write to the file using context manager and if desired urlretrieve can be modernized over it's use of urlcleanup. +1 to deprecation and removal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:55:03 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Jul 2019 22:55:03 +0000 Subject: [issue31783] Race condition in ThreadPoolExecutor when scheduling new jobs while the interpreter shuts down In-Reply-To: <1507930035.71.0.213398074469.issue31783@psf.upfronthosting.co.za> Message-ID: <1562021703.37.0.986022539496.issue31783@roundup.psfhosted.org> Ned Deily added the comment: > I don't know what the backport policy is. It does seem that the devguide does not give much guidance on this; I've opened an issue about it (https://github.com/python/devguide/issues/503). But, in general, if the fix is potentially beneficial and does not add undue risk or an incompatibility, we would generally consider backporting it to the currently active maintenance branches; at the moment, that would be 3.8 (in beta phase) and 3.7 (maintenance nmode). We have a lot of buildbot tests that show non-deterministic failures, some possibly due to concurrent.futures. If there is a chance that this fix might mitigate those, I'd like to consider it for backporting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:01:29 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 01 Jul 2019 23:01:29 +0000 Subject: [issue31783] Race condition in ThreadPoolExecutor when scheduling new jobs while the interpreter shuts down In-Reply-To: <1562021703.37.0.986022539496.issue31783@roundup.psfhosted.org> Message-ID: Brian Quinlan added the comment: Can I add "needs backport to 3.8" and "needs backport to 3.7" labels now or do I have to use cherry_picker at this point? On Mon, Jul 1, 2019 at 3:55 PM Ned Deily wrote: > > Ned Deily added the comment: > > > I don't know what the backport policy is. > > It does seem that the devguide does not give much guidance on this; I've > opened an issue about it (https://github.com/python/devguide/issues/503). > But, in general, if the fix is potentially beneficial and does not add > undue risk or an incompatibility, we would generally consider backporting > it to the currently active maintenance branches; at the moment, that would > be 3.8 (in beta phase) and 3.7 (maintenance nmode). We have a lot of > buildbot tests that show non-deterministic failures, some possibly due to > concurrent.futures. If there is a chance that this fix might mitigate > those, I'd like to consider it for backporting. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:02:17 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Jul 2019 23:02:17 +0000 Subject: [issue31783] Race condition in ThreadPoolExecutor when scheduling new jobs while the interpreter shuts down In-Reply-To: <1507930035.71.0.213398074469.issue31783@psf.upfronthosting.co.za> Message-ID: <1562022137.64.0.384376826783.issue31783@roundup.psfhosted.org> Ned Deily added the comment: Yes, you can still add the backport labels even after the original PR has been merged. It's magic! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:03:58 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 23:03:58 +0000 Subject: [issue37363] Additional PEP578 hooks In-Reply-To: <1561131749.05.0.996884755083.issue37363@roundup.psfhosted.org> Message-ID: <1562022238.78.0.0920687569992.issue37363@roundup.psfhosted.org> Steve Dower added the comment: New changeset e226e83d36dfc7220d836fb7a249ce18e70cb4a6 by Steve Dower in branch 'master': bpo-37363: Add audit events on startup for the run commands (GH-14524) https://github.com/python/cpython/commit/e226e83d36dfc7220d836fb7a249ce18e70cb4a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:04:05 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 23:04:05 +0000 Subject: [issue37363] Additional PEP578 hooks In-Reply-To: <1561131749.05.0.996884755083.issue37363@roundup.psfhosted.org> Message-ID: <1562022245.79.0.656202558237.issue37363@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14349 pull_request: https://github.com/python/cpython/pull/14536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:04:53 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 01 Jul 2019 23:04:53 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562022293.6.0.110977389847.issue37478@roundup.psfhosted.org> Kyle Stanley added the comment: Minor clarifications: This change is referring to the "Files and Directories" section of the "os.rst" page in "cpython/Doc/library/os.rst". Also, I realized that I forgot to add the colon before "exc" in a couple locations. This was just a typo when writing the comment, it is correctly formatted in my local branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:15:12 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Jul 2019 23:15:12 +0000 Subject: [issue19960] zlib skipped when building 2.7 on macOS without /usr/include installed In-Reply-To: <1386850025.77.0.292014271005.issue19960@psf.upfronthosting.co.za> Message-ID: <1562022912.71.0.360534255345.issue19960@roundup.psfhosted.org> Ned Deily added the comment: New changeset da7f6dbbf52fe7074360a9eae918806da60139c5 by Ned Deily in branch '2.7': bpo-19960: Fix building of zlib on macOS without installed headers (GH-14257) https://github.com/python/cpython/commit/da7f6dbbf52fe7074360a9eae918806da60139c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:19:24 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Jul 2019 23:19:24 +0000 Subject: [issue19960] zlib skipped when building 2.7 on macOS without /usr/include installed In-Reply-To: <1386850025.77.0.292014271005.issue19960@psf.upfronthosting.co.za> Message-ID: <1562023164.9.0.580251541617.issue19960@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:22:32 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 23:22:32 +0000 Subject: [issue37363] Additional PEP578 hooks In-Reply-To: <1561131749.05.0.996884755083.issue37363@roundup.psfhosted.org> Message-ID: <1562023352.27.0.584757952786.issue37363@roundup.psfhosted.org> miss-islington added the comment: New changeset 746992c1ae4c632220563d3fe54123498f93db1d by Miss Islington (bot) in branch '3.8': bpo-37363: Add audit events on startup for the run commands (GH-14524) https://github.com/python/cpython/commit/746992c1ae4c632220563d3fe54123498f93db1d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:24:11 2019 From: report at bugs.python.org (Jason Curtis) Date: Mon, 01 Jul 2019 23:24:11 +0000 Subject: [issue37479] IntEnum f-string behavior can't be overridden Message-ID: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> New submission from Jason Curtis : Combining int and Enum, as with enum.IntEnum results in a class where __str__ cannot be effectively overridden. For example: from enum import IntEnum class myIntEnum(IntEnum): x = 1 def __str__(self): return 'aaaaAAAa' f'{myIntEnum.x}, {str(myIntEnum.x)}' Expected output: 'aaaaAAAa, aaaaAAAa' Actual output: '1, aaaaAAAa' Overriding __str__ in this way works as expected if the inherited classes are int or Enum individually. However, it does not work when inheriting (int, Enum) or when inheriting (intEnum). Presumably this is a side effect of Enum's mixin behavior documented at https://docs.python.org/3/library/enum.html#others and it is possibly related to https://bugs.python.org/issue18264 . ---------- components: Library (Lib) messages: 347089 nosy: Jason Curtis priority: normal severity: normal status: open title: IntEnum f-string behavior can't be overridden type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:26:59 2019 From: report at bugs.python.org (Jason Curtis) Date: Mon, 01 Jul 2019 23:26:59 +0000 Subject: [issue37479] IntEnum f-string behavior can't be overridden In-Reply-To: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> Message-ID: <1562023619.61.0.764593146744.issue37479@roundup.psfhosted.org> Jason Curtis added the comment: I mistyped - __str__ can be overridden effectively, but __format__ has to be overridden instead or overridden also to get the desired f-string behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:27:07 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 01 Jul 2019 23:27:07 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562023627.33.0.613697652309.issue19696@roundup.psfhosted.org> Change by Kyle Stanley : ---------- pull_requests: +14350 pull_request: https://github.com/python/cpython/pull/14537 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:35:55 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 01 Jul 2019 23:35:55 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562024155.45.0.155500594864.issue19696@roundup.psfhosted.org> Kyle Stanley added the comment: Created a new PR for moving the last two files "test_threaded_import.py" and "threaded_import_hangers.py" to the directory "test_importlib". (https://github.com/python/cpython/pull/14537) There were some issues with automatically merging the changes, was the conflict because I attempted to move two files in a single PR? The previous one (which was just moving a single file) did not have any issues with merge conflicts. This should be the final PR required for this issue, afterwards I'll look into creating a new issue for modernizing the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:41:57 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 23:41:57 +0000 Subject: [issue37390] Generate table of audit events for docs In-Reply-To: <1561391164.88.0.923938823513.issue37390@roundup.psfhosted.org> Message-ID: <1562024517.8.0.887937611084.issue37390@roundup.psfhosted.org> Steve Dower added the comment: I can't repro this. It looks like Doc/makefile#L196 passes -Ea which ought to deal with any old files (and it certainly does on my Ubuntu machine), so it's likely not that. The table contents is simply not in the file on docs.p.o, so I guess there's something in the build process that's failing? Or the environment is not making it to the output stage for some reason? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:43:03 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 23:43:03 +0000 Subject: [issue37363] Additional PEP578 hooks In-Reply-To: <1561131749.05.0.996884755083.issue37363@roundup.psfhosted.org> Message-ID: <1562024583.27.0.566831564846.issue37363@roundup.psfhosted.org> Steve Dower added the comment: All that's left here right now is some xmlrpc events, unless we can think of any more stdlib modules that should have them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:43:05 2019 From: report at bugs.python.org (Jason Curtis) Date: Mon, 01 Jul 2019 23:43:05 +0000 Subject: [issue37479] IntEnum f-string behavior can't be overridden In-Reply-To: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> Message-ID: <1562024585.66.0.981930448316.issue37479@roundup.psfhosted.org> Jason Curtis added the comment: related cPython code: https://github.com/python/cpython/blob/19a1e1eb86115db66c1faae5927f87e3a12692fc/Lib/enum.py#L626 If we're in a mixed-in class but the class has overridden __str__(), we should probably use str(self) instead of self._value_. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 20:24:30 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 02 Jul 2019 00:24:30 +0000 Subject: [issue22107] tempfile module misinterprets access denied error on Windows In-Reply-To: <1406724041.52.0.0365391579019.issue22107@psf.upfronthosting.co.za> Message-ID: <1562027070.78.0.993824883955.issue22107@roundup.psfhosted.org> Eryk Sun added the comment: CanAccessFolder is incomplete for the following reasons: (1) It doesn't account for SeBackupPrivilege (read and execute access) and SeRestorePrivilege (write and delete access). If a create or open call requests backup semantics, these two privileges are checked by the I/O Manager in order to grant access before the request is sent to the filesystem device stack. That said, our os.open() call doesn't use O_OBTAIN_DIR (0x2000), an undocumented flag that allows opening a directory by requesting backup semantics. If it did use this undocumented flag, there would actually be no problem to solve since we would get FileExistsError instead of PermissionError. (2) It doesn't check the parent directory in case FILE_READ_ATTRIBUTES access (required for GENERIC_READ) or DELETE access (required for GENERIC_ALL) are either not granted or denied to the user for the target directory. These rights are granted by NT filesystem policy if FILE_READ_DATA and FILE_DELETE_CHILD access are granted to the parent directory, respectively. This is a general concern that's not relevant here since we only need to check the directory for write access (i.e. FILE_ADD_FILE). (3) It doesn't get the LABEL_SECURITY_INFORMATION from the file security, in order to check for no-read-up, no-write-up, and no-execute-up mandatory access. Adding files to a directory is disallowed if its mandatory label denies write-up access and its integrity level is higher than the caller's (e.g. the caller is a standard user at medium integrity level, and the directory is at high or system integrity level). (4) It doesn't check effective access via OpenThreadToken, in case the thread is impersonating. (5) It cannot take into account access granted or denied by filesystem filter drivers such as antimalware programs. For this, we need to actually try to open the directory with the requested access via CreateFile. We're granted the required access if CreateFile succeeds, or if it fails with a sharing violation (i.e. winerror 32). A sharing violation isn't an issue since in practice adding a file to a directory is internal to a filesystem; it doesn't count against shared data access. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 20:38:41 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Jul 2019 00:38:41 +0000 Subject: [issue37479] IntEnum f-string behavior can't be overridden In-Reply-To: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> Message-ID: <1562027921.05.0.382847886802.issue37479@roundup.psfhosted.org> Eric V. Smith added the comment: Note that this isn't really related to f-strings, except that they use the __format__ protocol, as does str.__format__. >>> format(myIntEnum.x) '1' ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 20:43:44 2019 From: report at bugs.python.org (Zufu Liu) Date: Tue, 02 Jul 2019 00:43:44 +0000 Subject: [issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum In-Reply-To: <1561686823.22.0.469835611791.issue37436@roundup.psfhosted.org> Message-ID: <1562028224.53.0.766398717627.issue37436@roundup.psfhosted.org> Zufu Liu added the comment: Personally I prefer TypeError. Use file descriptor is rare, I never used it in Python script. I encountered this because arguments passed in wrong order in my function, then I passed the wrong argument to isfile() without checking. Make isfile() returns False would make it harder to find bugs in user program. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 21:19:41 2019 From: report at bugs.python.org (Ethan Furman) Date: Tue, 02 Jul 2019 01:19:41 +0000 Subject: [issue37479] IntEnum f-string behavior can't be overridden In-Reply-To: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> Message-ID: <1562030381.96.0.337860258315.issue37479@roundup.psfhosted.org> Change by Ethan Furman : ---------- assignee: -> ethan.furman nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 22:49:01 2019 From: report at bugs.python.org (Zufu Liu) Date: Tue, 02 Jul 2019 02:49:01 +0000 Subject: [issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum In-Reply-To: <1561686823.22.0.469835611791.issue37436@roundup.psfhosted.org> Message-ID: <1562035741.42.0.415510847382.issue37436@roundup.psfhosted.org> Zufu Liu added the comment: Please also consider following pieces of code. They (value of int sub classes) can't be returned by fileno(). Python 3.8.0b1 (tags/v3.8.0b1:3b5deb0116, Jun 4 2019, 19:52:55) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> class MyInt(int):pass ... >>> a=MyInt(6) >>> a 6 >>> import os.path >>> os.path.isfile(a) False >>> os.path.isfile(True) False >>> os.path.isfile(False) False >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 23:03:56 2019 From: report at bugs.python.org (Zach Valenta) Date: Tue, 02 Jul 2019 03:03:56 +0000 Subject: [issue37480] add ptpython to list of alternate interpreters Message-ID: <1562036636.74.0.198372246702.issue37480@roundup.psfhosted.org> New submission from Zach Valenta : Referring to the last paragraph of chapter 14 of the tutorial on interactive interpreters: https://docs.python.org/3/tutorial/interactive.html#alternatives-to-the-interactive-interpreter Despite personally using bpython, ptpython seems both mature and popular enough to merit inclusion in the docs. Plus, bpython recommends them :) ---------- assignee: docs at python components: Documentation messages: 347099 nosy: docs at python, zjayv priority: normal severity: normal status: open title: add ptpython to list of alternate interpreters type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 23:06:25 2019 From: report at bugs.python.org (Zach Valenta) Date: Tue, 02 Jul 2019 03:06:25 +0000 Subject: [issue37480] add ptpython to list of alternate interpreters In-Reply-To: <1562036636.74.0.198372246702.issue37480@roundup.psfhosted.org> Message-ID: <1562036785.72.0.71773843003.issue37480@roundup.psfhosted.org> Change by Zach Valenta : ---------- keywords: +patch pull_requests: +14351 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14538 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 23:48:28 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Jul 2019 03:48:28 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562039308.99.0.0241043256885.issue36390@roundup.psfhosted.org> Terry J. Reedy added the comment: I think get_indent(line) is much clearer than classifyws(s)???. I propose to merge PR 12481 first, after review, with tests, and then include name change with rewrite in PR 14500. Proposed docstring: "Return line indent as # chars and effective # of spaces." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 23:55:42 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Jul 2019 03:55:42 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562039742.78.0.127740115472.issue36390@roundup.psfhosted.org> Terry J. Reedy added the comment: Tabwidth for the Text widget is currently fixed at 8 based on claim in editor.py that nothing else works correctly. It would be nice to verify if this is still correct. If it is, then there would seem to be no need to pass it around. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 00:22:36 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 02 Jul 2019 04:22:36 +0000 Subject: [issue37465] Incorrect documentation for `s#` arguments in C API argument parsing In-Reply-To: <1561972031.86.0.144069442788.issue37465@roundup.psfhosted.org> Message-ID: Inada Naoki added the comment: > Oh! Fair enough, I had missed it. Does the note also involve `Py_BuildValue`? If so, the documentation of `Py_BuildValue` should probably be updated; if not, I think it would be clearer if the note mentioned that it only applies to parsing, not building, values. Yes, this is same to Py_BuildValue. The document of Py_BuildValue should be `int or Py_ssize_t` too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 00:53:33 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Jul 2019 04:53:33 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562043213.0.0.437312235175.issue37437@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- pull_requests: +14352 pull_request: https://github.com/python/cpython/pull/14539 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:07:49 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Jul 2019 05:07:49 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562044069.19.0.03711539862.issue37437@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 2cd07920bb7d2d319999394092190f37935dc421 by Benjamin Peterson in branch 'master': Put pyexpatns.h include back. bpo-37437 (GH-14539) https://github.com/python/cpython/commit/2cd07920bb7d2d319999394092190f37935dc421 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:08:02 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 05:08:02 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562044082.73.0.189615542519.issue37437@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14353 pull_request: https://github.com/python/cpython/pull/14540 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:08:11 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 05:08:11 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562044091.96.0.282679228297.issue37437@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14354 pull_request: https://github.com/python/cpython/pull/14541 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:08:26 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 05:08:26 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562044106.07.0.961703105343.issue37437@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14355 pull_request: https://github.com/python/cpython/pull/14542 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:08:36 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 05:08:36 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562044116.62.0.0169601891448.issue37437@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14356 pull_request: https://github.com/python/cpython/pull/14543 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:22:04 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 05:22:04 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562044924.16.0.480768314188.issue37437@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14357 pull_request: https://github.com/python/cpython/pull/14544 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:26:43 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 05:26:43 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562045203.77.0.216439721107.issue37437@roundup.psfhosted.org> miss-islington added the comment: New changeset 9bd5479f8aba2687f4b8de735b1de50ef1405f19 by Miss Islington (bot) in branch '3.8': Put pyexpatns.h include back. bpo-37437 (GH-14539) https://github.com/python/cpython/commit/9bd5479f8aba2687f4b8de735b1de50ef1405f19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:29:08 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 05:29:08 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562045348.6.0.666943587284.issue37437@roundup.psfhosted.org> miss-islington added the comment: New changeset f3130fab9c5cbc7125695dbd66cdc2fd76e20093 by Miss Islington (bot) in branch '3.7': Put pyexpatns.h include back. bpo-37437 (GH-14539) https://github.com/python/cpython/commit/f3130fab9c5cbc7125695dbd66cdc2fd76e20093 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:38:36 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 05:38:36 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562045916.17.0.661544432763.issue37437@roundup.psfhosted.org> miss-islington added the comment: New changeset 03b01280825871f6a5bb165fe25d412e33751d45 by Miss Islington (bot) in branch '2.7': Put pyexpatns.h include back. bpo-37437 (GH-14539) https://github.com/python/cpython/commit/03b01280825871f6a5bb165fe25d412e33751d45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:42:03 2019 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Jul 2019 05:42:03 +0000 Subject: [issue37479] IntEnum f-string behavior can't be overridden In-Reply-To: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> Message-ID: <1562046123.57.0.396817100644.issue37479@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14358 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:48:19 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Jul 2019 05:48:19 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562046499.55.0.704916347264.issue37437@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 29d6905826d4417426e70f6209ca5e0db7921685 by Benjamin Peterson (Miss Islington (bot)) in branch '3.6': Put pyexpatns.h include back. bpo-37437 (GH-14542) https://github.com/python/cpython/commit/29d6905826d4417426e70f6209ca5e0db7921685 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 01:51:34 2019 From: report at bugs.python.org (Jason Curtis) Date: Tue, 02 Jul 2019 05:51:34 +0000 Subject: [issue37479] IntEnum __format__ behavior can't be overridden through __str__ In-Reply-To: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> Message-ID: <1562046694.01.0.550984756487.issue37479@roundup.psfhosted.org> Change by Jason Curtis : ---------- title: IntEnum f-string behavior can't be overridden -> IntEnum __format__ behavior can't be overridden through __str__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:29:42 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 02 Jul 2019 06:29:42 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1562048982.41.0.154556374839.issue37461@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Since the parser could take user input this looks like a security issue to me along with high CPU usage. Feel free to remove the tag if it's not a security issue. Thanks. ---------- keywords: +security_issue nosy: +xtreak versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:32:41 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 02 Jul 2019 06:32:41 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1562049161.26.0.408604037383.issue37206@roundup.psfhosted.org> Inada Naoki added the comment: I agree that this is a bug in many API docstrings, and PR 13933 is the right approach to fix all bugs in the future. But in case of dict.pop(), this is not only a bug, but a regression. May I merge PR-13935 to fix the regression in 3.7b2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:37:53 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 06:37:53 +0000 Subject: [issue34602] python3 resource.setrlimit strange behaviour under macOS In-Reply-To: <1536316486.92.0.56676864532.issue34602@psf.upfronthosting.co.za> Message-ID: <1562049473.89.0.0185709630485.issue34602@roundup.psfhosted.org> Ned Deily added the comment: > So we should keep an eye open for reports of segfaults running tests as originally reported in Issue18075. Now there are such reports for 3.7.4rc1, at least. Release builds seem to be OK but at least four tests now fail on macOS 10.14.5 when built --with-pydebug: test_exceptions test_json test_logging test_sys test_traceback. Plus, changing the interpreters stack size can inhibit use of dtrace. There are really two attempts at dealing with macOS's small default stack size. The original workaround, dating back to 2002-12-02 (bb48465273d2aa98fc7669e99b0d5fb1c57962de !!) added the runtime calls in regrtest to change RLIMIT_STACK. Years later, a different approach was taken in the original change for Issue18075 (335ab5b66f432ae3713840ed2403a11c368f5406) by increasing the default stack size when building the interpreter rather than at runtime. So, I *think* that means that the original regrtest runtime workaround is really no longer needed. So I think we should take the opposite approach to what I originally merged back in April, that is, we should go back to building the interpreter with the increased stack size and remove the ancient regrtest workaround attempt: that's what was failing here anyway. The only place in the source base that resource.RLIMIT_STACK is used, outside of its functional test, is the old regrtest workaround. It's still a bit of a mystery as what has changed in 3.8 that seems to not hit the stack size limit but these kind of test failures on macOS have always been dependent on other factors, including compiler version and options. I'd like to get this into 3.8.0b2 and 3.7.4rc2 ao I'm temporarily making it a "release blocker"; the PR will follow momentarily. ---------- nosy: +lukasz.langa priority: normal -> release blocker resolution: fixed -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:40:58 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 06:40:58 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1562049658.32.0.833343751822.issue37206@roundup.psfhosted.org> Ned Deily added the comment: I think you mean 3.8b2 so that would be ?ukasz's call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:55:43 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 06:55:43 +0000 Subject: [issue34602] python3 resource.setrlimit strange behaviour under macOS In-Reply-To: <1536316486.92.0.56676864532.issue34602@psf.upfronthosting.co.za> Message-ID: <1562050543.63.0.166274794659.issue34602@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +14359 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14546 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 02:55:43 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 06:55:43 +0000 Subject: [issue18075] Infinite recursion tests triggering a segfault In-Reply-To: <1369702928.42.0.612737848185.issue18075@psf.upfronthosting.co.za> Message-ID: <1562050543.73.0.233657145282.issue18075@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +14360 pull_request: https://github.com/python/cpython/pull/14546 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:12:37 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 07:12:37 +0000 Subject: [issue18075] Infinite recursion tests triggering a segfault In-Reply-To: <1369702928.42.0.612737848185.issue18075@psf.upfronthosting.co.za> Message-ID: <1562051557.28.0.742394323125.issue18075@roundup.psfhosted.org> Ned Deily added the comment: New changeset 5bbbc733e6cc0804f19b071944af8d4719e26ae6 by Ned Deily in branch 'master': bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) https://github.com/python/cpython/commit/5bbbc733e6cc0804f19b071944af8d4719e26ae6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:12:37 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 07:12:37 +0000 Subject: [issue34602] python3 resource.setrlimit strange behaviour under macOS In-Reply-To: <1536316486.92.0.56676864532.issue34602@psf.upfronthosting.co.za> Message-ID: <1562051557.38.0.632180746895.issue34602@roundup.psfhosted.org> Ned Deily added the comment: New changeset 5bbbc733e6cc0804f19b071944af8d4719e26ae6 by Ned Deily in branch 'master': bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) https://github.com/python/cpython/commit/5bbbc733e6cc0804f19b071944af8d4719e26ae6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:12:43 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 07:12:43 +0000 Subject: [issue18075] Infinite recursion tests triggering a segfault In-Reply-To: <1369702928.42.0.612737848185.issue18075@psf.upfronthosting.co.za> Message-ID: <1562051563.96.0.19966377743.issue18075@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14362 pull_request: https://github.com/python/cpython/pull/14547 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:12:43 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 07:12:43 +0000 Subject: [issue34602] python3 resource.setrlimit strange behaviour under macOS In-Reply-To: <1536316486.92.0.56676864532.issue34602@psf.upfronthosting.co.za> Message-ID: <1562051563.88.0.69196813662.issue34602@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14361 pull_request: https://github.com/python/cpython/pull/14547 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:12:52 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 07:12:52 +0000 Subject: [issue34602] python3 resource.setrlimit strange behaviour under macOS In-Reply-To: <1536316486.92.0.56676864532.issue34602@psf.upfronthosting.co.za> Message-ID: <1562051572.46.0.0556825619685.issue34602@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14363 pull_request: https://github.com/python/cpython/pull/14548 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:12:52 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 07:12:52 +0000 Subject: [issue18075] Infinite recursion tests triggering a segfault In-Reply-To: <1369702928.42.0.612737848185.issue18075@psf.upfronthosting.co.za> Message-ID: <1562051572.55.0.89595492624.issue18075@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14364 pull_request: https://github.com/python/cpython/pull/14548 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:13:05 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 07:13:05 +0000 Subject: [issue34602] python3 resource.setrlimit strange behaviour under macOS In-Reply-To: <1536316486.92.0.56676864532.issue34602@psf.upfronthosting.co.za> Message-ID: <1562051585.41.0.326626833154.issue34602@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14365 pull_request: https://github.com/python/cpython/pull/14549 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:13:05 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 07:13:05 +0000 Subject: [issue18075] Infinite recursion tests triggering a segfault In-Reply-To: <1369702928.42.0.612737848185.issue18075@psf.upfronthosting.co.za> Message-ID: <1562051585.49.0.00990431892901.issue18075@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14366 pull_request: https://github.com/python/cpython/pull/14549 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:31:12 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 07:31:12 +0000 Subject: [issue18075] Infinite recursion tests triggering a segfault In-Reply-To: <1369702928.42.0.612737848185.issue18075@psf.upfronthosting.co.za> Message-ID: <1562052672.96.0.248245736459.issue18075@roundup.psfhosted.org> miss-islington added the comment: New changeset bd92b94da93198c8385c06ca908407f172c7e8b2 by Miss Islington (bot) in branch '3.8': bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) https://github.com/python/cpython/commit/bd92b94da93198c8385c06ca908407f172c7e8b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:31:13 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 07:31:13 +0000 Subject: [issue34602] python3 resource.setrlimit strange behaviour under macOS In-Reply-To: <1536316486.92.0.56676864532.issue34602@psf.upfronthosting.co.za> Message-ID: <1562052673.08.0.943396103694.issue34602@roundup.psfhosted.org> miss-islington added the comment: New changeset bd92b94da93198c8385c06ca908407f172c7e8b2 by Miss Islington (bot) in branch '3.8': bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) https://github.com/python/cpython/commit/bd92b94da93198c8385c06ca908407f172c7e8b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:38:41 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 07:38:41 +0000 Subject: [issue18075] Infinite recursion tests triggering a segfault In-Reply-To: <1369702928.42.0.612737848185.issue18075@psf.upfronthosting.co.za> Message-ID: <1562053121.6.0.135367865942.issue18075@roundup.psfhosted.org> miss-islington added the comment: New changeset bf82cd3124df94935c6e3190c7c40b76918d2174 by Miss Islington (bot) in branch '3.7': bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) https://github.com/python/cpython/commit/bf82cd3124df94935c6e3190c7c40b76918d2174 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:38:41 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 07:38:41 +0000 Subject: [issue34602] python3 resource.setrlimit strange behaviour under macOS In-Reply-To: <1536316486.92.0.56676864532.issue34602@psf.upfronthosting.co.za> Message-ID: <1562053121.7.0.804062730493.issue34602@roundup.psfhosted.org> miss-islington added the comment: New changeset bf82cd3124df94935c6e3190c7c40b76918d2174 by Miss Islington (bot) in branch '3.7': bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) https://github.com/python/cpython/commit/bf82cd3124df94935c6e3190c7c40b76918d2174 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:49:02 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 07:49:02 +0000 Subject: [issue18075] Infinite recursion tests triggering a segfault In-Reply-To: <1369702928.42.0.612737848185.issue18075@psf.upfronthosting.co.za> Message-ID: <1562053742.3.0.978914886184.issue18075@roundup.psfhosted.org> Ned Deily added the comment: New changeset 782854f90ad5f73f787f68693d535f2b05514e13 by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) (GH-14549) https://github.com/python/cpython/commit/782854f90ad5f73f787f68693d535f2b05514e13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:49:02 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 07:49:02 +0000 Subject: [issue34602] python3 resource.setrlimit strange behaviour under macOS In-Reply-To: <1536316486.92.0.56676864532.issue34602@psf.upfronthosting.co.za> Message-ID: <1562053742.38.0.0634014880129.issue34602@roundup.psfhosted.org> Ned Deily added the comment: New changeset 782854f90ad5f73f787f68693d535f2b05514e13 by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) (GH-14549) https://github.com/python/cpython/commit/782854f90ad5f73f787f68693d535f2b05514e13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:50:14 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 07:50:14 +0000 Subject: [issue34602] python3 resource.setrlimit strange behaviour under macOS In-Reply-To: <1536316486.92.0.56676864532.issue34602@psf.upfronthosting.co.za> Message-ID: <1562053814.08.0.217168687427.issue34602@roundup.psfhosted.org> Change by Ned Deily : ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 03:57:03 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 07:57:03 +0000 Subject: [issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error In-Reply-To: <1553584151.61.0.380593331105.issue36432@roundup.psfhosted.org> Message-ID: <1562054223.18.0.242971760622.issue36432@roundup.psfhosted.org> Ned Deily added the comment: See updated Issue34602 discussion for why reverting 335ab5b66f432ae3713840ed2403a11c368f5406 causes other problems and for a different fix for this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 04:32:12 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 08:32:12 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562056332.93.0.807447590903.issue37463@roundup.psfhosted.org> Ned Deily added the comment: Ping. At the moment, this is the only release blocker preventing the release of 3.7.4rc2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 04:49:22 2019 From: report at bugs.python.org (Riccardo Schirone) Date: Tue, 02 Jul 2019 08:49:22 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562057362.31.0.434615984322.issue37463@roundup.psfhosted.org> Riccardo Schirone added the comment: As far as I know you can't request a hostname with spaces in it (which seems to be a precondition to trigger this bug) so I think an attacker cannot even create a malicious CA that would be mistakenly accepted by match_hostname. ---------- nosy: +rschiron _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 05:14:21 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jul 2019 09:14:21 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562058861.63.0.372473221474.issue37463@roundup.psfhosted.org> Christian Heimes added the comment: Riccardo, the issue is about parsing the user supplied hostname/ipaddress, not the IPAddress field of the certificate. X.509 certs store IP addresses as fixed-size binary data, 4 bytes for IPv4 or 16 bytes for IPv6. There can't be any additional payload. The bug is in the code that parses the user supplied "hostname" parameter to ssl.match_hostname(cert, hostname). The bug allows an attacker to pass an IPv4 address with additional content and ssl.match_hostname() ignores this additional content. This example should fail, but does not fail with an exception: >>> import ssl >>> cert = {'subjectAltName': [('IP Address', '127.0.0.1 additional payload')]} >>> ssl.match_hostname(cert, '127.0.0.1') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 05:49:57 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 02 Jul 2019 09:49:57 +0000 Subject: [issue36904] Implement _PyStack_UnpackDict() with a single allocation In-Reply-To: <1557760974.34.0.94387480475.issue36904@roundup.psfhosted.org> Message-ID: <1562060997.11.0.193298723648.issue36904@roundup.psfhosted.org> Inada Naoki added the comment: New changeset d4efd917ac24940063a1ce80073fe3570c5f07f8 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-36904: Optimize _PyStack_UnpackDict (GH-14517) https://github.com/python/cpython/commit/d4efd917ac24940063a1ce80073fe3570c5f07f8 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:01:02 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Jul 2019 10:01:02 +0000 Subject: [issue37382] Improve conditional check for test_gdb In-Reply-To: <1561365073.52.0.781183249984.issue37382@roundup.psfhosted.org> Message-ID: <1562061662.74.0.343967719848.issue37382@roundup.psfhosted.org> Jeroen Demeyer added the comment: > if a change like that is pushed, all the fleet has to be monitored for potential failures, as there are many older OSes supported there. If this breaks some buildbots, then we can find out more precisely under which conditions they fail. For example, if they fail when GDB is older than a certain version, we can adjust the tests to check for that version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:04:03 2019 From: report at bugs.python.org (Atul Bagga) Date: Tue, 02 Jul 2019 10:04:03 +0000 Subject: [issue37426] getpass.getpass not working with on windows when ctrl+v is used to enter the string In-Reply-To: <1561628977.4.0.232389584594.issue37426@roundup.psfhosted.org> Message-ID: <1562061843.13.0.731809458597.issue37426@roundup.psfhosted.org> Atul Bagga added the comment: Suprisingly this works fine on ConEMU which I commonly use on windows though internally I still use powershell on conemu. https://conemu.github.io/ It does not work on CMD and Powershell consoles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:37:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 10:37:45 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562063865.97.0.786907757065.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: About urllib.request, I created: bpo-37475 "What is urllib.request.urlcleanup() function?". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:39:31 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Jul 2019 10:39:31 +0000 Subject: [issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall In-Reply-To: <1560264211.71.0.0575753966343.issue37233@roundup.psfhosted.org> Message-ID: <1562063971.55.0.280964141667.issue37233@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14367 pull_request: https://github.com/python/cpython/pull/14550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:39:31 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Jul 2019 10:39:31 +0000 Subject: [issue37138] PEP 590 method_vectorcall calls memcpy with NULL src In-Reply-To: <1559535370.56.0.947989437279.issue37138@roundup.psfhosted.org> Message-ID: <1562063971.62.0.113278237895.issue37138@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14368 pull_request: https://github.com/python/cpython/pull/14550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:40:08 2019 From: report at bugs.python.org (Marcin Niemira) Date: Tue, 02 Jul 2019 10:40:08 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1562064008.83.0.0977569363055.issue37461@roundup.psfhosted.org> Change by Marcin Niemira : ---------- keywords: +patch pull_requests: +14369 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14551 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:44:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 10:44:12 +0000 Subject: [issue37475] What is urllib.request.urlcleanup() function? In-Reply-To: <1562004108.37.0.0869622537038.issue37475@roundup.psfhosted.org> Message-ID: <1562064252.53.0.71108709907.issue37475@roundup.psfhosted.org> STINNER Victor added the comment: > urlcleanup also sets the global variable _opener to None so it does the extra work of uninstalling the global variable opener set by install_opener which is also not documented. Oh wait, urlopen() also sets this private _opener global variable and so has an effect on next calls to urlopen()... This API is really strange, I dislike it :-( I modified my PR 14529 to call urlcleanup() is way more tests, but I also modified regrtest to test that urllib.requests._url_tempfiles and urllib.requests._opener are not modified. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:46:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 10:46:04 +0000 Subject: [issue37335] Improve encoding alias handling in locale coercion tests In-Reply-To: <1560931050.81.0.0200959048394.issue37335@roundup.psfhosted.org> Message-ID: <1562064364.58.0.515367128196.issue37335@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c53173aa00689aa1be17ce5406289718f6b30532 by Victor Stinner (Jakub Kul?k) in branch '3.7': bpo-37335: Fix test_c_locale_coercion to handle any ASCII alias (GH-14449) https://github.com/python/cpython/commit/c53173aa00689aa1be17ce5406289718f6b30532 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:48:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 10:48:31 +0000 Subject: [issue37335] Improve encoding alias handling in locale coercion tests In-Reply-To: <1560931050.81.0.0200959048394.issue37335@roundup.psfhosted.org> Message-ID: <1562064511.83.0.397236200881.issue37335@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 61bf97e91620e020939d57a36918ab22579920ff by Victor Stinner (Jakub Kul?k) in branch 'master': bpo-37335, test_c_locale_coercion: Remove unnecessary code (GH-14447) https://github.com/python/cpython/commit/61bf97e91620e020939d57a36918ab22579920ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:48:50 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 10:48:50 +0000 Subject: [issue37335] Improve encoding alias handling in locale coercion tests In-Reply-To: <1560931050.81.0.0200959048394.issue37335@roundup.psfhosted.org> Message-ID: <1562064530.76.0.946912966822.issue37335@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14370 pull_request: https://github.com/python/cpython/pull/14552 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:05:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 11:05:55 +0000 Subject: [issue37481] Deprecate bdist_wininstr: use bdist_wheel instead Message-ID: <1562065555.11.0.674555433239.issue37481@roundup.psfhosted.org> New submission from STINNER Victor : According to the following "Deprecate bdist_wininst" discussion, bdist_wininst can be deprecated: https://discuss.python.org/t/deprecate-bdist-wininst/1929 bdist_wininst uses the mbcs encoding which is only available on Windows. There is bpo-10945 open for 8 years to suggest to use UTF-8 or use the Unicode (wide character) flavor of the Windows API to support running bdist_wininst on non-Windows platforms and to be able to distribute binaries which don?t depend on the ANSI code page. I propose to deprecate it in Python 3.9, because of bpo-10945 issue. I don't propose to plan bdist_wininst removal yet. As an user, it?s annoying to have to run a GUI to install something, whereas pip can install dependencies using wheel packages in a command line interface, transparently, without bugging the user with dialog boxes. When I look at numpy or Cython: they don?t distribute .exe installers, but binary wheel packages for Windows. I understood the wheel packages is the recommended way to distribute binaries on Windows, and so that bdist_wininst is kind of deprecated. Donald Stufft wrote: "For what it?s worth, PyPI doesn?t even allow you to upload bdist_wininst (See PEP 527 2) anymore, so if you?re looking at PyPI to determine usage, you?re going to get no usage whatsoever for anything recent. I don?t have any idea if other people are still using bdist_wininst and distributing them through some other mechanism." Paul Ganssle wrote: "From my perspective, nearly all direct invocations of setup.py are currently or are eventually heading for deprecation. PEP 517 doesn?t provide hooks to generate anything other than sdist or wheel, so basically all commands not actually triggered (directly or indirectly) by calling a PEP 517 front-end are suspect." Attached PR deprecates bdist_wininst. See also the related issue bpo-37468 "Don't install wininst*.exe on non-Windows platforms". bdist_wininst only works on Windows: see bpo-10945 and commit 72cd653c4ed7a4f8f8fb06ac364b08a97085a2b5. ---------- components: Library (Lib) messages: 347131 nosy: vstinner priority: normal severity: normal status: open title: Deprecate bdist_wininstr: use bdist_wheel instead versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:06:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 11:06:24 +0000 Subject: [issue37481] Deprecate bdist_wininst: use bdist_wheel instead In-Reply-To: <1562065555.11.0.674555433239.issue37481@roundup.psfhosted.org> Message-ID: <1562065584.37.0.556716607981.issue37481@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Deprecate bdist_wininstr: use bdist_wheel instead -> Deprecate bdist_wininst: use bdist_wheel instead _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:13:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 11:13:45 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1562066025.19.0.848343330244.issue10945@roundup.psfhosted.org> STINNER Victor added the comment: Lib/distutils/tests/test_bdist_wininst.py contains an interesting comment linking to bpo-5731: # issue5731: command was broken on non-windows platforms # this test makes sure it works now for every platform # let's create a command Related commit: commit ad95826c33ea378db2807a268363ccfbf0ea8273 Author: Tarek Ziad? Date: Thu Apr 9 21:36:44 2009 +0000 Fixed #5731: Distutils bdist_wininst no longer worked on non-Windows platforms But there is also bpo-8954 follow-up which is still open: "wininst regression: errors when building on linux". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:18:43 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 11:18:43 +0000 Subject: [issue37335] Improve encoding alias handling in locale coercion tests In-Reply-To: <1560931050.81.0.0200959048394.issue37335@roundup.psfhosted.org> Message-ID: <1562066323.2.0.023816002942.issue37335@roundup.psfhosted.org> miss-islington added the comment: New changeset 518dc94e423398f7b0b5fd7bd5b84f138618e68e by Miss Islington (bot) in branch '3.8': bpo-37335, test_c_locale_coercion: Remove unnecessary code (GH-14447) https://github.com/python/cpython/commit/518dc94e423398f7b0b5fd7bd5b84f138618e68e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:19:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 11:19:21 +0000 Subject: [issue37481] Deprecate bdist_wininst: use bdist_wheel instead In-Reply-To: <1562065555.11.0.674555433239.issue37481@roundup.psfhosted.org> Message-ID: <1562066361.35.0.148288294307.issue37481@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +14371 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14553 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:21:34 2019 From: report at bugs.python.org (Jakub Kulik) Date: Tue, 02 Jul 2019 11:21:34 +0000 Subject: [issue37335] Improve encoding alias handling in locale coercion tests In-Reply-To: <1560931050.81.0.0200959048394.issue37335@roundup.psfhosted.org> Message-ID: <1562066494.05.0.299232913939.issue37335@roundup.psfhosted.org> Change by Jakub Kulik : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:24:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 11:24:31 +0000 Subject: [issue37335] Improve encoding alias handling in locale coercion tests In-Reply-To: <1560931050.81.0.0200959048394.issue37335@roundup.psfhosted.org> Message-ID: <1562066671.61.0.284682119462.issue37335@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Jakub Kulik. test_c_locale_coercion should pass again on 3.7, 3.8 and master branches on Solaris. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:32:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 11:32:35 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562067155.44.0.398309615069.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 039fb49c185570ab7b02f13fbdc51c859cfd831e by Victor Stinner in branch 'master': bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527) https://github.com/python/cpython/commit/039fb49c185570ab7b02f13fbdc51c859cfd831e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:32:59 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 11:32:59 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562067179.93.0.579609878032.issue37421@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14372 pull_request: https://github.com/python/cpython/pull/14554 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:51:15 2019 From: report at bugs.python.org (B Siemerink) Date: Tue, 02 Jul 2019 11:51:15 +0000 Subject: [issue37482] Email header fails with both encoded words and special chars Message-ID: <1562068275.57.0.247896906946.issue37482@roundup.psfhosted.org> New submission from B Siemerink : Special characters in email headers are normally put within double quotes. However, encoded words (=?charset?x?...?=) are not allowed withing double quotes. When the header contains a word with special characters and another word that must be encoded, the first one must also be encoded. In the next example, The From header is quoted and therefore the comma is allowed; in the To header, the comma is not within quotes and not encoded, which is not allowed and rejected. From: "Foo Bar, France" To: Foo Bar, =?utf-8?q?Espa=C3=B1a?= ---------- components: email files: email_header_test.py messages: 347136 nosy: barry, bsiem, r.david.murray priority: normal severity: normal status: open title: Email header fails with both encoded words and special chars type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48452/email_header_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:53:55 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 02 Jul 2019 11:53:55 +0000 Subject: [issue37482] Email header fails with both encoded words and special chars In-Reply-To: <1562068275.57.0.247896906946.issue37482@roundup.psfhosted.org> Message-ID: <1562068435.16.0.890629293304.issue37482@roundup.psfhosted.org> Change by SilentGhost : ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 07:58:17 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 11:58:17 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562068697.83.0.350024232195.issue37421@roundup.psfhosted.org> miss-islington added the comment: New changeset 632cb36084dc9d13f1cdb31a0e7e3ba80745a51a by Miss Islington (bot) in branch '3.8': bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527) https://github.com/python/cpython/commit/632cb36084dc9d13f1cdb31a0e7e3ba80745a51a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 08:14:43 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Jul 2019 12:14:43 +0000 Subject: [issue37483] Add PyObject_CallOneArg() Message-ID: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> New submission from Jeroen Demeyer : As discussed in https://mail.python.org/archives/list/capi-sig at python.org/thread/X6HJOEX6RRFLNKAQSQR6HLD7K4QZ4OTZ/ it would be convenient to have a function PyObject_CallOneArg() for making calls with exactly 1 positional argument and no keyword arguments. Such calls are very common. This would be analogous to PyObject_CallNoArgs(). ---------- components: Interpreter Core messages: 347138 nosy: jdemeyer, vstinner priority: normal severity: normal status: open title: Add PyObject_CallOneArg() type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 08:22:05 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Jul 2019 12:22:05 +0000 Subject: [issue37484] Use PY_VECTORCALL_ARGUMENTS_OFFSET for __exit__ Message-ID: <1562070125.47.0.376343884146.issue37484@roundup.psfhosted.org> New submission from Jeroen Demeyer : 35% of all cases where methods are called without PY_VECTORCALL_ARGUMENT_OFFSET and taking at least 1 argument (positional or keyword) are calls to __exit__ So we should really optimize __exit__ ---------- components: Interpreter Core messages: 347139 nosy: inada.naoki, jdemeyer priority: normal severity: normal status: open title: Use PY_VECTORCALL_ARGUMENTS_OFFSET for __exit__ type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 08:35:55 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Jul 2019 12:35:55 +0000 Subject: [issue37484] Use PY_VECTORCALL_ARGUMENTS_OFFSET for __exit__ In-Reply-To: <1562070125.47.0.376343884146.issue37484@roundup.psfhosted.org> Message-ID: <1562070955.55.0.469597336495.issue37484@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +14373 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14557 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 08:50:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 12:50:23 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562071822.99.0.661533898686.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7cb9204ee1cf204f6f507d99a60f7c5bb359eebb by Victor Stinner in branch 'master': bpo-37421: urllib.request tests call urlcleanup() (GH-14529) https://github.com/python/cpython/commit/7cb9204ee1cf204f6f507d99a60f7c5bb359eebb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 08:53:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 12:53:14 +0000 Subject: [issue37475] What is urllib.request.urlcleanup() function? In-Reply-To: <1562004108.37.0.0869622537038.issue37475@roundup.psfhosted.org> Message-ID: <1562071994.98.0.665629614194.issue37475@roundup.psfhosted.org> STINNER Victor added the comment: Another weirdness of test_urllib.py: it redefines urlopen() and actually tests its test function, rather than testing the urllib.request module. https://github.com/python/cpython/pull/14529#issuecomment-507646868 "def urlopen(url, data=None, proxies=None):" in test_urllib.py is as old as the urllib module itself! commit 1afc1696167547a5fa101c53e5a3ab4717f8852c Author: Jeremy Hylton Date: Wed Jun 18 20:49:58 2008 +0000 Make a new urllib package . It consists of code from urllib, urllib2, urlparse, and robotparser. The old modules have all been removed. The new package has five submodules: urllib.parse, urllib.request, urllib.response, urllib.error, and urllib.robotparser. The urllib.request.urlopen() function uses the url opener from urllib2. Note that the unittests have not been renamed for the beta, but they will be renamed in the future. Joint work with Senthil Kumaran. At least, the test function should have a different name, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 09:04:55 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Jul 2019 13:04:55 +0000 Subject: [issue36904] Implement _PyStack_UnpackDict() with a single allocation In-Reply-To: <1557760974.34.0.94387480475.issue36904@roundup.psfhosted.org> Message-ID: <1562072695.03.0.968888427855.issue36904@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 09:44:03 2019 From: report at bugs.python.org (Colin) Date: Tue, 02 Jul 2019 13:44:03 +0000 Subject: [issue37485] dataclass __foo__ methods inheritance is not working Message-ID: <1562075043.32.0.192151434344.issue37485@roundup.psfhosted.org> New submission from Colin : Hi, When using inheritance with dataclass, "standard" instance methods that are provided with a default behavior thanks to dataclass are not overridable using inheritance. Please see the sample below (or the attached file): import dataclasses @dataclasses.dataclass class A: def __eq__(self, other): return True @dataclasses.dataclass class B(A): pass print(A() == 1) # Returns True as expected print(B() == 1) # Returns False instead of True as expected via inheritance Thanks again ---------- components: Library (Lib) files: inheritance_dataclass_issue.py messages: 347142 nosy: colin-b priority: normal severity: normal status: open title: dataclass __foo__ methods inheritance is not working type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48453/inheritance_dataclass_issue.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 09:48:39 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 02 Jul 2019 13:48:39 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562075319.9.0.76125409149.issue37483@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +14374 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14558 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 10:00:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 02 Jul 2019 14:00:15 +0000 Subject: [issue37485] dataclass __foo__ methods inheritance is not working In-Reply-To: <1562075043.32.0.192151434344.issue37485@roundup.psfhosted.org> Message-ID: <1562076015.17.0.0171419488591.issue37485@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 10:32:45 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 02 Jul 2019 14:32:45 +0000 Subject: [issue37449] Move ensurepip off of pkgutil and to importlib.resources In-Reply-To: <1561860772.49.0.185483718697.issue37449@roundup.psfhosted.org> Message-ID: <1562077965.41.0.773601119039.issue37449@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 10:33:24 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 02 Jul 2019 14:33:24 +0000 Subject: [issue37444] Differing exception between builtins and importlib when importing beyond top-level package In-Reply-To: <1561749733.32.0.955430999512.issue37444@roundup.psfhosted.org> Message-ID: <1562078004.07.0.6375897458.issue37444@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 10:35:48 2019 From: report at bugs.python.org (adrien.pierre.horgnies@gmail.com) Date: Tue, 02 Jul 2019 14:35:48 +0000 Subject: [issue37486] pathlib.Path('.').parent is itself rather than parent Message-ID: <1562078148.03.0.333359330818.issue37486@roundup.psfhosted.org> New submission from adrien.pierre.horgnies at gmail.com : Tested with CPython 3.7.3 ``` from pathlib import Path p = Path('.') assert p == p.parent # should fail but it does not ``` I expect Path('.').parent to be Path('..') I searched issues and did not find any similar issue but maybe I didn't search well enough because I would be surprised that I'd be the first one to be bugged by this issue. I didn't test newer version of Python as I couldn't find a package or wasn't comfortable enough to build it myself. ---------- components: Library (Lib) messages: 347143 nosy: adrien.pierre.horgnies at gmail.com priority: normal severity: normal status: open title: pathlib.Path('.').parent is itself rather than parent type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 10:43:35 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 02 Jul 2019 14:43:35 +0000 Subject: [issue26131] Raise ImportWarning when loader.load_module() is used In-Reply-To: <1452894244.92.0.478987355259.issue26131@psf.upfronthosting.co.za> Message-ID: <1562078615.65.0.304716575499.issue26131@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 10:44:36 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 02 Jul 2019 14:44:36 +0000 Subject: [issue24846] Add tests for ``from ... import ...` code In-Reply-To: <1439341787.78.0.664651085427.issue24846@psf.upfronthosting.co.za> Message-ID: <1562078676.77.0.900137988733.issue24846@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 10:44:52 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 02 Jul 2019 14:44:52 +0000 Subject: [issue19978] Update multiprocessing.spawn to use runpy.run_path In-Reply-To: <1386953081.33.0.610270366508.issue19978@psf.upfronthosting.co.za> Message-ID: <1562078692.74.0.973527021203.issue19978@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 10:49:41 2019 From: report at bugs.python.org (=?utf-8?b?5p2o5piG5LuR?=) Date: Tue, 02 Jul 2019 14:49:41 +0000 Subject: [issue37487] PyList_GetItem() document regarding index Message-ID: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> New submission from ??? : The document of this function (PyList_GetItem()) says: "Return the object at position index in the list pointed to by list. The position must be **positive**,". However test shows the correct position index should be from 0 to len(list)-1. The claim of index **must be positive** is inaccurate and confusing. ---------- assignee: docs at python components: Documentation messages: 347144 nosy: docs at python, ??? priority: normal severity: normal status: open title: PyList_GetItem() document regarding index type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 10:51:05 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jul 2019 14:51:05 +0000 Subject: [issue37486] pathlib.Path('.').parent is itself rather than parent In-Reply-To: <1562078148.03.0.333359330818.issue37486@roundup.psfhosted.org> Message-ID: <1562079065.57.0.286240464978.issue37486@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +pitrou versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 11:01:57 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Jul 2019 15:01:57 +0000 Subject: [issue37486] pathlib.Path('.').parent is itself rather than parent In-Reply-To: <1562078148.03.0.333359330818.issue37486@roundup.psfhosted.org> Message-ID: <1562079717.59.0.23397954812.issue37486@roundup.psfhosted.org> Antoine Pitrou added the comment: This is by design. The "parent" attribute is a *lexical operation*. If you want to walk the actual filesystem, first call resolve(). It's even documented: https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.parent ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 11:18:04 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 02 Jul 2019 15:18:04 +0000 Subject: [issue37485] dataclass __foo__ methods inheritance is not working In-Reply-To: <1562075043.32.0.192151434344.issue37485@roundup.psfhosted.org> Message-ID: <1562080684.82.0.753110013319.issue37485@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: https://docs.python.org/3/library/dataclasses.html#inheritance > When the dataclass is being created by the dataclass() decorator, it looks through all of the class?s base classes in reverse MRO (that is, starting at object) and, for each dataclass that it finds, adds the fields from that base class to an ordered mapping of fields. After all of the base class fields are added, it adds its own fields to the ordered mapping. All of the generated methods will use this combined, calculated ordered mapping of fields. Because the fields are in insertion order, derived classes override base classes. I think here in the example __eq__ is defined in A and is inherited by B but since eq=False is not explicitly defined in the decorator the dataclass will use it's own definition of eq and override it at [0] . So using eq=False will work as expected. I propose closing this as not a bug. import dataclasses @dataclasses.dataclass class A: def __eq__(self, other): return True @dataclasses.dataclass(eq=False) # By default eq=True class B(A): pass print(A() == 1) # Returns True as expected print(B() == 1) # Returns True since inherited A.__eq__ is not overriden with eq=False Output ./python.exe ../backups/bpo37485.py True True [0] https://github.com/python/cpython/blob/7cb9204ee1cf204f6f507d99a60f7c5bb359eebb/Lib/dataclasses.py#L922 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 11:22:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 02 Jul 2019 15:22:56 +0000 Subject: [issue37482] Email header fails with both encoded words and special chars In-Reply-To: <1562068275.57.0.247896906946.issue37482@roundup.psfhosted.org> Message-ID: <1562080976.45.0.493773769762.issue37482@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 11:34:24 2019 From: report at bugs.python.org (adrien.pierre.horgnies@gmail.com) Date: Tue, 02 Jul 2019 15:34:24 +0000 Subject: [issue37486] pathlib.Path('.').parent is itself rather than parent In-Reply-To: <1562078148.03.0.333359330818.issue37486@roundup.psfhosted.org> Message-ID: <1562081664.03.0.182019398521.issue37486@roundup.psfhosted.org> adrien.pierre.horgnies at gmail.com added the comment: T-T Sorry. It didn't feel intuitive but I should have read the doc... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 12:01:38 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 02 Jul 2019 16:01:38 +0000 Subject: [issue37488] Document the "gotcha" behaviors in utcnow() and utcfromtimestamp() Message-ID: <1562083298.89.0.799843667155.issue37488@roundup.psfhosted.org> New submission from Paul Ganssle : Between Python 2 and Python 3, the meaning of a naive datetime underwent a subtle change. Previously a naive datetime was mostly treated as an abstract datetime in the same way a unitless number is treated as an abstract quantity (this is reflected in the current datetime documentation). In Python 3, though, it became more concrete in the sense that rather than just throwing an error whenever you try to do an operation that requires knowing the absolute datetime (e.g. convert between time zones, convert to timestamp, etc), certain operations will succeed with the assumption that naive times represent system local times. This makes `utcnow()` and `utcfromtimestamp()` dangerous, because they create a naive datetime as if the naive datetime represents UTC, but this context is then lost and if you ever use one of these "aware-only" operations (.astimezone, .timestamp, etc), you'll get an unexpected answer. For example, see this script, executed this with `TZ=America/New_York` on a machine with IANA data installed: >>> from datetime import datetime >>> dt = datetime.utcfromtimestamp(0) >>> dt datetime.datetime(1970, 1, 1, 0, 0) >>> dt.timestamp() 18000 This happens because EST is 18000s behind UTC, and `.timestamp()` gives a number of seconds after UTC (a concrete, not an abstract time). You get the same gotchas with `utcnow()`. I'm not sure if actually deprecating `utcnow` and `utcfromtimestamp` is worth it at the moment, but we can definitely start by adding a warning box to `utcnow()` and `utcfromtimestamp()` suggesting that you use the timezone-aware versions of these instead. We may also want to adjust the opening phrasing for the "naive objects" portion of the datetime documentation as well (https://docs.python.org/3.7/library/datetime.html), to reflect the fact that naive datetimes are no longer purely abstract quantities. ---------- assignee: docs at python components: Documentation messages: 347148 nosy: belopolsky, docs at python, p-ganssle priority: normal severity: normal stage: needs patch status: open title: Document the "gotcha" behaviors in utcnow() and utcfromtimestamp() type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 12:22:27 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Jul 2019 16:22:27 +0000 Subject: [issue37485] dataclass __foo__ methods inheritance is not working In-Reply-To: <1562075043.32.0.192151434344.issue37485@roundup.psfhosted.org> Message-ID: <1562084547.7.0.345187843363.issue37485@roundup.psfhosted.org> Eric V. Smith added the comment: I agree with xtreak that this works as designed and isn't a bug. ---------- assignee: -> eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 12:36:56 2019 From: report at bugs.python.org (Colin) Date: Tue, 02 Jul 2019 16:36:56 +0000 Subject: [issue37485] dataclass __foo__ methods inheritance is not working In-Reply-To: <1562075043.32.0.192151434344.issue37485@roundup.psfhosted.org> Message-ID: <1562085416.6.0.324613880315.issue37485@roundup.psfhosted.org> Colin added the comment: I personally find it easier to understand if inheritance is the default behaviour, instead of having to explicitly disable a feature that's seems primarily designed for non-herited dataclasses. But whatever suits best the community :-) Thanks for the quick reply ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 12:37:59 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Jul 2019 16:37:59 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562085479.47.0.012221593116.issue37463@roundup.psfhosted.org> ?ukasz Langa added the comment: FTR 3.8b2 is also waiting for this fix due to the expert's (that's you, Christian!) priority setting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 12:42:24 2019 From: report at bugs.python.org (hai shi) Date: Tue, 02 Jul 2019 16:42:24 +0000 Subject: [issue37411] testEnviron (test.test_wsgiref.HandlerTests) fails when environment variable X is set In-Reply-To: <1561550751.62.0.0941955504485.issue37411@roundup.psfhosted.org> Message-ID: <1562085744.61.0.375383557716.issue37411@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +14375 pull_request: https://github.com/python/cpython/pull/14453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:39:55 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 18:39:55 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562092795.61.0.213774841545.issue37463@roundup.psfhosted.org> miss-islington added the comment: New changeset 477b1b25768945621d466a8b3f0739297a842439 by Miss Islington (bot) (Christian Heimes) in branch 'master': bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499) https://github.com/python/cpython/commit/477b1b25768945621d466a8b3f0739297a842439 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:40:00 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 18:40:00 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562092800.61.0.643172294487.issue37463@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14376 pull_request: https://github.com/python/cpython/pull/14559 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:40:11 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 18:40:11 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562092811.54.0.767309875004.issue37463@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14377 pull_request: https://github.com/python/cpython/pull/14560 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:51:56 2019 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Jul 2019 18:51:56 +0000 Subject: [issue37482] Email header fails with both encoded words and special chars In-Reply-To: <1562068275.57.0.247896906946.issue37482@roundup.psfhosted.org> Message-ID: <1562093516.03.0.0768136015725.issue37482@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14378 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14561 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 14:55:38 2019 From: report at bugs.python.org (B Siemerink) Date: Tue, 02 Jul 2019 18:55:38 +0000 Subject: [issue37482] Email address display name fails with both encoded words and special chars In-Reply-To: <1562068275.57.0.247896906946.issue37482@roundup.psfhosted.org> Message-ID: <1562093738.37.0.489769418081.issue37482@roundup.psfhosted.org> Change by B Siemerink : ---------- title: Email header fails with both encoded words and special chars -> Email address display name fails with both encoded words and special chars _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 16:06:23 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 02 Jul 2019 20:06:23 +0000 Subject: [issue37481] Deprecate bdist_wininst: use bdist_wheel instead In-Reply-To: <1562065555.11.0.674555433239.issue37481@roundup.psfhosted.org> Message-ID: <1562097983.47.0.889642211937.issue37481@roundup.psfhosted.org> Steve Dower added the comment: For the record, I am 100% in favor of deprecating and removing bdist_wininst and bdist_msi from distutils as soon as possible, as they are maintenance burdens and bdist_wininst in particular often attracts AV false positives. setuptools is welcome to either do the same or restore the functionality, I don't have any preference if someone else is maintaining it (but I'd suggest removal there too until someone wants to maintain it). Some of our distributions of Python already exclude bdist_wininst, so it can't be blindly relied on. And I don't know that it was ever upgraded for PEP 514. So far I have heard zero complaints about this, though as Paul Ganssle pointed out on the PR they're not likely to be using the "newer" packages. So consider me +1 for deprecate in 3.8 (we can still do that, right? it's just docs and a warning on use) and remove in 3.9 or 3.10 as appropriate. ---------- components: +Distutils, Windows -Library (Lib) nosy: +dstufft, eric.araujo, p-ganssle, paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:01:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 21:01:39 +0000 Subject: [issue37411] testEnviron (test.test_wsgiref.HandlerTests) fails when environment variable X is set In-Reply-To: <1561550751.62.0.0941955504485.issue37411@roundup.psfhosted.org> Message-ID: <1562101299.64.0.451104393579.issue37411@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -14375 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:06:37 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 21:06:37 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562101597.94.0.772537191491.issue37463@roundup.psfhosted.org> miss-islington added the comment: New changeset 3cba3d3c55f230a59174a0dfcafb1d4685269e60 by Miss Islington (bot) in branch '3.8': bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499) https://github.com/python/cpython/commit/3cba3d3c55f230a59174a0dfcafb1d4685269e60 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:22:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 21:22:37 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562102557.22.0.604320991034.issue37421@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14380 pull_request: https://github.com/python/cpython/pull/14562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:22:56 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Jul 2019 21:22:56 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562102576.29.0.405204130667.issue37463@roundup.psfhosted.org> miss-islington added the comment: New changeset 024ea2170b7c1652a62cc7458e736c63d4970eb1 by Miss Islington (bot) in branch '3.7': bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499) https://github.com/python/cpython/commit/024ea2170b7c1652a62cc7458e736c63d4970eb1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:25:53 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Jul 2019 21:25:53 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562102753.74.0.413224706196.issue37463@roundup.psfhosted.org> Christian Heimes added the comment: Ned, ?ukasz, thanks for your patience. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:33:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 21:33:06 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562103186.26.0.557044817282.issue37421@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14381 pull_request: https://github.com/python/cpython/pull/14563 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 17:43:09 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Jul 2019 21:43:09 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1562103789.52.0.55680145594.issue34155@roundup.psfhosted.org> Barry A. Warsaw added the comment: I still think the only way to read the documentation for parseaddr('a at b@c') is to return ('', '') - a tuple of empty strings. The documentations says: "Returns a tuple of that information, unless the parse fails, in which case a 2-tuple of ('', '') is returned." Of course, it doesn't define exactly what a "failing parse" is, but I would claim that a non-RFC compliant address should fail to parse, at least for the parseaddr() interface. I'm not concerned about inconsistencies between message_from_string() and parseaddr(). They are difference APIs. I'll follow up on the PR, but does anybody disagree with that reasoning? ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:11:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Jul 2019 22:11:28 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562105488.4.0.181071991835.issue37421@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14382 pull_request: https://github.com/python/cpython/pull/14564 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:34:02 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 22:34:02 +0000 Subject: [issue37428] SSLContext.post_handshake_auth implicitly enables cert validation In-Reply-To: <1561631609.42.0.922673247425.issue37428@roundup.psfhosted.org> Message-ID: <1562106842.54.0.718821022085.issue37428@roundup.psfhosted.org> Ned Deily added the comment: New changeset 5b45fb0a449543fab6e7b606e51b739cb316d3c4 by Ned Deily (Miss Islington (bot)) in branch '3.7': [3.7] bpo-37428: Don't set PHA verify flag on client side (GH-14421) (GH-14493) https://github.com/python/cpython/commit/5b45fb0a449543fab6e7b606e51b739cb316d3c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:34:03 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 22:34:03 +0000 Subject: [issue37369] Issue with pip in venv on Powershell in Windows In-Reply-To: <1561161256.11.0.32935812019.issue37369@roundup.psfhosted.org> Message-ID: <1562106843.0.0.872036446247.issue37369@roundup.psfhosted.org> Ned Deily added the comment: New changeset 3c34ea97a341e4dd80b542c99c593f014a8ae410 by Ned Deily (Steve Dower) in branch '3.7': bpo-37369: Fixes path for sys.executable when running from the Microsoft Store (GH-14450) https://github.com/python/cpython/commit/3c34ea97a341e4dd80b542c99c593f014a8ae410 New changeset 57eba3aff16016be84b2fa8532b4f618fec79d97 by Ned Deily (Steve Dower) in branch '3.7': bpo-37369: Fix venv and test symlinking (GH-14456) https://github.com/python/cpython/commit/57eba3aff16016be84b2fa8532b4f618fec79d97 New changeset a88652e488edc7664f395ba1a22b5e46539d01d3 by Ned Deily (Steve Dower) in branch '3.7': bpo-37369: Fix path handling when python.exe is used as a symlink (GH-14461) https://github.com/python/cpython/commit/a88652e488edc7664f395ba1a22b5e46539d01d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:34:03 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 22:34:03 +0000 Subject: [issue35360] Update SQLite to 3.28 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1562106843.16.0.411927050093.issue35360@roundup.psfhosted.org> Ned Deily added the comment: New changeset c58fc3af75b54203b26008b6942709bb07d00fc6 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-35360: Update Windows builds to use SQLite 3.28.0 (GH-14179) https://github.com/python/cpython/commit/c58fc3af75b54203b26008b6942709bb07d00fc6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:34:03 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 22:34:03 +0000 Subject: [issue32627] Header dependent _uuid build failure on Fedora 27 In-Reply-To: <1516672443.95.0.467229070634.issue32627@psf.upfronthosting.co.za> Message-ID: <1562106843.74.0.345617929773.issue32627@roundup.psfhosted.org> Ned Deily added the comment: New changeset e90815b3b16ab196c10f3a4dd91402cdc2e07d06 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-32627: Fix compile error when conflicting `_uuid` headers included (GH-11751) https://github.com/python/cpython/commit/e90815b3b16ab196c10f3a4dd91402cdc2e07d06 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:34:03 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 22:34:03 +0000 Subject: [issue37440] httplib should enable post-handshake authentication for TLS 1.3 In-Reply-To: <1561732145.9.0.0353203933987.issue37440@roundup.psfhosted.org> Message-ID: <1562106843.84.0.295815243821.issue37440@roundup.psfhosted.org> Ned Deily added the comment: New changeset f97eb883d8a29ee9718147b3631ebd2741273d9b by Ned Deily (Miss Islington (bot)) in branch '3.7': [3.7] bpo-37440: Enable TLS 1.3 post-handshake auth in http.client (GH-14448) (GH-14496) https://github.com/python/cpython/commit/f97eb883d8a29ee9718147b3631ebd2741273d9b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:34:04 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 22:34:04 +0000 Subject: [issue34602] python3 resource.setrlimit strange behaviour under macOS In-Reply-To: <1536316486.92.0.56676864532.issue34602@psf.upfronthosting.co.za> Message-ID: <1562106844.05.0.112982139972.issue34602@roundup.psfhosted.org> Ned Deily added the comment: New changeset dcc0eb379613f279864af61023ea44c94aa0535c by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) https://github.com/python/cpython/commit/dcc0eb379613f279864af61023ea44c94aa0535c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:34:03 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 22:34:03 +0000 Subject: [issue18075] Infinite recursion tests triggering a segfault In-Reply-To: <1369702928.42.0.612737848185.issue18075@psf.upfronthosting.co.za> Message-ID: <1562106843.95.0.976465504789.issue18075@roundup.psfhosted.org> Ned Deily added the comment: New changeset dcc0eb379613f279864af61023ea44c94aa0535c by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) https://github.com/python/cpython/commit/dcc0eb379613f279864af61023ea44c94aa0535c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:34:03 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 22:34:03 +0000 Subject: [issue24214] UTF-8 incremental decoder doesn't support surrogatepass correctly In-Reply-To: <1431816994.33.0.797161516902.issue24214@psf.upfronthosting.co.za> Message-ID: <1562106843.48.0.108309446157.issue24214@roundup.psfhosted.org> Ned Deily added the comment: New changeset 30c2ae4dcfd19acbdfb7045151c73d5700eec7b4 by Ned Deily (Miss Islington (bot)) in branch '3.7': [3.7] bpo-24214: Fixed the UTF-8 and UTF-16 incremental decoders. (GH-14304) (GH-14369) https://github.com/python/cpython/commit/30c2ae4dcfd19acbdfb7045151c73d5700eec7b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:34:04 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 22:34:04 +0000 Subject: [issue37156] Fix libssl DLL tag in Tools/msi project In-Reply-To: <1559679658.46.0.279980896564.issue37156@roundup.psfhosted.org> Message-ID: <1562106844.15.0.90067731857.issue37156@roundup.psfhosted.org> Ned Deily added the comment: New changeset 9ad5e9edea08b0d377902d556624f03a2b8bb29b by Ned Deily (Steve Dower) in branch '3.7': bpo-37156: Fix libssl DLL tag in MSI sources (GH-14219) https://github.com/python/cpython/commit/9ad5e9edea08b0d377902d556624f03a2b8bb29b ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:34:03 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 22:34:03 +0000 Subject: [issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562106843.34.0.242460601159.issue37463@roundup.psfhosted.org> Ned Deily added the comment: New changeset 070fae6d0ff49e63bfd5f2bdc66f8eb1df3b6557 by Ned Deily (Christian Heimes) in branch '3.7': bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499) https://github.com/python/cpython/commit/070fae6d0ff49e63bfd5f2bdc66f8eb1df3b6557 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 18:34:02 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Jul 2019 22:34:02 +0000 Subject: [issue37437] update vendorized expat to 2.2.7 In-Reply-To: <1561692545.23.0.0954968127572.issue37437@roundup.psfhosted.org> Message-ID: <1562106842.87.0.65949398584.issue37437@roundup.psfhosted.org> Ned Deily added the comment: New changeset cc0bf97d61fbe844843f28abc510a11f3ef09942 by Ned Deily (Miss Islington (bot)) in branch '3.7': closes bpo-37437: Update vendorized expat to 2.2.7. (GH-14436) https://github.com/python/cpython/commit/cc0bf97d61fbe844843f28abc510a11f3ef09942 New changeset 3e24dd52bba863fce4f3c6a34ca9f813666ed181 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-37437: Pass -Wno-unreachable-code when compiling expat. (GH-14470) https://github.com/python/cpython/commit/3e24dd52bba863fce4f3c6a34ca9f813666ed181 New changeset 6348364ba5a76c66bd8a8e5466d7f9db435b88e3 by Ned Deily (Miss Islington (bot)) in branch '3.7': Put pyexpatns.h include back. bpo-37437 (GH-14539) https://github.com/python/cpython/commit/6348364ba5a76c66bd8a8e5466d7f9db435b88e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 19:04:39 2019 From: report at bugs.python.org (daniel hahler) Date: Tue, 02 Jul 2019 23:04:39 +0000 Subject: [issue26967] argparse: allow_abbrev=False stops -vv from working In-Reply-To: <1462475086.65.0.670765920247.issue26967@psf.upfronthosting.co.za> Message-ID: <1562108679.04.0.516886987142.issue26967@roundup.psfhosted.org> daniel hahler added the comment: https://github.com/python/cpython/pull/14316 has a fix. ---------- nosy: +blueyed versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 19:09:06 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Jul 2019 23:09:06 +0000 Subject: [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562108946.58.0.18684147009.issue37459@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 19:10:31 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Jul 2019 23:10:31 +0000 Subject: [issue37486] pathlib.Path('.').parent is itself rather than parent In-Reply-To: <1562078148.03.0.333359330818.issue37486@roundup.psfhosted.org> Message-ID: <1562109031.92.0.16535343842.issue37486@roundup.psfhosted.org> Brett Cannon added the comment: Would it be worth to set 'parent' to None in this instance? Might break code but would also be potentially less surprising. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 19:13:48 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Jul 2019 23:13:48 +0000 Subject: [issue37403] Recommend .venv for virtual environment names In-Reply-To: <1561489912.98.0.436599112257.issue37403@roundup.psfhosted.org> Message-ID: <1562109228.81.0.199743643423.issue37403@roundup.psfhosted.org> Change by Brett Cannon : ---------- stage: needs patch -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 19:43:09 2019 From: report at bugs.python.org (Rune Tynan) Date: Tue, 02 Jul 2019 23:43:09 +0000 Subject: [issue18697] Unify arguments names in Unicode object C API documentation In-Reply-To: <1376074126.58.0.40251146149.issue18697@psf.upfronthosting.co.za> Message-ID: <1562110989.66.0.54122965132.issue18697@roundup.psfhosted.org> Rune Tynan added the comment: It has been over a month and I'm still waiting for an updated PR review. I understand if people are busy, but don't want this to just fall through the cracks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 20:47:37 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 03 Jul 2019 00:47:37 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562114857.76.0.546511757047.issue37483@roundup.psfhosted.org> Inada Naoki added the comment: What do you think about macro like this? #define _PyObject_CALL_WITH_ARGS(func, ...) \ _PyObject_Vectorcall(func, (PyObject*[]){NULL, __VA_ARGS__} + 1, \ sizeof((PyObject*[]){__VA_ARGS__})/sizeof(PyObject*) | PY_VECTORCALL_ARGUMENTS_OFFSET, \ NULL) Pros: it can be used for 2 or 3 arguments too. Cons: readability... ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 21:02:12 2019 From: report at bugs.python.org (myungsekyo) Date: Wed, 03 Jul 2019 01:02:12 +0000 Subject: [issue37466] Move casting prompt after its validation in _raw_input() In-Reply-To: <1561973733.3.0.964071328037.issue37466@roundup.psfhosted.org> Message-ID: <1562115732.84.0.766023240247.issue37466@roundup.psfhosted.org> myungsekyo added the comment: Thanks to your reviews! I understood what you mean. This patch is unnecessary. I will close this issue. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 21:56:10 2019 From: report at bugs.python.org (hai shi) Date: Wed, 03 Jul 2019 01:56:10 +0000 Subject: [issue37411] testEnviron (test.test_wsgiref.HandlerTests) fails when environment variable X is set In-Reply-To: <1561550751.62.0.0941955504485.issue37411@roundup.psfhosted.org> Message-ID: <1562118970.05.0.554897071834.issue37411@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +14383 pull_request: https://github.com/python/cpython/pull/14453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 21:56:20 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 01:56:20 +0000 Subject: [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562118980.69.0.0405269367776.issue37441@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14384 pull_request: https://github.com/python/cpython/pull/14565 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 21:56:23 2019 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 Jul 2019 01:56:23 +0000 Subject: [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562118983.79.0.0115484327524.issue37441@roundup.psfhosted.org> Xiang Zhang added the comment: New changeset aeecf380660ea459d85bb5f59d76bb54f757b5be by Xiang Zhang (Hai Shi) in branch 'master': bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453) https://github.com/python/cpython/commit/aeecf380660ea459d85bb5f59d76bb54f757b5be ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 21:56:28 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 01:56:28 +0000 Subject: [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562118988.97.0.693702055748.issue37441@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14385 pull_request: https://github.com/python/cpython/pull/14566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 22:03:02 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 02:03:02 +0000 Subject: [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562119382.1.0.13785337102.issue37441@roundup.psfhosted.org> miss-islington added the comment: New changeset 6323ac1dd49ddbd935ac3354cc5d792c743e7018 by Miss Islington (bot) in branch '3.7': bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453) https://github.com/python/cpython/commit/6323ac1dd49ddbd935ac3354cc5d792c743e7018 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 22:04:03 2019 From: report at bugs.python.org (Gregory Szorc) Date: Wed, 03 Jul 2019 02:04:03 +0000 Subject: [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562119443.19.0.67223953112.issue37459@roundup.psfhosted.org> Gregory Szorc added the comment: I'm a bit busy with other things this week to submit a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 22:04:33 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 02:04:33 +0000 Subject: [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562119473.22.0.66115574188.issue37441@roundup.psfhosted.org> miss-islington added the comment: New changeset b8e198a5d09ca876b87baaf6efd2b2e7c9e3a0b3 by Miss Islington (bot) in branch '3.8': bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453) https://github.com/python/cpython/commit/b8e198a5d09ca876b87baaf6efd2b2e7c9e3a0b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 22:23:02 2019 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 Jul 2019 02:23:02 +0000 Subject: [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562120582.22.0.132614074763.issue37441@roundup.psfhosted.org> Change by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 23:12:31 2019 From: report at bugs.python.org (liugang) Date: Wed, 03 Jul 2019 03:12:31 +0000 Subject: [issue37489] pickling instance which inherited from Exception with keyword only parameter Message-ID: <1562123551.66.0.0575103279234.issue37489@roundup.psfhosted.org> New submission from liugang : -- code 1 import pickle class MyException(): def __init__(self, desc, *, item): super().__init__() self.desc = desc self.item = item def __getnewargs_ex__(self): print('called in {}.__getnewargs_ex__'.format(self.__class__.__name__)) return (self.desc,), self.__dict__ e = MyException('testing', item='cpu') s = pickle.dumps(e, protocol=-1) x = pickle.loads(s) -- code 2 import pickle class MyException(Exception): def __init__(self, desc, *, item): super().__init__() self.desc = desc self.item = item def __getnewargs_ex__(self): print('called in {}.__getnewargs_ex__'.format(self.__class__.__name__)) return (self.desc,), self.__dict__ e = MyException('testing', item='cpu') s = pickle.dumps(e, protocol=-1) x = pickle.loads(s) in code 1, the class is inherted from object, __getnewargs_ex__ is called and the returned args, kwargs are passed to __new__/__init__ to construct object when pickling. in code 2, the class is inherted from Exception, __getnewargs_ex__ is not called, and rasie an exception of "TypeError: __init__() missing 1 required positional argument: 'desc'" I think this is not python issue, it should be the right behavior of Exception. I want to known why it is, and how to implement the logic in code 2 (passing keyword only parameter to __new__/__init__ when pickling for class inherted from Exception) ---------- components: Library (Lib) messages: 347178 nosy: liugang93 priority: normal severity: normal status: open title: pickling instance which inherited from Exception with keyword only parameter type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 23:23:28 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Wed, 03 Jul 2019 03:23:28 +0000 Subject: [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562124208.98.0.855259828244.issue37459@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- keywords: +patch pull_requests: +14386 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14568 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 01:01:35 2019 From: report at bugs.python.org (Glenn Linderman) Date: Wed, 03 Jul 2019 05:01:35 +0000 Subject: [issue37490] poor documentation for .startswith, .endswith Message-ID: <1562130095.71.0.839529776545.issue37490@roundup.psfhosted.org> New submission from Glenn Linderman : The documentation is reasonably clear regarding the first parameter, which can be a string or a tuple of strings to match at the start or end of a string. However, the other two parameters are much less clear in their effect. text = "Now the day is over" text.startswith('the', 2, 8) Does it produce True because 'w the' is at the beginning of the text[2:] ? Maybe. Or because there is an ending position, must it fail because it doesn't match all of text[2:8] ? text.startswith('day', 8, 10) Does this produce True because everything in day matches text[8:10] or must it always produce false for any value of text because the match is never as long as the prefix string? text.startswith(('day', 'month', 'year'), 8, 12) Can this ever match day or month, because it is comparing to text[8:12], or can only year match because of the start and end? Is there a difference between the following: text.startswith(('day', 'month', 'year'), 8, 12) text[8:12].startswith(('day', 'month', 'year')) If no difference, why does startswith even need the extra two parameters? Maybe only in performance? If no difference, why doesn't the documentation describe it that way, so that it could be far clearer? If there is a difference, what is the difference? Similar questions for endswith. ---------- messages: 347179 nosy: v+python priority: normal severity: normal status: open title: poor documentation for .startswith, .endswith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 01:06:37 2019 From: report at bugs.python.org (Glenn Linderman) Date: Wed, 03 Jul 2019 05:06:37 +0000 Subject: [issue37490] poor documentation for .startswith, .endswith In-Reply-To: <1562130095.71.0.839529776545.issue37490@roundup.psfhosted.org> Message-ID: <1562130397.83.0.301067899684.issue37490@roundup.psfhosted.org> Glenn Linderman added the comment: Or is text.startswith(('day', 'month', 'year'), 8, 12) the same as text[8:12] in ('day', 'month', 'year') What happens if the text doesn't have as many as 12 characters? What if it doesn't have more than 8 characters? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 01:48:29 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 05:48:29 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562132909.38.0.228685583983.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: Variadic macros are not part of C89, so that would require changing PEP 7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 03:11:57 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 03 Jul 2019 07:11:57 +0000 Subject: [issue37489] pickling instance which inherited from Exception with keyword only parameter In-Reply-To: <1562123551.66.0.0575103279234.issue37489@roundup.psfhosted.org> Message-ID: <1562137917.08.0.936460938288.issue37489@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +pitrou versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 03:15:51 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 03 Jul 2019 07:15:51 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562138151.95.0.588363354007.issue36390@roundup.psfhosted.org> Tal Einat added the comment: > I propose to merge PR 12481 first, after review, with tests, and then include name change with rewrite in PR 14500. I think GH-14500 is in good shape now. I'd be happy to merge either PR with master after the other PR is merged, so please don't worry about the order in which we merge the PRs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 03:17:23 2019 From: report at bugs.python.org (=?utf-8?q?Cyril_Nicod=C3=A8me?=) Date: Wed, 03 Jul 2019 07:17:23 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1562138243.7.0.83577378693.issue34155@roundup.psfhosted.org> Cyril Nicod?me added the comment: This thread has been really interesting to follow, I'm glad to have opened it :) I would agree with Barry here, it should follow the documentation. BUT, I would suggest to add a "strict" parameter that would throw exceptions depending on the parsing issue (missing a @, having multiple @, etc). That way, a basic usage would return the empty strings, letting the developer know the email is invalid, and advanced case would still be possible. By default, I think having strict set to False would be logical, since it would follow the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 03:18:46 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 03 Jul 2019 07:18:46 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1562138326.45.0.0143072186473.issue17535@roundup.psfhosted.org> Tal Einat added the comment: I'm rather surprised at the lack of enthusiasm for this here and on idle-dev! I was sure people would be happy to see this finally approaching completion after so many years. To clarify, all I'm waiting for now is to hear whether this change is wanted, before I do the extra work to finalize it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 03:30:26 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Wed, 03 Jul 2019 07:30:26 +0000 Subject: [issue37490] poor documentation for .startswith, .endswith In-Reply-To: <1562130095.71.0.839529776545.issue37490@roundup.psfhosted.org> Message-ID: <1562139026.29.0.641233753604.issue37490@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: * text.startswith(prefix, start, end) seems the same as text[start:end].startswith(prefix) * text[start:end] with end>len(text) seems no issue, so also not an issue for startswith * text[8:12] in ('day', 'month', 'year') is not the same at all, rather: For x in ('day', 'month', 'year'): if text[8:12].startswith(x): return True Else: return False Maybe indeed could add to the documentation that 'text.startswith(prefix, start, end)' is the same as 'text[start:end].startswith(prefix)'? Although seemed obvious for me. ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 03:41:11 2019 From: report at bugs.python.org (Oleksandr Pavliuk) Date: Wed, 03 Jul 2019 07:41:11 +0000 Subject: [issue34788] ipaddress module fails on rfc4007 scoped IPv6 addresses In-Reply-To: <1537799403.03.0.956365154283.issue34788@psf.upfronthosting.co.za> Message-ID: <1562139671.73.0.0158507506181.issue34788@roundup.psfhosted.org> Oleksandr Pavliuk added the comment: Pull request needs a review. ---------- nosy: +opavlyuk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 03:41:19 2019 From: report at bugs.python.org (Steve Holden) Date: Wed, 03 Jul 2019 07:41:19 +0000 Subject: [issue37490] poor documentation for .startswith, .endswith In-Reply-To: <1562130095.71.0.839529776545.issue37490@roundup.psfhosted.org> Message-ID: <1562139679.84.0.521774348285.issue37490@roundup.psfhosted.org> Steve Holden added the comment: "Is the same as" is a little misleading - "gives the same result as" would be better, since there is little doubt actually slicing the subject strings would be massively less efficient in looping contexts. The re module offers the start and end arguments to so many functions/methods for precisely this reason, so perhaps that module's documentation will contain helpful wording that could be copied or referenced. ---------- nosy: +holdenweb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 03:58:50 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Wed, 03 Jul 2019 07:58:50 +0000 Subject: [issue37490] poor documentation for .startswith, .endswith In-Reply-To: <1562130095.71.0.839529776545.issue37490@roundup.psfhosted.org> Message-ID: <1562140730.7.0.0373404669973.issue37490@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: Modified from re module Pattern.search: -------- The optional second parameter 'start' gives an index in the string where the search is to start; it defaults to 0. The optional parameter 'end' limits how far the string will be searched; it will be as if the string is 'end' characters long, so only the characters from 'start' to 'end' - 1 will be searched for a match. If 'end' is less than 'start', no match will be found; otherwise, text.startswith(prefix, start, end) gives the same result as text[start:end](prefix). ------------ I don't think this is true like with re: ---- This is not completely equivalent to slicing the string; the '^' pattern character matches at the real beginning of the string and at positions just after a newline, but not necessarily at the index where the search is to start. ---- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 04:00:22 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Wed, 03 Jul 2019 08:00:22 +0000 Subject: [issue37490] poor documentation for .startswith, .endswith In-Reply-To: <1562130095.71.0.839529776545.issue37490@roundup.psfhosted.org> Message-ID: <1562140822.15.0.882842045247.issue37490@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: correction: ... otherwise, text.startswith(prefix, start, end) gives the same result as text[start:end].startswith(prefix). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 04:19:31 2019 From: report at bugs.python.org (Abhilash Raj) Date: Wed, 03 Jul 2019 08:19:31 +0000 Subject: [issue37491] IndexError in get_bare_quoted_string Message-ID: <1562141971.16.0.876863205208.issue37491@roundup.psfhosted.org> New submission from Abhilash Raj : from email.parser import BytesParser, Parser from email.policy import default payload = 'Content-Type:x;\x1b*="\'G\'\\"""""' msg = Parser(policy=default).parsestr(payload) print(msg.get('content-type')) When trying to review PR for BPO 37461, I found another bug where an IndexError is raised if there aren't closing quote characters in the input message: Suggested patch: @@ -1191,7 +1192,7 @@ def get_bare_quoted_string(value): "expected '\"' but found '{}'".format(value)) bare_quoted_string = BareQuotedString() value = value[1:] - if value[0] == '"': + if value and value[0] == '"': token, value = get_qcontent(value) bare_quoted_string.append(token) while value and value[0] != '"': ---------- components: email messages: 347190 nosy: barry, maxking, r.david.murray priority: normal severity: normal status: open title: IndexError in get_bare_quoted_string type: crash versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:10:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jul 2019 09:10:13 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562145013.85.0.756520460763.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b71d8d67959f3b5efbdfe00066589ac0d8f98aad by Victor Stinner in branch 'master': bpo-37421: test_winconsoleio doesn't leak temp file anymore (GH-14562) https://github.com/python/cpython/commit/b71d8d67959f3b5efbdfe00066589ac0d8f98aad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:10:22 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 09:10:22 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562145022.58.0.816127218246.issue37421@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14387 pull_request: https://github.com/python/cpython/pull/14569 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:10:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jul 2019 09:10:35 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562145035.38.0.535945774635.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 684cb47fffb7af3ac50cb077f6d2a095c9ce20b4 by Victor Stinner in branch 'master': bpo-37421: test_concurrent_futures cleans up multiprocessing (GH-14563) https://github.com/python/cpython/commit/684cb47fffb7af3ac50cb077f6d2a095c9ce20b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:10:42 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 09:10:42 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562145042.44.0.901022428036.issue37421@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14388 pull_request: https://github.com/python/cpython/pull/14570 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:12:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jul 2019 09:12:31 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562145151.66.0.860356674013.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 74c9dd57771f4f061ee83b069c8e7b37de41246b by Victor Stinner in branch 'master': bpo-37421: Fix test_distutils.test_build_ext() (GH-14564) https://github.com/python/cpython/commit/74c9dd57771f4f061ee83b069c8e7b37de41246b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:13:47 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 03 Jul 2019 09:13:47 +0000 Subject: [issue37490] poor documentation for .startswith, .endswith In-Reply-To: <1562130095.71.0.839529776545.issue37490@roundup.psfhosted.org> Message-ID: <1562145227.56.0.632272425445.issue37490@roundup.psfhosted.org> Steven D'Aprano added the comment: Here are links to the relevant docs: https://docs.python.org/3/library/stdtypes.html#str.startswith https://docs.python.org/3/library/stdtypes.html#str.endswith Both say: "With optional *start*, test string beginning at that position. With optional *end*, stop comparing string at that position." That seems perfectly clear to me: if you pass a starting position, the *starts with* test (or ends with) considers the substring starting at that position. If you pass an ending position, the starts with test considers the substring ending at that position. That makes it equivalent to text[start:end].startswith(prefix) except that no copying is done. It seems that you are reading the start and end positions as somehow requiring that the prefix be an exact match for the given slice, e.g. when you ask: > must it fail because it doesn't match all of text[2:8] ? and later: > can only year match because of the start and end? These questions imply you think that the methods require the specified slice *equals* the given affix (prefix/suffix) rather than *start* or *end* with. That seems to me to be an unjustified interpretation of what the docs say. In the absence of any evidence to the contrary, we are surely entitled to assume that the *startswith* method remains *startswith* regardless of whether a slice (start/end positions) is specified or not. Or to put it another way, it goes without saying that specifying a slice (start and/or end positions) doesn't change the semantics of the method, it only changes the starting and ending positions, precisely as already documented. Glenn asked: > text = "Now the day is over" > text.startswith('the', 2, 8) > Does it produce True because 'w the' is at the beginning of the text[2:] ? No, it produces False, because text[2:8] does not start with "the", it starts with "w". > Maybe. Or because there is an ending position, must it fail because it > doesn't match all of text[2:8] ? If fails, but that's not why it fails. If fails because the substring doesn't start with the prefix, not because it doesn't equal the prefix. > text.startswith('day', 8, 10) > Does this produce True because everything in day matches text[8:10] No, it produces False because the substring in the half-open slice 8:10 does not start with "day". > or must it always produce false for any value of text because the > match is never as long as the prefix string? Correct, since the slice is only 2 characters long, and the prefix is 3 characters long, hence the slice can never begin with that prefix. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:14:16 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 09:14:16 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562145256.24.0.544907254845.issue37421@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14389 pull_request: https://github.com/python/cpython/pull/14571 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:19:29 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 03 Jul 2019 09:19:29 +0000 Subject: [issue37490] poor documentation for .startswith, .endswith In-Reply-To: <1562130095.71.0.839529776545.issue37490@roundup.psfhosted.org> Message-ID: <1562145569.41.0.935005406205.issue37490@roundup.psfhosted.org> Steven D'Aprano added the comment: Perhaps it would help if we spelled out the behaviour more explicitly? str.startswith(prefix[, start=0[, end=len(string)]]) Return True if the slice of string between start (defaults to the beginning of the string) and end (defaults to the end of the string) starts with the prefix, otherwise return False. prefix can also be a tuple of prefixes to look for. (To be frank, I don't think we need to do this, I think the docs are fine as-is, but if others disagree perhaps this is an improvment.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:21:07 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 09:21:07 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562145667.55.0.975552217228.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Cons: readability... It's a single relatively short macro. I'm not worried about that. I'm more about compiler support for such macros. I'll make a PR with this idea and see what CI says. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:29:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jul 2019 09:29:42 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562146182.84.0.455970196106.issue37483@roundup.psfhosted.org> STINNER Victor added the comment: > Variadic macros are not part of C89, so that would require changing PEP 7. PEP 7 uses C99 since Python 3.6: https://www.python.org/dev/peps/pep-0007/#c-dialect > What do you think about macro like this? Macros cannot be used in all C extensions. For the PEP 587, I was asked to replace macros with functions. I would prefer a PyObject_CallOneArg() function than yet another ugly and dangerous macro. Sometimes, a regular function is better for stack consumption: it doesn't increase the stack consumption in the call site, stack memory is "released" once PyObject_CallOneArg() exit. In the past, I had to disable inlining in some functions to reduce the stack consumption. (I'm not sure if this optimization is still around.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:31:07 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 03 Jul 2019 09:31:07 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562146267.45.0.772738721849.issue37483@roundup.psfhosted.org> Inada Naoki added the comment: AFAIK, gcc, clang, and MSVC support it. Another cons is, general pitfall of macro: _PyObject_CALL_WITH_ARGS(func, PyDict_GetItem(d, key)); // PyDict_GetItem(d, key) is called twice. If two or more arguments are not common, I prefer _PyObject_CallOneArg to macro. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:31:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jul 2019 09:31:21 +0000 Subject: [issue37411] testEnviron (test.test_wsgiref.HandlerTests) fails when environment variable X is set In-Reply-To: <1561550751.62.0.0941955504485.issue37411@roundup.psfhosted.org> Message-ID: <1562146281.77.0.06555439043.issue37411@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -14383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:31:43 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 09:31:43 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562146303.91.0.0004608869425.issue37421@roundup.psfhosted.org> miss-islington added the comment: New changeset a2a807f75dc162dfb45fb297aee4961de8008f84 by Miss Islington (bot) in branch '3.8': bpo-37421: test_winconsoleio doesn't leak temp file anymore (GH-14562) https://github.com/python/cpython/commit/a2a807f75dc162dfb45fb297aee4961de8008f84 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:34:11 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 09:34:11 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562146451.04.0.719416554435.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: > _PyObject_CALL_WITH_ARGS(func, PyDict_GetItem(d, key)); // PyDict_GetItem(d, key) is called twice. That's pretty bad and in my opinion a good reason to reject this idea. > If two or more arguments are not common, I prefer _PyObject_CallOneArg to macro. I posted some counts at https://mail.python.org/archives/list/capi-sig at python.org/message/3I76R27YMFSKB5JQIM3E4NA3BECVTZHP/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:36:27 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 09:36:27 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562146587.99.0.469833766915.issue37421@roundup.psfhosted.org> miss-islington added the comment: New changeset 79665c698fb8f97475e03c4231067db1ae47addb by Miss Islington (bot) in branch '3.8': bpo-37421: test_concurrent_futures cleans up multiprocessing (GH-14563) https://github.com/python/cpython/commit/79665c698fb8f97475e03c4231067db1ae47addb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:37:46 2019 From: report at bugs.python.org (myungsekyo) Date: Wed, 03 Jul 2019 09:37:46 +0000 Subject: [issue36881] isinstance raises TypeError for metaclass with metaclass=ABCMeta In-Reply-To: <1557541744.61.0.162387429511.issue36881@roundup.psfhosted.org> Message-ID: <1562146666.77.0.0761102436542.issue36881@roundup.psfhosted.org> Change by myungsekyo : ---------- nosy: +myungsekyo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:44:10 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 09:44:10 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562147050.31.0.0602730006719.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: > _PyObject_CALL_WITH_ARGS(func, PyDict_GetItem(d, key)); // PyDict_GetItem(d, key) is called twice. Actually, it's not a problem: sizeof() is special, it only looks at the type of its argument, it doesn't execute the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:46:01 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 09:46:01 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562147161.31.0.144472808919.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: > PEP 7 uses C99 since Python 3.6: https://www.python.org/dev/peps/pep-0007/#c-dialect That's not what the PEP says: "Python versions greater than or equal to 3.6 use C89 with several select C99 features" "several select C99 features" is not the same of using C99. Plus, I'm also worried about C++. We also support compiling C++ extensions with the same header files, so it must be C++ compatible also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:48:20 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 09:48:20 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562147300.94.0.439750186092.issue37421@roundup.psfhosted.org> miss-islington added the comment: New changeset 0aefba7f99f0fd9bcb3328a5919e07f9e03676b0 by Miss Islington (bot) in branch '3.8': bpo-37421: Fix test_distutils.test_build_ext() (GH-14564) https://github.com/python/cpython/commit/0aefba7f99f0fd9bcb3328a5919e07f9e03676b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 05:49:32 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 03 Jul 2019 09:49:32 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562147372.04.0.128139223386.issue37483@roundup.psfhosted.org> Inada Naoki added the comment: > Macros cannot be used in all C extensions. For the PEP 587, I was asked to replace macros with functions. This is just an helper inline function / macro to ease calling _PyObject_Vectorcall. Extensions can port this helper inline function / macro to ease calling _PyObject_Vectorcall. I don't want to make this non-inline function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:03:59 2019 From: report at bugs.python.org (Stefan Krah) Date: Wed, 03 Jul 2019 10:03:59 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562148239.95.0.71014260864.issue37483@roundup.psfhosted.org> Stefan Krah added the comment: The motivation for this PR is "it would be convenient to have this function". This is probably true, but generally I would not change 47 files at once. Most of the locations are probably not performance sensitive. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:12:20 2019 From: report at bugs.python.org (jpic) Date: Wed, 03 Jul 2019 10:12:20 +0000 Subject: [issue37492] should email.utils.parseaddr treat a@b. as invalid email ? Message-ID: <1562148740.76.0.680982453684.issue37492@roundup.psfhosted.org> New submission from jpic : Following up bpo-34155[0] PR#13079[1], which changes: >>> parseaddr('a at malicious@good') >From returning: ('', 'a at malicious') To return: ('', '') As such, parseaddr behaves more like documented: email.utils.parseaddr(address) Parse address ? which should be the value of some address-containing field such as To or Cc ? into its constituent realname and email address parts. Returns a tuple of that information, unless the parse fails, in which case a 2-tuple of ('', '') is returned. The pull request discussion suggested that it would be good to open a new bpo to discuss changing the following behaviour: parseaddr('a at b.') >From returning: ('', 'a at b.') To return a tuple of empty strings as well. We have not found RFC to back up that `a at b.` was not a valid email, however RFC 1034 states that dots separate labels: When a user needs to type a domain name, the length of each label is omitted and the labels are separated by dots ("."). As such, my understanding is that a valid domain must not end with a dot. [0] https://bugs.python.org/issue34155 [1] https://github.com/python/cpython/pull/13079 ---------- components: email messages: 347207 nosy: barry, jpic, r.david.murray priority: normal severity: normal status: open title: should email.utils.parseaddr treat a at b. as invalid email ? type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:20:38 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 03 Jul 2019 10:20:38 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562149238.65.0.207093375251.issue37483@roundup.psfhosted.org> Inada Naoki added the comment: This change doesn't make caller code complicated. It makes caller little simpler. Choosing performance sensitive code is much hard than replace all occurrences. So I'm OK to change all callers except code owner opposed at once. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:24:04 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 10:24:04 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562149444.6.0.0576002548029.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: Exactly. I see no reason to prefer PyObject_CallFunctionObjArgs(func, arg, NULL) over _PyObject_CallOneArg(func, arg) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:27:30 2019 From: report at bugs.python.org (Stefan Krah) Date: Wed, 03 Jul 2019 10:27:30 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562149650.45.0.76081803285.issue37483@roundup.psfhosted.org> Stefan Krah added the comment: It adds yet another special case underscore function that one cannot use in external projects. So I would not say that is simpler. Has there been any performance measurement at all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:29:20 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 10:29:20 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562149760.34.0.772264801119.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: > It adds yet another special case underscore function that one cannot use in external projects. So I would not say that is simpler. If you're worried about the underscore, I will make a separate PR to add a non-underscored version, similar to PyObject_CallNoArgs() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:31:26 2019 From: report at bugs.python.org (Glenn Linderman) Date: Wed, 03 Jul 2019 10:31:26 +0000 Subject: [issue37490] poor documentation for .startswith, .endswith In-Reply-To: <1562130095.71.0.839529776545.issue37490@roundup.psfhosted.org> Message-ID: <1562149886.63.0.330290506713.issue37490@roundup.psfhosted.org> Glenn Linderman added the comment: Thanks for the explanations and suggestions. Now that I think I know what those parameters are used for... Sorry, my first example was tweaked on the fly, and doesn't make as much sense as it could because it wound up being a mix of pre-tweaked and tweaked text, as Steven points out at the beginning of msg347194. But the text he suggests in msg347195 would be an immense clarification to the existing text. The existing text is worded in such a way that it is not clear how the start and end parameters affect the search, except by analogy with other slicing operations in other parts of Python. Steven may be willing to draw such analogies to perceive that the current startswith documentation is clear, but if you go in with an open mind, uncluttered with the better-specified behavior of other Python operations, there are lots of possible interpretations. Describing the start/end parameters with defaults and explaining the whole operation as referring to the slice specified by those parameters makes it far less open to other interpretations. The text Aldwin suggests in msg347188 (from re) is better than the original for startswith/endswith, but is not as clear as Steven's wording. I would actually suggest that Steven's wording could be the basis for an improvement for the re docs as quoted. The second part, the "prefix can also be a tuple of prefixes to look for" could also be improved... neither prefix nor tuple of prefixes is defined as being a string. Further, if the parameter syntax is shown with the defaults, then the parethetical comments about (defaults to...) are not really necessary, simplifying the description to: The prefix parameter can be a single string, or a tuple of strings. Return True if the slice of string specified by [start:end] starts with any complete string supplied as part of the prefix parameter, otherwise return False. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:33:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jul 2019 10:33:35 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562150015.83.0.0192543033666.issue37483@roundup.psfhosted.org> STINNER Victor added the comment: > Exactly. I see no reason to prefer PyObject_CallFunctionObjArgs(func, arg, NULL) over _PyObject_CallOneArg(func, arg) In this case, maybe the whole idea of _PyObject_CallOneArg() is not worth it? Is there any benchmark showing if it's faster or use less stack? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:36:40 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 03 Jul 2019 10:36:40 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562150200.77.0.518284508328.issue37483@roundup.psfhosted.org> Inada Naoki added the comment: > It adds yet another special case underscore function that one cannot use in external projects. So I would not say that is simpler. I don't get what you mean. Do you care about *adding* API with underscore? If so, it doesn't make caller code complex. It can not be a reason to reject changing many files. Or do you care about *using* API with underscore? If so, I'm OK to stop changing some callers which are not tightly coupled with Python. (e.g. sqlite) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:49:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Jul 2019 10:49:53 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562150993.66.0.520204095574.issue37421@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14390 pull_request: https://github.com/python/cpython/pull/14572 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:52:27 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 03 Jul 2019 10:52:27 +0000 Subject: [issue37484] Use PY_VECTORCALL_ARGUMENTS_OFFSET for __exit__ In-Reply-To: <1562070125.47.0.376343884146.issue37484@roundup.psfhosted.org> Message-ID: <1562151147.59.0.192563076612.issue37484@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 469d1a70cecc918499c288fc0e5e3d79711bc5e5 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37484: use _PyObject_Vectorcall for __exit__ (GH-14557) https://github.com/python/cpython/commit/469d1a70cecc918499c288fc0e5e3d79711bc5e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:52:39 2019 From: report at bugs.python.org (Stefan Krah) Date: Wed, 03 Jul 2019 10:52:39 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562151159.86.0.372846897563.issue37483@roundup.psfhosted.org> Stefan Krah added the comment: > Or do you care about *using* API with underscore? If so, I'm OK to stop changing some callers which are not tightly coupled with Python. I care about this one. Indeed I think underscore functions should be used in strategic places inside the core interpreter and not sprinkled across the whole code base by default. But in general I also care about not having too many new functions to avoid churn. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:53:54 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 10:53:54 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562151234.72.0.606884223675.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Is there any benchmark showing if it's faster Here is one example: class D(dict): def __missing__(self, key): return None d = D() and now benchmark d[0] **before**: Mean +- std dev: 173 ns +- 1 ns **after**: Mean +- std dev: 162 ns +- 1 ns To be precise, I ran: ./python -m perf timeit --duplicate 200 -s 'class D(dict):' -s ' def __missing__(self, key):' -s ' return None' -s 'd = D()' 'd[0]' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:54:03 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 03 Jul 2019 10:54:03 +0000 Subject: [issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall In-Reply-To: <1560264211.71.0.0575753966343.issue37233@roundup.psfhosted.org> Message-ID: <1562151243.48.0.216474481439.issue37233@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 53c214344038341ce86fcf7efa12dc33be9d5b45 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37233: optimize method_vectorcall in case of totalargs == 0 (GH-14550) https://github.com/python/cpython/commit/53c214344038341ce86fcf7efa12dc33be9d5b45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 06:59:41 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 03 Jul 2019 10:59:41 +0000 Subject: [issue37492] should email.utils.parseaddr treat a@b. as invalid email ? In-Reply-To: <1562148740.76.0.680982453684.issue37492@roundup.psfhosted.org> Message-ID: <1562151581.75.0.909529425281.issue37492@roundup.psfhosted.org> Eric V. Smith added the comment: RFC 1034 defines absolute domain names as ending with dot: ------------ When a user needs to type a domain name, the length of each label is omitted and the labels are separated by dots ("."). Since a complete domain name ends with the root label, this leads to a printed form which ends in a dot. We use this property to distinguish between: - a character string which represents a complete domain name (often called "absolute"). For example, "poneria.ISI.EDU." - a character string that represents the starting labels of a domain name which is incomplete, and should be completed by local software using knowledge of the local domain (often called "relative"). For example, "poneria" used in the ISI.EDU domain. ------------ I'll admit that it isn't common to specify absolute domain names, and many resolvers treat a domain name with an internal dot, but no terminal dot, as an absolute name. I doubt in practice there are any email addresses that have a TLD name. There's some bpo issue where this was discussed in reference to the ipaddress module. I think the issues was canonicalizing names, and it was decided not to add trailing dot to make them absolute. I realize that logic doesn't directly apply here. In spite of "com." being a valid domain name, I think it's reasonable to reject it as the domain part of an email address. But there should be a comment in the code as such. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 07:00:19 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 11:00:19 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562151619.69.0.890266036981.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: Stefan: I used an underscore by analogy with PyObject_CallNoArgs()/_PyObject_CallNoArg(), where the first is in the limited API and the second is an inline function in the cpython API. But maybe we could revisit that decision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 07:09:42 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 03 Jul 2019 11:09:42 +0000 Subject: [issue37492] should email.utils.parseaddr treat a@b. as invalid email ? In-Reply-To: <1562148740.76.0.680982453684.issue37492@roundup.psfhosted.org> Message-ID: <1562152182.93.0.459385815944.issue37492@roundup.psfhosted.org> Eric V. Smith added the comment: Counterpoint: I just sent an email to "info at info.", and Thunderbird and my MTA (postfix) and my mail relay all accepted it. I guess it's possible that a TLD (especially one of the newer ones) could accept email addresses in the TLD itself. It turns out that "info at info." isn't a mailbox as of right now, but I think it's a valid and accepted address, at least by the software listed above. And it could be a valid mailbox, just isn't in this particular case. Maybe the more conservative approach is to say that "info at info." (and "a at b.", etc.) should be considered valid email addresses. If you were actually trying to send email to a mailbox in the "info" TLD, I think most resolvers would resolve "info" as a relative domain name, which isn't what we'd want to happen: you'd have to specify the domain as "info.". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 07:37:40 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 03 Jul 2019 11:37:40 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562153860.66.0.71052197516.issue37483@roundup.psfhosted.org> Inada Naoki added the comment: I don't want to add many functions to limited/public APIs. Note that public APIs defined outside of cpython/ are considered mandatory for all Python implementations supporting Python/C API. When portability is more important than performance, there are many APIs already. Please keep _PyObject_CallOneArg() as just an easy wrapper of _PyObject_Vectorcall which is CPython specific in this issue. Candidate of revert: _csv, _decimal, _sqlite, pyexpat, _testbuffer, _xxtestfuzz They doesn't use much private APIs, or they are tests which is useful for other interpreters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 08:10:34 2019 From: report at bugs.python.org (jpic) Date: Wed, 03 Jul 2019 12:10:34 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1562155834.04.0.813849009817.issue34155@roundup.psfhosted.org> jpic added the comment: Thanks for the kind words Cyril, sorry that this patch doesn't address exactly the issue that you have described initially, but rather the security issue related to it. The exception depending on the parsing issue is already supported by the new API, although it's just "Invalid Domain" for now. For user interfaces it would be nice to detail parse errors indeed. Again I wonder if this should be a separate issue. Concerning the default behavior, @maxking will know but I would try to defend the "secure by default" paradigm if necessary, especially in the deprecated API. Meanwhile, I think it would create more value for Python to invest in feature development in the new API, that has a very nice private API but apparently lacks unit tests and documentation before becoming available to users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 08:18:47 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 03 Jul 2019 12:18:47 +0000 Subject: [issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall In-Reply-To: <1560264211.71.0.0575753966343.issue37233@roundup.psfhosted.org> Message-ID: <1562156327.66.0.655494991975.issue37233@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +14391 pull_request: https://github.com/python/cpython/pull/14573 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 08:21:11 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 12:21:11 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562156471.45.0.403569930107.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: Victor, what's your opinion on adding PyObject_CallOneArg() to the limited API? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 08:42:11 2019 From: report at bugs.python.org (jpic) Date: Wed, 03 Jul 2019 12:42:11 +0000 Subject: [issue37492] should email.utils.parseaddr treat a@b. as invalid email ? In-Reply-To: <1562148740.76.0.680982453684.issue37492@roundup.psfhosted.org> Message-ID: <1562157731.0.0.464818651764.issue37492@roundup.psfhosted.org> jpic added the comment: Thanks a heap Eric, I feel a bit silly I missed it. Closing the issue as not a bug, please feel free to reopen if necessary. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 08:43:33 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 03 Jul 2019 12:43:33 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1562157813.66.0.0835688215148.issue37474@roundup.psfhosted.org> Mark Dickinson added the comment: > What is the behavior on FreeBSD when fedisableexcept(FE_OVERFLOW) is not called? That's an excellent question, that I'd love to have an answer to for currently supported FreeBSD versions. I think the old behaviour is that anything that you'd expect to raise an FPE (e.g., `math.sqrt(-1.0)` would segfault the interpreter). It may be that that's no longer an issue with FreeBSD versions that we care about. That code comment dates from over 16 years ago (see https://github.com/python/cpython/commit/4643bd9a9cf43332992d10982c52debf3f0d980c), so there's some hope that the situation's changed since then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 08:43:55 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 03 Jul 2019 12:43:55 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1562157835.02.0.273536047319.issue37474@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 08:46:14 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 03 Jul 2019 12:46:14 +0000 Subject: [issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall In-Reply-To: <1560264211.71.0.0575753966343.issue37233@roundup.psfhosted.org> Message-ID: <1562157974.73.0.429595432283.issue37233@roundup.psfhosted.org> Inada Naoki added the comment: New changeset c7570d402e3ee8717615ffa020eb9e2215a77660 by Inada Naoki in branch '3.8': [3.8] bpo-37233: use _PY_FASTCALL_SMALL_STACK in method_vectorcall (GH-13974) https://github.com/python/cpython/commit/c7570d402e3ee8717615ffa020eb9e2215a77660 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 08:47:07 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 12:47:07 +0000 Subject: [issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall In-Reply-To: <1560264211.71.0.0575753966343.issue37233@roundup.psfhosted.org> Message-ID: <1562158027.3.0.154502106633.issue37233@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14392 pull_request: https://github.com/python/cpython/pull/14574 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 08:49:29 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 03 Jul 2019 12:49:29 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1562158169.38.0.0170550447753.issue37474@roundup.psfhosted.org> Mark Dickinson added the comment: The current FreeBSD documentation for fedisableexcept says: > All exceptions are masked by default. Source: https://www.freebsd.org/cgi/man.cgi?query=fedisableexcept&apropos=0&sektion=0&manpath=FreeBSD+12.0-RELEASE+and+Ports&arch=default&format=html So it looks as though it may be safe to remove this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 09:06:41 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 13:06:41 +0000 Subject: [issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall In-Reply-To: <1560264211.71.0.0575753966343.issue37233@roundup.psfhosted.org> Message-ID: <1562159201.2.0.605319035212.issue37233@roundup.psfhosted.org> miss-islington added the comment: New changeset 1099e343e88ddfb46b84ba4ffc6ecc449b7f7891 by Miss Islington (bot) in branch '3.8': bpo-37233: optimize method_vectorcall in case of totalargs == 0 (GH-14550) https://github.com/python/cpython/commit/1099e343e88ddfb46b84ba4ffc6ecc449b7f7891 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 09:39:24 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 13:39:24 +0000 Subject: [issue37493] Use _PyObject_CallNoArg() in a few more places Message-ID: <1562161164.42.0.425095405728.issue37493@roundup.psfhosted.org> New submission from Jeroen Demeyer : Try to use _PyObject_CallNoArg in all places where a function is called without arguments. ---------- components: Interpreter Core messages: 347230 nosy: jdemeyer priority: normal severity: normal status: open title: Use _PyObject_CallNoArg() in a few more places versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 09:45:13 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 13:45:13 +0000 Subject: [issue37493] Use _PyObject_CallNoArg() in a few more places In-Reply-To: <1562161164.42.0.425095405728.issue37493@roundup.psfhosted.org> Message-ID: <1562161513.01.0.234436086378.issue37493@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +14393 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14575 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 10:31:32 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 14:31:32 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562164292.08.0.250273816852.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: Test of stack usage: from _testcapi import stack_pointer class D(dict): def __missing__(self, key): sp = stack_pointer() print(f"stack usage = {TOP - sp}") return None d = D() TOP = stack_pointer() d[0] **before**: stack usage = 1296 **after**: stack usage = 976 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 11:53:59 2019 From: report at bugs.python.org (Fourcade) Date: Wed, 03 Jul 2019 15:53:59 +0000 Subject: [issue37494] Call asyncio Future in scope Message-ID: <1562169239.78.0.569979789065.issue37494@roundup.psfhosted.org> New submission from Fourcade : I'm trying to get the progession of my asyncIO Futures. For some reason, I can't get value updates inside any other scope. For example: ``` import concurrent.futures import time import asyncio import random def get_progress(futures): return sum([f.done() for f in futures]) def long_task(t): time.sleep(1.5) return t loop = asyncio.get_event_loop() executor = concurrent.futures.ProcessPoolExecutor(max_workers=4) inputs = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] futures_ = [loop.run_in_executor(executor, long_task, i) for i in inputs] for i in range(5): time.sleep(1) print(get_progress(futures_)) ``` It prints only 0. However, if I run this inside a terminal and call get_progress(futures_) it prints 7 as expected. Am I missing something here ? ---------- components: asyncio messages: 347232 nosy: RobinFrcd, asvetlov, yselivanov priority: normal severity: normal status: open title: Call asyncio Future in scope type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 12:03:38 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 03 Jul 2019 16:03:38 +0000 Subject: [issue37494] Call asyncio Future in scope In-Reply-To: <1562169239.78.0.569979789065.issue37494@roundup.psfhosted.org> Message-ID: <1562169818.71.0.920824390747.issue37494@roundup.psfhosted.org> Andrew Svetlov added the comment: Your code doesn't run the event loop, only creates it. What do you expect? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 12:47:30 2019 From: report at bugs.python.org (Fourcade) Date: Wed, 03 Jul 2019 16:47:30 +0000 Subject: [issue37494] Call asyncio Future in scope In-Reply-To: <1562169239.78.0.569979789065.issue37494@roundup.psfhosted.org> Message-ID: <1562172450.12.0.900535801181.issue37494@roundup.psfhosted.org> Fourcade added the comment: If I add a simple print inside long_task, the print is executed correctly. So it seems this code actually runs the loop. (I'm on python 3.6.8). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 12:51:40 2019 From: report at bugs.python.org (Fourcade) Date: Wed, 03 Jul 2019 16:51:40 +0000 Subject: [issue37494] Call asyncio Future in scope In-Reply-To: <1562169239.78.0.569979789065.issue37494@roundup.psfhosted.org> Message-ID: <1562172700.67.0.992930118045.issue37494@roundup.psfhosted.org> Fourcade added the comment: Here's the file with an example. The get_progress function always outputs 0. ---------- Added file: https://bugs.python.org/file48454/test_progress.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 14:22:54 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 18:22:54 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562178174.5.0.591859795861.issue19696@roundup.psfhosted.org> miss-islington added the comment: New changeset 56ec4f1fdedd5b38deb06d94d51dd1a540262e90 by Miss Islington (bot) (Kyle Stanley) in branch 'master': bpo-19696: Replace deprecated method in "test_import_pkg.py" (GH-14466) https://github.com/python/cpython/commit/56ec4f1fdedd5b38deb06d94d51dd1a540262e90 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 14:35:14 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 03 Jul 2019 18:35:14 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562178914.64.0.379870997341.issue37483@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14394 pull_request: https://github.com/python/cpython/pull/14575 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 14:44:01 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 03 Jul 2019 18:44:01 +0000 Subject: [issue37494] Call asyncio Future in scope In-Reply-To: <1562169239.78.0.569979789065.issue37494@roundup.psfhosted.org> Message-ID: <1562179441.42.0.451411573746.issue37494@roundup.psfhosted.org> Andrew Svetlov added the comment: It doesn't. Loop is executed by asyncio.run() (recommended) or low-level loop.run_until_complete() / loop.run_forever() calls. Please note, this tracker is for working on Python itself, not for teaching Python usage. Please use other resources like forums or stack overflow. I'm closing the issue as there is no bug here but improper usage example. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 15:04:52 2019 From: report at bugs.python.org (liugang) Date: Wed, 03 Jul 2019 19:04:52 +0000 Subject: [issue37489] pickling instance which inherited from Exception with keyword only parameter In-Reply-To: <1562123551.66.0.0575103279234.issue37489@roundup.psfhosted.org> Message-ID: <1562180692.64.0.710113808377.issue37489@roundup.psfhosted.org> Change by liugang : ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 15:09:55 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Jul 2019 19:09:55 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1562180995.36.0.468780418305.issue17535@roundup.psfhosted.org> Ned Deily added the comment: Tal, I took a quick look at the results with the current PR and, as someone who doesn't use IDLE other than to smoke test, It looks fine to me. The concerns I raised previously about the interaction between changing the state of Options->Line Numbers and multiple windows still stands, though. Perhaps not previously mentioned, this may be an issue specific to macOS where, per macOS interface guidelines (and as provided by Tk), there is only one instance of a menu bar (at the top of the screen) per app, not a menu bar per app window. Also, since my original review comments, we have eliminated the use on macOS of Tk versions older than 8.6 so previous concerns are no longer relevant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 15:36:46 2019 From: report at bugs.python.org (Hobs) Date: Wed, 03 Jul 2019 19:36:46 +0000 Subject: [issue34896] Unable to install Python 3.5 In-Reply-To: <1538671933.56.0.545547206417.issue34896@psf.upfronthosting.co.za> Message-ID: Hobs added the comment: I'd suggest using Anaconda to install python and all python packages that you need. Once you have Anaconda installed you can type `conda install django` and that should work. Also I'd suggest sticking with the lastest version of python (3.7) that installs with anaconda rather than using python 3.5. Django (and other packages) may not be compatible with python 3.5. --Hobson On Thu, Oct 4, 2018 at 9:52 AM Ruchir Jha wrote: > > New submission from Ruchir Jha : > > Hi, I was trying to install Danjo to work on Python. However it was not > working fine hence I uninstalled the version 3.5 which I installed and > tried to install it again as the earlier version was used for Anaconda. > However even after multiple attempts to install Python its throws and error > 0x80070643 fatal error during python installation. I have restarted the > system and have also cleared the cache. I am working under strict deaadline > hence an urgent help will be highly appreciated > > ---------- > components: Installation > files: Python 3.5.0rc3 (64-bit)_20181004220550_000_core_JustForMe.log > messages: 327067 > nosy: ruchirjha > priority: normal > severity: normal > status: open > title: Unable to install Python 3.5 > type: crash > versions: Python 3.5 > Added file: https://bugs.python.org/file47849/Python 3.5.0rc3 > (64-bit)_20181004220550_000_core_JustForMe.log > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > New-bugs-announce mailing list > New-bugs-announce at python.org > https://mail.python.org/mailman/listinfo/new-bugs-announce > ---------- nosy: +Hobson.Lane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 16:08:22 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 03 Jul 2019 20:08:22 +0000 Subject: [issue37366] Add an "onitem" callback parameter to shutil.rmtree() In-Reply-To: <1561145152.44.0.980248626511.issue37366@roundup.psfhosted.org> Message-ID: <1562184502.15.0.0204320339028.issue37366@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- resolution: rejected -> versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 16:08:37 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 03 Jul 2019 20:08:37 +0000 Subject: [issue37366] Add an "onitem" callback parameter to shutil.rmtree() In-Reply-To: <1561145152.44.0.980248626511.issue37366@roundup.psfhosted.org> Message-ID: <1562184517.75.0.234223477411.issue37366@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:11:21 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 03 Jul 2019 21:11:21 +0000 Subject: [issue22107] tempfile module misinterprets access denied error on Windows In-Reply-To: <1406724041.52.0.0365391579019.issue22107@psf.upfronthosting.co.za> Message-ID: <1562188281.26.0.0474428285826.issue22107@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:12:19 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 03 Jul 2019 21:12:19 +0000 Subject: [issue33408] Enable AF_UNIX support in Windows In-Reply-To: <1525257332.06.0.682650639539.issue33408@psf.upfronthosting.co.za> Message-ID: <1562188339.94.0.15403442182.issue33408@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:40:25 2019 From: report at bugs.python.org (Yhojann Aguilera) Date: Wed, 03 Jul 2019 21:40:25 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1562190025.19.0.0401301637351.issue18748@roundup.psfhosted.org> Yhojann Aguilera added the comment: Same problem using Python 3.6.8 on Ubuntu 18.04 LTS. For now, solve this using LD_PRELOAD=libgcc_s.so.1 python3 ... For more details and pocs: https://github.com/WHK102/wss/issues/2 ---------- nosy: +Yhojann Aguilera versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:41:08 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Jul 2019 21:41:08 +0000 Subject: [issue37416] If threading is not imported from the main thread it sees the wrong thread as the main thread. In-Reply-To: <1561572282.64.0.920915319776.issue37416@roundup.psfhosted.org> Message-ID: <1562190068.77.0.491256369881.issue37416@roundup.psfhosted.org> Antoine Pitrou added the comment: This is a duplicate of #31517. ---------- nosy: +pitrou resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> MainThread association logic is fragile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:41:56 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Jul 2019 21:41:56 +0000 Subject: [issue31517] MainThread association logic is fragile In-Reply-To: <1505826011.26.0.999867844657.issue31517@psf.upfronthosting.co.za> Message-ID: <1562190116.74.0.877368227787.issue31517@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- nosy: +aldwinaldwin, fabioz, int19h, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:42:03 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Jul 2019 21:42:03 +0000 Subject: [issue31517] MainThread association logic is fragile In-Reply-To: <1505826011.26.0.999867844657.issue31517@psf.upfronthosting.co.za> Message-ID: <1562190123.17.0.616564329818.issue31517@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- versions: +Python 3.8, Python 3.9 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:47:35 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Jul 2019 21:47:35 +0000 Subject: [issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record In-Reply-To: <1561056169.29.0.814417679233.issue37355@roundup.psfhosted.org> Message-ID: <1562190455.47.0.740507885372.issue37355@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- nosy: +asvetlov, yselivanov versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:52:30 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 03 Jul 2019 21:52:30 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562190750.6.0.229658408269.issue35605@roundup.psfhosted.org> Anthony Sottile added the comment: This has regressed again -- I'll make another patch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:54:34 2019 From: report at bugs.python.org (Dominik Czarnota) Date: Wed, 03 Jul 2019 21:54:34 +0000 Subject: [issue37495] socket.inet_aton parsing issue on some libc versions Message-ID: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> New submission from Dominik Czarnota : The socket.inet_aton Python function uses libc's inet_aton function. This, on some implementations, for example the latest GNU C Library (glibc 2.29 as of today), accepts whitespace with trailing characters after a valid IP. An example can be seen below: ``` In [1]: import socket In [2]: socket.inet_aton('1.1.1.1 this shall not pass') Out[2]: b'\x01\x01\x01\x01' In [3]: socket.inet_aton('1.1.1.1this shall not pass') --------------------------------------------------------------------------- OSError Traceback (most recent call last) ----> 1 socket.inet_aton('1.1.1.1this shall not pass') OSError: illegal IP address string passed to inet_aton ``` The problem is, some users might use this function to also validate whether a given host or ip string is valid, especially taking into account Python's "ask for forgiveness and not permission" motto (or a coding style?). This will introduce security vulnerabilities, like command injections, if it is used with insecure os.system or subprocess.* functions. For example, an ip of "1.1.1.1 ; whoami" will result in returning an output of both ping and whoami commands. ``` def do_ping(request): """This is an insecure example, DO NOT REUSE THIS CODE""" ip = request['ip'] # Try to parse as ipv4 and save to db as just 4 bytes try: ip_bytes = socket.inet_aton(ip) except OSError: return 'IP is not a valid IPv4.' save_ping_request_to_db(ip_bytes) return subprocess.check_output('ping -c1 %s' % ip, shell=True) # an ip of "1.1.1.1 ; whomai" triggers a command injection vulnerability here ``` An initial report sent with this issue contains an example and potential security issue in ssl builtin module which has been already fixed (https://bugs.python.org/issue37463). The socket.inet_aton function is also used in requests library utility functions, which I am also going to report just after sending this issue. It is also worth mentioning that the inet_aton documentation - https://docs.python.org/3/library/socket.html#socket.inet_aton - states that the validation depends on the underlying implementation: > inet_aton() also accepts strings with less than three dots; see the Unix manual page inet(3) for details. > If the IPv4 address string passed to this function is invalid, OSError will be raised. Note that exactly what is valid depends on the underlying C implementation of inet_aton(). Which is nice but: 1. The inet(3) doesn't say that inet_aton shouldn't be used to validate whether the input is and only is an IP address or that it accepts trailing whitespace with garbage. It only states that "inet_aton() returns nonzero if the address is valid, zero if not". I added the relevant "DESCRIPTION" part from my `man 3 inet` on an Ubuntu 18.04.1 LTS host at the end. 2. The help(socket.inet_aton) doesn't forewarn about it. For example IPython users might miss the docs and just read the help from the shell: > Help on built-in function inet_aton in module _socket: > > inet_aton(...) > inet_aton(string) -> bytes giving packed 32-bit IP representation > > Convert an IP address in string format (123.45.67.89) to the 32-bit packed > binary format used in low-level network functions. 3. "If the IPv4 address string passed to this function is invalid, OSError will be raised." vs "Note that exactly what is valid depends on (...)" is weird since "1.1.1.1 blabla" string *is just not a valid IPv4 address string*. Ideally, the problem should be fixed on the libc side, but I don't know if it is going to be. The first comment from a similar issue on glibc bugtracker - https://sourceware.org/bugzilla/show_bug.cgi?id=20018 - states: > For historic reasons, inet_addr and inet_aton accept trailing garbage. Some parsers rely on this (for example, libresolv when it parses ?nameserver? directives in /etc/resolv.conf). > > (...) > > We should add a check for trailing garbage and relegate the old behavior to a compatibility symbol. However I am not sure if it won't be fixed or if it was simply forgotten during fixing the linked issue as it probably wasn't reported as a separate one. Because of that I think Python should add an additional validation of inet_aton input: raise a validation error when the input contains a whitespace. In case this solution would be rejected because of a need/want to be consistent with C's inet_aton, we should add a security warning that using this function to validate IP addresses is dangerous on some libc version, along with a description/example what exactly is wrong with it. --- man 3 inet, the relevant description part below --- DESCRIPTION inet_aton() converts the Internet host address cp from the IPv4 numbers-and-dots notation into binary form (in network byte order) and stores it in the struc? ture that inp points to. inet_aton() returns nonzero if the address is valid, zero if not. The address supplied in cp can have one of the following forms: a.b.c.d Each of the four numeric parts specifies a byte of the address; the bytes are assigned in left-to-right order to produce the binary address. a.b.c Parts a and b specify the first two bytes of the binary address. Part c is interpreted as a 16-bit value that defines the rightmost two bytes of the binary address. This notation is suitable for specifying (outmoded) Class B network addresses. a.b Part a specifies the first byte of the binary address. Part b is interpreted as a 24-bit value that defines the rightmost three bytes of the binary address. This notation is suitable for specifying (outmoded) Class A network addresses. a The value a is interpreted as a 32-bit value that is stored directly into the binary address without any byte rearrangement. In all of the above forms, components of the dotted address can be specified in decimal, octal (with a leading 0), or hexadecimal, with a leading 0X). Addresses in any of these forms are collectively termed IPV4 numbers-and-dots notation. The form that uses exactly four decimal numbers is referred to as IPv4 dotted-decimal notation (or sometimes: IPv4 dotted-quad notation). inet_aton() returns 1 if the supplied string was successfully interpreted, or 0 if the string is invalid (errno is not set on error). --- ---------- components: Library (Lib) messages: 347243 nosy: Dominik Czarnota priority: normal severity: normal status: open title: socket.inet_aton parsing issue on some libc versions 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 Jul 3 17:54:59 2019 From: report at bugs.python.org (Dominik Czarnota) Date: Wed, 03 Jul 2019 21:54:59 +0000 Subject: [issue37495] socket.inet_aton parsing issue on some libc versions In-Reply-To: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> Message-ID: <1562190899.58.0.655032990861.issue37495@roundup.psfhosted.org> Change by Dominik Czarnota : ---------- type: -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:00:37 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 03 Jul 2019 22:00:37 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562191237.2.0.269265411266.issue35605@roundup.psfhosted.org> Change by Anthony Sottile : ---------- pull_requests: +14395 pull_request: https://github.com/python/cpython/pull/14576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:14:57 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Jul 2019 22:14:57 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562192097.03.0.441414226993.issue35605@roundup.psfhosted.org> Steve Dower added the comment: Your PR is against 3.6 - is that intentional? ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:25:44 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 03 Jul 2019 22:25:44 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562192744.58.0.308926374387.issue35605@roundup.psfhosted.org> Anthony Sottile added the comment: yes, as was the original PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:40:37 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Jul 2019 22:40:37 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562193637.8.0.538788069301.issue35605@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:43:34 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Jul 2019 22:43:34 +0000 Subject: [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562193814.66.0.301086411251.issue35605@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the additional PR. Accepted for post-3.6.9 (PR 14576, commit a6d97e200863e7e5fc60bbc8f121b86a2098ef2d - message AWOL?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:45:38 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 03 Jul 2019 22:45:38 +0000 Subject: [issue27452] IDLE: Cleanup config code In-Reply-To: <1467662991.07.0.187758431637.issue27452@psf.upfronthosting.co.za> Message-ID: <1562193938.47.0.164960342275.issue27452@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- pull_requests: +14396 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/14577 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:49:14 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 03 Jul 2019 22:49:14 +0000 Subject: [issue27452] IDLE: Cleanup config code In-Reply-To: <1467662991.07.0.187758431637.issue27452@psf.upfronthosting.co.za> Message-ID: <1562194154.41.0.283451552226.issue27452@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- versions: +Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 19:36:12 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 03 Jul 2019 23:36:12 +0000 Subject: [issue15500] Python should support exporting thread names to the OS In-Reply-To: <1343650770.87.0.181202709436.issue15500@psf.upfronthosting.co.za> Message-ID: <1562196972.72.0.934567944385.issue15500@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +14397 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14578 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 19:43:24 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 03 Jul 2019 23:43:24 +0000 Subject: [issue15500] Python should support exporting thread names to the OS In-Reply-To: <1343650770.87.0.181202709436.issue15500@psf.upfronthosting.co.za> Message-ID: <1562197404.77.0.0985695853614.issue15500@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 19:45:26 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 03 Jul 2019 23:45:26 +0000 Subject: [issue37496] Support annotations in signature strings. Message-ID: <1562197526.36.0.0415942737779.issue37496@roundup.psfhosted.org> New submission from Eric Snow : In early 2014 (3.3), when argument clinic was added, we added support for turning func.__text_signature__ into an inspect.Signature object. However, at that time we did not add support for annotations (see the nested "parse_name()" in _signature_fromstr(). Annotations should be supported. I'd expect that PEP 563 (Postponed Evaluation of Annotations) could be leveraged. ---------- components: Library (Lib) messages: 347247 nosy: eric.snow priority: normal severity: normal stage: needs patch status: open title: Support annotations in signature strings. type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 19:49:38 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 03 Jul 2019 23:49:38 +0000 Subject: [issue32178] Some invalid email address groups cause an IndexError instead of a HeaderParseError In-Reply-To: <1512038434.94.0.213398074469.issue32178@psf.upfronthosting.co.za> Message-ID: <1562197778.03.0.636843990719.issue32178@roundup.psfhosted.org> Cheryl Sabella added the comment: Based on @maxking's comment, I'm going to close this issue. Thank you! ---------- nosy: +cheryl.sabella resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 19:51:25 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 03 Jul 2019 23:51:25 +0000 Subject: [issue32179] Empty email address in headers triggers an IndexError In-Reply-To: <1512041238.12.0.213398074469.issue32179@psf.upfronthosting.co.za> Message-ID: <1562197885.08.0.975861762206.issue32179@roundup.psfhosted.org> Cheryl Sabella added the comment: Closing this per @maxking's comment. If it can be recreated, please reopen. ---------- nosy: +cheryl.sabella resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 20:11:26 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 04 Jul 2019 00:11:26 +0000 Subject: [issue37497] Add inspect.Signature.from_text(). Message-ID: <1562199086.77.0.800086984204.issue37497@roundup.psfhosted.org> New submission from Eric Snow : In early 2014 (3.3), when argument clinic was added, we added support for turning func.__text_signature__ into an inspect.Signature object. However, the functionality to convert a string into a Signature was never exposed publicly. Here's a patch to do so. Note that inspect.signature() will also support taking a string. ---------- assignee: eric.snow components: Library (Lib) messages: 347250 nosy: eric.snow priority: normal pull_requests: 14398 severity: normal stage: needs patch status: open title: Add inspect.Signature.from_text(). type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 20:13:32 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 04 Jul 2019 00:13:32 +0000 Subject: [issue37497] Add inspect.Signature.from_text(). In-Reply-To: <1562199086.77.0.800086984204.issue37497@roundup.psfhosted.org> Message-ID: <1562199212.22.0.887175727562.issue37497@roundup.psfhosted.org> Eric Snow added the comment: Note that there has been a little discussion of this in the past, particularly around the time that argument clinic was introduced: https://bugs.python.org/issue23967#msg241140. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 20:58:57 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 04 Jul 2019 00:58:57 +0000 Subject: [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562201937.24.0.487877271877.issue37459@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset b607d992e76e485f20be3bfd6b311525123f936b by Barry Warsaw (aldwinaldwin) in branch 'master': bpo-37459: importlib docs improperly reference get_resource_loader() (#14568) https://github.com/python/cpython/commit/b607d992e76e485f20be3bfd6b311525123f936b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 20:59:02 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jul 2019 00:59:02 +0000 Subject: [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562201942.83.0.931243474502.issue37459@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14399 pull_request: https://github.com/python/cpython/pull/14580 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 20:59:12 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jul 2019 00:59:12 +0000 Subject: [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562201952.66.0.212270627818.issue37459@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14400 pull_request: https://github.com/python/cpython/pull/14581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 21:27:43 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 04 Jul 2019 01:27:43 +0000 Subject: [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562203663.22.0.576617734043.issue37459@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset 070d3d928d20ccb4790dd077f3794af3c2932e5c by Barry Warsaw (Miss Islington (bot)) in branch '3.8': bpo-37459: importlib docs improperly reference get_resource_loader() (GH-14568) (GH-14580) https://github.com/python/cpython/commit/070d3d928d20ccb4790dd077f3794af3c2932e5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 21:28:02 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 04 Jul 2019 01:28:02 +0000 Subject: [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562203682.48.0.541183998987.issue37459@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset d7d9c9f7c22113a405f1a340d050edfa2d024dff by Barry Warsaw (Miss Islington (bot)) in branch '3.7': bpo-37459: importlib docs improperly reference get_resource_loader() (GH-14568) (GH-14581) https://github.com/python/cpython/commit/d7d9c9f7c22113a405f1a340d050edfa2d024dff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 21:28:28 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 04 Jul 2019 01:28:28 +0000 Subject: [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562203708.15.0.632526379724.issue37459@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- resolution: -> fixed stage: patch review -> backport needed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 22:11:12 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 04 Jul 2019 02:11:12 +0000 Subject: [issue37497] Add inspect.Signature.from_text(). In-Reply-To: <1562199086.77.0.800086984204.issue37497@roundup.psfhosted.org> Message-ID: <1562206272.6.0.859160871548.issue37497@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 00:30:23 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 04 Jul 2019 04:30:23 +0000 Subject: [issue37495] socket.inet_aton parsing issue on some libc versions In-Reply-To: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> Message-ID: <1562214623.91.0.265161776913.issue37495@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: >From : https://docs.python.org/3.9/library/subprocess.html#security-considerations Security Considerations Unlike some other popen functions, this implementation will never implicitly call a system shell. This means that all characters, including shell metacharacters, can safely be passed to child processes. If the shell is invoked explicitly, via shell=True, it is the application?s responsibility to ensure that all whitespace and metacharacters are quoted appropriately to avoid shell injection vulnerabilities. When using shell=True, the shlex.quote() function can be used to properly escape whitespace and shell metacharacters in strings that are going to be used to construct shell commands. ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 00:41:35 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 04 Jul 2019 04:41:35 +0000 Subject: [issue37495] socket.inet_aton parsing issue on some libc versions In-Reply-To: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> Message-ID: <1562215295.53.0.720306184712.issue37495@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: indeed, can confirm that a string starting with valid ip address and a space followed with anything, will not trigger the exception. do_ping('1.1.1.1 1.256.300.1 ; whoami') => no exception ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 01:06:43 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 04 Jul 2019 05:06:43 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1562216803.71.0.526333662791.issue12782@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 01:55:19 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 04 Jul 2019 05:55:19 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1562219719.62.0.972980360446.issue17535@roundup.psfhosted.org> Ma Lin added the comment: I tried PR 14030 today. By default, the fgcolor is black. Looks like a black belt always on the left side, this makes me feel a bit oppressive. Of course, the fgcolor can be changed. ---------- nosy: +Ma Lin Added file: https://bugs.python.org/file48455/1.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 02:56:53 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 04 Jul 2019 06:56:53 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1562223413.25.0.572116736439.issue17535@roundup.psfhosted.org> Tal Einat added the comment: Ned, thanks for taking a look! If it is decided to go forward with this then I will make sure to make the menu item state consistent with that of each window. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 03:38:49 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 04 Jul 2019 07:38:49 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562225929.18.0.72986796787.issue19696@roundup.psfhosted.org> Change by Kyle Stanley : ---------- pull_requests: +14401 pull_request: https://github.com/python/cpython/pull/14582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 03:40:26 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 04 Jul 2019 07:40:26 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562226026.36.0.619440753387.issue19696@roundup.psfhosted.org> Kyle Stanley added the comment: In order to avoid the merge conflicts, I'm going to move test_threaded_imports.py and threaded_import_hangers.py in separate PRs. Here's the PR for moving test_threaded_imports.py https://github.com/python/cpython/pull/14582. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 03:42:26 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 04 Jul 2019 07:42:26 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562226146.35.0.298108088515.issue19696@roundup.psfhosted.org> Kyle Stanley added the comment: Typo in previous comment: "test_threaded_imports.py" should be "test_threaded_import.py". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 03:57:17 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 04 Jul 2019 07:57:17 +0000 Subject: [issue37495] socket.inet_aton parsing issue on some libc versions In-Reply-To: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> Message-ID: <1562227037.66.0.228725514504.issue37495@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 04:07:50 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 04 Jul 2019 08:07:50 +0000 Subject: [issue37367] octal escapes applied inconsistently throughout the interpreter and lib In-Reply-To: <1561146368.97.0.686299796922.issue37367@roundup.psfhosted.org> Message-ID: <1562227670.83.0.0849872417261.issue37367@roundup.psfhosted.org> Jeffrey Kintscher added the comment: >>> b'\407' b'\x07' >>> ord(b'\407') 7 This is the object structure passed to builtin_ord(): (lldb) p *((PyBytesObject *)(c)) (PyBytesObject) $19 = { ob_base = { ob_base = { ob_refcnt = 4 ob_type = 0x00000001003cb0b0 } ob_size = 1 } ob_shash = 8685212186264880044 ob_sval = { [0] = '\a' } } If two bytes were stored (0x107), I would expect ob_sval[0] to be 7 ('\a') and ob_sval[1] to be 1 on a little endian system, but ob_sval[1] is 0: (lldb) p (long)(unsigned char) (((PyBytesObject *)(c))->ob_sval[0]) (long) $23 = 7 (lldb) p (long)(unsigned char) (((PyBytesObject *)(c))->ob_sval[1]) (long) $24 = 0 This means the truncation to a single byte is happening when the byte string object is created. ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 05:55:51 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Jul 2019 09:55:51 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562234151.58.0.512941547792.issue29312@roundup.psfhosted.org> Jeroen Demeyer added the comment: For the benefit of PR 37207, I would like to re-open this discussion. It may have been rejected for the wrong reasons. Victor's patch was quite inefficient, but that's to be expected: msg285744 mentions a two-step process, but during the discussion the second steps seems to have been forgotten. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:04:43 2019 From: report at bugs.python.org (Marcin Niemira) Date: Thu, 04 Jul 2019 10:04:43 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1562234683.45.0.342221656991.issue37461@roundup.psfhosted.org> Marcin Niemira added the comment: I'm terribly sorry, but I feel I won't be able to fix this issue. Sorry for fuss. Closing my PR, because it's broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:19:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2019 10:19:46 +0000 Subject: [issue31517] MainThread association logic is fragile In-Reply-To: <1505826011.26.0.999867844657.issue31517@psf.upfronthosting.co.za> Message-ID: <1562235586.95.0.720729008203.issue31517@roundup.psfhosted.org> STINNER Victor added the comment: Python internals already know who is the "main" thread: _PyRuntime.main_thread. It's maintained up to date, even after a fork, PyOS_AfterFork_Child() calls _PyRuntimeState_ReInitThreads() which does: // This was initially set in _PyRuntimeState_Init(). runtime->main_thread = PyThread_get_thread_ident(); I already added _thread._is_main_interpreter() to deny spawning daemon threads in subinterpreters: bpo-37266. We can add _thread._is_main_thread() which can reuse Modules/signalmodule.c code: static int is_main(_PyRuntimeState *runtime) { unsigned long thread = PyThread_get_thread_ident(); PyInterpreterState *interp = _PyRuntimeState_GetThreadState(runtime)->interp; return (thread == runtime->main_thread && interp == runtime->interpreters.main); } For example, this function is used by signal.signal: if (!is_main(runtime)) { PyErr_SetString(PyExc_ValueError, "signal only works in main thread"); return NULL; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:23:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2019 10:23:34 +0000 Subject: [issue37266] Daemon threads must be forbidden in subinterpreters In-Reply-To: <1560418565.72.0.288239825756.issue37266@roundup.psfhosted.org> Message-ID: <1562235814.27.0.133068375958.issue37266@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14402 pull_request: https://github.com/python/cpython/pull/14584 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:29:11 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jul 2019 10:29:11 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562236151.86.0.0303211611936.issue37421@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14403 pull_request: https://github.com/python/cpython/pull/14585 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:29:19 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jul 2019 10:29:19 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562236159.89.0.29858046335.issue37421@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14404 pull_request: https://github.com/python/cpython/pull/14586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:29:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2019 10:29:21 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562236161.14.0.190805083479.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9d40554e0da09a44a8547f3f3a2b9dedfeaf7928 by Victor Stinner in branch 'master': bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572) https://github.com/python/cpython/commit/9d40554e0da09a44a8547f3f3a2b9dedfeaf7928 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:31:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2019 10:31:10 +0000 Subject: [issue31517] MainThread association logic is fragile In-Reply-To: <1505826011.26.0.999867844657.issue31517@psf.upfronthosting.co.za> Message-ID: <1562236270.77.0.414002925159.issue31517@roundup.psfhosted.org> STINNER Victor added the comment: bpo-37416 has been marked as a duplicate of this issue. It contains snippet.py to reproduce a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:31:59 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 04 Jul 2019 10:31:59 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562236319.7.0.157309726661.issue37483@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 196a530e00d88a138973bf9182e013937e293f97 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37483: add _PyObject_CallOneArg() function (#14558) https://github.com/python/cpython/commit/196a530e00d88a138973bf9182e013937e293f97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:33:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2019 10:33:48 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1562236428.44.0.481524727106.issue18748@roundup.psfhosted.org> STINNER Victor added the comment: > Same problem using Python 3.6.8 on Ubuntu 18.04 LTS. To be clear: this issue is NOT a bug in Python, but a bug in your application. You must fix your application. You can try to run it on Python 3.8 with python3.8 -X dev to get a log on the error. Good luck to debug it ;-) The change that I made is only to add a log to help developers to find their own bugs ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:35:52 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 04 Jul 2019 10:35:52 +0000 Subject: [issue37493] Use _PyObject_CallNoArg() in a few more places In-Reply-To: <1562161164.42.0.425095405728.issue37493@roundup.psfhosted.org> Message-ID: <1562236552.47.0.350401598348.issue37493@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 7f41c8e0dd237d1f3f0a1d2ba2f3ee4e4bd400a7 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37493: use _PyObject_CallNoArg in more places (GH-14575) https://github.com/python/cpython/commit/7f41c8e0dd237d1f3f0a1d2ba2f3ee4e4bd400a7 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:46:03 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jul 2019 10:46:03 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562237163.84.0.590135100102.issue37421@roundup.psfhosted.org> miss-islington added the comment: New changeset 2d438fc0b748b64d518ea8876af3f6963c6d7d60 by Miss Islington (bot) in branch '3.7': bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572) https://github.com/python/cpython/commit/2d438fc0b748b64d518ea8876af3f6963c6d7d60 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:47:41 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Jul 2019 10:47:41 +0000 Subject: [issue37493] Use _PyObject_CallNoArg() in a few more places In-Reply-To: <1562161164.42.0.425095405728.issue37493@roundup.psfhosted.org> Message-ID: <1562237261.17.0.405589765632.issue37493@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 07:05:28 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Jul 2019 11:05:28 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1562238328.17.0.909818991291.issue22117@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14405 pull_request: https://github.com/python/cpython/pull/11636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 07:07:56 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 04 Jul 2019 11:07:56 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562238476.16.0.228327157515.issue29312@roundup.psfhosted.org> Inada Naoki added the comment: How can we avoid unpacking dict in case of d1.update(**d2)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 07:11:10 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 04 Jul 2019 11:11:10 +0000 Subject: [issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict() In-Reply-To: <1560072227.25.0.180298594259.issue37207@roundup.psfhosted.org> Message-ID: <1562238670.99.0.199905940257.issue37207@roundup.psfhosted.org> Inada Naoki added the comment: Can we call tp_call instead of vectorcall when kwargs is not empty? https://github.com/python/cpython/blob/7f41c8e0dd237d1f3f0a1d2ba2f3ee4e4bd400a7/Objects/call.c#L209-L219 For example, dict_init may be faster than dict_vectorcall when `d2 = dict(**d1)`. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 07:34:39 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jul 2019 11:34:39 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562240079.39.0.0342813975818.issue37421@roundup.psfhosted.org> miss-islington added the comment: New changeset 957656ee1d6fb42664274ef2f440a10d26870e2a by Miss Islington (bot) in branch '3.8': bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572) https://github.com/python/cpython/commit/957656ee1d6fb42664274ef2f440a10d26870e2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 07:35:52 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Jul 2019 11:35:52 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562240152.93.0.642880006678.issue29312@roundup.psfhosted.org> Jeroen Demeyer added the comment: > How can we avoid unpacking dict in case of d1.update(**d2)? We cannot. However, how common is that call? One could argue that we should optimize for the more common case of d1.update(d2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 07:37:51 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Jul 2019 11:37:51 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562240271.62.0.935354255998.issue29312@roundup.psfhosted.org> Jeroen Demeyer added the comment: Above, I meant #37207 or PR 13930. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 07:48:02 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Jul 2019 11:48:02 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562240882.8.0.20635759648.issue29312@roundup.psfhosted.org> Jeroen Demeyer added the comment: > How can we avoid unpacking dict in case of d1.update(**d2)? The unpacking is only a problem if you insist on using PyDict_Merge(). It would be perfectly possible to implement dict merging from a tuple+vector instead of from a dict. In that case, there shouldn't be a performance penalty. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 07:55:14 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 04 Jul 2019 11:55:14 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562241314.1.0.196779745378.issue29312@roundup.psfhosted.org> Inada Naoki added the comment: > The unpacking is only a problem if you insist on using PyDict_Merge(). It would be perfectly possible to implement dict merging from a tuple+vector instead of from a dict. In that case, there shouldn't be a performance penalty. Really? ``` class K: def __eq__(self, other): return True def __hash__(self): time.sleep(10) return 42 d1 = {"foo": 1, "bar": 2, "baz": 3, K(): 4} d2 = dict(**d1) ``` I think `dict(**d1)` doesn't call K.__hash__() in this example, because hash value is cached in d1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 07:56:28 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 04 Jul 2019 11:56:28 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562241388.17.0.617696302319.issue29312@roundup.psfhosted.org> Inada Naoki added the comment: - d2 = dict(**d1) + d2 = {"fizz": "buzz"} + d2.update(**d1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 08:22:14 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Jul 2019 12:22:14 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562242934.07.0.175006209478.issue29312@roundup.psfhosted.org> Jeroen Demeyer added the comment: You are correct that PyDict_Merge() does not need to recompute the hashes of the keys. However, your example doesn't work because you need string keys for **kwargs. The "str" class caches its hash, so you would need a dict with a "str" subclass as keys to hit that problem. I think that calling d.update(**kw) with kw having str-subclass keys should be very rare. I'm not sure that we should care about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 08:34:42 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 04 Jul 2019 12:34:42 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562243682.38.0.173094080175.issue29312@roundup.psfhosted.org> Inada Naoki added the comment: OK, `d1.update(**d2)` is not useful in practice. Practical usages of dict.update() are: * d.update(d2) * d.update([(k1,k2),...]) * d.update(k1=v1, k2=v2, ...) * d.update(**d2, **d3, **d4) # little abuse, but possible. In all of them, kwdict is not used at all or can't avoid unpacking the kwdict. ---------- components: +Interpreter Core -Argument Clinic resolution: rejected -> status: closed -> open versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 08:39:28 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 04 Jul 2019 12:39:28 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1562243968.83.0.0543140175197.issue17535@roundup.psfhosted.org> Tal Einat added the comment: > Looks like a black belt always on the left side, this makes me feel a bit oppressive. This currently uses the same colors as the code-context panes, which is configurable as the "context" fg/bg colors. We might find a better name for this, or even add a separate color configuration option, if this comes up as a common request (I have it feeling it will be). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 09:44:15 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Jul 2019 13:44:15 +0000 Subject: [issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict() In-Reply-To: <1560072227.25.0.180298594259.issue37207@roundup.psfhosted.org> Message-ID: <1562247855.04.0.991997534943.issue37207@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14406 pull_request: https://github.com/python/cpython/pull/14588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 10:02:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2019 14:02:42 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1562248962.17.0.516434077318.issue30458@roundup.psfhosted.org> STINNER Victor added the comment: The commit b7378d77289c911ca6a0c0afaf513879002df7d5 is incomplete: it doesn't seem to check for control characters in the "host" part of the URL, only in the "path" part of the URL. Example: --- try: from urllib import request as urllib_request except ImportError: import urllib2 as urllib_request import socket def bug(*args): raise Exception(args) # urlopen() must not call create_connection() socket.create_connection = bug urllib_request.urlopen('http://127.0.0.1\r\n\x20hihi\r\n :11211') --- The URL comes from the first message of this issue: https://bugs.python.org/issue30458#msg294360 Development branches 2.7 and master produce a similar output: --- Traceback (most recent call last): ... Exception: (('127.0.0.1\r\n hihi\r\n ', 11211), ..., None) --- So urllib2/urllib.request actually does a real network connection (DNS query), whereas it should reject control characters in the "host" part of the URL. *** A second problem comes into the game. Some C libraries like glibc strip the end of the hostname (strip at the first newline character) and so HTTP Header injection is still possible is this case: https://bugzilla.redhat.com/show_bug.cgi?id=1673465 *** According to the RFC 3986, the "host" grammar doesn't allow any control character, it looks like: host = IP-literal / IPv4address / reg-name ALPHA (letters) DIGIT (decimal digits) unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" pct-encoded = "%" HEXDIG HEXDIG sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" reg-name = *( unreserved / pct-encoded / sub-delims ) IP-literal = "[" ( IPv6address / IPvFuture ) "]" IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" ) IPv6address = 6( h16 ":" ) ls32 / "::" 5( h16 ":" ) ls32 / [ h16 ] "::" 4( h16 ":" ) ls32 / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 / [ *4( h16 ":" ) h16 ] "::" ls32 / [ *5( h16 ":" ) h16 ] "::" h16 / [ *6( h16 ":" ) h16 ] "::" h16 = 1*4HEXDIG ls32 = ( h16 ":" h16 ) / IPv4address IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet ---------- versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 10:54:52 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 04 Jul 2019 14:54:52 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562252092.62.0.550841814798.issue29312@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14407 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14589 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 11:29:51 2019 From: report at bugs.python.org (Franklin? Lee) Date: Thu, 04 Jul 2019 15:29:51 +0000 Subject: [issue33965] [Windows WSL] Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time, after year 2038 In-Reply-To: <1530000340.86.0.56676864532.issue33965@psf.upfronthosting.co.za> Message-ID: <1562254191.48.0.357784369899.issue33965@roundup.psfhosted.org> Franklin? Lee added the comment: Petter S reported the issue to Microsoft, and got the response that it was already fixed in Insider Preview. https://github.com/microsoft/WSL/issues/3514 Should be fixed in Windows 10 version 1809, according to the tags here: https://github.com/microsoft/WSL/issues/3252 ---------- nosy: +leewz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 11:30:42 2019 From: report at bugs.python.org (Zack Weinberg) Date: Thu, 04 Jul 2019 15:30:42 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1562254242.67.0.305521841234.issue18748@roundup.psfhosted.org> Zack Weinberg added the comment: > To be clear: this issue is NOT a bug in Python I don't think that's entirely true. I think CPython needs to be linked against libgcc_s.so, so that this class of application bugs will no longer manifest as interpreter crashes. I filed #37395 for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 11:31:37 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 04 Jul 2019 15:31:37 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1562254297.7.0.0462757180102.issue30458@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Okay, the url variable against which the regex check is made is not the full url but the path. The HTTPConnection class sets self.host [0] in the constructor which is used to send the Host header. Perhaps the regex check could be done for the host too given the path check is already done in the previous commit. With that the reported host also throws a http.client.InvalidURL exception. > A second problem comes into the game. Some C libraries like glibc strip the end of the hostname (strip at the first newline character) and so HTTP Header injection is still possible is this case: https://bugzilla.redhat.com/show_bug.cgi?id=1673465 The bug link raises permission error. Does fixing the host part fix this issue too since there won't be any socket connection made? Is it possible to have a Python reproducer of this issue? [0] https://github.com/python/cpython/blob/7f41c8e0dd237d1f3f0a1d2ba2f3ee4e4bd400a7/Lib/http/client.py#L829 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 12:13:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2019 16:13:14 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562256794.53.0.453055616034.issue29312@roundup.psfhosted.org> STINNER Victor added the comment: Changing dict.update() calling convention may save a few nanoseconds on d1.update(d2) call, but it will make d1.update(**d2) way slower with a complexity of O(n): d2 must be converted to 2 lists (kwnames and args) and then a new dict should be created. I don't see the point of micro-optimizing d1.update(d2), if d1.update(**d2) would become way slower. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 12:30:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2019 16:30:42 +0000 Subject: [issue37266] Daemon threads must be forbidden in subinterpreters In-Reply-To: <1560418565.72.0.288239825756.issue37266@roundup.psfhosted.org> Message-ID: <1562257842.49.0.48987874211.issue37266@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b4e68960b90627422325fdb75f463df1e4153c6e by Victor Stinner in branch 'master': bpo-37266: Add bpo number to the What's New entry (GH614584) https://github.com/python/cpython/commit/b4e68960b90627422325fdb75f463df1e4153c6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 12:39:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2019 16:39:36 +0000 Subject: [issue37481] Deprecate bdist_wininst: use bdist_wheel instead In-Reply-To: <1562065555.11.0.674555433239.issue37481@roundup.psfhosted.org> Message-ID: <1562258376.15.0.123922516458.issue37481@roundup.psfhosted.org> STINNER Victor added the comment: > So consider me +1 for deprecate in 3.8 (we can still do that, right? it's just docs and a warning on use) and remove in 3.9 or 3.10 as appropriate. I modified my PR to deprecate the feature in Python 3.8. I'm not sure about scheduling the removal yet, since the Python 3.9 release schedule is under discussion: https://discuss.python.org/t/pep-596-python-3-9-release-schedule-doubling-the-release-cadence/1828 I would prefer to give at least 2 years to projects to update their setup.py (how they are distributed). Even if bdist_wininst has issues, it's not too painful to maintain a few more years. The removal can be decided later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 12:42:52 2019 From: report at bugs.python.org (Barry Byford) Date: Thu, 04 Jul 2019 16:42:52 +0000 Subject: [issue36132] Python cannot access hci_channel field in sockaddr_hci In-Reply-To: <1551265831.42.0.956760803512.issue36132@roundup.psfhosted.org> Message-ID: <1562258572.57.0.442003995509.issue36132@roundup.psfhosted.org> Barry Byford added the comment: I was looking to control Bluetooth on Linux machines using the BlueZ Management API available at: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/mgmt-api.txt The Bluetooth management sockets can be created by setting the hci_channel member of struct sockaddr_hci to HCI_CHANNEL_CONTROL (3) when creating a raw HCI socket. The resolution of this issue would enable access to that API. ---------- nosy: +ukBaz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 13:04:56 2019 From: report at bugs.python.org (Riccardo Schirone) Date: Thu, 04 Jul 2019 17:04:56 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1562259896.27.0.629703469692.issue30458@roundup.psfhosted.org> Riccardo Schirone added the comment: > > A second problem comes into the game. Some C libraries like glibc strip the end of the hostname (strip at the first newline character) and so HTTP Header injection is still possible is this case: https://bugzilla.redhat.com/show_bug.cgi?id=1673465 > The bug link raises permission error. Does fixing the host part fix this issue too since there won't be any socket connection made? Is it possible to have a Python reproducer of this issue? I think this was supposed to refer to CVE-2016-10739 (https://bugzilla.redhat.com/show_bug.cgi?id=1347549) ---------- nosy: +rschiron _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 14:29:02 2019 From: report at bugs.python.org (Ethan Furman) Date: Thu, 04 Jul 2019 18:29:02 +0000 Subject: [issue37479] IntEnum __format__ behavior can't be overridden through __str__ In-Reply-To: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> Message-ID: <1562264942.03.0.510935750035.issue37479@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 2f19e82fbe98ce86bcd98a176328af2808b678e8 by Ethan Furman (thatneat) in branch 'master': bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__ (GH-14545) https://github.com/python/cpython/commit/2f19e82fbe98ce86bcd98a176328af2808b678e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 14:42:05 2019 From: report at bugs.python.org (Christopher Hunt) Date: Thu, 04 Jul 2019 18:42:05 +0000 Subject: [issue32082] atexit module: allow getting/setting list of handlers directly In-Reply-To: <1511171681.08.0.213398074469.issue32082@psf.upfronthosting.co.za> Message-ID: <1562265725.18.0.759128661293.issue32082@roundup.psfhosted.org> Christopher Hunt added the comment: Updated link to workaround referenced in the original issue: https://github.com/sagemath/sage/blob/b5c9cf037cbce672101725f269470135b9b2c5c4/src/sage/cpython/atexit.pyx ---------- nosy: +chrahunt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 15:11:53 2019 From: report at bugs.python.org (neonene) Date: Thu, 04 Jul 2019 19:11:53 +0000 Subject: [issue37498] request.urlopen(), memory leak? Message-ID: <1562267513.1.0.161837527387.issue37498@roundup.psfhosted.org> New submission from neonene : Python3.8.0a4,b1,b2(x64,x32) Python3.7.4rc1,rc2 (x64,x32) In Windows7 SP1(x64), memory usage keep increasing by the following code. --- from urllib import request from time import sleep while True: req = request.Request('https://www.python.org/') request.urlopen(req) sleep(1) --- Sorry, I'm not sure why. ---------- components: Windows messages: 347293 nosy: neonene, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: request.urlopen(), memory leak? type: resource usage versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 15:57:22 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 04 Jul 2019 19:57:22 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1562270242.81.0.795990858299.issue37424@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith resolution: duplicate -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 15:57:28 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 04 Jul 2019 19:57:28 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1562270248.51.0.526624865711.issue37424@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- stage: resolved -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 16:15:34 2019 From: report at bugs.python.org (Carl Friedrich Bolz) Date: Thu, 04 Jul 2019 20:15:34 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562271334.37.0.565105264212.issue18374@roundup.psfhosted.org> Carl Friedrich Bolz added the comment: FWIW, in my opinion the col_offsets of the two nodes should be 1 and 3, respectively (the positions of the operators). ---------- nosy: +Carl.Friedrich.Bolz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 16:29:24 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 04 Jul 2019 20:29:24 +0000 Subject: [issue37499] test_gdb.test_pycfunction should use dedicated test functions Message-ID: <1562272164.16.0.880170642341.issue37499@roundup.psfhosted.org> New submission from Paul Ganssle : Currently, `test_pycfunction` picks a few built-in functions with various calling conventions to exercise all the relevant code paths: for py_name, py_args, c_name, expected_frame_number in ( ('gmtime', '', 'time_gmtime', 1), # METH_VARARGS ('len', '[]', 'builtin_len', 2), # METH_O ... See: https://github.com/python/cpython/blob/2f19e82fbe98ce86bcd98a176328af2808b678e8/Lib/test/test_gdb.py#L851 These calling conventions are not a guaranteed part of the interface, and as such these tests are fragile (as we saw in GH-14311, when converting the time module to use Argument Clinic changed gmtime from METH_VARARGS to METH_FASTCALL). Per Victor's suggestion in GH-14330, I think we should expose a few test functions in the `testcapi` module as exemplars of their respective calling conventions and use those, rather than arbitrary builtins. ---------- components: Tests messages: 347295 nosy: p-ganssle, vstinner priority: low severity: normal stage: needs patch status: open title: test_gdb.test_pycfunction should use dedicated test functions type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 23:02:39 2019 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 05 Jul 2019 03:02:39 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? Message-ID: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> New submission from Ned Batchelder : CPython 3.8.0b2 behaves differently than previous releases: it no longer optimizes away "if 0:" branches. This is something that has been done since at least 2.4. It was done in 3.8.0b1, but no longer is. Was this a purposeful change? Why? It seems like 3.8 is adding more optimizations, why was this removed? Test code (/tmp/no0.py): import dis import sys print(sys.version) def with_if_0(): print(1) if 0: print(2) print(3) dis.dis(with_if_0) $ /usr/local/pythonz/pythons/CPython-3.8.0b2/bin/python3.8 /tmp/no0.py 3.8.0b2 (default, Jul 4 2019, 22:38:04) [Clang 10.0.0 (clang-1000.10.44.4)] 7 0 LOAD_GLOBAL 0 (print) 2 LOAD_CONST 1 (1) 4 CALL_FUNCTION 1 6 POP_TOP 8 8 LOAD_CONST 2 (0) 10 POP_JUMP_IF_FALSE 20 9 12 LOAD_GLOBAL 0 (print) 14 LOAD_CONST 3 (2) 16 CALL_FUNCTION 1 18 POP_TOP 10 >> 20 LOAD_GLOBAL 0 (print) 22 LOAD_CONST 4 (3) 24 CALL_FUNCTION 1 26 POP_TOP 28 LOAD_CONST 0 (None) 30 RETURN_VALUE $ /usr/local/pythonz/pythons/CPython-3.8.0b1/bin/python3.8 /tmp/no0.py 3.8.0b1 (default, Jun 4 2019, 21:21:14) [Clang 10.0.0 (clang-1000.10.44.4)] 7 0 LOAD_GLOBAL 0 (print) 2 LOAD_CONST 1 (1) 4 CALL_FUNCTION 1 6 POP_TOP 10 8 LOAD_GLOBAL 0 (print) 10 LOAD_CONST 4 (3) 12 CALL_FUNCTION 1 14 POP_TOP 16 LOAD_CONST 0 (None) 18 RETURN_VALUE $ python3.7 /tmp/no0.py 3.7.3 (default, Apr 10 2019, 10:27:53) [Clang 10.0.0 (clang-1000.10.44.4)] 7 0 LOAD_GLOBAL 0 (print) 2 LOAD_CONST 1 (1) 4 CALL_FUNCTION 1 6 POP_TOP 10 8 LOAD_GLOBAL 0 (print) 10 LOAD_CONST 2 (3) 12 CALL_FUNCTION 1 14 POP_TOP 16 LOAD_CONST 0 (None) 18 RETURN_VALUE $ python2.7 /tmp/no0.py 2.7.14 (default, Oct 4 2017, 09:45:53) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] 7 0 LOAD_CONST 1 (1) 3 PRINT_ITEM 4 PRINT_NEWLINE 10 5 LOAD_CONST 2 (3) 8 PRINT_ITEM 9 PRINT_NEWLINE 10 LOAD_CONST 0 (None) 13 RETURN_VALUE $ python2.4 /tmp/no0.py 2.4.6 (#1, Jun 18 2016, 17:49:14) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] 7 0 LOAD_CONST 1 (1) 3 PRINT_ITEM 4 PRINT_NEWLINE 10 5 LOAD_CONST 2 (3) 8 PRINT_ITEM 9 PRINT_NEWLINE 10 LOAD_CONST 0 (None) 13 RETURN_VALUE ---------- keywords: 3.8regression messages: 347296 nosy: nedbat priority: normal severity: normal status: open title: 3.8.0b2 no longer optimizes away "if 0:" ? versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 23:03:50 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Jul 2019 03:03:50 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562295830.79.0.499151811411.issue37500@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pablogsal, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 23:29:35 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2019 03:29:35 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1562297375.07.0.980416107399.issue17535@roundup.psfhosted.org> Terry J. Reedy added the comment: Tal, I will be delighted to see this finally land. Please continue. Some immediate comments to update the years-ago discussion. 1a. IDLE now explicitly requires tk 8.5. AFAIK, it is only tested on 8.6. 1b. Feature are no longer extensions. 2a. The code context checkmark is gone, replaced by toggling the menu label between 'Show Code Context' and 'Hide Code Context'. The label only applies to to the current window. All windows start with the default of 'off', with label 'Show'. A global setting could be added to make the default on, but AFAIK this has not been requested, and I prefer not adding global options unless *really* needed. 2b. Zoom Height, default off, has been moved from Window to the Options menu, below ? Code Context. It had no checkmark and was never global. It now has a label toggle, Zoom versus Restore. 2c. The Options menu separator line separates the global settings dialog from current-window-only options, with room for more. AFAIK, both work on macOS. I would like to follow the pattern with 'Show/Hide Line Numbers', with 'off' the default for new windows. We might put it above 'Show/Hide Code Context' as likely to be used more often. I would prefer to wait before possibly adding a global toggle. --- Notepad++ has dark gray on light gray numbers. I can see how bold black on white is a bit much. But I want to focus on behavior next. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 23:30:04 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 05 Jul 2019 03:30:04 +0000 Subject: [issue37501] Test failures when CPython is built without docstrings Message-ID: <1562297404.15.0.705525533072.issue37501@roundup.psfhosted.org> New submission from Zackery Spytz : test_coroutines, test_dataclasses, test_idle, test_importlib, test_module, and test_pydoc fail when CPython is built without docstrings. It seems that most of the failures occur simply because the test.support.requires_docstrings decorator is missing for some tests. See also bpo-17041. ---------- components: Tests files: test_failures_without_docstrings.txt messages: 347298 nosy: ZackerySpytz priority: normal severity: normal status: open title: Test failures when CPython is built without docstrings type: behavior versions: Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48456/test_failures_without_docstrings.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 23:33:15 2019 From: report at bugs.python.org (Markus Mohrhard) Date: Fri, 05 Jul 2019 03:33:15 +0000 Subject: [issue37502] Pure Python pickle module should not depend on _pickle.PickleBuffer Message-ID: <1562297595.0.0.947701314803.issue37502@roundup.psfhosted.org> New submission from Markus Mohrhard : The following piece of code import pickle pickle.loads(pickle.dumps(1, protocol=pickle.HIGHEST_PROTOCOL), buffers=None) fails with "TypeError: 'NoneType' object is not iterable" The corresponding PEP (https://www.python.org/dev/peps/pep-0574/) specifies that buffer=None is the default but the C implementation does not check for Py_None. The PR contains a test for this case that fails without the fix. ---------- components: Library (Lib) messages: 347299 nosy: Markus Mohrhard priority: normal severity: normal status: open title: Pure Python pickle module should not depend on _pickle.PickleBuffer versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 23:33:35 2019 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 05 Jul 2019 03:33:35 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562297615.96.0.200475046596.issue37500@roundup.psfhosted.org> Ned Batchelder added the comment: BTW, the same regression applies to "if not __debug__:" . Python3.8.0b1 optimized these away, but b2 does not. That optimization was new in 3.7.0a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 23:35:27 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 05 Jul 2019 03:35:27 +0000 Subject: [issue37501] Test failures when CPython is built without docstrings In-Reply-To: <1562297404.15.0.705525533072.issue37501@roundup.psfhosted.org> Message-ID: <1562297727.75.0.40865196832.issue37501@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +14408 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14592 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 23:36:19 2019 From: report at bugs.python.org (Markus Mohrhard) Date: Fri, 05 Jul 2019 03:36:19 +0000 Subject: [issue37502] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1562297595.0.0.947701314803.issue37502@roundup.psfhosted.org> Message-ID: <1562297779.05.0.652405094677.issue37502@roundup.psfhosted.org> Change by Markus Mohrhard : ---------- keywords: +patch pull_requests: +14409 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14593 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 23:44:14 2019 From: report at bugs.python.org (karl) Date: Fri, 05 Jul 2019 03:44:14 +0000 Subject: [issue24772] Smaller viewport shifts the "expand left menu" character into the text In-Reply-To: <1438422511.74.0.548589592521.issue24772@psf.upfronthosting.co.za> Message-ID: <1562298254.88.0.637066589929.issue24772@roundup.psfhosted.org> karl added the comment: So I had time to look at it today. And it would probably be better to solve https://bugs.python.org/issue23312 which would make this one here useless and would actually provide a solution for many people. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:00:48 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Jul 2019 04:00:48 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562299248.06.0.538268959671.issue37500@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Not sure if related there were some changes done to __debug__ related checks with issue37269 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:05:19 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 05 Jul 2019 04:05:19 +0000 Subject: [issue37502] Pure Python pickle module should not depend on _pickle.PickleBuffer In-Reply-To: <1562297595.0.0.947701314803.issue37502@roundup.psfhosted.org> Message-ID: <1562299519.01.0.817896899386.issue37502@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also issue37210 ---------- nosy: +pitrou, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:09:54 2019 From: report at bugs.python.org (karl) Date: Fri, 05 Jul 2019 04:09:54 +0000 Subject: [issue23312] google thinks the docs are mobile unfriendly In-Reply-To: <1422121325.13.0.140473067698.issue23312@psf.upfronthosting.co.za> Message-ID: <1562299794.88.0.932727037143.issue23312@roundup.psfhosted.org> karl added the comment: This issue should probably be addressed now on https://github.com/python/python-docs-theme ---------- nosy: +karlcow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:16:26 2019 From: report at bugs.python.org (karl) Date: Fri, 05 Jul 2019 04:16:26 +0000 Subject: [issue23312] google thinks the docs are mobile unfriendly In-Reply-To: <1422121325.13.0.140473067698.issue23312@psf.upfronthosting.co.za> Message-ID: <1562300186.53.0.261962637869.issue23312@roundup.psfhosted.org> karl added the comment: I created https://github.com/python/python-docs-theme/issues/30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:23:50 2019 From: report at bugs.python.org (Markus Mohrhard) Date: Fri, 05 Jul 2019 04:23:50 +0000 Subject: [issue37502] Fix default argument handling for buffers argument in pickle.loads In-Reply-To: <1562297595.0.0.947701314803.issue37502@roundup.psfhosted.org> Message-ID: <1562300630.46.0.506131382128.issue37502@roundup.psfhosted.org> Change by Markus Mohrhard : ---------- title: Pure Python pickle module should not depend on _pickle.PickleBuffer -> Fix default argument handling for buffers argument in pickle.loads _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:24:54 2019 From: report at bugs.python.org (Markus Mohrhard) Date: Fri, 05 Jul 2019 04:24:54 +0000 Subject: [issue37502] Fix default argument handling for buffers argument in pickle.loads In-Reply-To: <1562297595.0.0.947701314803.issue37502@roundup.psfhosted.org> Message-ID: <1562300694.43.0.809413780673.issue37502@roundup.psfhosted.org> Markus Mohrhard added the comment: Sorr, I somehow managed to overwrite my title before submitting with the one from one if the results of my searches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 01:31:53 2019 From: report at bugs.python.org (makdon) Date: Fri, 05 Jul 2019 05:31:53 +0000 Subject: [issue36528] Remove duplicate tests in Lib/tests/re_tests.py In-Reply-To: <1554398942.85.0.973114316102.issue36528@roundup.psfhosted.org> Message-ID: <1562304713.31.0.0975553123494.issue36528@roundup.psfhosted.org> makdon added the comment: It has been 3 months since this issues opened, and the 3.8 has released. Though it is a low priority, could we push this issue forward? ---------- nosy: +makdon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 01:38:55 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 05 Jul 2019 05:38:55 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562305135.4.0.979831712666.issue37500@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: FWIW: this is probably since PR14099 ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 02:24:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Jul 2019 06:24:29 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562307869.32.0.47008321118.issue37500@roundup.psfhosted.org> Serhiy Storchaka added the comment: The root cause is PR 13332 for issue1875. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:20:39 2019 From: report at bugs.python.org (Marco Dickert) Date: Fri, 05 Jul 2019 08:20:39 +0000 Subject: [issue37503] Queue.join(): Broken example in documentation Message-ID: <1562314839.12.0.185461077472.issue37503@roundup.psfhosted.org> New submission from Marco Dickert : I guess I found a bug in the documented Queue.join() example [1]. The problem is the break condition for the while loop of the worker. If the item is None, the loop breaks, but the worker never calls item.task_done(). Thus the q.join() statement never returns, because the last task (None) remains unfinished. This should solve the issue: ``` if item is None: item.task_done() break ``` [1] https://docs.python.org/3/library/queue.html#queue.Queue.join ---------- assignee: docs at python components: Documentation messages: 347310 nosy: docs at python, misterunknown priority: normal severity: normal status: open title: Queue.join(): Broken example in documentation versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:31:49 2019 From: report at bugs.python.org (Marco Dickert) Date: Fri, 05 Jul 2019 08:31:49 +0000 Subject: [issue37503] Queue.join(): Broken example in documentation In-Reply-To: <1562314839.12.0.185461077472.issue37503@roundup.psfhosted.org> Message-ID: <1562315509.37.0.79063132625.issue37503@roundup.psfhosted.org> Marco Dickert added the comment: Sorry, I missed that q.join() is executed *before* the "None" item is added to the queue. In my real-world case I called q.join() *after* I added the "None" item. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:44:18 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jul 2019 08:44:18 +0000 Subject: [issue37346] Documentation of os not using OSError subclasses In-Reply-To: <1561021736.27.0.454231232898.issue37346@roundup.psfhosted.org> Message-ID: <1562316258.12.0.346730841662.issue37346@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14411 pull_request: https://github.com/python/cpython/pull/14596 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:44:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 08:44:17 +0000 Subject: [issue37481] Deprecate bdist_wininst: use bdist_wheel instead In-Reply-To: <1562065555.11.0.674555433239.issue37481@roundup.psfhosted.org> Message-ID: <1562316257.96.0.571502827993.issue37481@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1da4462765b084dfa8d869b6cb5855e8f6014a11 by Victor Stinner in branch 'master': bpo-37481: Deprecate distutils bdist_wininst command (GH-14553) https://github.com/python/cpython/commit/1da4462765b084dfa8d869b6cb5855e8f6014a11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:44:36 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jul 2019 08:44:36 +0000 Subject: [issue37481] Deprecate bdist_wininst: use bdist_wheel instead In-Reply-To: <1562065555.11.0.674555433239.issue37481@roundup.psfhosted.org> Message-ID: <1562316276.9.0.448206366229.issue37481@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14412 pull_request: https://github.com/python/cpython/pull/14598 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:45:06 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jul 2019 08:45:06 +0000 Subject: [issue37346] Documentation of os not using OSError subclasses In-Reply-To: <1561021736.27.0.454231232898.issue37346@roundup.psfhosted.org> Message-ID: <1562316306.38.0.0578455927892.issue37346@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14413 pull_request: https://github.com/python/cpython/pull/14597 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:46:19 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Jul 2019 08:46:19 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562316379.03.0.085129528398.issue18374@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am not sure that changes in compile.c are needed now. Python/Python-ast.c is generated file. And perhaps it would be better to fix CST instead of AST. ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: patch review -> needs patch versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:47:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 08:47:49 +0000 Subject: [issue37499] test_gdb.test_pycfunction should use dedicated test functions In-Reply-To: <1562272164.16.0.880170642341.issue37499@roundup.psfhosted.org> Message-ID: <1562316469.43.0.0184440982674.issue37499@roundup.psfhosted.org> STINNER Victor added the comment: > Per Victor's suggestion in GH-14330, I think we should expose a few test functions in the `testcapi` module as exemplars of their respective calling conventions and use those, rather than arbitrary builtins. I suggest to write functions which return their arguments, so we can check that we get what we expect ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:52:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 08:52:18 +0000 Subject: [issue37499] test_gdb.test_pycfunction should use dedicated test functions In-Reply-To: <1562272164.16.0.880170642341.issue37499@roundup.psfhosted.org> Message-ID: <1562316738.15.0.452177212137.issue37499@roundup.psfhosted.org> STINNER Victor added the comment: By the way, PyObject_CallFunction("O") has a surprising behavior: if you pass a tuple, the tuple is unpacked, whereas any other type is passed directly. See bpo-28977. I would prefer to fix the API since it caused severe bugs in the past, like asyncio generator bug bpo-21209. But I'm not sure if we can do it without a deprecation period... I'm not sure that we should deprecate anything, since I would expect that PyObject_CallFunction(func, "O", tuple) calls func(tuple) rather than func(*tuple)... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:52:21 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Jul 2019 08:52:21 +0000 Subject: [issue37346] Documentation of os not using OSError subclasses In-Reply-To: <1561021736.27.0.454231232898.issue37346@roundup.psfhosted.org> Message-ID: <1562316741.11.0.811928325861.issue37346@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks! ---------- nosy: +asvetlov resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:03:32 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jul 2019 09:03:32 +0000 Subject: [issue37481] Deprecate bdist_wininst: use bdist_wheel instead In-Reply-To: <1562065555.11.0.674555433239.issue37481@roundup.psfhosted.org> Message-ID: <1562317412.39.0.0633479128332.issue37481@roundup.psfhosted.org> miss-islington added the comment: New changeset b4cd6ba1a028c2624ac7bc93439b9d45f51cfeba by Miss Islington (bot) in branch '3.8': bpo-37481: Deprecate distutils bdist_wininst command (GH-14553) https://github.com/python/cpython/commit/b4cd6ba1a028c2624ac7bc93439b9d45f51cfeba ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:12:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 09:12:20 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562317940.31.0.82542081228.issue37483@roundup.psfhosted.org> STINNER Victor added the comment: The following commit introduced a reference leak: commit 196a530e00d88a138973bf9182e013937e293f97 Author: Jeroen Demeyer Date: Thu Jul 4 12:31:34 2019 +0200 bpo-37483: add _PyObject_CallOneArg() function (#14558) Example: https://buildbot.python.org/all/#/builders/80/builds/642 test_xml_etree leaked [1, 1, 1] references, sum=3 test_threading leaked [6, 6, 6] references, sum=18 test_atexit leaked [6, 6, 6] references, sum=18 test_compile leaked [1, 1, 1] references, sum=3 test_zipfile leaked [1, 1, 1] references, sum=3 test_tokenize leaked [3, 3, 3] references, sum=9 test_pydoc leaked [1, 1, 1] references, sum=3 test_codecs leaked [43, 43, 43] references, sum=129 test_codecs leaked [11, 11, 11] memory blocks, sum=33 Re-running failed tests in verbose mode test__xxsubinterpreters leaked [136, 136, 136] references, sum=408 test_getargs2 leaked [4, 4, 4] references, sum=12 test_source_encoding leaked [3, 3, 3] references, sum=9 test_capi leaked [4, 4, 4] references, sum=12 test_email leaked [17, 17, 17] references, sum=51 test_xml_etree leaked [1, 1, 1] references, sum=3 test_threading leaked [6, 6, 6] references, sum=18 test_atexit leaked [6, 6, 6] references, sum=18 test_compile leaked [1, 1, 1] references, sum=3 test_zipfile leaked [1, 1, 1] references, sum=3 test_tokenize leaked [3, 3, 3] references, sum=9 test_pydoc leaked [1, 1, 1] references, sum=3 test_codecs leaked [43, 43, 43] references, sum=129 test_codecs leaked [11, 11, 11] memory blocks, sum=33 (...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:14:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 09:14:33 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562318073.87.0.606242596239.issue18374@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +levkivskyi, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:15:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 09:15:30 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562318130.51.0.141369026713.issue18374@roundup.psfhosted.org> STINNER Victor added the comment: Pablo, Ivan: this old bug is able CST and AST, things that you know. You may want to have a look ;-) Note: This bug is discussed in https://twitter.com/cfbolz/status/1146866203975139328 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:31:58 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 05 Jul 2019 09:31:58 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562319118.13.0.83056933881.issue37483@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +14414 pull_request: https://github.com/python/cpython/pull/14599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:33:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 09:33:39 +0000 Subject: [issue37495] socket.inet_aton parsing issue on some libc versions In-Reply-To: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> Message-ID: <1562319219.72.0.181070620673.issue37495@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:35:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 09:35:33 +0000 Subject: [issue37463] ssl.match_hostname() ignores extra string after a space in IPv4 address In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562319333.36.0.209581008754.issue37463@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: socket.inet_aton IP parsing issue in ssl.match_hostname -> ssl.match_hostname() ignores extra string after a space in IPv4 address _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:36:41 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 05 Jul 2019 09:36:41 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562319401.14.0.596838509206.issue37483@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14415 pull_request: https://github.com/python/cpython/pull/14600 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:37:09 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2019 09:37:09 +0000 Subject: [issue37463] ssl.match_hostname() ignores extra string after whitespace in IPv4 address In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562319429.13.0.540389122906.issue37463@roundup.psfhosted.org> Change by Christian Heimes : ---------- title: ssl.match_hostname() ignores extra string after a space in IPv4 address -> ssl.match_hostname() ignores extra string after whitespace in IPv4 address _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:38:36 2019 From: report at bugs.python.org (Aivar Annamaa) Date: Fri, 05 Jul 2019 09:38:36 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562319516.01.0.364604234889.issue18374@roundup.psfhosted.org> Aivar Annamaa added the comment: > in my opinion the col_offsets of the two nodes should be 1 and 3, respectively (the positions of the operators) This would not match the documentation: > one can get the source segment of a one-line expression node using source_line[node.col_offset : node.end_col_offset] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:44:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 09:44:32 +0000 Subject: [issue37495] socket.inet_aton parsing issue on some libc versions In-Reply-To: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> Message-ID: <1562319872.87.0.446572808027.issue37495@roundup.psfhosted.org> STINNER Victor added the comment: January 2019, Florian Weimer created the issue "Deprecate inet_addr, inet_aton" in glibc: https://sourceware.org/bugzilla/show_bug.cgi?id=24111 inet_aton() ignores extra string "for historic reasons". More info at: https://sourceware.org/bugzilla/show_bug.cgi?id=20018#c0 "For historic reasons, inet_addr and inet_aton accept trailing garbage. Some parsers rely on this (for example, libresolv when it parses ?nameserver? directives in /etc/resolv.conf)." -- To clarify the complex situation: glibc getaddrinfo() has been fixed in glibc to ignore extra string, but not inet_aton(). getaddrinfo() fix: * https://sourceware.org/bugzilla/show_bug.cgi?id=20018 * https://bugzilla.redhat.com/show_bug.cgi?id=1347549 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:49:15 2019 From: report at bugs.python.org (Matthias Klose) Date: Fri, 05 Jul 2019 09:49:15 +0000 Subject: [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 Message-ID: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> New submission from Matthias Klose : 3.8 b2 now requires sphinx2 (according to SilentGhost on IRC), but only has documented 1.8. I'm aware of issue #36007, the last time that the requirements were bumped. So again, the dependencies were bumped without documenting, and why do we require the latest sphinx again? It's difficult to provide the documentation as a Linux distro when you always have to provide the latest build tools. Please compare that to other projects that are usually fine to build with any doxygen, texinfo, or whatever doc tool. Any hint where the new dependency was introduced, and probably can be backed out? The actuall error is: writing... Exception occurred: File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 567, in __getitem__ return self.attributes[key] KeyError: 'cols' # Sphinx version: 1.8.4 # Python version: 3.7.3 (CPython) # Docutils version: 0.14 # Jinja2 version: 2.10 # Last messages: # distutils/sourcedist # distutils/builtdist # distutils/examples # distutils/extending # distutils/commandref # distutils/apiref # install/index # # resolving references... # writing... # Loaded extensions: # sphinx.ext.mathjax (1.8.4) from /usr/lib/python3/dist-packages/sphinx/ext/mathjax.py # alabaster (0.7.8) from /usr/lib/python3/dist-packages/alabaster/__init__.py # sphinx.ext.coverage (1.8.4) from /usr/lib/python3/dist-packages/sphinx/ext/coverage.py # sphinx.ext.doctest (1.8.4) from /usr/lib/python3/dist-packages/sphinx/ext/doctest.py # pyspecific (1.0) from /home/packages/python/3.8/python3.8-3.8.0~b2/Doc/tools/extensions/pyspecific.py # c_annotations (1.0) from /home/packages/python/3.8/python3.8-3.8.0~b2/Doc/tools/extensions/c_annotations.py # escape4chm (1.0) from /home/packages/python/3.8/python3.8-3.8.0~b2/Doc/tools/extensions/escape4chm.py Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sphinx/cmd/build.py", line 304, in build_main app.build(args.force_all, filenames) File "/usr/lib/python3/dist-packages/sphinx/application.py", line 341, in build self.builder.build_update() File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 342, in build_update self.build(['__all__'], to_build) File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 412, in build self.write(docnames, list(updated_docnames), method) File "/usr/lib/python3/dist-packages/sphinx/builders/texinfo.py", line 187, in write docwriter.write(doctree, destination) File "/usr/lib/python3/dist-packages/docutils/writers/__init__.py", line 80, in write self.translate() File "/usr/lib/python3/dist-packages/sphinx/writers/texinfo.py", line 139, in translate self.document.walkabout(visitor) File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 174, in walkabout if child.walkabout(visitor): File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 174, in walkabout if child.walkabout(visitor): File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 174, in walkabout if child.walkabout(visitor): [Previous line repeated 9 more times] File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 166, in walkabout visitor.dispatch_visit(self) File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 1882, in dispatch_visit return method(node) File "/usr/lib/python3/dist-packages/sphinx/writers/texinfo.py", line 1126, in visit_tgroup self.n_cols = node['cols'] File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 567, in __getitem__ return self.attributes[key] KeyError: 'cols' ---------- assignee: docs at python components: Documentation messages: 347322 nosy: docs at python, doko priority: normal severity: normal status: open title: 3.8 b2 now requires sphinx2, but only has documented 1.8 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:49:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 09:49:51 +0000 Subject: [issue37463] ssl.match_hostname() ignores extra string after whitespace in IPv4 address In-Reply-To: <1561963624.13.0.490304493984.issue37463@roundup.psfhosted.org> Message-ID: <1562320191.49.0.495837265558.issue37463@roundup.psfhosted.org> STINNER Victor added the comment: > inet_aton accepts trailing characterrs after a valid IP ( https://bugzilla.redhat.com/show_bug.cgi?id=1347549). There is a little bit of confusion between getaddrinfo() and inet_aton() here (https://bugzilla.redhat.com/show_bug.cgi?id=1347549 is about getaddrinfo()). getaddrinfo() has been fixed: https://sourceware.org/bugzilla/show_bug.cgi?id=20018 But glibc devs don't want to fix inet_aton() to keep the backward compatibility ("for historic reasons"): more info in bpo-37495 "socket.inet_aton parsing issue on some libc versions". This issue is about ssl.match_hostname() which uses internally socket.inet_aton(). ssl.match_hostname() has been fixed to implement further checks to workaround inet_aton() behavior (ignore extra string after a whitespace). I also removed inet_aton() from the title of this issue to reduce confusion ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:51:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 09:51:08 +0000 Subject: [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562320268.9.0.721676753657.issue37504@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:51:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Jul 2019 09:51:37 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562320297.62.0.632279670955.issue18374@roundup.psfhosted.org> Serhiy Storchaka added the comment: > in my opinion the col_offsets of the two nodes should be 1 and 3, respectively (the positions of the operators) Such change was committed once, but it was quickly reverted because it was not well discussed and contradicts the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:02:03 2019 From: report at bugs.python.org (Carl Friedrich Bolz) Date: Fri, 05 Jul 2019 10:02:03 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1562320297.62.0.632279670955.issue18374@roundup.psfhosted.org> Message-ID: <95B1CF6F-324C-4A3E-A0A2-D499DAD1F83D@gmx.de> Carl Friedrich Bolz added the comment: OK, fair enough. That means right now there is no way to find the position of the operator using the ast module at the moment, correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:07:35 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 05 Jul 2019 10:07:35 +0000 Subject: [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562321255.26.0.280246146511.issue37504@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:11:20 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Jul 2019 10:11:20 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562321480.56.0.729727063757.issue18374@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is between the end position of the left operand and the start position of the right operand. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:12:48 2019 From: report at bugs.python.org (Matthias Klose) Date: Fri, 05 Jul 2019 10:12:48 +0000 Subject: [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562321568.14.0.547461829118.issue37504@roundup.psfhosted.org> Matthias Klose added the comment: so this might not be a sphinx 2.x issue, the docs build fine for the html output, but the reported error is for building the texinfo files: make -C Doc texinfo That worked for 3.8 b1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:19:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 10:19:00 +0000 Subject: [issue37495] [CVE-2016-10739] socket.inet_aton parsing issue on some libc versions In-Reply-To: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> Message-ID: <1562321940.13.0.817294041686.issue37495@roundup.psfhosted.org> STINNER Victor added the comment: I take the freedom of assigning CVE-2016-10739 to this Python issue, even if CVE-2016-10739 was reported to the glibc (not to Python). "In the GNU C Library (aka glibc or libc6) through 2.28, the getaddrinfo function would successfully parse a string that contained an IPv4 address followed by whitespace and arbitrary characters, which could lead applications to incorrectly assume that it had parsed a valid string, without the possibility of embedded HTTP headers or other potentially dangerous substrings." https://access.redhat.com/security/cve/cve-2016-10739 ---------- title: socket.inet_aton parsing issue on some libc versions -> [CVE-2016-10739] socket.inet_aton parsing issue on some libc versions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:25:49 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2019 10:25:49 +0000 Subject: [issue37495] socket.inet_aton parsing issue on some libc versions In-Reply-To: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> Message-ID: <1562322349.07.0.795589106524.issue37495@roundup.psfhosted.org> Christian Heimes added the comment: CVE-2016-10739 was filed against glibc. We cannot re-use a CVE number from another product in CPython. You can only reference that a CVE causes a security bug. ---------- title: [CVE-2016-10739] socket.inet_aton parsing issue on some libc versions -> socket.inet_aton parsing issue on some libc versions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:26:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 10:26:12 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562322372.08.0.284367374802.issue37483@roundup.psfhosted.org> STINNER Victor added the comment: INADA-san, Jeroen: hum, you both proposed a similar fix :-) One fix is enough. See my review on PR 14600. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:26:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 10:26:46 +0000 Subject: [issue37481] Deprecate bdist_wininst: use bdist_wheel instead In-Reply-To: <1562065555.11.0.674555433239.issue37481@roundup.psfhosted.org> Message-ID: <1562322406.35.0.328200000943.issue37481@roundup.psfhosted.org> STINNER Victor added the comment: The initial issue has been fixed. Let's continue the discussion in the Packaging forum: https://discuss.python.org/t/deprecate-bdist-wininst/1929 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:28:55 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 05 Jul 2019 10:28:55 +0000 Subject: [issue37501] Test failures when CPython is built without docstrings In-Reply-To: <1562297404.15.0.705525533072.issue37501@roundup.psfhosted.org> Message-ID: <1562322535.55.0.219219123994.issue37501@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:41:00 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 05 Jul 2019 10:41:00 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562323260.68.0.510317803219.issue37483@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Jeroen: hum, you both proposed a similar fix :-) It seems that I lost the race ;-) But seriously: if we both independently came up with the same solution, that's a good sign that the solution is correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:57:58 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 05 Jul 2019 10:57:58 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562324278.67.0.400407569458.issue37483@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 6e43d07324ca799118e805751a10a7eff71d5a04 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37483: fix reference leak in _PyCodec_Lookup (GH-14600) https://github.com/python/cpython/commit/6e43d07324ca799118e805751a10a7eff71d5a04 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 07:56:07 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 05 Jul 2019 11:56:07 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1562327767.31.0.872730676933.issue37221@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 08:07:59 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2019 12:07:59 +0000 Subject: [issue37505] Early auditing broken Message-ID: <1562328479.24.0.514484433383.issue37505@roundup.psfhosted.org> New submission from Christian Heimes : I think that commit 838f26402de82640698c38ea9d2be65c6cf780d6 / bpo-36710 broke auditing for early events. I'm no longer seeing early events like cpython.PyInterpreterState_New. The first event is an import event without interpreter state. ---------- components: Interpreter Core messages: 347334 nosy: christian.heimes, steve.dower, vstinner priority: normal severity: normal status: open title: Early auditing broken type: security versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 08:21:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 12:21:21 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562329281.1.0.0976280841209.issue37483@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the quick fix ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 08:31:43 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 05 Jul 2019 12:31:43 +0000 Subject: [issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict() In-Reply-To: <1560072227.25.0.180298594259.issue37207@roundup.psfhosted.org> Message-ID: <1562329903.16.0.406310679042.issue37207@roundup.psfhosted.org> Jeroen Demeyer added the comment: One thing that keeps bothering me when using vectorcall for type.__call__ is that we would have two completely independent code paths for constructing an object: the new one using vectorcall and the old one using tp_call, which in turn calls tp_new and tp_init. In typical vectorcall usages, there is no need to support the old way any longer: we can set tp_call = PyVectorcall_Call and that's it. But for "type", we still need to support tp_new and tp_init because there may be C code out there that calls tp_new/tp_init directly. To give one concrete example: collections.defaultdict calls PyDict_Type.tp_init One solution is to keep the old code for tp_new/tp_init. This is what Mark did in PR 13930. But this leads to duplication of functionality and is therefore error-prone (different code paths may have subtly different behaviour). Since we don't want to break Python code calling dict.__new__ or dict.__init__, not implementing those is not an option. But to be compatible with the vectorcall signature, ideally we want to implement __init__ using METH_FASTCALL, so __init__ would need to be a normal method instead of a slot wrapper of tp_init (similar to Python classes). This would work, but it needs some support in typeobject.c ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 08:32:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 12:32:32 +0000 Subject: [issue37495] socket.inet_aton parsing issue on some libc versions In-Reply-To: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> Message-ID: <1562329952.2.0.333574221146.issue37495@roundup.psfhosted.org> STINNER Victor added the comment: One solution would to be reimplement socket.inet_aton() with inet_pton() internally. inet_pton() is well specified and standard (POSIX). inet_aton() is not ("inet_aton() is not specified in POSIX.1, but is available on most systems." says its Linux manual page). >>> socket.inet_pton(socket.AF_INET, "1.2.3.4") b'\x01\x02\x03\x04' >>> socket.inet_pton(socket.AF_INET, "1.2.3.4 extra string") Traceback (most recent call last): File "", line 1, in OSError: illegal IP address string passed to inet_pton Problems: * inet_pton() requires an address family. Should we iterate on all supported address families until one works? * inet_pton() doesn't accept IPv4 "short format" like "127" >>> socket.inet_aton("127") b'\x00\x00\x00\x7f' >>> socket.inet_pton(socket.AF_INET, "127") Traceback (most recent call last): File "", line 1, in OSError: illegal IP address string passed to inet_pton ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 08:48:47 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 05 Jul 2019 12:48:47 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1562330927.55.0.965367206323.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 0d722f3cd602e5f5492f9c65c8af57ea9d3743b6 by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-36974: separate vectorcall functions for each calling convention (GH-13781) https://github.com/python/cpython/commit/0d722f3cd602e5f5492f9c65c8af57ea9d3743b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 08:52:13 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 05 Jul 2019 12:52:13 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1562331133.24.0.458922101414.issue36974@roundup.psfhosted.org> Jeroen Demeyer added the comment: Any objections to closing this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 08:52:09 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2019 12:52:09 +0000 Subject: [issue37495] socket.inet_aton parsing issue on some libc versions In-Reply-To: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> Message-ID: <1562331129.58.0.859457166787.issue37495@roundup.psfhosted.org> Christian Heimes added the comment: > inet_pton() requires an address family. Should we iterate on all supported address families until one works? No, that is not necessary. inet_aton() only accepts IPv4 addresses. Therefore an emulation with inet_pton() would look like this: >>> import functools, socket >>> inet_aton = functools.partial(socket.inet_pton, socket.AF_INET) >>> inet_aton('127.0.0.1') b'\x7f\x00\x00\x01' > inet_pton() doesn't accept IPv4 "short format" like "127" Yes, that might be a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 09:06:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 13:06:01 +0000 Subject: [issue37495] socket.inet_aton parsing issue on some libc versions In-Reply-To: <1562190874.32.0.352639947279.issue37495@roundup.psfhosted.org> Message-ID: <1562331961.52.0.422800604102.issue37495@roundup.psfhosted.org> STINNER Victor added the comment: Attached inet_aton_pton.py is a proof-of-concept which reimplements inet_aton() using inet_pton(). It supports a.b.c.d, a.b.c, a.b and a formats. I'm not sure which exception should be raised in case of parsing error. socket.inet_aton() raises OSError"illegal IP address string passed to inet_aton") using C code: PyErr_SetString(PyExc_OSError, "illegal IP address string passed to inet_aton"); ---------- Added file: https://bugs.python.org/file48457/inet_aton_pton.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 09:06:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 13:06:20 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562331980.63.0.934030040988.issue37421@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14416 pull_request: https://github.com/python/cpython/pull/14601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 09:07:30 2019 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 05 Jul 2019 13:07:30 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562332050.81.0.361949184196.issue37500@roundup.psfhosted.org> Ned Batchelder added the comment: Since this was backported to 3.7 but not yet released, I'm adding 3.7regression. ---------- keywords: +3.7regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 09:14:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 13:14:30 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562332470.95.0.410032363252.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: ./python -u -m test test_multiprocessing_spawn -R 3:3 still fail: ERROR: test_context (test.test_multiprocessing_spawn.TestStartMethod) ERROR: test_set_get (test.test_multiprocessing_spawn.TestStartMethod) PR 14601 fix these tests when test_multiprocessing_spawn is run more than once. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 09:25:26 2019 From: report at bugs.python.org (Guilloux) Date: Fri, 05 Jul 2019 13:25:26 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562333126.3.0.447178376216.issue37149@roundup.psfhosted.org> Change by Guilloux : ---------- versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 09:40:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 13:40:50 +0000 Subject: [issue37505] Early auditing broken In-Reply-To: <1562328479.24.0.514484433383.issue37505@roundup.psfhosted.org> Message-ID: <1562334050.27.0.213006642425.issue37505@roundup.psfhosted.org> STINNER Victor added the comment: Oh. How can I reproduce this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 09:48:05 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2019 13:48:05 +0000 Subject: [issue37505] Early auditing broken In-Reply-To: <1562328479.24.0.514484433383.issue37505@roundup.psfhosted.org> Message-ID: <1562334485.6.0.379292456719.issue37505@roundup.psfhosted.org> Christian Heimes added the comment: 3.8.0b1 is also broken, so it may have been a different commit. I'm sure that I was able to see interpreter initialization with dtrace hooks. # audit.stp probe process("/usr/lib64/libpython3.8.*").provider("python").mark("audit") { printf("%s\n", user_string($arg1)) } $ sudo stap audit.stp -c python3.8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:01:48 2019 From: report at bugs.python.org (Holly) Date: Fri, 05 Jul 2019 14:01:48 +0000 Subject: [issue37506] os.mkdir creates invalid folder when path string has trailing space and slash Message-ID: <1562335308.56.0.146479172275.issue37506@roundup.psfhosted.org> New submission from Holly : If we use os.mkdir to create a folder as follows: os.mkdir("C:/test /") Then we successfully create a folder with name "test ". This folder can be accessed normally, but it cannot be renamed or deleted. Instead we get the following error message: Could not find this item This is no longer located in C:\. Verify the item's location and try again. I used Python 3.7.3 (64 bit) and Windows 1809 Obviously this is down to how windows doesn't handle paths particularly nicely, so it's not really python's fault. However even if it's decided that python shouldn't handle this then it would be better for an exception to be thrown rather than creating a corrupt folder. Note: We can delete the folder by using the Long UNC path, eg. rd "\\?\C:\test " ---------- components: IO messages: 347346 nosy: hollyroberts priority: normal severity: normal status: open title: os.mkdir creates invalid folder when path string has trailing space and slash type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:03:23 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 05 Jul 2019 14:03:23 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1562335403.23.0.703039439096.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: Buildbots are green, closing. Thank you for the implementation! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:15:58 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jul 2019 14:15:58 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562336158.25.0.0430897922666.issue37421@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14417 pull_request: https://github.com/python/cpython/pull/14602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:16:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 14:16:02 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562336162.47.0.374330157355.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8fbeb14312b4c1320d31ad86e69749515879d1c3 by Victor Stinner in branch 'master': bpo-37421: multiprocessing tests now stop ForkServer (GH-14601) https://github.com/python/cpython/commit/8fbeb14312b4c1320d31ad86e69749515879d1c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:21:43 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Jul 2019 14:21:43 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562336503.76.0.790753106167.issue37500@roundup.psfhosted.org> Ned Deily added the comment: How serious a regression is this? We still have time to revert the 3.7 commit of Issue1875 (85ed1712e428f93408f56fc684816f9a85b0ebc0) from 3.7.4 final if we act immediately. ---------- nosy: +ned.deily versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:22:15 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Jul 2019 14:22:15 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1562336535.85.0.52231788137.issue1875@roundup.psfhosted.org> Ned Deily added the comment: See also discussion in Issue37500. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:22:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 14:22:18 +0000 Subject: [issue37507] multiprocessing: Add a stop() method to ForkServer Message-ID: <1562336538.11.0.898279442139.issue37507@roundup.psfhosted.org> New submission from STINNER Victor : While working on bpo-37421, I fixed multiprocessing tests to explicitly call _run_finaliers(), so temporary directories are removed: New changeset 039fb49c185570ab7b02f13fbdc51c859cfd831e by Victor Stinner in branch 'master': bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527) https://github.com/python/cpython/commit/039fb49c185570ab7b02f13fbdc51c859cfd831e Problem: some tests started to fail when run more than once, which happens using ./python -m test -R 3:3 (hunt reference leaks). So I made a first change: New changeset 9d40554e0da09a44a8547f3f3a2b9dedfeaf7928 by Victor Stinner in branch 'master': bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572) https://github.com/python/cpython/commit/9d40554e0da09a44a8547f3f3a2b9dedfeaf7928 But I also had to explicitly stop the ForkServer: New changeset 9d40554e0da09a44a8547f3f3a2b9dedfeaf7928 by Victor Stinner in branch 'master': bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572) https://github.com/python/cpython/commit/9d40554e0da09a44a8547f3f3a2b9dedfeaf7928 I propose to add a public ForkServer.stop() method to stop the server. The method would block until the server stops. The server doesn't track its children, so if there are running child processes, they will continue to run after stop() completes. Child processes are tracked by APIs like multiprocessing Pool. I dislike relying on implicit resource management. I prefer to handle them explicitly, to ensure that errors are properly reported if something goes wrong. Implicit resource management rely on Python destructor which may be called very late during Python finalization, while other modules are already cleaned up, and so some function may fail silently (the machineny to report issues is broken as well). In short, I propose to rename the new _stop() method as stop() and document it properly :-) ---------- components: Library (Lib) messages: 347351 nosy: davin, pablogsal, pitrou, vstinner priority: normal severity: normal status: open title: multiprocessing: Add a stop() method to ForkServer versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:22:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 14:22:42 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562336562.63.0.736051768569.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: I created a follow-up issue: bpo-37507 "multiprocessing: Add a stop() method to ForkServer". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:23:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 14:23:47 +0000 Subject: [issue37505] Early auditing broken In-Reply-To: <1562328479.24.0.514484433383.issue37505@roundup.psfhosted.org> Message-ID: <1562336627.99.0.22032837442.issue37505@roundup.psfhosted.org> STINNER Victor added the comment: I don't see how the first call to PyInterpreterState_New() can be audited: PySys_Audit() builds a tuple to call hooks, but there is no interpreter yet, so we cannot even build tuples. Are you talking about the "main" interpreter, or sub-interpreters? I'm surprised that it worked previously for the main interpreter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:24:09 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 05 Jul 2019 14:24:09 +0000 Subject: [issue37506] os.mkdir creates invalid folder when path string has trailing space and slash In-Reply-To: <1562335308.56.0.146479172275.issue37506@roundup.psfhosted.org> Message-ID: <1562336649.0.0.995961060866.issue37506@roundup.psfhosted.org> Steven D'Aprano added the comment: > it would be better for an exception to be thrown rather than creating a corrupt folder. I am not convinced that Python should refuse to create a perfectly valid directory because some components of Windows sometimes have trouble resolving the pathname under some circumstances. Microsoft say: "Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not." https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming_conventions but Python is talking to the file system, not the shell or Windows Explorer. This is a common problem, with numerous solutions: https://superuser.com/questions/198256/how-to-delete-a-folder-containing-trailing-spaces It's apparently quite common in shared environments where (for example) Mac users may copy files ending with a space onto Windows drives. ---------- components: +Windows nosy: +paul.moore, steve.dower, steven.daprano, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:29:02 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Jul 2019 14:29:02 +0000 Subject: [issue23312] google thinks the docs are mobile unfriendly In-Reply-To: <1422121325.13.0.140473067698.issue23312@psf.upfronthosting.co.za> Message-ID: <1562336942.09.0.781447731862.issue23312@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +mdk versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:35:42 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jul 2019 14:35:42 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562337342.46.0.8997183467.issue37421@roundup.psfhosted.org> miss-islington added the comment: New changeset 229f6e85f8b4d57a2e742e0d3fc361c5bd15f1cb by Miss Islington (bot) in branch '3.8': bpo-37421: multiprocessing tests now stop ForkServer (GH-14601) https://github.com/python/cpython/commit/229f6e85f8b4d57a2e742e0d3fc361c5bd15f1cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:53:22 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 05 Jul 2019 14:53:22 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1562338402.83.0.761410872818.issue37151@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14418 pull_request: https://github.com/python/cpython/pull/14603 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 11:14:10 2019 From: report at bugs.python.org (hai shi) Date: Fri, 05 Jul 2019 15:14:10 +0000 Subject: [issue37508] A wrong return type in memory.rst Message-ID: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> New submission from hai shi : the result should be a bytes object in #L70 in https://github.com/python/cpython/blob/master/Doc/c-api/memory.rst ---------- assignee: docs at python components: Documentation messages: 347356 nosy: docs at python, shihai1991 priority: normal severity: normal status: open title: A wrong return type in memory.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 11:16:45 2019 From: report at bugs.python.org (hai shi) Date: Fri, 05 Jul 2019 15:16:45 +0000 Subject: [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562339805.21.0.253155268985.issue37508@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14419 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14604 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 11:24:34 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Jul 2019 15:24:34 +0000 Subject: [issue37505] Early auditing broken In-Reply-To: <1562328479.24.0.514484433383.issue37505@roundup.psfhosted.org> Message-ID: <1562340274.55.0.152253745901.issue37505@roundup.psfhosted.org> Steve Dower added the comment: Yeah, at some point we had to add an initialization check to the audit calls because of the tuple, so it essentially became a subinterpreter event but not the main one. But I thought the dtrace call happened before that check? Looking through the linked commit, apparently not, but I don't actually recall right now why and I can't quite see enough context. Did we need the tuple there too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 11:39:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 15:39:22 +0000 Subject: [issue37505] Early auditing broken In-Reply-To: <1562328479.24.0.514484433383.issue37505@roundup.psfhosted.org> Message-ID: <1562341162.06.0.970629865368.issue37505@roundup.psfhosted.org> STINNER Victor added the comment: PySys_Audit() exit immediately if ts=NULL: /* Early exit when no hooks are registered */ if (!should_audit(ts)) { return 0; } It exits before calling: /* Dtrace USDT point */ if (dtrace) { PyDTrace_AUDIT(event, (void *)eventArgs); } where eventArgs is the tuple. Do you really care of getting an audit event when the *main* interpreter is created? It doesn't sound like an attack vector to start Python, no? If you need an event "Python started", we can add one later, when the PySys_Audit() is usable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 11:43:46 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 05 Jul 2019 15:43:46 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1562341426.89.0.08025378878.issue37151@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 7b57c03a7cb63ccfb2b8dfa82a1bf169268d80ba by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-37151: remove _PyMethodDef_RawFastCall* functions (GH-14603) https://github.com/python/cpython/commit/7b57c03a7cb63ccfb2b8dfa82a1bf169268d80ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 12:01:08 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Jul 2019 16:01:08 +0000 Subject: [issue37505] Early auditing broken In-Reply-To: <1562328479.24.0.514484433383.issue37505@roundup.psfhosted.org> Message-ID: <1562342468.11.0.484437474374.issue37505@roundup.psfhosted.org> Christian Heimes added the comment: The hooks are about auditing the behavior of an interpreter. It's not strictly tight to some attack scenario. I would find it useful to either get back the old behavior or to have some sort of event, which indicates the start of the auditing log. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 13:16:50 2019 From: report at bugs.python.org (Dmitry Shachnev) Date: Fri, 05 Jul 2019 17:16:50 +0000 Subject: [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562347010.8.0.0473401471126.issue37504@roundup.psfhosted.org> Change by Dmitry Shachnev : ---------- nosy: +mitya57 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 13:24:09 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jul 2019 17:24:09 +0000 Subject: [issue37501] Test failures when CPython is built without docstrings In-Reply-To: <1562297404.15.0.705525533072.issue37501@roundup.psfhosted.org> Message-ID: <1562347449.91.0.48019814491.issue37501@roundup.psfhosted.org> Brett Cannon added the comment: Bit surprised by the test_importlib failure. What has crept into there that requires docstrings? ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 13:26:38 2019 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 05 Jul 2019 17:26:38 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562347598.07.0.531287066286.issue37500@roundup.psfhosted.org> Ned Batchelder added the comment: The real-word implications from my world are this: if your code has "if 0:" clauses in it, and you measure its coverage, then because the lines have not been optimized away, coverage.py will think the lines are a possible execution path, and will be considered a miss because they are not executed. This will reduce your coverage percentage. I can't estimate how many people this will affect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 13:39:41 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 05 Jul 2019 17:39:41 +0000 Subject: [issue37501] Test failures when CPython is built without docstrings In-Reply-To: <1562297404.15.0.705525533072.issue37501@roundup.psfhosted.org> Message-ID: <1562348381.62.0.310535176813.issue37501@roundup.psfhosted.org> Eric V. Smith added the comment: Also surprised by the marked dataclasses tests. I don't see anything there that requires docstrings. See my review on the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 13:50:39 2019 From: report at bugs.python.org (YoSTEALTH) Date: Fri, 05 Jul 2019 17:50:39 +0000 Subject: [issue37509] OSError preadv() Message-ID: <1562349039.72.0.211859672318.issue37509@roundup.psfhosted.org> New submission from YoSTEALTH : import os import ctypes # Stdlib # ------ def test_preadv_stdlib(path): fd = os.open(path, os.O_RDWR | os.O_CREAT) buffer = bytearray(10) buffers = [buffer] try: length = os.preadv(fd, buffers, 0, os.RWF_NOWAIT) # OSError: [Errno 95] Operation not supported print('length:', length) print('buffer:', buffer) finally: os.close(fd) # Cyptes Libc # ----------- class iovec(ctypes.Structure): _fields_ = [('iov_base', ctypes.c_char_p), ('iov_len', ctypes.c_size_t)] libc = ctypes.CDLL('libc.so.6') def test_preadv_libc(path): fd = os.open(path, os.O_RDWR | os.O_CREAT) buffer = bytes(10) buffers = (iovec*1)() buffers[0].iov_base = buffer buffers[0].iov_len = 10 try: length = libc.preadv2(fd, buffers, len(buffers), 0, os.RWF_NOWAIT) print('length:', length) # length: -1 print('buffer:', buffer) # buffer: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' finally: os.close(fd) # Test Run # -------- def test(): path = '/dev/shm/test-preadv-in-ram-file' # Test-1 stdlib implementation try: test_preadv_stdlib(path) # OSError: [Errno 95] Operation not supported except OSError: print('OSError is raised. This should not raise OSError') # Test-2 custom ctype `libc` implementation test_preadv_libc(path) if __name__ == '__main__': test() This code is just to demonstrate working vs receiving an OSError in this specific usage. System: Linux 4.19.56-1-MANJARO Python: 3.8.0b2 When the file in question is stored in ram ('/dev/shm') stdlib implementation raises an OSError while libc version does not. ---------- messages: 347364 nosy: YoSTEALTH, pablogsal, vstinner priority: normal severity: normal status: open title: OSError preadv() type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 14:14:07 2019 From: report at bugs.python.org (hai shi) Date: Fri, 05 Jul 2019 18:14:07 +0000 Subject: [issue30090] Failed to build these modules: _ctypes In-Reply-To: <1492446477.68.0.86749049176.issue30090@psf.upfronthosting.co.za> Message-ID: <1562350447.87.0.38767846953.issue30090@roundup.psfhosted.org> hai shi added the comment: In centos, `sudo yum install -y libffi libffi-devel` should worked ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 14:21:44 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Jul 2019 18:21:44 +0000 Subject: [issue37506] os.mkdir creates invalid folder when path string has trailing space and slash In-Reply-To: <1562335308.56.0.146479172275.issue37506@roundup.psfhosted.org> Message-ID: <1562350904.09.0.446240697616.issue37506@roundup.psfhosted.org> Steve Dower added the comment: Yeah, I'd rather not do this level of validation in Python. If Windows decides to reject or automatically correct this, fine, but Python is just being a thin layer over the operating system here. We shouldn't try and prevent things that the OS allows. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 14:56:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 18:56:25 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562352985.62.0.387487018517.issue37500@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +14420 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 14:57:26 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2019 18:57:26 +0000 Subject: [issue37476] Adding a unit test of unicode in test_unicode.py In-Reply-To: <1562005792.78.0.882905794815.issue37476@roundup.psfhosted.org> Message-ID: <1562353046.31.0.00597428179481.issue37476@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 14:59:17 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 18:59:17 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562353157.93.0.0683392313647.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Ned, I have prepared PR14605 for the 3.7 branch to revert 85ed1712e428f93408f56fc684816f9a85b0ebc0. As this is somehow changing behavior in the 3.7 series, I think is the best course of action for 3.7. For 3.8 the proposed way to do this is not using an unconditional jump to skip the conditional (in progress in PR 14116). The reason is that we need to compile the blocks to detect syntax errors even if the block will be unreachable. This is also a deep implementation detail and it should not be rely upon, in my opinion. ---------- keywords: -patch stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 15:00:18 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 19:00:18 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562353218.59.0.90089078604.issue37500@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg347367 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 15:00:21 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 19:00:21 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562353221.08.0.575496022221.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Ned, I have prepared PR14605 for the 3.7 branch to revert 85ed1712e428f93408f56fc684816f9a85b0ebc0. As this is somehow changing behavior in the 3.7 series, I think is the best course of action for 3.7. For 3.8 the proposed way to do this is now using an unconditional jump to skip the conditional (in progress in PR 14116). The reason is that we need to compile the blocks to detect syntax errors even if the block will be unreachable. This is also a deep implementation detail and it should not be rely upon, in my opinion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 15:14:02 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jul 2019 19:14:02 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562354042.76.0.544095149725.issue37500@roundup.psfhosted.org> miss-islington added the comment: New changeset 7d93effeb4f8e86dfa283f2376ec5362275635c6 by Miss Islington (bot) (Pablo Galindo) in branch '3.7': [3.7] bpo-37500: Revert commit 85ed1712e428f93408f56fc684816f9a85b0ebc0 (GH-14605) https://github.com/python/cpython/commit/7d93effeb4f8e86dfa283f2376ec5362275635c6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 15:32:26 2019 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Fri, 05 Jul 2019 19:32:26 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562355146.72.0.821495750433.issue18374@roundup.psfhosted.org> Carl Friedrich Bolz-Tereick added the comment: I think the attached patch fixes the problem. Will create a pull request soon. ---------- versions: +Python 3.5 -Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48458/binop-offset.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 15:33:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2019 19:33:51 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562355231.29.0.956725254733.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: > what exactly is the standard for mentioning errors My impression is that there is none, or that it is inconsistent, but that the trend is to say more. If you want to followup, check the documentation chapters of the devguide, and if there is nothing clear now, post to the pydev list. https://docs.python.org/3/library/os.html#os-file-dir has os.chdir(path) Change the current working directory to path. This function can support specifying a file descriptor. The descriptor must refer to an opened directory, not an open file. Most of the other entries in do not mention errors, but is_dir has the line mentioned. I think the condensed line is enough to add, as the sub-exception names are self-explanatory; and when they occur, the full message certainly is. (I verified both possibilities mentioned.) Most users should just catch OSError, if anything. Make a PR with the short message and request me as a reviewer. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 15:37:17 2019 From: report at bugs.python.org (Dmitry Shachnev) Date: Fri, 05 Jul 2019 19:37:17 +0000 Subject: [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562355437.58.0.29516887364.issue37504@roundup.psfhosted.org> Change by Dmitry Shachnev : ---------- keywords: +patch pull_requests: +14421 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 15:39:39 2019 From: report at bugs.python.org (Dmitry Shachnev) Date: Fri, 05 Jul 2019 19:39:39 +0000 Subject: [issue37504] Documentation fails to build when using Sphinx' texinfo builder In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562355579.89.0.784382743785.issue37504@roundup.psfhosted.org> Change by Dmitry Shachnev : ---------- title: 3.8 b2 now requires sphinx2, but only has documented 1.8 -> Documentation fails to build when using Sphinx' texinfo builder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:01:32 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 05 Jul 2019 20:01:32 +0000 Subject: [issue37496] Support annotations in signature strings. In-Reply-To: <1562197526.36.0.0415942737779.issue37496@roundup.psfhosted.org> Message-ID: <1562356892.11.0.999333992517.issue37496@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:06:06 2019 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 05 Jul 2019 20:06:06 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562357166.21.0.826565949889.issue37500@roundup.psfhosted.org> Ned Batchelder added the comment: I don't know what you mean by, "it should not be rely upon." Are you saying that in 3.8 you want to keep the lines in the compiled bytecode? Do you understand the implications for coverage measurement? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:10:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2019 20:10:22 +0000 Subject: [issue37487] PyList_GetItem() document regarding index In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562357422.5.0.983055141547.issue37487@roundup.psfhosted.org> Terry J. Reedy added the comment: Good catch. (In the future, try to include the url, as below.) The full sentence in question, at https://docs.python.org/3/c-api/list.html#c.PyList_GetItem, is "The position must be positive, indexing from the end of the list is not supported." 'positive' should be 'non-negative'. The next sentence deal with out-of-bounds positions, and these could be specified as '(< 0, > len(list))' ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:10:39 2019 From: report at bugs.python.org (Paul Moore) Date: Fri, 05 Jul 2019 20:10:39 +0000 Subject: [issue37369] Issue with pip in venv on Powershell in Windows In-Reply-To: <1561655326.56.0.712945465742.issue37369@roundup.psfhosted.org> Message-ID: Paul Moore added the comment: On Thu, 27 Jun 2019 at 18:08, Steve Dower wrote: > However, it does mean that we need to start reporting a sys.executable that is not inside sys.prefix, and I'm not sure whether that is a good idea. > > Looking at venv (+Vinay for confirmation here), it seems to treat "home" as "the directory containing the original Python binary" rather than "the directory containing the Python install". So in theory (and in my simple testing), using the sys.executable-not-in-prefix here is fine. But is that intentional? I'm pretty sure there is code in the wild that expects / python.exe to be the Python executable (when you're not in a virtual environment). I seem to recall that virtualenv might do that sort of thing. Sorry I can't be precise here, I've just come back from holiday and won't be back into the swing of open source for a while yet, but my recollection is that it gets done in situations where sys.executable isn't (easily) accessible - for example, when getting sys.prefix from the registry (um, I don't think that's right, as the executable path is in the registry too - but you get the idea). What I'd say is that we should be cautious here, as we risk trading one breakage for another, rather than actually fixing the issue. Certainly the assumption I quote above is unwarranted, and code making it can't complain too much if it breaks, but the problem is that you *have* to make that assumption as the necessary information isn't available any other way. So we should do some careful testing of 3rd party tools like virtualenv, pipenv, pipx, pew, tox, etc, to make sure any "solution" here doesn't break them, and provide or document transition options for them if necessary (because such tools can't realistically avoid continuing to support older versions of Python). IMO, we should bite the bullet here and actually document the interfaces involved in virtual environments, so that tools have a stable contract to work with. That way we'd limit the need for people to rely on undocumented behaviour in the first place. Paul ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:23:43 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 05 Jul 2019 20:23:43 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562358223.8.0.515448120609.issue37500@roundup.psfhosted.org> Stefan Behnel added the comment: > it should not be rely upon IMHO, the correct behaviour under coverage analysis is to keep the code and not discard it. After all, it is code that exists, and that is not being executed, so it should count as uncovered code. The fact that some Python versions can detect at compile time that it will never be executed, and thus discard it ahead of time, should not have an impact on the coverage analysis. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:33:46 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Jul 2019 20:33:46 +0000 Subject: [issue37369] Issue with pip in venv on Powershell in Windows In-Reply-To: <1561161256.11.0.32935812019.issue37369@roundup.psfhosted.org> Message-ID: <1562358826.14.0.25040623104.issue37369@roundup.psfhosted.org> Steve Dower added the comment: > I'm pretty sure there is code in the wild that expects / > python.exe to be the Python executable (when you're not in a virtual > environment) ... for example, when getting > sys.prefix from the registry (um, I don't think that's right, as the > executable path is in the registry too - but you get the idea). Yeah, for sure. Though as you say, when sys.executable is easily accessible, they're probably (hopefully) going to be using that. Older versions of Python definitely omitted the full executable path from the registry. PEP 514 added that in, though in this case unfortunately I don't think we have any way to fix what goes in the registry :( > What I'd say is that we should be cautious here, as we risk trading > one breakage for another, rather than actually fixing the issue. Yeah. We probably need to be clear about which approaches are actually supported and which ones are not. Ultimately though, I think this is a situation where the breakage is forced upon us (by the operating system), and so fixing the behaviour of our built-in functionality pretty clearly outweight preserving the assumptions made by third-parties (especially since those assumptions are going to break). > IMO, we should bite the bullet here and actually document the > interfaces involved in virtual environments, so that tools have a > stable contract to work with. That way we'd limit the need for people > to rely on undocumented behaviour in the first place. I feel like I've made this argument before, but I suspect if we'd documented them prior to this change, we'd now have no choice but to remain broken. The interfaces that should be documented are "-m venv", venv.VenvBuilder, and the activation scripts, none of which had to change. But if we start making promises about how "python.exe" actually behaves in a venv then we're going to paint ourselves into a corner very quickly - the venv approach just doesn't scale well to the range of systems people use. (Obligatory mention that PEP 582 would have avoided this whole mess by not requiring us to duplicate python.exe anywhere. But it just wasn't meant to be.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:40:58 2019 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 05 Jul 2019 20:40:58 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562359258.62.0.213302021691.issue37500@roundup.psfhosted.org> Ned Batchelder added the comment: I can see the logic of the argument that says the code exists, and should be measured. But this is changing behavior that has been in place for at least 15 years. Before this change, code could have had an unreported SyntaxError, but it was code that was being discarded by the optimizer anyway. How many people are benefiting from those SyntaxErrors? The only way the code would ever run is if they changed the "if 0:" to something else, at which point they would have seen the SyntaxErrors without this change. If we keep this change, I will hear from people unhappy with the drop in their coverage measurement. Have users of the language been complaining that they don't see SyntaxErrors in their optimized-away code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:45:30 2019 From: report at bugs.python.org (Jorge L. Martinez) Date: Fri, 05 Jul 2019 20:45:30 +0000 Subject: [issue37510] argparse removing more "--" than it should Message-ID: <1562359530.82.0.205006034858.issue37510@roundup.psfhosted.org> New submission from Jorge L. Martinez : $ python -c ' import argparse p = argparse.ArgumentParser() p.add_argument("first_arg") p.add_argument("args", nargs="*") r = p.parse_args(["foo", "--", "bar", "--", "baz", "--", "zap"]) print(r.first_arg + " " + " ".join(r.args)) ' returns: foo bar baz -- zap when I think it should return: foo bar -- baz -- zap ---------- components: Library (Lib) messages: 347378 nosy: jol priority: normal severity: normal status: open title: argparse removing more "--" than it should type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:46:32 2019 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Fri, 05 Jul 2019 20:46:32 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562359592.78.0.109536515238.issue18374@roundup.psfhosted.org> Change by Carl Friedrich Bolz-Tereick : ---------- pull_requests: +14423 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14607 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:51:43 2019 From: report at bugs.python.org (David Carlier) Date: Fri, 05 Jul 2019 20:51:43 +0000 Subject: [issue37511] mmap module add OpenBSD MADV_CONCEAL flag Message-ID: <1562359903.85.0.72937349499.issue37511@roundup.psfhosted.org> Change by David Carlier : ---------- nosy: David Carlier priority: normal pull_requests: 14424 severity: normal status: open title: mmap module add OpenBSD MADV_CONCEAL flag versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:51:59 2019 From: report at bugs.python.org (Jorge L. Martinez) Date: Fri, 05 Jul 2019 20:51:59 +0000 Subject: [issue37510] argparse removing more "--" than it should In-Reply-To: <1562359530.82.0.205006034858.issue37510@roundup.psfhosted.org> Message-ID: <1562359919.92.0.280577693892.issue37510@roundup.psfhosted.org> Jorge L. Martinez added the comment: Sorry, I forgot to add details on my machine. Python: 3.7.3 OS: Archlinux ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:54:28 2019 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 05 Jul 2019 20:54:28 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562360068.77.0.303837250632.issue37500@roundup.psfhosted.org> Ned Batchelder added the comment: To add to the confusion, the treatment of "if __debug__:" and "if not __debug__:" is now asymmetric: Here is debug.py: import dis import sys print(sys.version) def f(): if __debug__: print("debug") else: print("not debug") if not __debug__: print("NOT DEBUG") else: print("DEBUG") dis.dis(f) $ python3.8 /tmp/debug.py 3.8.0b2 (default, Jul 4 2019, 22:38:04) [Clang 10.0.0 (clang-1000.10.44.4)] 7 0 LOAD_GLOBAL 0 (print) 2 LOAD_CONST 1 ('debug') 4 CALL_FUNCTION 1 6 POP_TOP 10 8 LOAD_CONST 2 (False) 10 POP_JUMP_IF_FALSE 22 11 12 LOAD_GLOBAL 0 (print) 14 LOAD_CONST 3 ('NOT DEBUG') 16 CALL_FUNCTION 1 18 POP_TOP 20 JUMP_FORWARD 8 (to 30) 13 >> 22 LOAD_GLOBAL 0 (print) 24 LOAD_CONST 4 ('DEBUG') 26 CALL_FUNCTION 1 28 POP_TOP >> 30 LOAD_CONST 0 (None) 32 RETURN_VALUE $ python3.8 -O /tmp/debug.py 3.8.0b2 (default, Jul 4 2019, 22:38:04) [Clang 10.0.0 (clang-1000.10.44.4)] 6 0 LOAD_CONST 1 (False) 2 POP_JUMP_IF_FALSE 14 7 4 LOAD_GLOBAL 0 (print) 6 LOAD_CONST 2 ('debug') 8 CALL_FUNCTION 1 10 POP_TOP 12 JUMP_FORWARD 8 (to 22) 9 >> 14 LOAD_GLOBAL 0 (print) 16 LOAD_CONST 3 ('not debug') 18 CALL_FUNCTION 1 20 POP_TOP 11 >> 22 LOAD_GLOBAL 0 (print) 24 LOAD_CONST 4 ('NOT DEBUG') 26 CALL_FUNCTION 1 28 POP_TOP 30 LOAD_CONST 0 (None) 32 RETURN_VALUE In 3.7 (and earlier) the behavior was balanced: $ python3.7 /tmp/debug.py 3.7.3 (default, Apr 10 2019, 10:27:53) [Clang 10.0.0 (clang-1000.10.44.4)] 7 0 LOAD_GLOBAL 0 (print) 2 LOAD_CONST 1 ('debug') 4 CALL_FUNCTION 1 6 POP_TOP 13 8 LOAD_GLOBAL 0 (print) 10 LOAD_CONST 2 ('DEBUG') 12 CALL_FUNCTION 1 14 POP_TOP 16 LOAD_CONST 0 (None) 18 RETURN_VALUE $ python3.7 -O /tmp/debug.py 3.7.3 (default, Apr 10 2019, 10:27:53) [Clang 10.0.0 (clang-1000.10.44.4)] 9 0 LOAD_GLOBAL 0 (print) 2 LOAD_CONST 1 ('not debug') 4 CALL_FUNCTION 1 6 POP_TOP 11 8 LOAD_GLOBAL 0 (print) 10 LOAD_CONST 2 ('NOT DEBUG') 12 CALL_FUNCTION 1 14 POP_TOP 16 LOAD_CONST 0 (None) 18 RETURN_VALUE Is this really the desired behavior? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:57:40 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 20:57:40 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562360260.25.0.522896039917.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >Before this change, code could have had an unreported SyntaxError, but it was code that was being discarded by the optimizer anyway if __debug__ can a valid form of if 0 and therefore any syntax error will not be reported until that branch becomes true. > How many people are benefiting from those SyntaxErrors? I don't know how to give numbers, but is a matter of correctness. SyntaxErrors are reported without the need to execute any code (is a parse error) and should be reported independently of bytecode and what code runs or does not run. Is a property of the code being written, not of the code being executed. > Have users of the language been complaining that they don't see SyntaxErrors in their optimized-away code? Yes, I have seen many people surprised by this. Paul Ganssle (added to the noisy list) was one of the latest ones. Also, is a matter of correctness, is a syntax error and should be reported. >If we keep this change, I will hear from people unhappy with the drop in their coverage measurement. Have users of the language been complaining that they don't see SyntaxErrors in their optimized-away code? I am very sorry that this change affects your users in a negative way. But I think you were relying on an implementation detail of the interpreter that was never assured to have backwards compatibility. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:02:56 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 21:02:56 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562360576.34.0.601112273503.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > To add to the confusion, the treatment of "if __debug__:" and "if not __debug__:" is now asymmetric: After the code in PR 14116 this becomes: 5 0 LOAD_GLOBAL 0 (print) 2 LOAD_CONST 1 ('debug') 4 CALL_FUNCTION 1 6 POP_TOP 8 JUMP_ABSOLUTE 30 7 10 LOAD_GLOBAL 0 (print) 12 LOAD_CONST 2 ('not debug') 14 CALL_FUNCTION 1 16 POP_TOP 8 18 JUMP_ABSOLUTE 30 9 20 LOAD_GLOBAL 0 (print) 22 LOAD_CONST 3 ('NOT DEBUG') 24 CALL_FUNCTION 1 26 POP_TOP 28 JUMP_FORWARD 8 (to 38) 11 >> 30 LOAD_GLOBAL 0 (print) 32 LOAD_CONST 4 ('DEBUG') 34 CALL_FUNCTION 1 36 POP_TOP >> 38 LOAD_CONST 0 (None) 40 RETURN_VALUE and 4 0 JUMP_ABSOLUTE 12 5 2 LOAD_GLOBAL 0 (print) 4 LOAD_CONST 1 ('debug') 6 CALL_FUNCTION 1 8 POP_TOP 10 JUMP_FORWARD 8 (to 20) 7 >> 12 LOAD_GLOBAL 0 (print) 14 LOAD_CONST 2 ('not debug') 16 CALL_FUNCTION 1 18 POP_TOP 9 >> 20 LOAD_GLOBAL 0 (print) 22 LOAD_CONST 3 ('NOT DEBUG') 24 CALL_FUNCTION 1 26 POP_TOP 28 JUMP_FORWARD 8 (to 38) 11 30 LOAD_GLOBAL 0 (print) 32 LOAD_CONST 4 ('DEBUG') 34 CALL_FUNCTION 1 36 POP_TOP >> 38 LOAD_CONST 0 (None) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:07:01 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 05 Jul 2019 21:07:01 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562360821.98.0.779728775472.issue37500@roundup.psfhosted.org> Tim Peters added the comment: I hate this change :-( The code generated for something like this today: def f(): if 0: x = 1 elif 0: x = 2 elif 1: x = 3 elif 0: x = 4 else: x = 5 print(x) is the same as for: def f(): x = 3 print(x) No tests or jumps at all. That made the optimization an extremely efficient, and convenient, way to write code with the _possibility_ of using different algorithms by merely flipping a 0 and 1 or two in the source code, with no runtime costs at all (no cycles consumed, no bytecode bloat, no useless unreferenced co_consts members, ...). Also a zero-runtime-cost way to effectively comment out code blocks (e.g., I've often put expensive debug checking under an "if 1:" block). ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:07:57 2019 From: report at bugs.python.org (Paul Moore) Date: Fri, 05 Jul 2019 21:07:57 +0000 Subject: [issue37369] Issue with pip in venv on Powershell in Windows In-Reply-To: <1562358826.14.0.25040623104.issue37369@roundup.psfhosted.org> Message-ID: Paul Moore added the comment: On Fri, 5 Jul 2019 at 21:33, Steve Dower wrote: > Yeah. We probably need to be clear about which approaches are actually supported and which ones are not. > > Ultimately though, I think this is a situation where the breakage is forced upon us (by the operating system), and so fixing the behaviour of our built-in functionality pretty clearly outweight preserving the assumptions made by third-parties (especially since those assumptions are going to break). Well, given that this is an issue specific to the store distribution of Python, I'd say that it's the release of the store build that forces it on us, not the OS, and releasing the store build was our choice, so if we did so with the store build not meeting existing implicit (i.e. undocumented, I agree) contracts, then we made that choice. I think it was the right choice, because the store distribution is a huge plus, but I do think we should be cautious about impacting the existing user base simply because of a very new, and explicitly documented as "still experimental" build. (Yes, I'm still a bit sore about the hassle involved in getting virtualenv to work - although the final resolution to that issue was IMO clean and a huge improvement on the previous status quo, so I'm not *really* sore :-)) > > IMO, we should bite the bullet here and actually document the > > interfaces involved in virtual environments, so that tools have a > > stable contract to work with. That way we'd limit the need for people > > to rely on undocumented behaviour in the first place. > > I feel like I've made this argument before, but I suspect if we'd documented them prior to this change, we'd now have no choice but to remain broken. Hardly. We would simply have had to document the changed behaviour and follow our existing transition/compatibility processes. Documenting things doesn't lock them in stone, it just requires us to give due consideration to our users when we change things. Conversely, *not* documenting things makes it easier for us to change things, at the cost of not giving users supported ways to do certain things that they may still need to do. > The interfaces that should be documented are "-m venv", venv.VenvBuilder, and the activation scripts, none of which had to change. But if we start making promises about how "python.exe" actually behaves in a venv then we're going to paint ourselves into a corner very quickly - the venv approach just doesn't scale well to the range of systems people use. (Obligatory mention that PEP 582 would have avoided this whole mess by not requiring us to duplicate python.exe anywhere. But it just wasn't meant to be.) I assume you're missing my key point here (not unlikely, as I didn't state it explicitly - I guess I'm relying on undocumented information myself ;-)). The point here is that venv doesn't exist in a vacuum, before it existed, virtualenv was the standard way to produce virtual environments. And because neither virtualenv nor venv document any of their internal details, they are plagued with incompatibilities, and work badly together. As a result, tools like pipenv, or pew, or pipx, can't support both but end up picking just one - and because of backward compatibility requirements, they pick virtualenv, which has significantly hindered adoption of venv, which is (for hopefully obvious reasons) a substantially more robust solution. It may be that it's just too late to worry about this, and we should simply accept that tools will be dropping Python 2 support very soon now, at which point there's no real reason to continue using virtualenv (apart from no-one having the time to make the change, but if virtualenv adopts venv as its internal mechanism we can get around that). But personally, I'd rather not rely on an assumption like that, just yet (maybe in 3.9?). (Side issue, I don't really see the relevance of PEP 582 here, as I don't think it's something that tools like tox and pipenv could replace virtual environments with - but maybe I'm wrong, if so the arguments for PEP 582 didn't really get that point across). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:11:34 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 21:11:34 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562361094.52.0.951238286102.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > No tests or jumps at all. That made the optim... I understand that, but we would need a way of reporting syntax errors in blocks even if they will not be executed. Although I agree with your analysis, correctness should be prioritized over optimization, IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:13:24 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 21:13:24 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562361204.54.0.875818030256.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: CPython being the reference implementation of Python, people could interpret that this optimization is part of the language and its behavior should be mirror in every other implementation. That's why under my understanding, correctness should always be prioritized. Tim, do you have any other way that can remove the bytecode but reporting SyntaxErrors for these blocks? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:17:13 2019 From: report at bugs.python.org (Mark Williams) Date: Fri, 05 Jul 2019 21:17:13 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562361433.5.0.23697565365.issue37500@roundup.psfhosted.org> Mark Williams added the comment: As a user of Python who maintains at least one large code base, I rely on coverage to limit the damage my changes can inflict. Some of the code I maintain uses __debug__; I would not expect moving to 3.8 to be the cause of reduced line coverage in that project, and I would be baffled by the difference between a coverage report from 3.8 and < 3.8. Please don't break a package as fundamental as coverage. Can the compiler be changed to not emit bytecode under some circumstances? ---------- nosy: +Mark.Williams _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:28:46 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 21:28:46 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562362126.62.0.630668120363.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I have opened a thread in Python dev: https://mail.python.org/archives/list/python-dev at python.org/thread/RHP4LTM4MSTAPJHGMQGGHERYI4PZR23R/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:32:39 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 05 Jul 2019 21:32:39 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562362359.25.0.812616860059.issue37500@roundup.psfhosted.org> Tim Peters added the comment: There's "correctness" that matters and "correctness" that's merely pedantic ;-) CPython has acted the current way for about 15 years (since 2.4 was released), and this is the first time anyone has raised an objection. That's just not enough harm to justify tossing out well over a decade of "facts on the ground". Practicality beats purity. I, of course, have no objection to detecting syntax errors in dead code. It's the disruptive _way_ that's being done that's objectionable. I don't have a better way in mind, nor the bandwidth to try to dream one up. But, at heart, I'd rather it never "get fixed" than get fixed at this cost. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:33:18 2019 From: report at bugs.python.org (Dmitriy) Date: Fri, 05 Jul 2019 21:33:18 +0000 Subject: [issue37512] Error in the documentation about string concatenation Message-ID: <1562362398.93.0.443192979272.issue37512@roundup.psfhosted.org> New submission from Dmitriy : There is an error in documentation about string concatenation: https://docs.python.org/3/library/stdtypes.html --- Common Sequence Operations [...] 6. Concatenating immutable sequences always results in a new object. This means that building up a sequence by repeated concatenation will have a quadratic runtime cost in the total sequence length. To get a linear runtime cost, you must switch to one of the alternatives below: - if concatenating str objects, you can build a list and use str.join() at the end or else write to an io.StringIO instance and retrieve its value when complete --- It is not true for str objects anymore. Example using timeit module shows that time grows linearly: >>> timeit('a+="a"', setup='a=""', number=10000) 0.0005754000012530014 >>> timeit('a+="a"', setup='a=""', number=100000) 0.005819800004246645 But for bytes it is still right: >>> timeit('a+=b"a"', setup='a=b""', number=10000) 0.0017669000080786645 >>> timeit('a+=b"a"', setup='a=b""', number=100000) 0.20758410000416916 ---------- assignee: docs at python components: Documentation messages: 347390 nosy: dmitriym, docs at python priority: normal severity: normal status: open title: Error in the documentation about string concatenation type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:34:39 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Jul 2019 21:34:39 +0000 Subject: [issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1562362479.1.0.58328134874.issue37130@roundup.psfhosted.org> Brett Cannon added the comment: Thinking about this a bit, I my gut says having Path('.').name == '.' makes more sense than returning ''. My reasoning is that in any case where there's a single value -- e.g. Path('spam') -- you end up with the part returned in `name`. That suggests to me that '.' isn't any more special or ambiguous than 'spam' or '..'. Antoine, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:45:51 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 21:45:51 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562363151.22.0.902959338201.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > CPython has acted the current way for about 15 years (since 2.4 was released), and this is the first time anyone has raised an objection. Although I tend to agree with your words, I have to insist that correctness in the reference implementation is very important, is not just a "pragmatic" thing. For example, under this argument, we could say that it does not matter if def f(): if 0: yield should be or not a generator. But that changes things massively. It happens that it will always be a generator due to how we check for that property, but under this argument is ok if it is undefined. This also makes the thing even more confusing as there are some syntax consequences of unreachable code, but no others. (Like the bytecode for that yield will be gone!!. Is impossible to know if that is a generator or not from the bytecode). I have seen many people confused already and it makes very difficult to guess what are the consequences of code that is unreachable at runtime. For these reasons I think consistency is key. I agree that the way this is done is not ideal, but we could not find a better way to do this :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:53:14 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2019 21:53:14 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562363594.1.0.848998696355.issue37500@roundup.psfhosted.org> Terry J. Reedy added the comment: I agree with Tim. Detect SyntaxErrors in dead code if you can, but don't change the current code deletion, at least not without proper discussion (which Pablo just started on pydev). The latter is what I consider to be a release blocker needing release manager consideration. I see optimizing away 'if __debug__: ...' clauses, when __debug__ is False (and 0) as currently documented language behavior, not a 'deep implementation detail'. https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement Assert statements are equivalent to 'if __debug__' clauses. They are optimized away when __debug__ is False, when python is run with -0. Given that False and True are 0 and 1 with extra behavior, it is not a stretch to infer that 'if 0:' clauses are optimized away, as they currently are (or were, until PR 13332). To my mind, PR 13332 is either an enhancement or a bugfix + additional regressive behavior change that I do not believe is absolutely necessary. In either case, I don't think it should have been applied as is in b2. But that is past. I think it should be either reverted or fixed before b3 to only detect SyntaxErrors without leaving code that should be removed. I don't know how close PR 14116 comes to this. ---------- nosy: +lukasz.langa, terry.reedy -Mark.Williams, p-ganssle, scoder, tim.peters priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:53:46 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 05 Jul 2019 21:53:46 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562363626.36.0.418409271819.issue37500@roundup.psfhosted.org> Paul Ganssle added the comment: > CPython has acted the current way for about 15 years (since 2.4 was released), and this is the first time anyone has raised an objection. This is the expected result of fixing a bug that has been open since 2008 (11 years), which itself was noticed independently, also in 2008 (#1875 and #1920, respectively). I also independently discovered the same issue last year when writing some tests for IPython, and I suspect others have hit it as well and shrugged it off because it's not that hard to work around and there was an open issue for it. I will also note that this "not raising a SyntaxError" behavior is a CPython-specific implementation detail (and is quite fragile to boot), note: $ cat syntax_err.py if 0: return $ python syntax_err.py # Works on 2.7 and <3.8 $ pypy syntax_err.py # Same behavior with pypy3.6 File "syntax_err.py", line 2 return ^ SyntaxError: return outside function I am not sure if pypy emits the same bytecode, but I think that > Please don't break a package as fundamental as coverage. I think it's a bit melodramatic to consider this "breaking" coverage, particularly since I would find it very weird if any code under an "if 0" were simply *ignored* by coverage, and I would probably report it as a bug. It changes the behavior, sure, but this was code that is legitimately not covered. I don't think it's a big problem to add `# pragma: nocover` to code blocks you don't want covered. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:55:34 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 05 Jul 2019 21:55:34 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562363734.83.0.736035842311.issue37478@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks for the feedback terry. Do you think it would be helpful to work through some of the other commonly used functions in OS, adding condensed explanations of exceptions which can be raised? In general, it seems quite useful for users to be able to figure out the exceptions in which they may need to account for when using each of the functions. Also, should the naming convention be "method" or "function"? The two roughly refer to the same thing, but as far as I'm aware, the convention in Python is to refer to them as "functions". I'm used to calling them "methods" from my prior experience with OOP, so that's why I did so in my initial condensed description. On the docs for OS, there seems to be a few instances where the term "method" is used. Personally, I don't mind the usage of either term, at the end of the day it's just semantics. But for the purposes of documentation, consistency seems preferable. Should I create a PR for replacing the mentions of "method" with "function"? Since it's quite minor and in the same OS.rst file, should I link it to this issue instead of creating a new one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:56:53 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Jul 2019 21:56:53 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562363813.29.0.77179903289.issue37500@roundup.psfhosted.org> Ned Deily added the comment: For the record, this change in behavior was originally backported to the 3.7 branch and appeared in 3.7.4rc1 and rc2. Now that the compatibility issues are clearer, it will be reverted for 3.7.4 final and will not be considered for future 3.7.x releases. ---------- versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:58:53 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 21:58:53 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562363933.58.0.102714194945.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > In either case, I don't think it should have been applied as is in b2 Just to clarify: this was added before beta2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:02:11 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 22:02:11 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562364131.34.0.008167395926.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > I see optimizing away 'if __debug__: ...' clauses, when __debug__ is False (and 0) as currently documented language behavior, not a 'deep implementation detail'. https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement I don't think you can conclude that is documented with this argument. What's documented is what happens with the assert statement, not with arbitrary dead code. The link between the two is at least an interpretation, not an explicitly documented think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:08:19 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 05 Jul 2019 22:08:19 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562364499.85.0.873667794176.issue37478@roundup.psfhosted.org> Change by Kyle Stanley : ---------- keywords: +patch pull_requests: +14425 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14611 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:14:48 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 05 Jul 2019 22:14:48 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562364888.07.0.30258463593.issue37478@roundup.psfhosted.org> Kyle Stanley added the comment: Actually, I don't believe that I have the appropriate permissions to manually specify reviewers for PRs in the cpython repository. Do I have to be added a member of the Python organization on GitHub for this? I'm registered as a PSF contributing member, but I don't think that alone translates to any repository permissions. Could I be added as a member with low level permissions such as editing issue labels without being granted commit? This would also be helpful for adding "skip news" labels on any other issues, I've been doing a decent amount of PR reviews recently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:28:32 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 05 Jul 2019 22:28:32 +0000 Subject: [issue37510] argparse removing more "--" than it should In-Reply-To: <1562359530.82.0.205006034858.issue37510@roundup.psfhosted.org> Message-ID: <1562365712.73.0.387331859501.issue37510@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:31:45 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 22:31:45 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562365905.82.0.112549135633.issue37500@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +14426 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:32:02 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 05 Jul 2019 22:32:02 +0000 Subject: [issue37512] Error in the documentation about string concatenation In-Reply-To: <1562362398.93.0.443192979272.issue37512@roundup.psfhosted.org> Message-ID: <1562365922.71.0.959996768848.issue37512@roundup.psfhosted.org> Eric V. Smith added the comment: It's my understanding that this is a quality of implementation issue, and that in other (non-CPython) implementations, the run time for repeated concatenation may indeed be quadratic. The optimization in CPython relies on knowing the reference count is 1. If CPython were to switch away from reference counting, I would expect the behavior of repeated concatenation to be quadratic again. I'm not sure if the deserves a documentation note or not. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:37:19 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 05 Jul 2019 22:37:19 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562366239.27.0.861460686304.issue37500@roundup.psfhosted.org> Tim Peters added the comment: > This is the expected result of fixing a bug that has been > open since 2008 It's the expected result of fixing a bug _by_ eliminating the optimization entirely. It's not an expected result of merely fixing the bug. It's quite obviously _possible_ to note that if 0: return is forbidden at module level, yet not emit any bytecode for it. Indeed, it's so obvious that everyone here did it in their head without even noticing they had done so ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:39:16 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 22:39:16 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562366356.24.0.258769473893.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Tim, you made very good points in you email to Python-dev. I am convinced that the better thing to do at this pointis to revert this until we can think this a bit more :) I have made a PR to revert the change, could you review it, please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:44:42 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 05 Jul 2019 22:44:42 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1562366682.18.0.531917374665.issue17535@roundup.psfhosted.org> Tal Einat added the comment: I've made some significant improvements in several aspects: 1. Scrolling: performance and behavior 2. Selection entire lines by dragging over line numbers 3. Color config: a separate highlighting setting for line numbers, which takes effect immediately I've also remove the Tk version >= 8.5 check, and replaced the hack for getting font updates to take immediate effect. As far as I can see, the only things left to resolve are: 1. Clear, consistent behavior regarding whether line numbers are enabled by default, and when and how this default is changed. 2. Menu item location, type (boolean flag?) and correctly reflecting the state of each window. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:49:24 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 22:49:24 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562366964.35.0.863861669131.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > It's the expected result of fixing a bug _by_ eliminating the optimization entirely. Using jumps is not removing the optimization entirely, is just a weaker and more incomplete way of doing the same. The optimization introduced the bug in the first place. If this was done today it would have been reverted. The only thing legitimating the "error" is time. But this is basically elevating a bug to a feature, making this even more relevant than ever: https://xkcd.com/1172/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 19:23:00 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Jul 2019 23:23:00 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562368980.08.0.596118975617.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think I have found a simple way to make everyone happy: we can add a new field to the compiler that tells it to not emit bytecode. In this way we can detect errors by walking the blocks but no bytecode will be emitted. I have updated PR 14612 to use this approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:05:56 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 06 Jul 2019 00:05:56 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562371556.13.0.505749030488.issue37500@roundup.psfhosted.org> Tim Peters added the comment: > Using jumps is not removing the optimization > entirely, is just a weaker and more incomplete > way of doing the same. Sorry, I'm afraid I have no idea what that means. The generated code before and after was wildly different, as shown in Ned's original report here. In what possible sense was his "if 0:" being "optimized" if it generated code to load 0 onto the stack, then POP_JUMP_IF_FALSE, and then jumped over all the code generated for the dead block? The generated code after is nearly identical if I replace his "if 0:" with "if x:" (which the compiler takes to mean a global or builtin about whose truthiness it knows nothing at all). Indeed, the only difference in the byte code is that instead of doing a LOAD_CONST to load 0, it does a LOAD_GLOBAL to load x. So, to my eyes, absolutely nothing of the optimization remained. At least not in the example Ned posted here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:08:30 2019 From: report at bugs.python.org (Jorge L. Martinez) Date: Sat, 06 Jul 2019 00:08:30 +0000 Subject: [issue37510] argparse removing more "--" than it should In-Reply-To: <1562359530.82.0.205006034858.issue37510@roundup.psfhosted.org> Message-ID: <1562371710.88.0.899371755179.issue37510@roundup.psfhosted.org> Jorge L. Martinez added the comment: To be clear, my opinion is that a single call of parse_args() should only ever remove the first "--". Right now, it seems that it removes the first of each argument group, as determined by nargs, I guess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:09:10 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 06 Jul 2019 00:09:10 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562371750.81.0.296451084958.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > So, to my eyes, absolutely nothing of the optimization remained. At least not in the example Ned posted here. This is because his example did not include the changes in PR14116 that implemented that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:21:07 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 06 Jul 2019 00:21:07 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562372467.72.0.959257780574.issue37500@roundup.psfhosted.org> Tim Peters added the comment: > we could say that it does not matter if > > def f(): > if 0: > yield > > should be or not a generator Slippery slope arguments play better if they're made _before_ a decade has passed after the slope was fully greased. There's nothing accidental about how `yield` behaves here. I wrote the original generator PEP, and very deliberately added these to its doctests (in test_generators.py): """ >>> def f(): ... if 0: ... yield >>> type(f()) >>> def f(): ... if 0: ... yield 1 >>> type(f()) >>> def f(): ... if "": ... yield None >>> type(f()) """ Any alternate implementation that decided that whether "it's a generator" depended on optimizations would likely fail at least one of those tests. It was intended to be solely a compile-time decision, based purely on syntactic analysis. So I've seen no reason to believe - or expect - that the damage here goes - or will ever go - deeper than that some dead code isn't raising compile-time errors in some rare cases (statements allowed only at function level being used in dead code outside function level). Which should be fixed, if possible. But, as damage goes - sorry! - it just seems minimal to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:41:33 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 06 Jul 2019 00:41:33 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562373693.21.0.377484389962.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Which should be fixed, if possible. But, as damage goes - sorry! - it just seems minimal to me. I think I failed to express myself correctly there :( I have absolutely no problem with the way that behaves currently, I just wanted to point out the possible differences and view points regarding optimization and how "implementation details" percolate to observable behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 20:53:00 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 06 Jul 2019 00:53:00 +0000 Subject: [issue37367] octal escapes applied inconsistently throughout the interpreter and lib In-Reply-To: <1561146368.97.0.686299796922.issue37367@roundup.psfhosted.org> Message-ID: <1562374380.59.0.512587842456.issue37367@roundup.psfhosted.org> Jeffrey Kintscher added the comment: Here is the problematic code in _PyBytes_DecodeEscape in Objects/bytesobject.c: c = s[-1] - '0'; if (s < end && '0' <= *s && *s <= '7') { c = (c<<3) + *s++ - '0'; if (s < end && '0' <= *s && *s <= '7') c = (c<<3) + *s++ - '0'; } *p++ = c; c is an int, and p is a char pointer to the new bytes object's string buffer. For b'\407', c gets correctly calculated as 263 (0x107), but the upper bits are lost when it gets recast as a char and stored in the location pointed to by p. Hence, b'\407' becomes b'\x07' when the object is created. IMO, this should raise "ValueError: bytes must be in range(0, 256)" instead of silently throwing away the upper bits. I will work on a PR. I also took a look at how escaped hex values are handled by the same function. It may seem at first glance that >>> b'\x107' b'\x107' is returning the hex value 0x107, but in reality it is returning '\x10' as the first character and '7' as the second character. While visually misleading, it is syntactically and semantically correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 21:11:25 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 06 Jul 2019 01:11:25 +0000 Subject: [issue37510] argparse removing more "--" than it should In-Reply-To: <1562359530.82.0.205006034858.issue37510@roundup.psfhosted.org> Message-ID: <1562375485.42.0.146872801201.issue37510@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 21:14:12 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 06 Jul 2019 01:14:12 +0000 Subject: [issue37512] Error in the documentation about string concatenation In-Reply-To: <1562362398.93.0.443192979272.issue37512@roundup.psfhosted.org> Message-ID: <1562375652.92.0.434565471498.issue37512@roundup.psfhosted.org> Steven D'Aprano added the comment: Eric is correct that this is a CPython optimization, it is not a language feature. Furthermore, it is an optimization that can be affected by rather subtle factors such as the operating system memory management. Here is a thread demonstrating that code that relied on this optimization ran fast on Linux and slow on Windows, literally hundreds of times slower than other tools: https://mail.python.org/archives/list/python-dev at python.org/thread/EQO6HDZXHFCP4DBEE5Q7MYLHPJMGJ7DQ/ If you prefer the old mailman archives, here are a few relevant posts: https://mail.python.org/pipermail/python-dev/2009-August/091125.html https://mail.python.org/pipermail/python-dev/2009-September/091582.html https://mail.python.org/pipermail/python-dev/2009-September/091592.html Best practice is to *not* rely on this optimization, but to use str.join. That ensures that: - your code remains fast if run on alternate implementations; - your code remains fast if the OS memory management changes; - your code remains fast if you change your code slightly. For example, I expect both of the following to show the documented quadratic behaviour: - Prepending instead of appending - keeping two or more references to the string being appended to partials = [] current = '' for s in list_of_strings: partials.append(current) current += s There may be others. Perhaps we ought to document this optimization specifically so we can suggest that it is intended for improving performance of casual scripts, and that *best practice* for professional quality code remains str.join. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 21:21:40 2019 From: report at bugs.python.org (paul j3) Date: Sat, 06 Jul 2019 01:21:40 +0000 Subject: [issue37510] argparse removing more "--" than it should In-Reply-To: <1562359530.82.0.205006034858.issue37510@roundup.psfhosted.org> Message-ID: <1562376100.46.0.0706808037235.issue37510@roundup.psfhosted.org> paul j3 added the comment: There are earlier bug/issues about the '--'. Also look at the parser code itself. Keep in mind that parsing is done in two passes - once to identify flags versus arguments ('O/A') and then to allocate strings to arguments. I don't recall when '--' is being handled, possibly in both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:11:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Jul 2019 02:11:56 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1562379116.34.0.0041911995419.issue37221@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue. Cython 0.29.11 doesn't work on Python 3.8 beta2. Installation fails with a compiler error: Cython-0.29.11/Cython/Plex/Scanners.c:7244:274: error: macro "__Pyx_PyCode_New" requires 16 arguments, but only 15 given Cython commit 0d88839168013fd69350d31eaee5514cd2f727b9 is not part of Cython tag 0.29.11. Stefan: it seems like a new Cython release is needed. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 22:14:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 06 Jul 2019 02:14:02 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1562379242.58.0.179605099154.issue37221@roundup.psfhosted.org> STINNER Victor added the comment: I created https://github.com/cython/cython/issues/3034 "Cython doesn't work on Python 3.8 beta2" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:03:16 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 06 Jul 2019 04:03:16 +0000 Subject: [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562385796.45.0.802415089943.issue37508@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 39a5d17a7f1387582eb484422df450bc09a5543e by Benjamin Peterson (Hai Shi) in branch 'master': closes bpo-37508: Fix name of type in memory.rst. (GH-14604) https://github.com/python/cpython/commit/39a5d17a7f1387582eb484422df450bc09a5543e ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:03:31 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 04:03:31 +0000 Subject: [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562385811.08.0.154651523075.issue37508@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14427 pull_request: https://github.com/python/cpython/pull/14613 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:03:37 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 04:03:37 +0000 Subject: [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562385817.85.0.048958085457.issue37508@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14428 pull_request: https://github.com/python/cpython/pull/14614 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:08:43 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 04:08:43 +0000 Subject: [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562386123.88.0.632142448742.issue37508@roundup.psfhosted.org> miss-islington added the comment: New changeset af5e62e9e2b56017d3716fce40d959adfb753554 by Miss Islington (bot) in branch '3.7': closes bpo-37508: Fix name of type in memory.rst. (GH-14604) https://github.com/python/cpython/commit/af5e62e9e2b56017d3716fce40d959adfb753554 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:10:00 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 04:10:00 +0000 Subject: [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562386200.47.0.878682508401.issue37508@roundup.psfhosted.org> miss-islington added the comment: New changeset cf294c48e4f97117f708c116362208d28ebfe08f by Miss Islington (bot) in branch '3.8': closes bpo-37508: Fix name of type in memory.rst. (GH-14604) https://github.com/python/cpython/commit/cf294c48e4f97117f708c116362208d28ebfe08f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:28:06 2019 From: report at bugs.python.org (hai shi) Date: Sat, 06 Jul 2019 04:28:06 +0000 Subject: [issue37513] Fix a type error in ctypes.rst Message-ID: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> New submission from hai shi : Python 3.9.0a0 (heads/master-dirty:80097e0, Jul 6 2019, 02:14:54) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> class POINT(Structure): ... _fields_ = [("x", c_int), ... ("y", c_int)] ... >>> POINT(1, 2, 3) Traceback (most recent call last): File "", line 1, in TypeError: too many initializers and the init function in: https://github.com/python/cpython/blob/master/Modules/_ctypes/_ctypes.c#L4335 ---------- assignee: docs at python components: Documentation messages: 347419 nosy: docs at python, shihai1991 priority: normal severity: normal status: open title: Fix a type error in ctypes.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:29:45 2019 From: report at bugs.python.org (hai shi) Date: Sat, 06 Jul 2019 04:29:45 +0000 Subject: [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562387385.8.0.538405573356.issue37513@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14429 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:34:29 2019 From: report at bugs.python.org (hai shi) Date: Sat, 06 Jul 2019 04:34:29 +0000 Subject: [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562387669.02.0.647577134979.issue37513@roundup.psfhosted.org> hai shi added the comment: or the value error replace type error in struct_init(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:05:52 2019 From: report at bugs.python.org (Eryk Sun) Date: Sat, 06 Jul 2019 06:05:52 +0000 Subject: [issue36085] Enable better DLL resolution In-Reply-To: <1550881737.58.0.129017089721.issue36085@roundup.psfhosted.org> Message-ID: <1562393152.11.0.898182886715.issue36085@roundup.psfhosted.org> Eryk Sun added the comment: Steve, in what's new and the installer, you've referenced KB2533625 instead of KB2533623. Do we have to open a new issue for this minor search and replace fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:22:31 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 06:22:31 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562394151.85.0.328829360889.issue37149@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +14430 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14616 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:32:00 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 06:32:00 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562394720.2.0.761936101933.issue37149@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 45bc61b97178b27ae05bd3eb95481bf0325795bb by Terry Jan Reedy in branch 'master': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/45bc61b97178b27ae05bd3eb95481bf0325795bb ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:32:05 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 06:32:05 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562394725.43.0.0805825967818.issue37149@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14431 pull_request: https://github.com/python/cpython/pull/14617 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:32:13 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 06:32:13 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562394733.79.0.94527593378.issue37149@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14432 pull_request: https://github.com/python/cpython/pull/14618 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:35:41 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 06:35:41 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562394941.22.0.206241165449.issue37149@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14433 pull_request: https://github.com/python/cpython/pull/14619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:37:42 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 06:37:42 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562395062.21.0.598018955754.issue37149@roundup.psfhosted.org> miss-islington added the comment: New changeset d2c5677a4f3be7de572def0a914b96385d7982b0 by Miss Islington (bot) in branch '3.7': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/d2c5677a4f3be7de572def0a914b96385d7982b0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:38:33 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 06:38:33 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562395113.73.0.0857633670515.issue37149@roundup.psfhosted.org> miss-islington added the comment: New changeset ea9c8caa13977561787bf2de430f18c2031dde0d by Miss Islington (bot) in branch '3.8': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/ea9c8caa13977561787bf2de430f18c2031dde0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:45:40 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 06:45:40 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562395540.06.0.888282240579.issue37149@roundup.psfhosted.org> Terry J. Reedy added the comment: Ned, PR-14616 replaces a dead link to the most important online Tkinter reference. Please consider cherry-picking the 3.7 backport (already merged) into the upcoming 3.7.4. Many people are lost without the reference, as they find reading the tcl/tk reference much harder. (The question has come up on Stackoverflow also.) I checked that the new link in the rebuilt revised page works. The longer term solution is a complete in-house doc. I have some ideas, which I will share later, for something more compact than the Shipman work (168 pages for the pdf). Ned, a separate question is whether the link fix or a local replacement can be backported to 3.6. It is like having half the tkinter doc, the part covering tk widgets, removed. ---------- nosy: +benjamin.peterson, larry, lukasz.langa, ned.deily -gpolo, miss-islington priority: normal -> release blocker stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:52:12 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 06:52:12 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562395932.99.0.334994984371.issue37149@roundup.psfhosted.org> Terry J. Reedy added the comment: The 2.7 backport shows a clean 2.7 diff, Travis merged and passed it, but required Appveyor just says 'non-mergeable' with no details, and no way to discover why or to cleanly retry. I will try close and open once. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 03:00:46 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 07:00:46 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562396446.5.0.0670276981975.issue37149@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14434 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 03:04:56 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 07:04:56 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562396696.39.0.484536571994.issue37149@roundup.psfhosted.org> miss-islington added the comment: New changeset 55270d09c212654c4f1bc9ebf9a0081c169a6d12 by Miss Islington (bot) in branch '2.7': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/55270d09c212654c4f1bc9ebf9a0081c169a6d12 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 07:32:57 2019 From: report at bugs.python.org (Dmitriy) Date: Sat, 06 Jul 2019 11:32:57 +0000 Subject: [issue37512] Error in the documentation about string concatenation In-Reply-To: <1562362398.93.0.443192979272.issue37512@roundup.psfhosted.org> Message-ID: <1562412777.68.0.0703333098978.issue37512@roundup.psfhosted.org> Dmitriy added the comment: Yes, optimization is really not working in case of prepending. In case of multiple references I couldn't get quadratic time grow. Concerning the Windows, yes, the optimization may be not always efficient: >>> timeit('a+="a"', setup='a=""', number=10000) 0.0011690999999984797 >>> timeit('a+="a"', setup='a=""', number=100000) 0.01114439999999206 >>> timeit('a+="a"', setup='a=""', number=1000000) 0.10783829999999739 >>> timeit('a+="a"', setup='a=""', number=10000000) 5.636337499999996 As I understand this is the case related to OS memory management. But on Linux I got fairly predictable results: >>> timeit('a+="a"', setup='a=""', number=10000) 0.0006532900151796639 >>> timeit('a+="a"', setup='a=""', number=100000) 0.006340583000564948 >>> timeit('a+="a"', setup='a=""', number=1000000) 0.06438201799755916 >>> timeit('a+="a"', setup='a=""', number=10000000) 0.6354853530065157 >>> timeit('a+="a"', setup='a=""', number=100000000) 6.365498173021479 Also I have found the mention about optimization in PEP8 https://www.python.org/dev/peps/pep-0008/#programming-recommendations So maybe it would be nice to add some notes or reference to the part of upper PEP in docs about optimizations in CPython to make it more clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 08:35:29 2019 From: report at bugs.python.org (Tal Einat) Date: Sat, 06 Jul 2019 12:35:29 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562416529.79.0.672472444877.issue26806@roundup.psfhosted.org> Tal Einat added the comment: New changeset fcf1d003bf4f0100c9d0921ff3d70e1127ca1b71 by Tal Einat in branch 'master': bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944) https://github.com/python/cpython/commit/fcf1d003bf4f0100c9d0921ff3d70e1127ca1b71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 08:35:38 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 12:35:38 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562416538.32.0.884073318374.issue26806@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14435 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14621 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 08:35:45 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 12:35:45 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562416545.76.0.39992513228.issue26806@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14436 pull_request: https://github.com/python/cpython/pull/14622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 08:54:21 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 12:54:21 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562417661.01.0.797514062763.issue26806@roundup.psfhosted.org> miss-islington added the comment: New changeset d4af55391f56286ab8d478591017174a5a0a5ce2 by Miss Islington (bot) in branch '3.8': bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944) https://github.com/python/cpython/commit/d4af55391f56286ab8d478591017174a5a0a5ce2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 08:56:13 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 12:56:13 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562417773.6.0.199769910044.issue26806@roundup.psfhosted.org> miss-islington added the comment: New changeset d666217b26c373784761e3a84f243f02682bccb1 by Miss Islington (bot) in branch '3.7': bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944) https://github.com/python/cpython/commit/d666217b26c373784761e3a84f243f02682bccb1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 08:56:54 2019 From: report at bugs.python.org (Tal Einat) Date: Sat, 06 Jul 2019 12:56:54 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562417814.33.0.0448471849777.issue26806@roundup.psfhosted.org> Change by Tal Einat : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 09:23:10 2019 From: report at bugs.python.org (=?utf-8?q?Lanteri_J=C3=A9r=C3=B4me?=) Date: Sat, 06 Jul 2019 13:23:10 +0000 Subject: [issue37514] french translation Spelling mistake on datetime python's library documentation online Message-ID: <1562419390.4.0.81704201562.issue37514@roundup.psfhosted.org> New submission from Lanteri J?r?me : "Un objet avis? est utilis? pour repr?sent? un moment" corrected should be: "Un objet avis? est utilis? pour repr?senter un moment" Comment for help French translator: Vous pouvez tester en rempla?ant le verbe suspect? par un verbe du troisi?me groupe, tel que "faire": "Un objet avis? est utilis? pour faire..." (?a fonctionne, il n'est pas conjugu?, par ce que on ne pourrait pas dire: "Un objet avis? est utilis? pour fait..."). C'est une astuce facile ? retenir. ---------- assignee: docs at python components: Documentation messages: 347432 nosy: docs at python, jerome_l priority: normal severity: normal status: open title: french translation Spelling mistake on datetime python's library documentation online versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 09:33:48 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 06 Jul 2019 13:33:48 +0000 Subject: [issue37514] french translation Spelling mistake on datetime python's library documentation online In-Reply-To: <1562419390.4.0.81704201562.issue37514@roundup.psfhosted.org> Message-ID: <1562420028.76.0.385013642637.issue37514@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 09:46:53 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 06 Jul 2019 13:46:53 +0000 Subject: [issue37514] french translation Spelling mistake on datetime python's library documentation online In-Reply-To: <1562419390.4.0.81704201562.issue37514@roundup.psfhosted.org> Message-ID: <1562420813.81.0.627304817979.issue37514@roundup.psfhosted.org> Paul Ganssle added the comment: @Lanteri If you'd like you can make a pull request against the French documentation here: https://github.com/python/python-docs-fr The relevant file is library/datetime.po It also seems like the French documentation has its own issue tracker, here: https://github.com/python/python-docs-fr/issues I will leave it to @mdk as to whether this issue should be migrated over there or not. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 11:58:15 2019 From: report at bugs.python.org (Jorge L. Martinez) Date: Sat, 06 Jul 2019 15:58:15 +0000 Subject: [issue37510] argparse removing more "--" than it should In-Reply-To: <1562359530.82.0.205006034858.issue37510@roundup.psfhosted.org> Message-ID: <1562428695.47.0.794953143365.issue37510@roundup.psfhosted.org> Jorge L. Martinez added the comment: > There are earlier bug/issues about the '--'. Yes, there are: https://bugs.python.org/issue9571 https://bugs.python.org/issue22223 https://bugs.python.org/issue14364 But this one seems separate. Though they're related, they don't seem like duplicates, so that's why I thought I'd make this one. > Also look at the parser code itself. Keep in mind that parsing is done in two passes - once to identify flags versus arguments ('O/A') and then to allocate strings to arguments. I don't recall when '--' is being handled, possibly in both. I'm not sure what your point is here. I did take a quick look at the code, yesterday. I think the identification part you mention is done right. It marks 'O/A' as you mention. Then, when it sees "--", it marks it "-", and the rest of the arguments are marked as "A". I didn't look at the start of the code of the second pass or how it is concretely linked to the first pass. However, I did see that in the example I gave, _get_values() in argparse.py gets called twice (apparently once per argument group as determined by nargs, I guess) to remove the "--" present in arg_strings. The first time, arg_strings is ["foo", "--"] and the second time it's ["bar", "--", "baz", "--", "zap"]. So, that's what happens, and where part of the fix should probably be. I don't think the removal of "--" should happen in a function that gets called multiple times. Though I didn't spend the time to see where the code should be positioned, I can only imagine the correct behavior would be to remove the argument marked as "-" by the first pass mentioned. I didn't mention this yesterday, because I figured there wouldn't be much value in sharing incomplete research like this, as opposed to a patch. I didn't want to influence the work of whoever chose to invest time in this for a proper fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 12:15:19 2019 From: report at bugs.python.org (Jorge L. Martinez) Date: Sat, 06 Jul 2019 16:15:19 +0000 Subject: [issue37510] argparse removing more "--" than it should In-Reply-To: <1562359530.82.0.205006034858.issue37510@roundup.psfhosted.org> Message-ID: <1562429719.91.0.625821767336.issue37510@roundup.psfhosted.org> Jorge L. Martinez added the comment: > to remove the "--" present in arg_strings *to remove the first "--" present... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 13:04:53 2019 From: report at bugs.python.org (Carsten) Date: Sat, 06 Jul 2019 17:04:53 +0000 Subject: [issue37515] `open("aux.txt", "w")` fails unexpectedly with FileNotFoundError on Windows Message-ID: <1562432693.47.0.818477599166.issue37515@roundup.psfhosted.org> New submission from Carsten : I maintain a package which includes a package named "aux.py". I could not install it on my windows machine via pip and others had the same problem also with windows. I tracked down the problem to `io.open`. On my Windows 7 System with Python 3.7.1 from Anaconda, the following statements all result in a FileNotFoundError: open("aux", "w") open("Aux", "w") open("AUX", "w") open("aux.py", "w") open("aux.py", "wb") open("aux.txt", "w") On the other hand the following commands work as expected: open("aaux", "w") open("AUX1.txt", "w") open("aux2.py", "w") etc. Can anybody confirm this? On Linux (I could not reproduce the problem.) ---------- components: IO files: bug.png messages: 347436 nosy: CarK priority: normal severity: normal status: open title: `open("aux.txt", "w")` fails unexpectedly with FileNotFoundError on Windows versions: Python 3.7 Added file: https://bugs.python.org/file48459/bug.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:10:07 2019 From: report at bugs.python.org (paul j3) Date: Sat, 06 Jul 2019 18:10:07 +0000 Subject: [issue37510] argparse removing more "--" than it should In-Reply-To: <1562359530.82.0.205006034858.issue37510@roundup.psfhosted.org> Message-ID: <1562436607.57.0.392864028338.issue37510@roundup.psfhosted.org> paul j3 added the comment: I looked at this issue way back, in 2013: https://bugs.python.org/issue13922 I probably shouldn't have tacked this on to a closed issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 14:11:51 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 06 Jul 2019 18:11:51 +0000 Subject: [issue37515] `open("aux.txt", "w")` fails unexpectedly with FileNotFoundError on Windows In-Reply-To: <1562432693.47.0.818477599166.issue37515@roundup.psfhosted.org> Message-ID: <1562436711.89.0.58027235138.issue37515@roundup.psfhosted.org> SilentGhost added the comment: aux is one of the reserved filenames on windows: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions I don't think Python can do anything about that. ---------- components: +Windows -IO nosy: +SilentGhost, paul.moore, steve.dower, tim.golden, zach.ware resolution: -> third party stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:09:55 2019 From: report at bugs.python.org (Carsten) Date: Sat, 06 Jul 2019 19:09:55 +0000 Subject: [issue37515] `open("aux.txt", "w")` fails unexpectedly with FileNotFoundError on Windows In-Reply-To: <1562432693.47.0.818477599166.issue37515@roundup.psfhosted.org> Message-ID: <1562440195.49.0.929655434597.issue37515@roundup.psfhosted.org> Carsten added the comment: This is a good explanation. Indeed Windows complains if I manually want to create a file "aux.txt" ("This device name is not allowed"). If I want to copy-paste such a file from within a zip-file (Windows Explorer can open zip files) I get an "Unexpected Error". I think a descriptive error message would be very helpful here. The best mechanism would be if this was generated on system level and then just passed through by io.open to the generated Exception. But just throwing a "FileNotFoundError" without any hint is potentially frustrating. Suggestion for a better Error message: "Could neither open nor create the desired file. Maybe the filename is not allowed by the underlying os". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:27:10 2019 From: report at bugs.python.org (Eryk Sun) Date: Sat, 06 Jul 2019 19:27:10 +0000 Subject: [issue37515] `open("aux.txt", "w")` fails unexpectedly with FileNotFoundError on Windows In-Reply-To: <1562432693.47.0.818477599166.issue37515@roundup.psfhosted.org> Message-ID: <1562441230.07.0.674783002952.issue37515@roundup.psfhosted.org> Eryk Sun added the comment: DOS device names are reserved in the final component of DOS drive-letter paths. "AUX" (plus an optional colon, spaces, or extension) becomes "\\.\AUX", which is "\??\AUX" in the NT object namespace. By default, "\??\AUX" is a link to "\??\COM1", which, if it exists, is typically a link to "\Device\Serial0". If there's no "COM1", then the kernel returns STATUS_OBJECT_NAME_NOT_FOUND, which the Windows API translates to ERROR_FILE_NOT_FOUND, which the C runtime translates to ENOENT, and finally Python raises FileNotFoundError. Accessing a DOS device name requires using a device path (prefixed by "\\.\" or "\\?\", and forward slash is okay, e.g. "//./C:/Temp/aux.py") or a UNC path (e.g. "//localhost/C$/Temp/aux.py"). That said, if we create a file like this, programs that use regular drive-letter paths won't be able to access it. It's better to sanitize reserved DOS device names. This includes "CONIN$" and "CONOUT$", even though Microsoft's documentation overlooks these two. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:33:17 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Jul 2019 19:33:17 +0000 Subject: [issue37507] multiprocessing: Add a stop() method to ForkServer In-Reply-To: <1562336538.11.0.898279442139.issue37507@roundup.psfhosted.org> Message-ID: <1562441597.04.0.903601908623.issue37507@roundup.psfhosted.org> Antoine Pitrou added the comment: There is no reason to expose "stop the forkserver" to users. How the forkserver process works, what tasks it handles, is an implementation detail. If users start "stopping the forkserver" in their applications for no good to reason, they might get bugs now or later that they wouldn't get otherwise. Side note: if you're modifying multiprocessing, asking for a review doesn't hurt ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 15:38:34 2019 From: report at bugs.python.org (Jorge L. Martinez) Date: Sat, 06 Jul 2019 19:38:34 +0000 Subject: [issue37510] argparse removing more "--" than it should In-Reply-To: <1562359530.82.0.205006034858.issue37510@roundup.psfhosted.org> Message-ID: <1562441914.91.0.92216755095.issue37510@roundup.psfhosted.org> Jorge L. Martinez added the comment: Maybe I can find the time to make a patch this weekend (either today or tomorrow). I hope I'm not underestimating this somehow, but I don't think this would take too long. The only issue I can foresee is in disagreement of what the correct behavior should be, which is why I gave my opinion that a single call of parse_args() should only ever remove a single "--". If I don't submit a patch by Monday (PDT), everyone should assume I decided not to tackle this. By the way, does this issue tracking platform support submitting to the issue thread by email? Maybe, I'll try that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 16:54:24 2019 From: report at bugs.python.org (Gordon R. Burgess) Date: Sat, 06 Jul 2019 20:54:24 +0000 Subject: [issue37516] buid error - test_asyncio fails during make Message-ID: <1562446464.35.0.966251927477.issue37516@roundup.psfhosted.org> New submission from Gordon R. Burgess : 0:02:03 load avg: 3.08 [ 26/423] test_asyncio Unknown child process pid 30234, will report returncode 255 Child watcher got an unexpected pid: 30234 Traceback (most recent call last): File "/home/gordon/Images/Python/Python-3.8.0b2/Lib/asyncio/unix_events.py", line 1213, in _do_waitpid loop, callback, args = self._callbacks.pop(pid) KeyError: 30234 (first issue I've logged here, so thanks for your patience! This system is Debian 9.9 - a 3.7 make was running at the same time but had completed all of the tests before I kicked 3.8 off) ---------- components: Installation messages: 347443 nosy: gburgess priority: normal severity: normal status: open title: buid error - test_asyncio fails during make type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:22:35 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:22:35 +0000 Subject: [issue37487] PyList_GetItem() document regarding index In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562448155.27.0.409866350836.issue37487@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +14437 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:28:06 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:28:06 +0000 Subject: [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562448486.36.0.592311699329.issue37487@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- assignee: docs at python -> terry.reedy stage: patch review -> commit review title: PyList_GetItem() document regarding index -> PyList_GetItem() document: index can be 0 versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:40:31 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:40:31 +0000 Subject: [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562449230.99.0.005083716708.issue37487@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset f8709e804d16ec5d44b1d2f00d59a0f78df7b792 by Terry Jan Reedy in branch 'master': bpo-37487: Fix PyList_GetItem index description. (GH-14623) https://github.com/python/cpython/commit/f8709e804d16ec5d44b1d2f00d59a0f78df7b792 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:40:44 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 21:40:44 +0000 Subject: [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562449244.55.0.961322211566.issue37487@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14438 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/14624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:40:51 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 21:40:51 +0000 Subject: [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562449251.26.0.900953375875.issue37487@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14439 pull_request: https://github.com/python/cpython/pull/14625 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:41:02 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 21:41:02 +0000 Subject: [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562449262.85.0.952144984676.issue37487@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14440 pull_request: https://github.com/python/cpython/pull/14626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:42:36 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:42:36 +0000 Subject: [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562449356.78.0.515231526127.issue37456@roundup.psfhosted.org> Terry J. Reedy added the comment: I will remove the sentence. ---------- assignee: docs at python -> terry.reedy nosy: +terry.reedy stage: -> commit review type: -> behavior versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:53:44 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:53:44 +0000 Subject: [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562450024.97.0.520628126978.issue37456@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +14441 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/14627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:54:59 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:54:59 +0000 Subject: [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562450099.4.0.84554735649.issue37487@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset ad3720359faa933d04bde3d3222fd54e73ee7feb by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14624) https://github.com/python/cpython/commit/ad3720359faa933d04bde3d3222fd54e73ee7feb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:55:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:55:22 +0000 Subject: [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562450122.5.0.289530345322.issue37487@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 9c930d076a7225694b369d30636a29acb556c2be by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14625) https://github.com/python/cpython/commit/9c930d076a7225694b369d30636a29acb556c2be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:55:44 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:55:44 +0000 Subject: [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562450144.61.0.379030032119.issue37487@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset dd3862e167d573b6e9a3348c365229ca958d1f1f by Terry Jan Reedy (Miss Islington (bot)) in branch '2.7': bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14626) https://github.com/python/cpython/commit/dd3862e167d573b6e9a3348c365229ca958d1f1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:56:26 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:56:26 +0000 Subject: [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562450186.56.0.999879344021.issue37487@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:13:06 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 22:13:06 +0000 Subject: [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562451186.51.0.746917417887.issue37456@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 6f2a8c08573c71b78d2f6e2bfaf31641a0cd092b by Terry Jan Reedy in branch 'master': bpo-37456: Slash ('/') is now part of syntax. (GH-14627) https://github.com/python/cpython/commit/6f2a8c08573c71b78d2f6e2bfaf31641a0cd092b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:13:14 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 22:13:14 +0000 Subject: [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562451194.01.0.352738688732.issue37456@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14442 pull_request: https://github.com/python/cpython/pull/14628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:22:53 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 22:22:53 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562451773.96.0.369445365175.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: Please ask your questions about doc conventions, both about exceptions and function/method. Either someone will point to something in the devguide, or we might get a discussion about something that should be added. I would not merge more extensive changes without some feedback. ---------- assignee: docs at python -> terry.reedy stage: patch review -> commit review versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:25:50 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 22:25:50 +0000 Subject: [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562451950.19.0.49385530409.issue37456@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 90631f9bc5f78ec6cdc2096d5c5ae26e41e5f150 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-37456: Slash ('/') is now part of syntax. (GH-14627) (GH-14628) https://github.com/python/cpython/commit/90631f9bc5f78ec6cdc2096d5c5ae26e41e5f150 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:39:44 2019 From: report at bugs.python.org (Gordon R. Burgess) Date: Sat, 06 Jul 2019 22:39:44 +0000 Subject: [issue37516] buid error - test_asyncio fails during make In-Reply-To: <1562446464.35.0.966251927477.issue37516@roundup.psfhosted.org> Message-ID: <1562452784.31.0.328557234465.issue37516@roundup.psfhosted.org> Gordon R. Burgess added the comment: Ran this on a different laptop (Debian 9.9, Lenovo w540) and it passed, so (as I'd expect) this is an intermittent issue. (The ticket was opened with an error on a Lenovo w510) Both systems have been reimaged in the last 6-8 months. 0:00:34 load avg: 1.18 [ 26/423] test_asyncio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:44:32 2019 From: report at bugs.python.org (Gordon R. Burgess) Date: Sat, 06 Jul 2019 22:44:32 +0000 Subject: [issue37516] buid error - test_asyncio fails during make In-Reply-To: <1562446464.35.0.966251927477.issue37516@roundup.psfhosted.org> Message-ID: <1562453072.09.0.91038382459.issue37516@roundup.psfhosted.org> Gordon R. Burgess added the comment: I got excited prematurely - this is farther down in the log on the second build: ... 0:16:09 load avg: 0.84 [341/423] test_sys_settrace unhandled exception during asyncio.run() shutdown task: ()> exception=RuntimeError("can't send non-None value to a just-started coroutine")> RuntimeError: can't send non-None value to a just-started coroutine unhandled exception during asyncio.run() shutdown task: ()> exception=RuntimeError("can't send non-None value to a just-started coroutine")> RuntimeError: can't send non-None value to a just-started coroutine 0:16:10 load avg: 0.84 [342/423] test_sysconfig ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:46:39 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 22:46:39 +0000 Subject: [issue37491] IndexError in get_bare_quoted_string In-Reply-To: <1562141971.16.0.876863205208.issue37491@roundup.psfhosted.org> Message-ID: <1562453199.89.0.798526931322.issue37491@roundup.psfhosted.org> Terry J. Reedy added the comment: An Python exception is not a crash; a crash is the program stopping without an exception and proper cleanup. If s is a string (rather than, for instance, None), s and (s[0] == char) is equivalent to s[0:1] == char ---------- nosy: +terry.reedy type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 19:54:27 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 06 Jul 2019 23:54:27 +0000 Subject: [issue37515] `open("aux.txt", "w")` fails unexpectedly with FileNotFoundError on Windows In-Reply-To: <1562432693.47.0.818477599166.issue37515@roundup.psfhosted.org> Message-ID: <1562457267.52.0.91905656061.issue37515@roundup.psfhosted.org> Steven D'Aprano added the comment: For future reference, please don't post screen shots of plain text, as they make it unnecessarily difficult for blind or visually impaired developers to contribute (and yes, they do exist, I've worked with some, and at least one core developer). Copy the relevant text (including the exception traceback) and paste them into the bug report. Thank you. ---------- nosy: +steven.daprano resolution: third party -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 20:00:34 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 Jul 2019 00:00:34 +0000 Subject: [issue37517] Improve error messages for Windows reserved file names Message-ID: <1562457634.89.0.989040753976.issue37517@roundup.psfhosted.org> New submission from Steven D'Aprano : See #37515. Perhaps Windows builds can check for reserved file names and give a more descriptive error message in the event of IO error? (Eryksun also mentions two reserved names which Microsoft apparently does not document: "CONIN$" and "CONOUT$".) ---------- components: Windows messages: 347456 nosy: CarK, SilentGhost, eryksun, paul.moore, steve.dower, steven.daprano, tim.golden, zach.ware priority: normal severity: normal status: open title: Improve error messages for Windows reserved file names versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 21:07:10 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 01:07:10 +0000 Subject: [issue37480] add ptpython to list of alternate interpreters In-Reply-To: <1562036636.74.0.198372246702.issue37480@roundup.psfhosted.org> Message-ID: <1562461630.9.0.766432627401.issue37480@roundup.psfhosted.org> Terry J. Reedy added the comment: My problems with this chapter are that it mostly ignores Windows, omits IDLE which has most of the 'advanced features' discussed, and some others (I could fix this), confuses a bit 'interpreter' as code executor versus 'interactive interpreter' as interface to an interpreter (Shell), and seems seems to mention a somewhat arbitrary subset of alternative shells. Other than the fact that bpython and ptpython cross list each other (and IPython), what evidence do you have that ptpython is 'both mature and popular enough to merit inclusion'? (I know, difficult question given no visible criteria.) I looked at the history of the last paragraph and it seems that is was added 8/13/2009 by Georg Brandl in c5605dffdb226e85f415bd6edb441dad714fbc0c, which merged about 16 revisions from the py3k branch. The only change since was markup. It seems to me that the wiki might be a better place for a list of alternate shells, if not one already. I believe there is already a page for editors or IDEs. ---------- nosy: +terry.reedy versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 21:11:27 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 Jul 2019 01:11:27 +0000 Subject: [issue37517] Improve error messages for Windows reserved file names In-Reply-To: <1562457634.89.0.989040753976.issue37517@roundup.psfhosted.org> Message-ID: <1562461887.23.0.831076890063.issue37517@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 21:20:19 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 01:20:19 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562462419.67.0.369498958716.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 0717b4d9b3899c5c2ca13031e4ff619a15a4d368 by Terry Jan Reedy (Kyle Stanley) in branch 'master': bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) https://github.com/python/cpython/commit/0717b4d9b3899c5c2ca13031e4ff619a15a4d368 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 21:20:27 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 01:20:27 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562462427.84.0.462314475475.issue37478@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14443 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/14629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 21:20:35 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 01:20:35 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562462435.92.0.0486222378352.issue37478@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14444 pull_request: https://github.com/python/cpython/pull/14630 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:18:53 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 02:18:53 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562465933.27.0.271656620575.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 4e6bfc4c605d92d2395fbcded9cf45cdd1ced810 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) (GH-14629) https://github.com/python/cpython/commit/4e6bfc4c605d92d2395fbcded9cf45cdd1ced810 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:19:11 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 02:19:11 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562465951.01.0.9078393039.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 1dd65075955337183ba2f78cb11a1eec2466dc74 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) (GH-14630) https://github.com/python/cpython/commit/1dd65075955337183ba2f78cb11a1eec2466dc74 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:37:13 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 02:37:13 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467033.89.0.19951827632.issue37478@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14445 pull_request: https://github.com/python/cpython/pull/14631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:43:59 2019 From: report at bugs.python.org (Willie Lopez) Date: Sun, 07 Jul 2019 02:43:59 +0000 Subject: [issue37518] Python-2.7.16 fails to build with --enable-shared Message-ID: <1562467439.87.0.798383157729.issue37518@roundup.psfhosted.org> New submission from Willie Lopez : When building Python-2.7.16 on CentOS-7.4, building with --enable-shared through ./configure will cause Python to fail its build without errors and will install python-2.7.5, the wrong version. If Python is built without --enable-shared, other compilations that need Python will fail with the cryptic error in the following. Recompiling the app such as Apache will continue fail even when explicitly defining -fPIC in CFLAGS. However, trying to build Python with the shared flag appears to succeed, but in fact it fails and installs Python-2.7.5, the wrong version. /bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC I have tried to build manually build Python with the following: ./buildconf (with and without running buildconf) CFLAGS='-fPIC -g -O2' ./configure --prefix=$HOME/tools make make altinstall %{buildroot}%{prefix} What am I missing? What am I doing wrong in the build? ---------- components: Build messages: 347461 nosy: lopez at ucar.edu priority: normal severity: normal status: open title: Python-2.7.16 fails to build with --enable-shared type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:44:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 02:44:04 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467444.14.0.901428068722.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset a9b40e4546ca631e5ab41376b5b72e8f296f557d by Terry Jan Reedy in branch 'master': bpo-37478: Add missing 'and'. (GH-14631) https://github.com/python/cpython/commit/a9b40e4546ca631e5ab41376b5b72e8f296f557d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:44:18 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 02:44:18 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467458.02.0.973438340748.issue37478@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14446 pull_request: https://github.com/python/cpython/pull/14632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:44:25 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 02:44:25 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467465.48.0.868338222891.issue37478@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14447 pull_request: https://github.com/python/cpython/pull/14633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:49:42 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 02:49:42 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467782.11.0.67223502553.issue37478@roundup.psfhosted.org> miss-islington added the comment: New changeset e841a54206c65770aeb2b936cdc830dd4ed8bf9e by Miss Islington (bot) in branch '3.7': bpo-37478: Add missing 'and'. (GH-14631) https://github.com/python/cpython/commit/e841a54206c65770aeb2b936cdc830dd4ed8bf9e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:50:51 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 02:50:51 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467851.97.0.148774540798.issue37478@roundup.psfhosted.org> miss-islington added the comment: New changeset e414aa9cb002427a39dfd157cdad156336f93ca9 by Miss Islington (bot) in branch '3.8': bpo-37478: Add missing 'and'. (GH-14631) https://github.com/python/cpython/commit/e414aa9cb002427a39dfd157cdad156336f93ca9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:03:10 2019 From: report at bugs.python.org (Eryk Sun) Date: Sun, 07 Jul 2019 04:03:10 +0000 Subject: [issue37517] Improve error messages for Windows reserved file names In-Reply-To: <1562457634.89.0.989040753976.issue37517@roundup.psfhosted.org> Message-ID: <1562472190.53.0.5055933503.issue37517@roundup.psfhosted.org> Eryk Sun added the comment: > Perhaps Windows builds can check for reserved file names and give a > more descriptive error message in the event of IO error? An operation on a reserved DOS device name can also succeed with unexpected results. For example, a script may unintentionally write to the active console screen buffer, "conout$": >>> open('C:/conout$::. .::.dat', 'w').write('spam\n') spam 5 There's also the issue of normalization that removes trailing spaces and dots from the final path component. All paths get normalized, except for device paths that begin with exactly "\\?\" (i.e. extended paths) in a create or open context. For example, say a script creates a file with the reserved name "spam. . .": >>> open(r'\\?\C:\Temp\spam. . .', 'w').close() Then later, it generically uses os.walk('C:/Temp'), without the "\\?\" prefix, and tries to remove the file: >>> os.remove('C:/Temp/spam. . .') Traceback (most recent call last): File "", line 1, in FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:/Temp/spam. . .' Without an extended path, "spam. . ." gets normalized as "spam". The script would need to use os.walk(r'\\?\C:\Temp'). Should we special case this error as well to suggest using an extended path? > Eryksun also mentions two reserved names which Microsoft apparently > does not document: "CONIN$" and "CONOUT$". The system's behavior with these two names depends on the Windows version. In Windows 7 and earlier, "CONIN$" and "CONOUT$" are special cased by CreateFileW, and only when it's just the bare names (case insensitive) without trailing colons, spaces, or an extension, and never in a directory. In Windows 8+, as part of updating the internal console implementation to use an I/O device (i.e. "\Device\ConDrv"), "CONIN$" and "CONOUT$" were added to the system runtime library's list of DOS devices, so they behave the same as other DOS device names, including "NUL", "CON", "AUX", "PRN", "COM<1-9>", and "LPT<1-9>". This change is undocumented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:39:04 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 07 Jul 2019 04:39:04 +0000 Subject: [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562474344.59.0.394424829864.issue37478@roundup.psfhosted.org> Kyle Stanley added the comment: Exceptions for os.chdir() have been added to the docs. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 01:11:18 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 05:11:18 +0000 Subject: [issue37478] Specify possible exceptions for os.chdir() In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562476278.15.0.778444022734.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: Spinoff issues should be separate. ---------- title: Docs: Method os.chdir() does not mention errors that can be raised -> Specify possible exceptions for os.chdir() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 01:13:25 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 07 Jul 2019 05:13:25 +0000 Subject: [issue37516] buid error - test_asyncio fails during make In-Reply-To: <1562446464.35.0.966251927477.issue37516@roundup.psfhosted.org> Message-ID: <1562476405.27.0.9135715367.issue37516@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 01:59:05 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 07 Jul 2019 05:59:05 +0000 Subject: [issue21120] PyArena type is used in headers from the limited API In-Reply-To: <1396339821.73.0.473299529971.issue21120@psf.upfronthosting.co.za> Message-ID: <1562479145.43.0.715310730487.issue21120@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +14448 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 05:10:14 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 07 Jul 2019 09:10:14 +0000 Subject: [issue37221] PyCode_New API change breaks backwards compatibility policy In-Reply-To: <1560209067.42.0.855519802872.issue37221@roundup.psfhosted.org> Message-ID: <1562490614.58.0.964594096686.issue37221@roundup.psfhosted.org> Stefan Behnel added the comment: No need to keep this bug open on CPython side. The backwards compatibility has been restored (and I'll release Cython 0.29.12 today to resolve the issue on that side.) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 05:31:19 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 07 Jul 2019 09:31:19 +0000 Subject: [issue21120] PyArena type is used in headers from the limited API In-Reply-To: <1396339821.73.0.473299529971.issue21120@psf.upfronthosting.co.za> Message-ID: <1562491879.27.0.578204375666.issue21120@roundup.psfhosted.org> Change by Zackery Spytz : ---------- components: +Build -Library (Lib) nosy: +ZackerySpytz versions: +Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 06:14:49 2019 From: report at bugs.python.org (Alexander Kapshuna) Date: Sun, 07 Jul 2019 10:14:49 +0000 Subject: [issue26952] argparse help formatter crashes In-Reply-To: <1462374887.67.0.462060112057.issue26952@psf.upfronthosting.co.za> Message-ID: <1562494489.92.0.819086292076.issue26952@roundup.psfhosted.org> Alexander Kapshuna added the comment: I have a feeling that nesting groups has nothing to do with it. Got same traceback when I forgot to fill my mutually exclusive groups with arguments. import argparse parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group() parser.parse_args(['-h']) # Result: Traceback (most recent call last): File "/home/kapsh/.PyCharmCE2019.1/config/scratches/scratch_12.py", line 5, in parser.parse_args(['-h']) File "/usr/lib/python3.7/argparse.py", line 1749, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/lib/python3.7/argparse.py", line 1781, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/lib/python3.7/argparse.py", line 1987, in _parse_known_args start_index = consume_optional(start_index) File "/usr/lib/python3.7/argparse.py", line 1927, in consume_optional take_action(action, args, option_string) File "/usr/lib/python3.7/argparse.py", line 1855, in take_action action(self, namespace, argument_values, option_string) File "/usr/lib/python3.7/argparse.py", line 1037, in __call__ parser.print_help() File "/usr/lib/python3.7/argparse.py", line 2474, in print_help self._print_message(self.format_help(), file) File "/usr/lib/python3.7/argparse.py", line 2458, in format_help return formatter.format_help() File "/usr/lib/python3.7/argparse.py", line 284, in format_help help = self._root_section.format_help() File "/usr/lib/python3.7/argparse.py", line 215, in format_help item_help = join([func(*args) for func, args in self.items]) File "/usr/lib/python3.7/argparse.py", line 215, in item_help = join([func(*args) for func, args in self.items]) File "/usr/lib/python3.7/argparse.py", line 322, in _format_usage action_usage = format(optionals + positionals, groups) File "/usr/lib/python3.7/argparse.py", line 397, in _format_actions_usage start = actions.index(group._group_actions[0]) IndexError: list index out of range ---------- nosy: +kapsh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 08:30:52 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sun, 07 Jul 2019 12:30:52 +0000 Subject: [issue37519] Three inconsistent module attributes Message-ID: <1562502652.41.0.952456238618.issue37519@roundup.psfhosted.org> New submission from G?ry : Analysis ======== In the next two sections showing the module attributes and corresponding spec attributes of imported modules and run modules, we notice the following rule (which is in accordance with this `PEP 451 section `_): If a *spec* attribute is either ``None``, ``'built-in'`` or ``'frozen'``, then the corresponding *module* attribute is not set. However we also notice three exceptions to this rule, that I think are unintended inconsistencies that should be corrected: - ``module.__file__ is None`` (instead of being not set) for imported namespace packages; - ``module.__cached__ is None`` (instead of being not set) for non-package modules run from the file system and run from standard input; - ``module.__package__ is None`` (instead of being ``''``) for non-package modules run from the file system and run from standard input. The first exception was introduced recently (26 February 2018) by this `pull request `_, which changed the ``module.__spec__.origin`` attribute from ``namespace`` to ``None`` (which I agree with as it avoids conflicting non-namespace-package modules named ``namespace`` with namespace packages) and the ``module.__file__`` attribute from being unset to ``None`` (which I disagree with as it introduces an inconsistency and contradicts PEP 451). Environment: CPython 3.7, MacOS 10.14. Imported modules ================ Running the following code:: import module print("MODULE") for attr in ["__name__", "__file__", "__cached__", "__path__", "__package__", "__loader__"]: print(f"{attr}:", repr(getattr(module, attr, "not set"))) print("SPEC") if hasattr(module, "__spec__"): if module.__spec__ is None: print("__spec__:", repr(module.__spec__)) else: for attr in ["name", "origin", "cached", "submodule_search_locations", "parent", "loader"]: print(f"__spec__.{attr}:", repr(getattr(module.__spec__, attr))) else: print("__spec__: not set") where ``module`` refers to: - a non-package module (e.g., ``pathlib``); - a regular package (e.g., ``json``); - a namespace package; - a built-in module (e.g., ``time``); - a frozen module (e.g., ``_frozen_importlib_external``) prints the following module attributes and corresponding spec attributes of the imported ``module``: - for a non-package module: | MODULE | __name__: 'pathlib' | __file__: '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py' | __cached__: '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/__pycache__/pathlib.cpython-37.pyc' | __path__: 'not set' | __package__: '' | __loader__: <_frozen_importlib_external.SourceFileLoader object at 0x1018896d8> | SPEC | __spec__.name: 'pathlib' | __spec__.origin: '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py' | __spec__.cached: '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/__pycache__/pathlib.cpython-37.pyc' | __spec__.submodule_search_locations: None | __spec__.parent: '' | __spec__.loader: <_frozen_importlib_external.SourceFileLoader object at 0x1018896d8> - for a regular package: | MODULE | __name__: 'json' | __file__: '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py' | __cached__: '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__pycache__/__init__.cpython-37.pyc' | __path__: ['/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json'] | __package__: 'json' | __loader__: <_frozen_importlib_external.SourceFileLoader object at 0x10f9aa6d8> | SPEC | __spec__.name: 'json' | __spec__.origin: '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py' | __spec__.cached: '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__pycache__/__init__.cpython-37.pyc' | __spec__.submodule_search_locations: ['/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json'] | __spec__.parent: 'json' | __spec__.loader: <_frozen_importlib_external.SourceFileLoader object at 0x10f9aa6d8> - for a namespace package: | MODULE | __name__: 'foobar' | __file__: None | __cached__: 'not set' | __path__: _NamespacePath(['/Users/maggyero/foobar']) | __package__: 'foobar' | __loader__: <_frozen_importlib_external._NamespaceLoader object at 0x1074564a8> | SPEC | __spec__.name: 'foobar' | __spec__.origin: None | __spec__.cached: None | __spec__.submodule_search_locations: _NamespacePath(['/Users/maggyero/foobar']) | __spec__.parent: 'foobar' | __spec__.loader: <_frozen_importlib_external._NamespaceLoader object at 0x1074564a8> - for a built-in module: | MODULE | __name__: 'time' | __file__: 'not set' | __cached__: 'not set' | __path__: 'not set' | __package__: '' | __loader__: | SPEC | __spec__.name: 'time' | __spec__.origin: 'built-in' | __spec__.cached: None | __spec__.submodule_search_locations: None | __spec__.parent: '' | __spec__.loader: - for a frozen module: | MODULE | __name__: '_frozen_importlib_external' | __file__: 'not set' | __cached__: 'not set' | __path__: 'not set' | __package__: '' | __loader__: | SPEC | __spec__.name: '_frozen_importlib_external' | __spec__.origin: 'frozen' | __spec__.cached: None | __spec__.submodule_search_locations: None | __spec__.parent: '' | __spec__.loader: Run modules =========== Putting the following code:: import sys print("MODULE") for attr in ["__name__", "__file__", "__cached__", "__path__", "__package__", "__loader__"]: print(f"{attr}:", repr(getattr(sys.modules[__name__], attr, "not set"))) print("SPEC") if hasattr(sys.modules[__name__], "__spec__"): if sys.modules[__name__].__spec__ is None: print("__spec__:", repr(sys.modules[__name__].__spec__)) else: for attr in ["name", "origin", "cached", "submodule_search_locations", "parent", "loader"]: print(f"__spec__.{attr}:", repr(getattr(sys.modules[__name__].__spec__, attr))) else: print("__spec__: not set") in: - a module.py file for getting a ``module`` non-package module; - a __main__.py file in a module directory with an __init__.py file for getting a ``module`` regular package; - a __main__.py file in a module directory without an __init__.py file for getting a ``module`` namespace package and running the code: - from the file system (``python3 module.py`` for a non-package module, ``python3 module/`` for a package module); - from standard input (``cat module.py | python3`` for a non-package module); - from the module namespace (``python3 -m module``) prints the following module attributes and corresponding spec attributes of the run ``module``: - for a non-package module: | $ python3 module.py | MODULE | __name__: '__main__' | __file__: 'module.py' | __cached__: None | __path__: 'not set' | __package__: None | __loader__: <_frozen_importlib_external.SourceFileLoader object at 0x1051970b8> | SPEC | __spec__: None | | $ cat module.py | python3 | MODULE | __name__: '__main__' | __file__: '' | __cached__: None | __path__: 'not set' | __package__: None | __loader__: | SPEC | __spec__: None | | $ python3 -m module | MODULE | __name__: '__main__' | __file__: '/Users/maggyero/module.py' | __cached__: '/Users/maggyero/__pycache__/module.cpython-37.pyc' | __path__: 'not set' | __package__: '' | __loader__: <_frozen_importlib_external.SourceFileLoader object at 0x1056b16d8> | SPEC | __spec__.name: 'module' | __spec__.origin: '/Users/maggyero/module.py' | __spec__.cached: '/Users/maggyero/__pycache__/module.cpython-37.pyc' | __spec__.submodule_search_locations: None | __spec__.parent: '' | __spec__.loader: <_frozen_importlib_external.SourceFileLoader object at 0x1056b16d8> - for a regular package: | $ python3 module/ | MODULE | __name__: '__main__' | __file__: 'module/__main__.py' | __cached__: 'module/__pycache__/__main__.cpython-37.pyc' | __path__: 'not set' | __package__: '' | __loader__: <_frozen_importlib_external.SourceFileLoader object at 0x10826a550> | SPEC | __spec__.name: '__main__' | __spec__.origin: 'module/__main__.py' | __spec__.cached: 'module/__pycache__/__main__.cpython-37.pyc' | __spec__.submodule_search_locations: None | __spec__.parent: '' | __spec__.loader: <_frozen_importlib_external.SourceFileLoader object at 0x10826a550> | | $ python3 -m module | MODULE | __name__: '__main__' | __file__: '/Users/maggyero/module/__main__.py' | __cached__: '/Users/maggyero/module/__pycache__/__main__.cpython-37.pyc' | __path__: 'not set' | __package__: 'module' | __loader__: <_frozen_importlib_external.SourceFileLoader object at 0x10832d278> | SPEC | __spec__.name: 'module.__main__' | __spec__.origin: '/Users/maggyero/module/__main__.py' | __spec__.cached: '/Users/maggyero/module/__pycache__/__main__.cpython-37.pyc' | __spec__.submodule_search_locations: None | __spec__.parent: 'module' | __spec__.loader: <_frozen_importlib_external.SourceFileLoader object at 0x10832d278> - for a namespace package: | $ python3 module/ | MODULE | __name__: '__main__' | __file__: 'module/__main__.py' | __cached__: 'module/__pycache__/__main__.cpython-37.pyc' | __path__: 'not set' | __package__: '' | __loader__: <_frozen_importlib_external.SourceFileLoader object at 0x107a06518> | SPEC | __spec__.name: '__main__' | __spec__.origin: 'module/__main__.py' | __spec__.cached: 'module/__pycache__/__main__.cpython-37.pyc' | __spec__.submodule_search_locations: None | __spec__.parent: '' | __spec__.loader: <_frozen_importlib_external.SourceFileLoader object at 0x107a06518> | | $ python3 -m module | MODULE | __name__: '__main__' | __file__: '/Users/maggyero/module/__main__.py' | __cached__: '/Users/maggyero/module/__pycache__/__main__.cpython-37.pyc' | __path__: 'not set' | __package__: 'module' | __loader__: <_frozen_importlib_external.SourceFileLoader object at 0x10fb69240> | SPEC | __spec__.name: 'module.__main__' | __spec__.origin: '/Users/maggyero/module/__main__.py' | __spec__.cached: '/Users/maggyero/module/__pycache__/__main__.cpython-37.pyc' | __spec__.submodule_search_locations: None | __spec__.parent: 'module' | __spec__.loader: <_frozen_importlib_external.SourceFileLoader object at 0x10fb69240> ---------- components: Interpreter Core, Library (Lib) messages: 347470 nosy: barry, eric.smith, maggyero, ncoghlan priority: normal severity: normal status: open title: Three inconsistent module attributes type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:34:20 2019 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 07 Jul 2019 15:34:20 +0000 Subject: [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562513660.38.0.487101365347.issue37513@roundup.psfhosted.org> Xiang Zhang added the comment: Should be TypeError. It's changed from ValueError to TypeError in https://bugs.python.org/issue1831. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:40:22 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:40:22 +0000 Subject: [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514022.47.0.904140219752.issue37513@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14449 pull_request: https://github.com/python/cpython/pull/14635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:40:29 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:40:29 +0000 Subject: [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514029.56.0.670920105466.issue37513@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14450 pull_request: https://github.com/python/cpython/pull/14636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:40:30 2019 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 07 Jul 2019 15:40:30 +0000 Subject: [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514030.36.0.891259392203.issue37513@roundup.psfhosted.org> Xiang Zhang added the comment: New changeset f6cdd3ff687ebbf8209d793a18a042ea495c4aeb by Xiang Zhang (Hai Shi) in branch 'master': bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615) https://github.com/python/cpython/commit/f6cdd3ff687ebbf8209d793a18a042ea495c4aeb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:46:05 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:46:05 +0000 Subject: [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514365.38.0.341636407303.issue37513@roundup.psfhosted.org> miss-islington added the comment: New changeset bc0a6ced30267d4e21e7566bfd6d14b30d6d1604 by Miss Islington (bot) in branch '3.7': bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615) https://github.com/python/cpython/commit/bc0a6ced30267d4e21e7566bfd6d14b30d6d1604 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:46:49 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:46:49 +0000 Subject: [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514409.8.0.0586945063734.issue37513@roundup.psfhosted.org> miss-islington added the comment: New changeset 3f7d0c9665ca546bb0073376cb83e31dd13b48d9 by Miss Islington (bot) in branch '3.8': bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615) https://github.com/python/cpython/commit/3f7d0c9665ca546bb0073376cb83e31dd13b48d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:50:00 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:50:00 +0000 Subject: [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514600.5.0.785475388351.issue37513@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14451 pull_request: https://github.com/python/cpython/pull/14637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:58:26 2019 From: report at bugs.python.org (Andrew Scheller) Date: Sun, 07 Jul 2019 15:58:26 +0000 Subject: [issue34446] ambiguous _max_size parameter in SpooledTemporaryFile In-Reply-To: <1534794455.51.0.56676864532.issue34446@psf.upfronthosting.co.za> Message-ID: <1562515106.06.0.498625685744.issue34446@roundup.psfhosted.org> Andrew Scheller added the comment: I agree that this is ambiguous behaviour. The docs at https://docs.python.org/3/library/tempfile.html#tempfile.SpooledTemporaryFile say "This function operates exactly as TemporaryFile() does, except that data is spooled in memory until the file size exceeds max_size, or until the file?s fileno() method is called, at which point the contents are written to disk and operation proceeds as with TemporaryFile().", and as the default value for max_size is 0, that would imply to me that _any_ data written to a SpooledTemporaryFile (constructed with a max_size of 0) would instantly get (internally) converted to a TemporaryFile. Whereas looking at the code https://github.com/python/cpython/blob/master/Lib/tempfile.py#L650 it seems a max_size of 0 means "don't rollover". Perhaps it would have made sense to have SpooledTemporaryFile default to a max_size of None (and use that to mean "never rollover") ? So as well as the inconsistency between rollover behaviour in the write()/writelines() methods and the truncate() method (when max_size is 0) that jcc2220 pointed out, I believe there's also a documentation issue here in that it's not clear what a max_size of 0 is /supposed/ to do. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, lurchman versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:59:17 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:59:17 +0000 Subject: [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562515157.69.0.00211987985211.issue37513@roundup.psfhosted.org> miss-islington added the comment: New changeset 00bf4d64ecb01027be40c32d822e47e55d6b5c76 by Miss Islington (bot) in branch '2.7': bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615) https://github.com/python/cpython/commit/00bf4d64ecb01027be40c32d822e47e55d6b5c76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 12:03:08 2019 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 07 Jul 2019 16:03:08 +0000 Subject: [issue37513] Fix a wrong exception type in ctypes documentation In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562515388.13.0.808935877918.issue37513@roundup.psfhosted.org> Change by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: Fix a type error in ctypes.rst -> Fix a wrong exception type in ctypes documentation versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 13:02:38 2019 From: report at bugs.python.org (paul j3) Date: Sun, 07 Jul 2019 17:02:38 +0000 Subject: [issue26952] argparse help formatter crashes In-Reply-To: <1462374887.67.0.462060112057.issue26952@psf.upfronthosting.co.za> Message-ID: <1562518958.61.0.932882963608.issue26952@roundup.psfhosted.org> paul j3 added the comment: Xiang Zhang pointed out that the immediate error in this case was caused by the empty mutually exclusive group: https://bugs.python.org/issue26952#msg264835 The nesting fails because adding actions to the argument_group does not enroll them in the mutually exclusive group. So the group._group_actions list remains empty, just as it is in your case. As I pointed out earlier, the usage formatter is brittle. The addition of mutually exclusive group markings is particularly clunky. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 15:16:53 2019 From: report at bugs.python.org (paul j3) Date: Sun, 07 Jul 2019 19:16:53 +0000 Subject: [issue37510] argparse removing more "--" than it should In-Reply-To: <1562359530.82.0.205006034858.issue37510@roundup.psfhosted.org> Message-ID: <1562527013.81.0.616695553128.issue37510@roundup.psfhosted.org> paul j3 added the comment: https://bugs.python.org/file29845/dbldash.patch while written against an earlier version of `argparse`, does what you want. I moved the '--' removal out of `_get_values` and into `consume_positionals`. Note that a full patch should include test cases and documentation changes if any. Also now github pull requests are the preferred patching route. But don't expect rapid response on this. The issue has been around for a long time without causing too many complaints. Backward compatibility is always a concern when making changes to core functionality. We don't want to mess with someone's working code. Though I doubt if there are many users who count on multiple '--' removals, one way or other. The argparse docs explicity calls this a 'pseudo-argument'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 16:54:03 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 07 Jul 2019 20:54:03 +0000 Subject: [issue37520] zipfile.Path.parent returns incorrect value (same as self) for directory ref Message-ID: <1562532843.64.0.14097351238.issue37520@roundup.psfhosted.org> New submission from Jason R. Coombs : Originally reported in https://github.com/jaraco/zipp/issues/7, the parent of a Path object referencing a directory is returning the incorrect result: cpython master $ docker run -it python:rc-buster Python 3.8.0b1 (default, Jun 27 2019, 22:38:51) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import zipfile >>> import io >>> zf = zipfile.ZipFile(io.BytesIO(), 'w') >>> p = zipfile.Path(zf) >>> p.joinpath('missing/').parent Path(None, 'missing/') >>> p.joinpath('missing/').parent.at 'missing/' The expected value is '' as the parent of a single-level directory is the parent directory. ---------- components: Library (Lib) messages: 347479 nosy: jaraco priority: normal severity: normal status: open title: zipfile.Path.parent returns incorrect value (same as self) for directory ref versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 17:07:31 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 07 Jul 2019 21:07:31 +0000 Subject: [issue37520] zipfile.Path.parent returns incorrect value (same as self) for directory ref In-Reply-To: <1562532843.64.0.14097351238.issue37520@roundup.psfhosted.org> Message-ID: <1562533651.62.0.813125518375.issue37520@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +14452 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14638 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 17:37:53 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 07 Jul 2019 21:37:53 +0000 Subject: [issue37520] zipfile.Path.parent returns incorrect value (same as self) for directory ref In-Reply-To: <1562532843.64.0.14097351238.issue37520@roundup.psfhosted.org> Message-ID: <1562535473.86.0.696523630723.issue37520@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 38f44b4a4adc37e8f5f8971917d8b3145f351a56 by Jason R. Coombs in branch 'master': bpo-37520: Correct behavior for zipfile.Path.parent (GH-14638) https://github.com/python/cpython/commit/38f44b4a4adc37e8f5f8971917d8b3145f351a56 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 17:39:00 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 21:39:00 +0000 Subject: [issue37520] zipfile.Path.parent returns incorrect value (same as self) for directory ref In-Reply-To: <1562532843.64.0.14097351238.issue37520@roundup.psfhosted.org> Message-ID: <1562535540.2.0.550897778691.issue37520@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14453 pull_request: https://github.com/python/cpython/pull/14641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 18:05:57 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 07 Jul 2019 22:05:57 +0000 Subject: [issue37520] zipfile.Path.parent returns incorrect value (same as self) for directory ref In-Reply-To: <1562532843.64.0.14097351238.issue37520@roundup.psfhosted.org> Message-ID: <1562537157.07.0.362110188652.issue37520@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 66905d14672517d50dc8ba516b9839f9ddbcc131 by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-37520: Correct behavior for zipfile.Path.parent (GH-14638) (GH-14641) https://github.com/python/cpython/commit/66905d14672517d50dc8ba516b9839f9ddbcc131 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 18:07:48 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 07 Jul 2019 22:07:48 +0000 Subject: [issue37520] zipfile.Path.parent returns incorrect value (same as self) for directory ref In-Reply-To: <1562532843.64.0.14097351238.issue37520@roundup.psfhosted.org> Message-ID: <1562537268.59.0.0862286893538.issue37520@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 20:52:26 2019 From: report at bugs.python.org (Benjamin Mintz) Date: Mon, 08 Jul 2019 00:52:26 +0000 Subject: [issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules Message-ID: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> New submission from Benjamin Mintz : unzip the attached zip file and run main.py expected output: True actual output: False So what? If you follow these directions, https://docs.python.org/3.7/library/importlib.html#checking-if-a-module-can-be-imported , you will put a stale reference in sys.modules even though a fresh reference is already there. If you use that code on a package with a subpackage, the subpackage will not be set as an attribute on the package. ---------- components: Library (Lib) files: importsfucked.zip messages: 347482 nosy: bmintz priority: normal severity: normal status: open title: importlib.util.module_from_spec return value is not the same as in sys.modules versions: Python 3.7 Added file: https://bugs.python.org/file48460/importsfucked.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 20:54:43 2019 From: report at bugs.python.org (Benjamin Mintz) Date: Mon, 08 Jul 2019 00:54:43 +0000 Subject: [issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562547283.32.0.0310541390576.issue37521@roundup.psfhosted.org> Benjamin Mintz added the comment: Updated main.py. New expected output: ==================== True New actual output: ================== False Traceback (most recent call last): File "main.py", line 14, in print(module.sub) AttributeError: module 'testext' has no attribute 'sub' ---------- Added file: https://bugs.python.org/file48461/importsfucked.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 22:37:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 08 Jul 2019 02:37:56 +0000 Subject: [issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562553476.3.0.225407259977.issue37521@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 23:26:17 2019 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 08 Jul 2019 03:26:17 +0000 Subject: [issue37476] Adding a unit test of unicode in test_unicode.py In-Reply-To: <1562005792.78.0.882905794815.issue37476@roundup.psfhosted.org> Message-ID: <1562556377.41.0.20219737137.issue37476@roundup.psfhosted.org> Change by Xiang Zhang : ---------- type: -> enhancement versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 23:45:11 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 08 Jul 2019 03:45:11 +0000 Subject: [issue37502] Fix default argument handling for buffers argument in pickle.loads In-Reply-To: <1562297595.0.0.947701314803.issue37502@roundup.psfhosted.org> Message-ID: <1562557511.08.0.112122463047.issue37502@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks for reporting the issue. On PR-14593 I reviewed the changes with interpreter screenshots showing the output of "pickle.loads(pickle.dumps(1, protocol=pickle.HIGHEST_PROTOCOL), buffers=None)" in the latest version of cpython master compared to the branch from the PR. ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 01:09:03 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Jul 2019 05:09:03 +0000 Subject: [issue36085] Enable better DLL resolution In-Reply-To: <1550881737.58.0.129017089721.issue36085@roundup.psfhosted.org> Message-ID: <1562562543.9.0.847316765721.issue36085@roundup.psfhosted.org> Steve Dower added the comment: Heh, and I was so sure I'd copy pasted the right number after getting it wrong so often. Just tag it against this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 02:57:24 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 08 Jul 2019 06:57:24 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562569044.61.0.646598539452.issue19696@roundup.psfhosted.org> Change by Kyle Stanley : ---------- pull_requests: +14454 pull_request: https://github.com/python/cpython/pull/14642 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 03:46:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2019 07:46:36 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1562571996.75.0.178702824781.issue37224@roundup.psfhosted.org> STINNER Victor added the comment: The test still fails times to times: https://buildbot.python.org/all/#/builders/80/builds/644 FAIL: test_subinterpreter (test.test__xxsubinterpreters.IsRunningTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\test\test__xxsubinterpreters.py", line 492, in test_subinterpreter self.assertTrue(interpreters.is_running(interp)) AssertionError: False is not true ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 04:12:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2019 08:12:03 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562573523.83.0.45494704179.issue37421@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14455 pull_request: https://github.com/python/cpython/pull/14643 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 04:19:32 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 08 Jul 2019 08:19:32 +0000 Subject: [issue37337] Add _PyObject_VectorcallMethod() function In-Reply-To: <1560936931.61.0.893195452608.issue37337@roundup.psfhosted.org> Message-ID: <1562573972.9.0.639713841802.issue37337@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 762f93ff2efd6b7ef0177cad57939c0ab2002eac by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267) https://github.com/python/cpython/commit/762f93ff2efd6b7ef0177cad57939c0ab2002eac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 04:20:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2019 08:20:36 +0000 Subject: [issue37507] multiprocessing: Add a stop() method to ForkServer In-Reply-To: <1562336538.11.0.898279442139.issue37507@roundup.psfhosted.org> Message-ID: <1562574036.34.0.167420569338.issue37507@roundup.psfhosted.org> STINNER Victor added the comment: > There is no reason to expose "stop the forkserver" to users. How the forkserver process works, what tasks it handles, is an implementation detail. If users start "stopping the forkserver" in their applications for no good to reason, they might get bugs now or later that they wouldn't get otherwise. Well, we already had this conversation before. I really dislike APIs which hold resources but disallow to "release resources", especially when a resource is not a few bytes of memory, but a whole process. Since there is a method to start the server (ensure_running), I would like to control when it's stopped "to ensure that errors are properly reported if something goes wrong." That's why I added Process.close() in Python 3.7 and ResourceWarning in Pool in Python 3.8. Here I don't propose to add a ResourceWarning if the server is not stopped explicitly. I only propose to add a method if the developer wants to control when it's stopped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 04:27:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2019 08:27:56 +0000 Subject: [issue37507] multiprocessing: Add a stop() method to ForkServer In-Reply-To: <1562336538.11.0.898279442139.issue37507@roundup.psfhosted.org> Message-ID: <1562574476.92.0.984422235719.issue37507@roundup.psfhosted.org> STINNER Victor added the comment: > Side note: if you're modifying multiprocessing, asking for a review doesn't hurt ;-) I only modified tests (I only added a *private* _stop() method which is only used by tests). When I touch the multiprocessing module directly, I wait for a review. Right now, I'm embarrassed since my "multiprocessing tests call _run_finalizers()" change which was supposed to be simple and safe broke Refleak buildbots. I had to fix test_concurrent_futures to also explicitly closes the forkserver there: https://github.com/python/cpython/pull/14643 I was quite surprised to discover that a test leaves a child process in background. IMHO tests should have zero side effects on following tests (at least a test file must clear all its resources when it completes). Python finalization is *very* fragile (not reliable at all), so I prefer to release resources as soon as possible, to get errors reported. Multiprocessing tests failures are still common, and very likely caused by these small details like a server which isn't stopped properly (IMHO). Tests should get a fresh and reliable environment. Maybe each test should ensure that the forkserver is stopped, but I chose the easy fix: only stop it once at (test file) exit. Start/stop the server in each test might make these tests even slower, whereas multiprocessing tests are almost part of the slowest tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 04:29:02 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 08 Jul 2019 08:29:02 +0000 Subject: [issue37337] Add _PyObject_VectorcallMethod() function In-Reply-To: <1560936931.61.0.893195452608.issue37337@roundup.psfhosted.org> Message-ID: <1562574542.71.0.149047261881.issue37337@roundup.psfhosted.org> Petr Viktorin added the comment: Thank you, Jeroen and INADA-san! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 04:29:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2019 08:29:59 +0000 Subject: [issue37507] multiprocessing: Add a stop() method to ForkServer In-Reply-To: <1562336538.11.0.898279442139.issue37507@roundup.psfhosted.org> Message-ID: <1562574599.63.0.893715105155.issue37507@roundup.psfhosted.org> STINNER Victor added the comment: Previous related discussion on python-dev: https://mail.python.org/archives/list/python-dev at python.org/thread/NJCLS7IOKKO6W7LBGPQI2VFAO57EJEPW/#DIOMN256E24NUBSPKWFQA556F43IOWXR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 04:49:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2019 08:49:18 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562575758.52.0.11377794575.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e676244235895aeb6ec3b81ca3ccf4a70e487919 by Victor Stinner in branch 'master': bpo-37421: test_concurrent_futures stops ForkServer (GH-14643) https://github.com/python/cpython/commit/e676244235895aeb6ec3b81ca3ccf4a70e487919 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 04:49:32 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jul 2019 08:49:32 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562575772.3.0.366468689315.issue37421@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14456 pull_request: https://github.com/python/cpython/pull/14645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 05:04:15 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 08 Jul 2019 09:04:15 +0000 Subject: [issue30663] IDLE: Add lineno sidebar to editor window In-Reply-To: <1497431681.4.0.503512983326.issue30663@psf.upfronthosting.co.za> Message-ID: <1562576655.68.0.162627272518.issue30663@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 05:52:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2019 09:52:04 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562579524.27.0.789865356748.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cdada40b23b1f7f527797ba7cb14c25820b05981 by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-37421: test_concurrent_futures stops ForkServer (GH-14643) (GH-14645) https://github.com/python/cpython/commit/cdada40b23b1f7f527797ba7cb14c25820b05981 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 08:00:10 2019 From: report at bugs.python.org (MeiK) Date: Mon, 08 Jul 2019 12:00:10 +0000 Subject: [issue37522] http.cookies.SimpleCookie doesn't seem to be parsed using regulars Message-ID: <1562587209.99.0.655930628175.issue37522@roundup.psfhosted.org> New submission from MeiK : In Python's built-in SimpleCookie[1], regular expressions are used to parse cookies, which seems to be a non-standard way. I looked at the RFC documentation related to cookie resolution: rfc2109[2] and rfc6265[3], the former has been replaced by the latter. These documents stipulate that cookies should be split with a semicolon, just like http.cookiejar.parse_ns_headers[4]. But if we use the approach described in the documentation, then there will be a set of tests that fail[5]. Current: >>> print(SimpleCookie('keebler="E=mc2; L=\\"Loves\\"; fudge=\\012;"?)) Set-Cookie: keebler="E=mc2; L=\"Loves\"; fudge=\012;" Modified: >>> print(SimpleCookie('keebler="E=mc2; L=\\"Loves\\"; fudge=\\012;"?)) Set-Cookie: keebler="E=mc2 Is this a bug? Should it be modified? English is not my native language; please excuse typing errors. [1]: https://github.com/python/cpython/blob/master/Lib/http/cookies.py#L536 [2]: https://www.ietf.org/rfc/rfc2109.txt [3]: https://www.ietf.org/rfc/rfc6265.txt [4]: https://github.com/python/cpython/blob/master/Lib/http/cookiejar.py#L453 [5]: https://github.com/python/cpython/blob/master/Lib/test/test_http_cookies.py#L19 ---------- components: Extension Modules messages: 347494 nosy: MeiK priority: normal severity: normal status: open title: http.cookies.SimpleCookie doesn't seem to be parsed using regulars type: enhancement 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 Jul 8 08:02:05 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 08 Jul 2019 12:02:05 +0000 Subject: [issue37055] Numerous warnings with blake2 module In-Reply-To: <1558886932.4.0.665756848832.issue37055@roundup.psfhosted.org> Message-ID: <1562587325.71.0.61244276828.issue37055@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +14457 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14646 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 09:47:26 2019 From: report at bugs.python.org (Steinmann) Date: Mon, 08 Jul 2019 13:47:26 +0000 Subject: [issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1562593646.67.0.38254215418.issue37130@roundup.psfhosted.org> Steinmann added the comment: @Brett: I also think making Path('.').name evaluate to '.' would be the most logical thing. More even so since the documentation says PurePath.name() is equivalent to os.path.basename()[1], but: >>> Path('.').name '' >>> os.path.basename('.') '.' Though I'm not sure if that is ok to change this behaviour or if people already rely on it. No matter which decision is made, I would say the documentation should be improved. If it will be the same as basename, document this also here [2]. Otherwise add a note to [1], maybe in the same format and position as was done for os.path.relpath(). [1] https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module [2] https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.name ---------- nosy: +lucas.steinmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 09:58:54 2019 From: report at bugs.python.org (David CARLIER) Date: Mon, 08 Jul 2019 13:58:54 +0000 Subject: [issue37471] mmap module: add MAP_ALIGNED_SUPER FreeBSD and MAP_CONCEAL OpenBSD constants In-Reply-To: <1561992076.14.0.131168836569.issue37471@roundup.psfhosted.org> Message-ID: <1562594334.48.0.560877237441.issue37471@roundup.psfhosted.org> Change by David CARLIER : ---------- title: mmap module: add MAP_ALIGNED_SUPER FreeBSD constant -> mmap module: add MAP_ALIGNED_SUPER FreeBSD and MAP_CONCEAL OpenBSD constants _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 10:11:58 2019 From: report at bugs.python.org (Guido Vranken) Date: Mon, 08 Jul 2019 14:11:58 +0000 Subject: [issue29505] Submit the re, json, & csv modules to oss-fuzz testing In-Reply-To: <1486587261.97.0.342323514088.issue29505@psf.upfronthosting.co.za> Message-ID: <1562595118.82.0.70597165688.issue29505@roundup.psfhosted.org> Guido Vranken added the comment: Hi, I've built a generic Python fuzzer and submitted it to OSS-Fuzz. It works by implementing a "def FuzzerRunOne(FuzzerInput):" function in Python in which some arbitrary code is run based on FuzzerInput, which is a bytes object. This is a more versatile solution than the current re, json, csv fuzzers as it requires no custom C code and adding more fuzzing targets is as easy as writing a new harness in Python and adding a build rule. Code coverage is measured at both the CPython level (*.c) and the Python level (*.py). CPython is compiled with AddressSanitizer. What this means is that both CPython memory bugs and Python library bugs (excessive memory consumption, hangs, slowdowns, unexpected exceptions) are expected to transpire. You can see my current set of fuzzers here: https://github.com/guidovranken/python-library-fuzzers The PR to OSS-Fuzz is https://github.com/google/oss-fuzz/pull/2567 Currently, the only Python maintainer who will be receiving automated bug reports is gpshead. Are there any other developers who normally process Python security bug reports and would like to receive notifications? Feel free to respond directly in the OSS-Fuzz PR thread. ---------- nosy: +Guido _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 10:24:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2019 14:24:04 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1562595844.55.0.929894745485.issue36389@roundup.psfhosted.org> STINNER Victor added the comment: I opened this issue, because I was convinced that it would be easy to implement checks faster than gc.setthreshold(), but I failed to write efficient tests which detect the bugs that I listed above. My approach was basically to check all objects tracked by the GC every N memory allocations (PyGC_Malloc): too slow. I tried to put thresholds per generation: it was still too slow. Maybe recent objects should be checked often, but old objects should be checked less often. For example, only check objects in generation 0 and scan new objects, and then remember the size of generation 0. At the next check, ignore objects already checked. I failed to find time and interest to implement this approach. I abandon this issue and my PR. In the meanwhile, gc.set_threshold(5) can be used. It isn't too slow and is quite good to find most bugs listed in this issue. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 10:25:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2019 14:25:44 +0000 Subject: [issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC In-Reply-To: <1553166161.96.0.697085261419.issue36389@roundup.psfhosted.org> Message-ID: <1562595944.11.0.20956454081.issue36389@roundup.psfhosted.org> STINNER Victor added the comment: Ah by the way, this issue was mostly motivated by a customer issue, but the bug disappeared from customer's production. Moreover, Python 3.8 now allows to use debug build without having to recompile all C extensions: https://docs.python.org/dev/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build A debug build may also help to catch more bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 10:34:25 2019 From: report at bugs.python.org (gaborbernat) Date: Mon, 08 Jul 2019 14:34:25 +0000 Subject: [issue37369] Issue with pip in venv on Powershell in Windows In-Reply-To: <1561161256.11.0.32935812019.issue37369@roundup.psfhosted.org> Message-ID: <1562596465.53.0.907938603131.issue37369@roundup.psfhosted.org> gaborbernat added the comment: A note on the above points, virtualenv has started migrating over to venv via https://github.com/pypa/virtualenv/pull/1377 . Following this, the old ways of virtualenv should be left to the history books. Hopefully, I can get it out within the next month or so. ---------- nosy: +gaborbernat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 12:54:56 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Jul 2019 16:54:56 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562604896.93.0.418500526864.issue37500@roundup.psfhosted.org> Guido van Rossum added the comment: Sure seems to me as if we need to have a separate pass that looks for out-of-place `return`, `yield`, `break` and `continue`, run before the optimization removes `if 0:` blocks etc. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 12:57:47 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jul 2019 16:57:47 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562605067.64.0.473218158376.issue37149@roundup.psfhosted.org> Ned Deily added the comment: New changeset 317c33e67cb6076c5a87a66c75e8c35ac581398d by Ned Deily in branch '3.6': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/317c33e67cb6076c5a87a66c75e8c35ac581398d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:04:18 2019 From: report at bugs.python.org (hai shi) Date: Mon, 08 Jul 2019 17:04:18 +0000 Subject: [issue37187] CField.size from the ctypes module does not behave as documented on bitfields In-Reply-To: <1559879196.85.0.0861364976154.issue37187@roundup.psfhosted.org> Message-ID: <1562605458.85.0.178551919771.issue37187@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14458 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:25:14 2019 From: report at bugs.python.org (hai shi) Date: Mon, 08 Jul 2019 17:25:14 +0000 Subject: [issue27679] set_bitfields() unused in _ctypes_test In-Reply-To: <1470299556.34.0.285781931231.issue27679@psf.upfronthosting.co.za> Message-ID: <1562606714.43.0.90866521553.issue27679@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14459 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:31:53 2019 From: report at bugs.python.org (hai shi) Date: Mon, 08 Jul 2019 17:31:53 +0000 Subject: [issue27679] set_bitfields() unused in _ctypes_test In-Reply-To: <1470299556.34.0.285781931231.issue27679@psf.upfronthosting.co.za> Message-ID: <1562607113.42.0.798278618959.issue27679@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:32:40 2019 From: report at bugs.python.org (hai shi) Date: Mon, 08 Jul 2019 17:32:40 +0000 Subject: [issue37187] CField.size from the ctypes module does not behave as documented on bitfields In-Reply-To: <1559879196.85.0.0861364976154.issue37187@roundup.psfhosted.org> Message-ID: <1562607160.97.0.0737622338766.issue37187@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:43:08 2019 From: report at bugs.python.org (Caymon Sullivan) Date: Mon, 08 Jul 2019 17:43:08 +0000 Subject: [issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support In-Reply-To: <1530609211.5.0.56676864532.issue34028@psf.upfronthosting.co.za> Message-ID: <1562607788.95.0.567914495544.issue34028@roundup.psfhosted.org> Change by Caymon Sullivan : ---------- nosy: +cayman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:58:37 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jul 2019 17:58:37 +0000 Subject: [issue30663] IDLE: Add lineno sidebar to editor window In-Reply-To: <1497431681.4.0.503512983326.issue30663@psf.upfronthosting.co.za> Message-ID: <1562608717.31.0.740814400309.issue30663@roundup.psfhosted.org> Terry J. Reedy added the comment: A closing note: Saimadhav Heblikar's initial patch on #17535 was a standalone proof-of-concept file was based on Canvas and Text subclasses. The latter consisted mostly of two tk.eval(tcl_code) calls. I rejected the idea of using tk.eval, as review and maintenance would requires knowing tcl. But the submission won him my GSOC mentorship (and we did quite well working together, even though line-numbering was not finished). Saimadhav's poc appears to have been inspired by Bryan Oakley's Canvas and Text-based answer a year earlier on https://stackoverflow.com/a/16375233. But Bryan only used tk.call and tk.createcommand, not tk.eval. Some of Saimadhav's tcl appears to be a translation of some of Bryan's python. PR 2183 is a full patch also based on Canvas and Text and explicitly inspired by Oakley's answer. However, the Text subclass is an edited version of Saimadhav's tk.eval version, not Oakley's. This is properly closed as a duplicate, but it does provide the Oakley link, which does not appear on #17535. ---------- nosy: +cheryl.sabella, taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 14:36:52 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jul 2019 18:36:52 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562611012.39.0.445334151406.issue37149@roundup.psfhosted.org> Terry J. Reedy added the comment: Larry, I have the same request of you that I did for Ned. Please backport PR-14616 to 3.5. It replaces a dead link to the most important online Tkinter reference. Many people are lost without the reference, as they find reading the tcl/tk reference much harder. It is like having half the tkinter doc, the part covering tk widgets, removed. (The question has come up on Stackoverflow also.) The replacement will benefit any 3.5 users looking at the online 3.5 docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 14:38:53 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Jul 2019 18:38:53 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562611133.67.0.52513753905.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Yep, that is more or less the approach in PR14612. What I tried to achieve there is also minimize the amount of changes to make the pass for errors non intrusive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:07:58 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jul 2019 19:07:58 +0000 Subject: [issue37512] Error in the documentation about string concatenation In-Reply-To: <1562362398.93.0.443192979272.issue37512@roundup.psfhosted.org> Message-ID: <1562612878.23.0.792959256581.issue37512@roundup.psfhosted.org> Brett Cannon added the comment: I'm going to close this as we try to avoid documenting CPython-specific details unless absolutely necessary. And in the case of documenting the str type we should avoid that. So thanks for the suggestion, Dmitriy, but we will just leave this as a pleasant surprise for folks who accidentally make the mistake of writing code this way. ---------- nosy: +brett.cannon resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:08:05 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 08 Jul 2019 19:08:05 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562612885.41.0.0460354118248.issue29312@roundup.psfhosted.org> Jeroen Demeyer added the comment: > d2 must be converted to 2 lists (kwnames and args) and then a new dict should be created. The last part is not necessarily true. You could do the update directly, without having that intermediate dict. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:09:01 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jul 2019 19:09:01 +0000 Subject: [issue37514] french translation Spelling mistake on datetime python's library documentation online In-Reply-To: <1562419390.4.0.81704201562.issue37514@roundup.psfhosted.org> Message-ID: <1562612941.05.0.309783595352.issue37514@roundup.psfhosted.org> Change by Brett Cannon : ---------- assignee: docs at python -> mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:12:53 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jul 2019 19:12:53 +0000 Subject: [issue37519] Three inconsistent module attributes In-Reply-To: <1562502652.41.0.952456238618.issue37519@roundup.psfhosted.org> Message-ID: <1562613173.7.0.622958308445.issue37519@roundup.psfhosted.org> Brett Cannon added the comment: PEPs actually become historical documents once they are implemented, so could you please check what the official docs say in regards to this to see if there is an inconsistency in the semantics? ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:14:19 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jul 2019 19:14:19 +0000 Subject: [issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562613259.92.0.170354202182.issue37521@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:16:04 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jul 2019 19:16:04 +0000 Subject: [issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562613364.45.0.721022635343.issue37521@roundup.psfhosted.org> Brett Cannon added the comment: Mind re-uploading the examples files with a more appropriate file name? (Saying "import is f-'ed" is not motivating to those of us who wrote it to try and fix this.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 16:00:12 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jul 2019 20:00:12 +0000 Subject: [issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562616012.74.0.708196161509.issue37521@roundup.psfhosted.org> Change by Brett Cannon : Removed file: https://bugs.python.org/file48460/importsfucked.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 16:00:18 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jul 2019 20:00:18 +0000 Subject: [issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562616018.71.0.797118862189.issue37521@roundup.psfhosted.org> Change by Brett Cannon : Removed file: https://bugs.python.org/file48461/importsfucked.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:17:59 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 08 Jul 2019 21:17:59 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562620679.4.0.795722542412.issue18374@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset 110a47c4f42cf4db88edc1876899fff8f05190fb by Ivan Levkivskyi (Carl Friedrich Bolz-Tereick) in branch 'master': bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607) https://github.com/python/cpython/commit/110a47c4f42cf4db88edc1876899fff8f05190fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:18:11 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jul 2019 21:18:11 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562620691.07.0.617542566772.issue18374@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14460 pull_request: https://github.com/python/cpython/pull/14653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:41:37 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Jul 2019 21:41:37 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562622097.15.0.811972578037.issue18374@roundup.psfhosted.org> miss-islington added the comment: New changeset c7be35c2abd598f02a633879133caec356593241 by Miss Islington (bot) in branch '3.8': bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607) https://github.com/python/cpython/commit/c7be35c2abd598f02a633879133caec356593241 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:54:52 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jul 2019 21:54:52 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562622892.13.0.0105869209667.issue37500@roundup.psfhosted.org> Ned Deily added the comment: New changeset 4834c80d799471a6c9ddaad9c5c82c8af156e4fd by Ned Deily (Pablo Galindo) in branch '3.7': [3.7] bpo-37500: Revert commit 85ed1712e428f93408f56fc684816f9a85b0ebc0 (GH-14605) https://github.com/python/cpython/commit/4834c80d799471a6c9ddaad9c5c82c8af156e4fd New changeset 87a918a0035da576207b85b6844f64fbb9b4c0af by Ned Deily in branch '3.7': [3.7] bpo-37500: update Misc/NEWS entries to mention revert https://github.com/python/cpython/commit/87a918a0035da576207b85b6844f64fbb9b4c0af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 17:54:52 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jul 2019 21:54:52 +0000 Subject: [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562622892.29.0.240795712135.issue37149@roundup.psfhosted.org> Ned Deily added the comment: New changeset f2cbf41afc9e9a0ce16bfe0c71662348453a28c4 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/f2cbf41afc9e9a0ce16bfe0c71662348453a28c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 18:10:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Jul 2019 22:10:29 +0000 Subject: [issue37421] Some tests leak temporary files In-Reply-To: <1561588455.96.0.166877646344.issue37421@roundup.psfhosted.org> Message-ID: <1562623828.99.0.785647665675.issue37421@roundup.psfhosted.org> STINNER Victor added the comment: It seems like tests don't leak temporary files anymore: $ mkdir ~/TEMP $ TMPDIR=~/TEMP TEMPDIR=~/TEMP ./python -m test -v -r -u all,-gui $ ls ~/TEMP # empty directory I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:56:51 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jul 2019 23:56:51 +0000 Subject: [issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562630211.28.0.222381328736.issue37149@roundup.psfhosted.org> Ned Deily added the comment: A few comments on this. One, the Tkinter documentation in question seems to have been a personal project of John Shipman at New Mexico Tech and, as such, was not "official" so I've updated the issue title accordingly. Sadly, as Cheryl noted, John died two years ago and I guess there were no plans in place for someone to take the documentation over from him. We can all appreciate his very valuable contributions over the years by developing and maintaining this additional documentation. It would be great to find a way to provide an equivalent resource for Tk 8.6. The best alternatives today is probably Mark Roseman's TkDocs website and "Modern Tkinter" book/ebook, both also already linked on our Standard Library tkinter page. I've nosied Mark in case he has any thoughts on the matter. As far as updating the page in older releases, as 3.6 release manager I did decide to allow the update there, even though we normally would not make such a change for a security-fix-only release; I did so as we are still including 3.6 in our daily doc builds on docs.python.org (although at some point soon that will stop). It's Larry's call about 3.5 but note that the current 3.5 docs on docs.python.org are normally only updated when a new 3.5.x security-fix release appears. If you want it to be considered for 3.5, it would be best to make a 3.5 backport PR. ---------- nosy: +markroseman priority: release blocker -> title: link to official documentation tkinter failed !!! -> link to John Shipman's Tkinter 8.5 documentation fails: website no longer available _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 22:21:57 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 09 Jul 2019 02:21:57 +0000 Subject: [issue37367] octal escapes applied inconsistently throughout the interpreter and lib In-Reply-To: <1561146368.97.0.686299796922.issue37367@roundup.psfhosted.org> Message-ID: <1562638917.14.0.754450680033.issue37367@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +14461 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 22:46:32 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 09 Jul 2019 02:46:32 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562640392.03.0.102624176701.issue29312@roundup.psfhosted.org> Inada Naoki added the comment: > Changing dict.update() calling convention may save a few nanoseconds on d1.update(d2) call, but it will make d1.update(**d2) way slower with a complexity of O(n): d2 must be converted to 2 lists (kwnames and args) and then a new dict should be created. But who/why use d1.update(**d2)? In case of dict(), dict(d1, **d2) was idiom to merge two dicts. But I don't know any practical usage of d1.update(**d2). d1.update(d2) should be preferred. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 23:13:18 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 09 Jul 2019 03:13:18 +0000 Subject: [issue37367] octal escapes applied inconsistently throughout the interpreter and lib In-Reply-To: <1561146368.97.0.686299796922.issue37367@roundup.psfhosted.org> Message-ID: <1562641998.81.0.916354029419.issue37367@roundup.psfhosted.org> Jeffrey Kintscher added the comment: The PR is ready for review. It raises ValueError if the escaped octal value in a byte string is greater than 255. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 00:23:30 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 09 Jul 2019 04:23:30 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562646210.37.0.995711569967.issue19696@roundup.psfhosted.org> Change by Kyle Stanley : ---------- pull_requests: +14462 pull_request: https://github.com/python/cpython/pull/14655 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 00:35:07 2019 From: report at bugs.python.org (Daniel Hillier) Date: Tue, 09 Jul 2019 04:35:07 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1562646907.94.0.117809196513.issue36993@roundup.psfhosted.org> Change by Daniel Hillier : ---------- pull_requests: +14463 pull_request: https://github.com/python/cpython/pull/14656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 01:00:15 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 09 Jul 2019 05:00:15 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562648415.7.0.806392863551.issue19696@roundup.psfhosted.org> Kyle Stanley added the comment: Opened a new PR for moving "threaded_import_hangers" to "test_importlib/" (PR-14642). This should be the final file in "tests/" to move into "test_importlib/", so the issue can be closed if this PR is merged. I'll create a new issue for modernizing the tests once this issue is closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 01:03:03 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 09 Jul 2019 05:03:03 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562648583.02.0.746019509412.issue19696@roundup.psfhosted.org> Kyle Stanley added the comment: Typo: The PR in the above comment should be 14655, not 14642. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 01:19:37 2019 From: report at bugs.python.org (liyang) Date: Tue, 09 Jul 2019 05:19:37 +0000 Subject: [issue37489] pickling instance which inherited from Exception with keyword only parameter In-Reply-To: <1562123551.66.0.0575103279234.issue37489@roundup.psfhosted.org> Message-ID: <1562649577.61.0.366429197212.issue37489@roundup.psfhosted.org> liyang added the comment: yesterday i have test two case, first i find the code 1 not execute the __init__ when execute loads. second the code 1 and code 2 dumps result s is not equal,because the dumps is the buildin function ,so i can't find more message.but if the code2 only have keyword parameter the code2 is not raise exception. i want to debug the interpreter that can get the reason. ---------- nosy: +liyang1025 at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 01:44:38 2019 From: report at bugs.python.org (Gordon Messmer) Date: Tue, 09 Jul 2019 05:44:38 +0000 Subject: [issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8 In-Reply-To: <1498409939.21.0.261757462715.issue30755@psf.upfronthosting.co.za> Message-ID: <1562651078.95.0.713641333741.issue30755@roundup.psfhosted.org> Gordon Messmer added the comment: > I can see that it might be helpful to provide such a conversion if > C.UTF-8 doesn't exist and en_US.UTF-8 does That can't happen. The "C" locale describes the behavior defined in the ISO C standard. It's built-in to glibc (and should be for all other libc implementations). All other locales require external support (i.e. /usr/lib/locale/) https://www.gnu.org/software/libc/manual/html_node/Standard-Locales.html#Standard-Locales ---------- nosy: +gordonmessmer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 02:08:42 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 06:08:42 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562652522.2.0.927176955202.issue26806@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14464 pull_request: https://github.com/python/cpython/pull/14657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 02:10:15 2019 From: report at bugs.python.org (Gordon Messmer) Date: Tue, 09 Jul 2019 06:10:15 +0000 Subject: [issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8 In-Reply-To: <1498409939.21.0.261757462715.issue30755@psf.upfronthosting.co.za> Message-ID: <1562652615.47.0.934302929171.issue30755@roundup.psfhosted.org> Gordon Messmer added the comment: > I agree we shouldn't be aliasing C.UTF-8 to en_US.UTF-8 though What can we do about reverting that change? Python's current behavior causes unexpected exceptions, especially in containers. I'm currently debugging test failures in a Python application that occur in Fedora rawhide containers. Those containers don't have any locales installed. The test software saves its current locale, changes the locale in order to run a test, and then restores the original. Because Python is incorrectly reporting the original locale as "en_US", restoring the original fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 02:29:38 2019 From: report at bugs.python.org (Daniel Hillier) Date: Tue, 09 Jul 2019 06:29:38 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1562653778.29.0.447120302443.issue36993@roundup.psfhosted.org> Daniel Hillier added the comment: I've pushed a PR which adds a test that generates corrupt zip64 files with different combinations of zip64 extra data lengths and zip64 flags (which determines how many fields are required in the extra data). It now raises a BadZipFile with a message naming the first missing field. ---------- nosy: +dhillier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 02:42:30 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Jul 2019 06:42:30 +0000 Subject: [issue30663] IDLE: Add lineno sidebar to editor window In-Reply-To: <1497431681.4.0.503512983326.issue30663@psf.upfronthosting.co.za> Message-ID: <1562654550.88.0.192862470565.issue30663@roundup.psfhosted.org> Tal Einat added the comment: Thanks for helping to move this forward, Louie! My worry with this approach is that all of the line numbers are redrawn upon scrolling, which would be likely to make scrolling less smooth, especially on low-end hardware (where IDLE is relatively often used). The alternate implementation approach we are pursuing in #17535 uses a second text widget, whose scrolling is synced to the main text widget, and whose contents are only updated when the number of lines in the main text widget changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 03:01:38 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 09 Jul 2019 07:01:38 +0000 Subject: [issue36132] Python cannot access hci_channel field in sockaddr_hci In-Reply-To: <1551265831.42.0.956760803512.issue36132@roundup.psfhosted.org> Message-ID: <1562655698.92.0.730551919986.issue36132@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 03:06:51 2019 From: report at bugs.python.org (Daniel Hillier) Date: Tue, 09 Jul 2019 07:06:51 +0000 Subject: [issue37523] zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile Message-ID: <1562656011.62.0.508019848995.issue37523@roundup.psfhosted.org> New submission from Daniel Hillier : After closing a file object opened from a ZipFile, attempting i/o operations raises AttributeError because the underlying fd has been set to None. We should be raising ValueErrors consistent with io.FileIO behaviour. Similar inconsistencies exist for the following operations on a closed ZipExtFile: - seek - seekable - read - readable - tell ---------- components: Library (Lib) messages: 347524 nosy: dhillier priority: normal severity: normal status: open title: zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 03:24:44 2019 From: report at bugs.python.org (Brett Slatkin) Date: Tue, 09 Jul 2019 07:24:44 +0000 Subject: [issue34679] asyncio.add_signal_handler call fails if not on main thread In-Reply-To: <1536938865.53.0.956365154283.issue34679@psf.upfronthosting.co.za> Message-ID: <1562657084.8.0.24515066921.issue34679@roundup.psfhosted.org> Brett Slatkin added the comment: I believe the scope of this bug may be larger than it originally seemed. Now that ProactorEventLoop is the default for Python 3.8 (https://bugs.python.org/issue34687), I'm seeing this same problem on Windows when you try to call asyncio.new_event_loop() from within a thread. It breaks with the ProactorEventLoop (snippet #1 below). It works fine with the SelectorEventLoop (snippet #2 below). Am I wrong to expect to be able to create a unique event loop for each thread from within the thread itself? I worked around this problem by manually forcing the event loop policy (https://bugs.python.org/issue33792). === Snippet #1 (breaks) === import asyncio from threading import Thread def my_func(): asyncio.new_event_loop() t = Thread(target=my_func) t.start() t.join() === Output from snippet #1 === PS G:\> python .\repro.py Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File ".\repro.py", line 6, in my_func asyncio.new_event_loop() File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\asyncio\events.py", line 758, in new_event_loop return get_event_loop_policy().new_event_loop() File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\asyncio\events.py", line 656, in new_event_loop return self._loop_factory() File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py", line 310, in __init__ super().__init__(proactor) File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py", line 630, in __init__ signal.set_wakeup_fd(self_no) ValueError: set_wakeup_fd only works in main thread === Snippet #2 (works) === import asyncio from threading import Thread # Work-around from https://bugs.python.org/issue34679 policy = asyncio.get_event_loop_policy() policy._loop_factory = asyncio.SelectorEventLoop def my_func(): asyncio.new_event_loop() t = Thread(target=my_func) t.start() t.join() === More details === My version of Python: 3.8.0b2 (tags/v3.8.0b2:21dd01d, Jul 4 2019, 16:00:09) [MSC v.1916 64 bit (AMD64)] My version of Windows (it's a developer VM from https://developer.microsoft.com/en-us/windows/downloads/virtual-machines): PS G:\> [System.Environment]::OSVersion.Version Major Minor Build Revision ----- ----- ----- -------- 10 0 17763 0 ---------- nosy: +Brett Slatkin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 03:27:20 2019 From: report at bugs.python.org (Daniel Hillier) Date: Tue, 09 Jul 2019 07:27:20 +0000 Subject: [issue37523] zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile In-Reply-To: <1562656011.62.0.508019848995.issue37523@roundup.psfhosted.org> Message-ID: <1562657240.84.0.328505760251.issue37523@roundup.psfhosted.org> Change by Daniel Hillier : ---------- keywords: +patch pull_requests: +14465 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 03:36:40 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Jul 2019 07:36:40 +0000 Subject: [issue37390] Generate table of audit events for docs In-Reply-To: <1561391164.88.0.923938823513.issue37390@roundup.psfhosted.org> Message-ID: <1562657800.95.0.604462716991.issue37390@roundup.psfhosted.org> Steve Dower added the comment: Anyone from the docs team have any ideas here? We're going to present on this at EuroPython tomorrow and it'd be great to be able to point people at the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 03:46:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 07:46:22 +0000 Subject: [issue37501] Test failures when CPython is built without docstrings In-Reply-To: <1562297404.15.0.705525533072.issue37501@roundup.psfhosted.org> Message-ID: <1562658382.95.0.942634185922.issue37501@roundup.psfhosted.org> Terry J. Reedy added the comment: Compiling without docstrings only affects compiled functions. (Is this option unix only, for servers?) This caused failures in 6 /test test functions. Running with -00 only affects python functions. It causes failure in 19 test function on Windows. For IDLE, it causes many more failures than the configuration change. __doc__ == '' might have been less of a nuisance than == None, but too late to change that glocally now, although it can be a local solution. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 04:42:49 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 09 Jul 2019 08:42:49 +0000 Subject: [issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8 In-Reply-To: <1498409939.21.0.261757462715.issue30755@psf.upfronthosting.co.za> Message-ID: <1562661769.53.0.843175223791.issue30755@roundup.psfhosted.org> Miro Hron?ok added the comment: >> C.UTF-8 doesn't exist and en_US.UTF-8 does > That can't happen It certainly can. Take for example RHEL 7 or 6. ---------- nosy: +hroncok, vstinner versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:02:23 2019 From: report at bugs.python.org (Abhilash Raj) Date: Tue, 09 Jul 2019 09:02:23 +0000 Subject: [issue37491] IndexError in get_bare_quoted_string In-Reply-To: <1562141971.16.0.876863205208.issue37491@roundup.psfhosted.org> Message-ID: <1562662943.89.0.431461408152.issue37491@roundup.psfhosted.org> Abhilash Raj added the comment: Thanks for the explanation Terry! In this case, value becomes None (I think), which causes the IndexError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:15:38 2019 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Tue, 09 Jul 2019 09:15:38 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562663738.6.0.847935777063.issue18374@roundup.psfhosted.org> Change by Carl Friedrich Bolz-Tereick : ---------- pull_requests: +14466 pull_request: https://github.com/python/cpython/pull/14659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:20:18 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 09:20:18 +0000 Subject: [issue37524] IDLE error on closing 3.8+ debug build Message-ID: <1562664018.55.0.0863283493597.issue37524@roundup.psfhosted.org> New submission from Terry J. Reedy : In Win Command Prompt, in master repository or 3.8 worktree with 32 bit debug build: F:\dev\3x>python Running Debug|Win32 interpreter... Python 3.9.0a0 (heads/master:110a47c4f4, Jul 9 2019, 01:31:55) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> quit() ***Exits okay*** F:\dev\3x>python -m idlelib Running Debug|Win32 interpreter... Exception ignored in: Traceback (most recent call last): File "F:\dev\3x\lib\idlelib\run.py", line 488, in close File "F:\dev\3x\lib\idlelib\pyshell.py", line 1017, in close File "F:\dev\3x\lib\idlelib\editor.py", line 1019, in close File "F:\dev\3x\lib\idlelib\outwin.py", line 94, in maybesave File "F:\dev\3x\lib\idlelib\editor.py", line 952, in get_saved AttributeError: 'NoneType' object has no attribute 'get_saved' Same in 3.8 worktree, not in 3.7 worktree, not with installed 64 bit, non-debug 3.8.0b2 ---------- assignee: terry.reedy components: IDLE messages: 347530 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE error on closing 3.8+ debug build type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:22:17 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 09:22:17 +0000 Subject: [issue37524] IDLE error on closing 3.8+ debug build In-Reply-To: <1562664018.55.0.0863283493597.issue37524@roundup.psfhosted.org> Message-ID: <1562664137.57.0.919497692688.issue37524@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:23:16 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 09:23:16 +0000 Subject: [issue37524] IDLE error on closing 3.8+ debug build In-Reply-To: <1562664018.55.0.0863283493597.issue37524@roundup.psfhosted.org> Message-ID: <1562664196.26.0.734961531033.issue37524@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:26:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 09:26:22 +0000 Subject: [issue37524] IDLE error on closing 3.8+ debug build In-Reply-To: <1562664018.55.0.0863283493597.issue37524@roundup.psfhosted.org> Message-ID: <1562664382.04.0.321806501893.issue37524@roundup.psfhosted.org> Terry J. Reedy added the comment: I am pretty sure that this started sometime well after 3.7 was split off from master. Perhaps there was some change in python shutdown not backported to 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:31:47 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Jul 2019 09:31:47 +0000 Subject: [issue37052] Add examples for mocking async for and async context manager in unittest.mock docs In-Reply-To: <1558857063.08.0.951093658338.issue37052@roundup.psfhosted.org> Message-ID: <1562664707.84.0.810010879665.issue37052@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +14467 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14660 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:36:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 09:36:10 +0000 Subject: [issue37525] test_ssl: test_pha_required_nocert() logs ResourceWarning Message-ID: <1562664970.92.0.231614914384.issue37525@roundup.psfhosted.org> New submission from STINNER Victor : vstinner at apu$ ./python -u -m test test_ssl -v -m test_pha_required_nocert == CPython 3.9.0a0 (heads/master:110a47c4f4, Jul 8 2019, 23:52:00) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] == Linux-5.1.15-300.fc30.x86_64-x86_64-with-glibc2.29 little-endian == cwd: /home/vstinner/python/master/build/test_python_24211 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 load avg: 0.70 [1/1] test_ssl test_ssl: testing with 'OpenSSL 1.1.1c FIPS 28 May 2019' (1, 1, 1, 3, 15) under 'Linux-5.1.15-300.fc30.x86_64-x86_64-with-glibc2.29' HAS_SNI = True OP_ALL = 0x80000054 OP_NO_TLSv1_1 = 0x10000000 test_pha_required_nocert (test.test_ssl.TestPostHandshakeAuth) ... Exception in thread Thread-2: Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_ssl.py", line 2299, in run msg = self.read() File "/home/vstinner/python/master/Lib/test/test_ssl.py", line 2276, in read return self.sslconn.read() File "/home/vstinner/python/master/Lib/ssl.py", line 1101, in read return self._sslobj.read(len) ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2560) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/vstinner/python/master/Lib/threading.py", line 938, in _bootstrap_inner self.run() File "/home/vstinner/python/master/Lib/test/test_ssl.py", line 2385, in run raise ssl.SSLError('tlsv13 alert certificate required') ssl.SSLError: ('tlsv13 alert certificate required',) /home/vstinner/python/master/Lib/threading.py:938: ResourceWarning: unclosed self.run() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok ---------------------------------------------------------------------- Ran 1 test in 0.028s OK == Tests result: SUCCESS == 1 test OK. Total duration: 178 ms Tests result: SUCCESS More verbose output from Refleak buildbot: https://buildbot.python.org/all/#/builders/189/builds/87 0:00:19 load avg: 4.17 [ 40/419] test_ssl passed beginning 6 repetitions 123456 Exception in thread Thread-242: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2299, in run msg = self.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2276, in read return self.sslconn.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/ssl.py", line 1101, in read return self._sslobj.read(len) ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2560) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py", line 938, in _bootstrap_inner self.run() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2385, in run raise ssl.SSLError('tlsv13 alert certificate required') ssl.SSLError: ('tlsv13 alert certificate required',) /home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py:938: ResourceWarning: unclosed self.run() ResourceWarning: Enable tracemalloc to get the object allocation traceback Resource 'ipv6.google.com' is not available .Exception in thread Thread-492: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2299, in run msg = self.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2276, in read return self.sslconn.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/ssl.py", line 1101, in read return self._sslobj.read(len) ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2560) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py", line 938, in _bootstrap_inner self.run() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2385, in run raise ssl.SSLError('tlsv13 alert certificate required') ssl.SSLError: ('tlsv13 alert certificate required',) /home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py:938: ResourceWarning: unclosed self.run() ResourceWarning: Enable tracemalloc to get the object allocation traceback Resource 'ipv6.google.com' is not available .Exception in thread Thread-742: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2299, in run msg = self.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2276, in read return self.sslconn.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/ssl.py", line 1101, in read return self._sslobj.read(len) ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2560) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py", line 938, in _bootstrap_inner self.run() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2385, in run raise ssl.SSLError('tlsv13 alert certificate required') ssl.SSLError: ('tlsv13 alert certificate required',) /home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py:938: ResourceWarning: unclosed self.run() ResourceWarning: Enable tracemalloc to get the object allocation traceback Resource 'ipv6.google.com' is not available .Exception in thread Thread-992: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2299, in run msg = self.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2276, in read return self.sslconn.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/ssl.py", line 1101, in read return self._sslobj.read(len) ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2560) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py", line 938, in _bootstrap_inner self.run() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2385, in run raise ssl.SSLError('tlsv13 alert certificate required') ssl.SSLError: ('tlsv13 alert certificate required',) /home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py:938: ResourceWarning: unclosed self.run() ResourceWarning: Enable tracemalloc to get the object allocation traceback Resource 'ipv6.google.com' is not available .Exception in thread Thread-1242: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2299, in run msg = self.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2276, in read return self.sslconn.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/ssl.py", line 1101, in read return self._sslobj.read(len) ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2560) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py", line 938, in _bootstrap_inner self.run() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2385, in run raise ssl.SSLError('tlsv13 alert certificate required') ssl.SSLError: ('tlsv13 alert certificate required',) /home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py:938: ResourceWarning: unclosed self.run() ResourceWarning: Enable tracemalloc to get the object allocation traceback Resource 'ipv6.google.com' is not available .Exception in thread Thread-1492: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2299, in run msg = self.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2276, in read return self.sslconn.read() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/ssl.py", line 1101, in read return self._sslobj.read(len) ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2560) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py", line 938, in _bootstrap_inner self.run() File "/home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/test/test_ssl.py", line 2385, in run raise ssl.SSLError('tlsv13 alert certificate required') ssl.SSLError: ('tlsv13 alert certificate required',) /home/buildbot/buildarea/3.x.cstratak-fedora.refleak/build/Lib/threading.py:938: ResourceWarning: unclosed self.run() ResourceWarning: Enable tracemalloc to get the object allocation traceback Resource 'ipv6.google.com' is not available . ---------- components: Tests messages: 347532 nosy: vstinner priority: normal severity: normal status: open title: test_ssl: test_pha_required_nocert() logs ResourceWarning versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:38:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 09:38:49 +0000 Subject: [issue11871] test_default_timeout() of test_threading.BarrierTests failure: BrokenBarrierError In-Reply-To: <1303163944.05.0.666091618845.issue11871@psf.upfronthosting.co.za> Message-ID: <1562665129.54.0.894063340708.issue11871@roundup.psfhosted.org> STINNER Victor added the comment: test_threading failed on AMD64 Windows8.1 Refleaks 3.x, the unittest errors are missing, but unraisable exceptions look similar: https://buildbot.python.org/all/#/builders/80/builds/646 0:21:11 load avg: 7.30 [156/419/3] test_threading failed (2 min 56 sec) -- running: test_concurrent_futures (7 min 40 sec), test_email (1 min 34 sec) beginning 6 repetitions 123456 .....Warning -- Unraisable exceptionWarning -- Unraisable exception Exception ignored in thread started byException ignored in thread started by: : .task at 0x000000C7CAC57AF0>.task at 0x000000C7CAC57AF0> Traceback (most recent call last): Traceback (most recent call last): File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 41, in task File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 41, in task f() f() File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 939, in f File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 939, in f i = barrier.wait() i = barrier.wait() File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\threading.py", line 620, in wait File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\threading.py", line 620, in wait self._wait(timeout) File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\threading.py", line 660, in _wait self._wait(timeout) File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\threading.py", line 660, in _wait raise BrokenBarrierError threading. BrokenBarrierErrorraise BrokenBarrierError: threading.BrokenBarrierError: Warning -- Unraisable exception Exception ignored in thread started by: .task at 0x000000C7CAC57AF0> Traceback (most recent call last): File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 41, in task f() File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 939, in f i = barrier.wait() File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\threading.py", line 611, in wait self._enter() # Block while the barrier drains. File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\threading.py", line 635, in _enter raise BrokenBarrierError threading.BrokenBarrierError: Warning -- Unraisable exception Exception ignored in thread started by: .task at 0x000000C7CAC57AF0> Traceback (most recent call last): File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 41, in task f() File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\test\lock_tests.py", line 939, in f i = barrier.wait() File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\threading.py", line 611, in wait self._enter() # Block while the barrier drains. File "D:\buildarea\3.x.ware-win81-release.refleak\build\lib\threading.py", line 635, in _enter raise BrokenBarrierError threading.BrokenBarrierError: test test_threading failed -- multiple errors occurred; run in verbose mode for details ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:44:29 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Jul 2019 09:44:29 +0000 Subject: [issue37525] test_ssl: test_pha_required_nocert() logs ResourceWarning In-Reply-To: <1562664970.92.0.231614914384.issue37525@roundup.psfhosted.org> Message-ID: <1562665469.96.0.552466288475.issue37525@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:54:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 09:54:55 +0000 Subject: [issue37525] test_ssl: test_pha_required_nocert() logs ResourceWarning In-Reply-To: <1562664970.92.0.231614914384.issue37525@roundup.psfhosted.org> Message-ID: <1562666095.77.0.678730151549.issue37525@roundup.psfhosted.org> STINNER Victor added the comment: Duplicate of bpo-37322. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_ssl: test_pha_required_nocert() emits a ResourceWarning _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:55:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 09:55:06 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562666106.63.0.00103883446051.issue37322@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-37525 as duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:55:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 09:55:31 +0000 Subject: [issue15386] Still getting two copies of importlib._bootstrap In-Reply-To: <1342611094.8.0.638334167677.issue15386@psf.upfronthosting.co.za> Message-ID: <1562666131.66.0.619202658703.issue15386@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14469 pull_request: https://github.com/python/cpython/pull/14661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:55:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 09:55:31 +0000 Subject: [issue37473] importlib: Remove libregrtest hack: "We import importlib *ASAP* in order to test #15386" In-Reply-To: <1561994692.63.0.367663564424.issue37473@roundup.psfhosted.org> Message-ID: <1562666131.59.0.34445492431.issue37473@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +14468 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:07:14 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2019 10:07:14 +0000 Subject: [issue37505] Early auditing broken In-Reply-To: <1562328479.24.0.514484433383.issue37505@roundup.psfhosted.org> Message-ID: <1562666834.62.0.614300565712.issue37505@roundup.psfhosted.org> Christian Heimes added the comment: Some audit events are designed to work before the interpreter is fully initialized or already shut down. These events pass in NULL instead of a PyObject*. Python/pystate.c: if (PySys_Audit("cpython.PyInterpreterState_New", NULL) < 0) { Python/pystate.c: if (PySys_Audit("cpython.PyInterpreterState_Clear", NULL) < 0) { Python/sysmodule.c: PySys_Audit("cpython._PySys_ClearAuditHooks", NULL); (They are also currently not documented) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:11:08 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Jul 2019 10:11:08 +0000 Subject: [issue37517] Improve error messages for Windows reserved file names In-Reply-To: <1562457634.89.0.989040753976.issue37517@roundup.psfhosted.org> Message-ID: <1562667068.99.0.786768619633.issue37517@roundup.psfhosted.org> Steve Dower added the comment: Presumably this is linked to issue37515 (why not just repurpose that one?), but I'm inclined to think this is okay provided: * if the operation succeeds, no error/message is displayed * if the operation fails, we only update the error message if one of the special filenames is the target So probably this ought to be a special case in PyErr_SetFromWindowsErrWithFilename(). And either we need to search the string for the special names or find an API that will clarify it (GetFileAttributes?). I definitely do not want every error message suggesting that this edge case may be the cause, and I don't want to prevent people using these names or purpose for their actual uses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:13:59 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Jul 2019 10:13:59 +0000 Subject: [issue37505] Early auditing broken In-Reply-To: <1562328479.24.0.514484433383.issue37505@roundup.psfhosted.org> Message-ID: <1562667239.43.0.422275704977.issue37505@roundup.psfhosted.org> Steve Dower added the comment: Passing a NULL format string there means the same as passing NULL to PyObject_CallFunction(func, NULL) - no arguments, which results in an empty tuple being passed to the hooks. Perhaps in the early cases we can pass NULL instead of a tuple? Maybe even assert when that case occurs and the event has parameters? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:15:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 10:15:17 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562667317.18.0.804450376949.issue37322@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +14470 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:19:34 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 09 Jul 2019 10:19:34 +0000 Subject: [issue29312] Use FASTCALL in dict.update() In-Reply-To: <1484759262.53.0.625567482548.issue29312@psf.upfronthosting.co.za> Message-ID: <1562667574.57.0.362756789255.issue29312@roundup.psfhosted.org> Jeroen Demeyer added the comment: > but it will make d1.update(**d2) slower with a complexity of O(n): d2 must be converted to 2 lists This part is still true and it causes a slow-down of about 23% for dict.update(**d), see benchmarks at https://github.com/python/cpython/pull/14589#issuecomment-509356084 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:26:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 10:26:30 +0000 Subject: [issue37526] Add support.catch_threading_exception() Message-ID: <1562667990.77.0.0421401641462.issue37526@roundup.psfhosted.org> New submission from STINNER Victor : bpo-1230540 added threading.excepthook() to handle "uncaught exceptions raised by Thread.run()". I propose to add support.catch_threading_exception(): context manager to ease catching these exceptions. Attached PR implements it. ---------- components: Tests messages: 347540 nosy: vstinner priority: normal severity: normal status: open title: Add support.catch_threading_exception() versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:32:25 2019 From: report at bugs.python.org (Dschoni) Date: Tue, 09 Jul 2019 10:32:25 +0000 Subject: [issue37527] Timestamp conversion on windows fails with timestamps close to EPOCH Message-ID: <1562668345.09.0.775729583969.issue37527@roundup.psfhosted.org> New submission from Dschoni : A long description of the issue can be found on SO here: https://stackoverflow.com/questions/56931738/python-crash-on-windows-with-a-datetime-close-to-the-epoch?noredirect=1#comment100413591_56931738 TL;DR: This fails on windows: from datetime import datetime datetime.fromtimestamp(1).timestamp() ---------- components: Windows messages: 347541 nosy: Dschoni, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Timestamp conversion on windows fails with timestamps close to EPOCH type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:32:43 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Jul 2019 10:32:43 +0000 Subject: [issue37363] Additional PEP578 hooks In-Reply-To: <1561131749.05.0.996884755083.issue37363@roundup.psfhosted.org> Message-ID: <1562668363.75.0.0220328985422.issue37363@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +14471 pull_request: https://github.com/python/cpython/pull/14663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:33:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 10:33:39 +0000 Subject: [issue37526] Add support.catch_threading_exception() In-Reply-To: <1562667990.77.0.0421401641462.issue37526@roundup.psfhosted.org> Message-ID: <1562668419.42.0.622701101521.issue37526@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:33:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 10:33:47 +0000 Subject: [issue37526] Add support.catch_threading_exception() In-Reply-To: <1562667990.77.0.0421401641462.issue37526@roundup.psfhosted.org> Message-ID: <1562668427.23.0.176872016686.issue37526@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +14472 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:36:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 10:36:59 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562668619.52.0.91499902618.issue37322@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cf9c41c422de3774862db964fe3153086bad3f61 by Victor Stinner in branch 'master': bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning (GH-14662) https://github.com/python/cpython/commit/cf9c41c422de3774862db964fe3153086bad3f61 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:37:22 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jul 2019 10:37:22 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562668642.08.0.294154984154.issue37322@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14473 pull_request: https://github.com/python/cpython/pull/14665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:38:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 10:38:04 +0000 Subject: [issue37526] Add support.catch_threading_exception() In-Reply-To: <1562667990.77.0.0421401641462.issue37526@roundup.psfhosted.org> Message-ID: <1562668684.17.0.492238039981.issue37526@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-36829: Add test.support.catch_unraisable_exception(). catch_threading_exception() is very close to catch_unraisable_exception(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 06:38:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 10:38:23 +0000 Subject: [issue36829] Add sys.unraisablehook() to customize how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1562668703.73.0.0977742752967.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-37526: Add support.catch_threading_exception(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:00:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:00:27 +0000 Subject: [issue37526] Add support.catch_threading_exception() In-Reply-To: <1562667990.77.0.0421401641462.issue37526@roundup.psfhosted.org> Message-ID: <1562670027.26.0.540710565201.issue37526@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 91b4f7ab7f9a5e0908b91379ee085ae087a76483 by Victor Stinner in branch 'master': bpo-37526: Add support.catch_threading_exception() (GH-14664) https://github.com/python/cpython/commit/91b4f7ab7f9a5e0908b91379ee085ae087a76483 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:00:34 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jul 2019 11:00:34 +0000 Subject: [issue37526] Add support.catch_threading_exception() In-Reply-To: <1562667990.77.0.0421401641462.issue37526@roundup.psfhosted.org> Message-ID: <1562670034.6.0.0399844622288.issue37526@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14474 pull_request: https://github.com/python/cpython/pull/14666 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:07:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:07:54 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562670474.38.0.666478424263.issue37322@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14475 pull_request: https://github.com/python/cpython/pull/14667 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:08:51 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 09 Jul 2019 11:08:51 +0000 Subject: [issue34679] asyncio.add_signal_handler call fails if not on main thread In-Reply-To: <1536938865.53.0.956365154283.issue34679@psf.upfronthosting.co.za> Message-ID: <1562670531.23.0.340571257121.issue34679@roundup.psfhosted.org> Andrew Svetlov added the comment: Good point. For proactor event loop set_wakeup_fd() is used for Ctrl+C handling. Skipping this call for non-main thread in proactor implementation makes sense. ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:11:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:11:51 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 In-Reply-To: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> Message-ID: <1562670711.7.0.970129866018.issue37120@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14476 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/14668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:18:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:18:23 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562671103.78.0.440607480247.issue37322@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14477 pull_request: https://github.com/python/cpython/pull/14669 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:29:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:29:58 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562671798.12.0.15702039922.issue37322@roundup.psfhosted.org> STINNER Victor added the comment: > New changeset cf9c41c422de3774862db964fe3153086bad3f61 by Victor Stinner in branch 'master': > bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning (GH-14662) Oh. This test started to fail on Windows with this change. Example: https://buildbot.python.org/all/#/builders/3/builds/3121 ERROR: test_pha_required_nocert (test.test_ssl.TestPostHandshakeAuth) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_ssl.py", line 4344, in test_pha_required_nocert s.recv(1024) File "D:\buildarea\3.x.bolen-windows10\build\lib\ssl.py", line 1226, in recv return self.read(buflen) File "D:\buildarea\3.x.bolen-windows10\build\lib\ssl.py", line 1101, in read return self._sslobj.read(len) ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host I proposed PR 14669 to revert it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:30:55 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jul 2019 11:30:55 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 In-Reply-To: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> Message-ID: <1562671855.53.0.315347012617.issue37120@roundup.psfhosted.org> miss-islington added the comment: New changeset 76611c7c0af6b2f4d0d98a5db827d34cff54ce25 by Miss Islington (bot) (Victor Stinner) in branch 'master': bpo-37120: Fix _ssl get_num_tickets() (GH-14668) https://github.com/python/cpython/commit/76611c7c0af6b2f4d0d98a5db827d34cff54ce25 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:34:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:34:17 +0000 Subject: [issue37528] test_tarfile: test_extractall_symlinks() fails on Windows with: [WinError 206] The filename or extension is too long Message-ID: <1562672057.8.0.696699034391.issue37528@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 Windows8.1 Non-Debug 3.x: https://buildbot.python.org/all/#/builders/12/builds/2862 FAIL: test_extractall_symlinks (test.test_tarfile.Bz2WriteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_tarfile.py", line 1312, in test_extractall_symlinks tar.extractall(path=tempdir) FileNotFoundError: [WinError 206] The filename or extension is too long: 'D:\\buildarea\\3.x.ware-win81-release.nondebug\\build\\build\\test_python_3164\\test_python_worker_5512\\@test_5512_tmp-tardir\\testsymlinks\\buildarea\\3.x.ware-win81-release.nondebug\\build\\build\\test_python_3164\\test_python_worker_5512\\@test_5512_tmp-tardir' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_tarfile.py", line 1314, in test_extractall_symlinks self.fail("extractall failed with symlinked files") AssertionError: extractall failed with symlinked files Extract of pythoninfo: windows.RtlAreLongPathsEnabled: RtlAreLongPathsEnabled() is not available on Windows 8.1. I don't know if long paths support is enabled or not on this buildbot (I guess that no, it isn't). I'm not sure why the test started to fail. ---------- components: Tests messages: 347549 nosy: vstinner, zach.ware priority: normal severity: normal status: open title: test_tarfile: test_extractall_symlinks() fails on Windows with: [WinError 206] The filename or extension is too long versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:34:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:34:25 +0000 Subject: [issue37528] test_tarfile: test_extractall_symlinks() fails on Windows with: [WinError 206] The filename or extension is too long In-Reply-To: <1562672057.8.0.696699034391.issue37528@roundup.psfhosted.org> Message-ID: <1562672065.31.0.671461729336.issue37528@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:35:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:35:29 +0000 Subject: [issue37528] test_tarfile: test_extractall_symlinks() fails on Windows with: [WinError 206] The filename or extension is too long In-Reply-To: <1562672057.8.0.696699034391.issue37528@roundup.psfhosted.org> Message-ID: <1562672129.6.0.809344451759.issue37528@roundup.psfhosted.org> STINNER Victor added the comment: On this buildbot build, test_tarfile succeeded when run again. Likely because the test is run in the main regrtest process which doesn't have "test_python_worker_xxx" in its current working directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:35:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:35:50 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562672150.76.0.484184318989.issue37322@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 61b1bc56069719fc6f17c73fdf2193636dbf6cc2 by Victor Stinner in branch 'master': Revert "bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning (GH-14662)" (GH-14669) https://github.com/python/cpython/commit/61b1bc56069719fc6f17c73fdf2193636dbf6cc2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:36:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:36:03 +0000 Subject: [issue37526] Add support.catch_threading_exception() In-Reply-To: <1562667990.77.0.0421401641462.issue37526@roundup.psfhosted.org> Message-ID: <1562672163.06.0.495203824007.issue37526@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 58f2c7f424fe91ba035918f0f66306af73a37543 by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-37526: Add support.catch_threading_exception() (GH-14664) (GH-14666) https://github.com/python/cpython/commit/58f2c7f424fe91ba035918f0f66306af73a37543 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:36:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:36:53 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562672213.48.0.260642275383.issue37322@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14478 pull_request: https://github.com/python/cpython/pull/14670 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:39:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 11:39:13 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562672353.94.0.772799556475.issue37322@roundup.psfhosted.org> STINNER Victor added the comment: The test also logs an "Exception in thread Thread-2:" error: --- vstinner at apu$ ./python -m test test_ssl -m test_pha_required_nocert -v == CPython 3.9.0a0 (heads/master:110a47c4f4, Jul 8 2019, 23:52:00) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] == Linux-5.1.15-300.fc30.x86_64-x86_64-with-glibc2.29 little-endian == cwd: /home/vstinner/python/master/build/test_python_21491 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 load avg: 1.77 [1/1] test_ssl test_ssl: testing with 'OpenSSL 1.1.1c FIPS 28 May 2019' (1, 1, 1, 3, 15) under 'Linux-5.1.15-300.fc30.x86_64-x86_64-with-glibc2.29' HAS_SNI = True OP_ALL = 0x80000054 OP_NO_TLSv1_1 = 0x10000000 test_pha_required_nocert (test.test_ssl.TestPostHandshakeAuth) ... Exception in thread Thread-2: Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_ssl.py", line 2299, in run msg = self.read() File "/home/vstinner/python/master/Lib/test/test_ssl.py", line 2276, in read return self.sslconn.read() File "/home/vstinner/python/master/Lib/ssl.py", line 1101, in read return self._sslobj.read(len) ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2560) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/vstinner/python/master/Lib/threading.py", line 938, in _bootstrap_inner self.run() File "/home/vstinner/python/master/Lib/test/test_ssl.py", line 2385, in run raise ssl.SSLError('tlsv13 alert certificate required') ssl.SSLError: ('tlsv13 alert certificate required',) /home/vstinner/python/master/Lib/threading.py:938: ResourceWarning: unclosed self.run() ResourceWarning: Enable tracemalloc to get the object allocation traceback ok ---------------------------------------------------------------------- Ran 1 test in 0.028s OK == Tests result: SUCCESS == 1 test OK. Total duration: 179 ms Tests result: SUCCESS --- Attached PR 14670 makes this log quiet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 07:42:16 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jul 2019 11:42:16 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 In-Reply-To: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> Message-ID: <1562672536.56.0.0490918674787.issue37120@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14479 pull_request: https://github.com/python/cpython/pull/14671 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 08:20:10 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 09 Jul 2019 12:20:10 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562674810.32.0.33119726838.issue18374@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset 430a9f44fe22f029ae8cfeecb46621d7e199414b by Ivan Levkivskyi (Carl Friedrich Bolz-Tereick) in branch 'master': bpo-18374: fix tests to check the correct thing about line numbers (GH-14659) https://github.com/python/cpython/commit/430a9f44fe22f029ae8cfeecb46621d7e199414b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 08:20:13 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jul 2019 12:20:13 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562674813.86.0.472063209471.issue18374@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14480 pull_request: https://github.com/python/cpython/pull/14672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 08:33:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 12:33:57 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562675637.82.0.258554649107.issue37322@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 73ea54620a6f91c3f2e53880373dd47813691a21 by Victor Stinner in branch 'master': bpo-37322: ssl test_pha_required_nocert() ignores expected SSLError (GH-14670) https://github.com/python/cpython/commit/73ea54620a6f91c3f2e53880373dd47813691a21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 08:34:02 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jul 2019 12:34:02 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562675642.1.0.934519620985.issue37322@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14481 pull_request: https://github.com/python/cpython/pull/14673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 08:37:25 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Tue, 09 Jul 2019 12:37:25 +0000 Subject: [issue34722] Non-deterministic bytecode generation In-Reply-To: <1537278827.47.0.956365154283.issue34722@psf.upfronthosting.co.za> Message-ID: <1562675845.24.0.650324795904.issue34722@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 08:37:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 12:37:40 +0000 Subject: [issue37526] Add support.catch_threading_exception() In-Reply-To: <1562667990.77.0.0421401641462.issue37526@roundup.psfhosted.org> Message-ID: <1562675860.2.0.485661133154.issue37526@roundup.psfhosted.org> STINNER Victor added the comment: Maybe the context manager could recreate attributes (set them to None) if the context manager is used wice, but I'm not sure that I don't want to promote to reuse catch_threading_exception(). I didn't check if catch_threading_exception() creates a ref cycle. I guess so. It's likely than storing an exception creates a ref cycle. Anyway, __exit__() removes attributes. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 08:39:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 12:39:53 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562675993.16.0.203770086069.issue18374@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 08:43:03 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jul 2019 12:43:03 +0000 Subject: [issue37120] Provide knobs to disable session ticket generation on TLS 1.3 In-Reply-To: <1559365529.23.0.311490427939.issue37120@roundup.psfhosted.org> Message-ID: <1562676183.53.0.0489302951621.issue37120@roundup.psfhosted.org> miss-islington added the comment: New changeset bbad695e7890513be7a9bc662e2d8ae13bfcd313 by Miss Islington (bot) in branch '3.8': bpo-37120: Fix _ssl get_num_tickets() (GH-14668) https://github.com/python/cpython/commit/bbad695e7890513be7a9bc662e2d8ae13bfcd313 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 08:55:13 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jul 2019 12:55:13 +0000 Subject: [issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning In-Reply-To: <1560803734.85.0.206698450732.issue37322@roundup.psfhosted.org> Message-ID: <1562676913.76.0.156539290527.issue37322@roundup.psfhosted.org> miss-islington added the comment: New changeset 4c403b8ca2d0ef44b691cceaeeac9e110fd3f05a by Miss Islington (bot) in branch '3.8': bpo-37322: ssl test_pha_required_nocert() ignores expected SSLError (GH-14670) https://github.com/python/cpython/commit/4c403b8ca2d0ef44b691cceaeeac9e110fd3f05a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 09:21:20 2019 From: report at bugs.python.org (Fredrik Mellbin) Date: Tue, 09 Jul 2019 13:21:20 +0000 Subject: [issue37452] Microsoft store package has an invalid ExecutablePath registry entry In-Reply-To: <1561907089.3.0.284531317846.issue37452@roundup.psfhosted.org> Message-ID: <1562678480.16.0.640049549699.issue37452@roundup.psfhosted.org> Fredrik Mellbin added the comment: This is fixed and works as expected in 3.7.4 from the MS Store. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 09:29:01 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 09 Jul 2019 13:29:01 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562678941.23.0.734797051.issue18374@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset 68bd9c5691c4899d21cc7fe6cce7cd22b2f5ccb0 by Ivan Levkivskyi (Miss Islington (bot)) in branch '3.8': bpo-18374: fix tests to check the correct thing about line numbers (GH-14659) (GH-14672) https://github.com/python/cpython/commit/68bd9c5691c4899d21cc7fe6cce7cd22b2f5ccb0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 09:29:52 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 09 Jul 2019 13:29:52 +0000 Subject: [issue26131] Raise ImportWarning when loader.load_module() is used In-Reply-To: <1452894244.92.0.478987355259.issue26131@psf.upfronthosting.co.za> Message-ID: <1562678992.07.0.417174313923.issue26131@roundup.psfhosted.org> Joannah Nanjekye added the comment: @brett Since this was opened like years ago. Before I work on it, I was wondering If it is still relevant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 09:59:21 2019 From: report at bugs.python.org (disconnect3d) Date: Tue, 09 Jul 2019 13:59:21 +0000 Subject: [issue37529] Mimetype module duplicates Message-ID: <1562680761.15.0.288138014947.issue37529@roundup.psfhosted.org> New submission from disconnect3d : The mimetype builtin module allows users to guess extension for a given mimetype through the `mimetypes.guess_extension` function. Default mimetypes are stored in `types_map` and `_types_map_default` dictionaries that maps extensions to mimetypes. Those dictionaries are created by `_default_mime_types` function in `cpython/Lib/mimetypes.py`. If a given extension have more than one mimetype, this information is lost. This happens currently for ".bmp" extension in CPython's codebase. This can be seen in the linked code below: https://github.com/python/cpython/blob/110a47c4f42cf4db88edc1876899fff8f05190fb/Lib/mimetypes.py#L490-L502 Here is an example in an interactive IPython session: ``` In [1]: import mimetypes In [2]: mimetypes.guess_extension('image/bmp') Out[2]: '.bmp' In [3]: mimetypes.guess_extension('image/x-ms-bmp') In [4]: ``` The issue has been found by using Semmle's LGTM: https://lgtm.com/projects/g/python/cpython/snapshot/d099f261c762ac81042e47b530d279f932d89e09/files/Lib/mimetypes.py?sort=name&dir=ASC&mode=heatmap PS / offtopic / loud thinking: Maybe there should be a debug build of CPython that would detect such key overwrites during dicts initialisation and warn about them? ---------- components: Library (Lib) messages: 347562 nosy: Dominik Czarnota priority: normal severity: normal status: open title: Mimetype module duplicates 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 Tue Jul 9 10:03:11 2019 From: report at bugs.python.org (disconnect3d) Date: Tue, 09 Jul 2019 14:03:11 +0000 Subject: [issue37529] Mimetype module duplicates In-Reply-To: <1562680761.15.0.288138014947.issue37529@roundup.psfhosted.org> Message-ID: <1562680991.22.0.452097518735.issue37529@roundup.psfhosted.org> disconnect3d added the comment: To be more specific and to keep this information historically, the .bmp registers two mimetypes - 'image/bmp' and 'image/x-ms-bmp'. Below a part of the relevant code. ``` types_map = _types_map_default = { # (...) '.bmp' : 'image/bmp', '.gif' : 'image/gif', '.ief' : 'image/ief', '.jpg' : 'image/jpeg', '.jpe' : 'image/jpeg', '.jpeg' : 'image/jpeg', '.png' : 'image/png', '.svg' : 'image/svg+xml', '.tiff' : 'image/tiff', '.tif' : 'image/tiff', '.ico' : 'image/vnd.microsoft.icon', '.ras' : 'image/x-cmu-raster', '.bmp' : 'image/x-ms-bmp', ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 11:12:12 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Jul 2019 15:12:12 +0000 Subject: [issue34722] Non-deterministic bytecode generation In-Reply-To: <1537278827.47.0.956365154283.issue34722@psf.upfronthosting.co.za> Message-ID: <1562685132.4.0.20527889281.issue34722@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 12:15:31 2019 From: report at bugs.python.org (Ben Brown) Date: Tue, 09 Jul 2019 16:15:31 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1562688931.53.0.237318400155.issue37226@roundup.psfhosted.org> Ben Brown added the comment: Maayan Keshet do you have a minimal example it would be interesting to compare against our code and see if there is something we are both doing that could help narrow down the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 12:32:54 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 16:32:54 +0000 Subject: [issue37491] IndexError in get_bare_quoted_string In-Reply-To: <1562141971.16.0.876863205208.issue37491@roundup.psfhosted.org> Message-ID: <1562689974.11.0.0804718903833.issue37491@roundup.psfhosted.org> Terry J. Reedy added the comment: To avoid such questions, bug reports should contain exception messages and usually at least some of the tracebacks. >>> ''[0] Traceback (most recent call last): File "", line 1, in ''[0] IndexError: string index out of range >>> x=None >>> x[0] Traceback (most recent call last): File "", line 1, in x[0] TypeError: 'NoneType' object is not subscriptable IndexError should mean object was indexable. Operations on None should give TypeError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 12:47:17 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 16:47:17 +0000 Subject: [issue37491] IndexError in get_bare_quoted_string In-Reply-To: <1562141971.16.0.876863205208.issue37491@roundup.psfhosted.org> Message-ID: <1562690837.6.0.0734373072673.issue37491@roundup.psfhosted.org> Terry J. Reedy added the comment: Also, quotes should be attributed to a file and patch snipped should indicate the target. As for the bug, the author(s) of the expressions "value[1:]" and "value[0]" presumably *expected* value to initially have length 2 so that it would be be non-empty after clipping. In the absence of additional information, it is possible that the bug is in the unquoted code that produced value. This is potentially true whenever a function or expession raises. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 13:02:22 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 09 Jul 2019 17:02:22 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1562691742.41.0.309379242377.issue37168@roundup.psfhosted.org> Mark Dickinson added the comment: @Phil: Did you ever get to the bottom of this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 13:44:47 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 17:44:47 +0000 Subject: [issue37530] IDLE: simplify, optimize, and clean up code context Message-ID: <1562694287.35.0.507911055212.issue37530@roundup.psfhosted.org> New submission from Terry J. Reedy : Issue for Tal's PR 14675, dependency of #33610. 1. Only create CodeContext instances for "real" editors windows, but not e.g. shell or output windows. - Previously, were created but never activated because menu item deactivated. This is even better. 2. Remove configuration update Tk event fired every second, by having the editor window ask its code context widget to update when necessary, i.e. upon font or highlighting updates. 3. When code context isn't being shown, avoid having a Tk event fired every 100ms to check whether the code context needs to be updated. 4. Use the editor window's getlineno() method where applicable. 5. Fix a bare except:. ---------- assignee: terry.reedy components: IDLE messages: 347568 nosy: cheryl.sabella, taleinat, terry.reedy priority: normal severity: normal stage: patch review status: open title: IDLE: simplify, optimize, and clean up code context type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 13:45:38 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 09 Jul 2019 17:45:38 +0000 Subject: [issue37530] IDLE: simplify, optimize, and clean up code context In-Reply-To: <1562694287.35.0.507911055212.issue37530@roundup.psfhosted.org> Message-ID: <1562694338.4.0.321826168927.issue37530@roundup.psfhosted.org> Change by Tal Einat : ---------- keywords: +patch pull_requests: +14482 pull_request: https://github.com/python/cpython/pull/14675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 13:54:40 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Jul 2019 17:54:40 +0000 Subject: [issue34722] Non-deterministic bytecode generation In-Reply-To: <1537278827.47.0.956365154283.issue34722@psf.upfronthosting.co.za> Message-ID: <1562694880.84.0.472131582582.issue34722@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:00:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 18:00:32 +0000 Subject: [issue27679] set_bitfields() unused in _ctypes_test In-Reply-To: <1470299556.34.0.285781931231.issue27679@psf.upfronthosting.co.za> Message-ID: <1562695232.42.0.831902076522.issue27679@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3a3db970de344efbb4017fb9dde9204f0fd4bbdc by Victor Stinner (Hai Shi) in branch 'master': bpo-27679: Remove set_bitfields() from _ctypes_test (GH-14648) https://github.com/python/cpython/commit/3a3db970de344efbb4017fb9dde9204f0fd4bbdc ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:02:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Jul 2019 18:02:05 +0000 Subject: [issue27679] set_bitfields() unused in _ctypes_test In-Reply-To: <1470299556.34.0.285781931231.issue27679@psf.upfronthosting.co.za> Message-ID: <1562695325.11.0.740708302933.issue27679@roundup.psfhosted.org> STINNER Victor added the comment: I don't feel the need to backport the change to Python 3.8 and older. Having an unused in a test module (_ctypes_test) doesn't hurt. I close the issue. Thanks Martin Panter for the report, thanks Hai Shi for the fix ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:03:11 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 18:03:11 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1562695391.14.0.362518443959.issue33610@roundup.psfhosted.org> Terry J. Reedy added the comment: #37530 addresses I2, events (Tal, see msg319241 above). I considered this to be about next in priority. It also does some I1 cleanup. In that list, the 2nd M3 should be M4. The comment "D1 is PR 7579" should have referred to PR 7597, merged thereafter. ---------- dependencies: +IDLE: simplify, optimize, and clean up code context nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:11:10 2019 From: report at bugs.python.org (Abhilash Raj) Date: Tue, 09 Jul 2019 18:11:10 +0000 Subject: [issue37491] IndexError in get_bare_quoted_string In-Reply-To: <1562141971.16.0.876863205208.issue37491@roundup.psfhosted.org> Message-ID: <1562695870.12.0.29746009347.issue37491@roundup.psfhosted.org> Abhilash Raj added the comment: I just wanted to report before I forgot and hence missed some details, turns out the bug report was slightly wrong too. The testcase I provided wasn't right. Here is the right test case to reproduce the exception with master: # bpo_37491.py from email.parser import BytesParser, Parser from email.policy import default payload = 'Content-Type:"' msg = Parser(policy=default).parsestr(payload) print(msg.get('content-type')) $ ./python bpo_37491.py Traceback (most recent call last): File "bpo_37491.py", line 5, in msg = Parser(policy=default).parsestr(payload) File "/home/maxking/Documents/cpython/Lib/email/parser.py", line 68, in parsestr return self.parse(StringIO(text), headersonly=headersonly) File "/home/maxking/Documents/cpython/Lib/email/parser.py", line 58, in parse return feedparser.close() File "/home/maxking/Documents/cpython/Lib/email/feedparser.py", line 187, in close self._call_parse() File "/home/maxking/Documents/cpython/Lib/email/feedparser.py", line 180, in _call_parse self._parse() File "/home/maxking/Documents/cpython/Lib/email/feedparser.py", line 256, in _parsegen if self._cur.get_content_type() == 'message/delivery-status': File "/home/maxking/Documents/cpython/Lib/email/message.py", line 578, in get_content_type value = self.get('content-type', missing) File "/home/maxking/Documents/cpython/Lib/email/message.py", line 471, in get return self.policy.header_fetch_parse(k, v) File "/home/maxking/Documents/cpython/Lib/email/policy.py", line 163, in header_fetch_parse return self.header_factory(name, value) File "/home/maxking/Documents/cpython/Lib/email/headerregistry.py", line 602, in __call__ return self[name](name, value) File "/home/maxking/Documents/cpython/Lib/email/headerregistry.py", line 197, in __new__ cls.parse(value, kwds) File "/home/maxking/Documents/cpython/Lib/email/headerregistry.py", line 447, in parse kwds['decoded'] = str(parse_tree) File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 126, in __str__ return ''.join(str(x) for x in self) File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 126, in return ''.join(str(x) for x in self) File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 796, in __str__ for name, value in self.params: File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 770, in params value = param.param_value File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 679, in param_value return token.stripped_value File "/home/maxking/Documents/cpython/Lib/email/_header_value_parser.py", line 710, in stripped_value token = self[0] IndexError: list index out of range This time I attached a correct patch instead of copy-pasting only the diff :) About IndexError, I agree, it must be an empty string value and not a None value. ---------- keywords: +patch Added file: https://bugs.python.org/file48462/fix-indexerror.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:37:30 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 18:37:30 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562697450.95.0.269944438818.issue26806@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 6aeb2fe606408aae14c246470794f1303b3be812 by Terry Jan Reedy in branch 'master': bpo-26806: IDLE should run without docstrings (#14657) https://github.com/python/cpython/commit/6aeb2fe606408aae14c246470794f1303b3be812 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:37:39 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jul 2019 18:37:39 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562697459.98.0.657247610716.issue26806@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14483 pull_request: https://github.com/python/cpython/pull/14677 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:37:47 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Jul 2019 18:37:47 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562697467.76.0.949135360646.issue26806@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14484 pull_request: https://github.com/python/cpython/pull/14678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 14:59:30 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 18:59:30 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562698770.02.0.21832134981.issue26806@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset b82188d9bad1774624cb1788dbdec2f0d7d65688 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-26806: IDLE should run without docstrings (GH-14657) (GH-14677) https://github.com/python/cpython/commit/b82188d9bad1774624cb1788dbdec2f0d7d65688 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:16:48 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Jul 2019 19:16:48 +0000 Subject: [issue26806] IDLE not displaying RecursionError tracebacks and hangs In-Reply-To: <1461105544.08.0.0145590373976.issue26806@psf.upfronthosting.co.za> Message-ID: <1562699808.76.0.171787966826.issue26806@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset f54f062f68ac82fc3e7c92345b4d5fbe2534dc84 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-26806: IDLE should run without docstrings (GH-14657) (GH-14678) https://github.com/python/cpython/commit/f54f062f68ac82fc3e7c92345b4d5fbe2534dc84 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:34:22 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 09 Jul 2019 19:34:22 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS Message-ID: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> New submission from Joannah Nanjekye : Reported by Victor Stinner. regrtest has a --timeout parameter which calls faulthandler.dump_traceback_later(timeout), but sometimes it's not enough to kill a test. regrtest should kill a worker process if it runs longer than --timeout seconds. * https://bugs.python.org/issue37313 : test_concurrent_futures ran for 25 hours whereas regrtest was run using --timeout 900 * regrtest ran for 4 days whereas it was run with --timeout=900: https://mail.python.org/pipermail/python-buildbots/2019-June/000285.html ---------- messages: 347576 nosy: nanjekyejoannah, vstinner priority: normal severity: normal stage: needs patch status: open title: Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:36:49 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 09 Jul 2019 19:36:49 +0000 Subject: [issue3753] bytearray incompatible with y# In-Reply-To: <1220285023.36.0.49129522463.issue3753@psf.upfronthosting.co.za> Message-ID: <1562701009.61.0.598820494882.issue3753@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- pull_requests: +14485 pull_request: https://github.com/python/cpython/pull/14679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 15:37:39 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 09 Jul 2019 19:37:39 +0000 Subject: [issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s In-Reply-To: <1373103302.65.0.774257874247.issue18374@psf.upfronthosting.co.za> Message-ID: <1562701059.91.0.29836657398.issue18374@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 17:20:46 2019 From: report at bugs.python.org (Yun Li) Date: Tue, 09 Jul 2019 21:20:46 +0000 Subject: [issue37532] email.header.make_header() doesn't work if any `ascii` code is out of range(128) Message-ID: <1562707246.84.0.835768356919.issue37532@roundup.psfhosted.org> New submission from Yun Li : email.header.make_header() doesn't work if any `ascii` code is out of range(128) For example >>> header = "Your booking at Voyager Int'l Hostel,=?UTF-8?B?IFBhbmFtw6EgQ2l0eQ==?=, Panam?- Casco Antiguo" >>> decode_header(header) [(b"Your booking at Voyager Int'l Hostel,", None), (b' Panam\xc3\xa1 City', 'utf-8'), (b', Panam\xe1- Casco Antiguo', None)] >>> make_header(decode_header(header)) Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/email/header.py", line 174, in make_header h.append(s, charset) File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/email/header.py", line 295, in append s = s.decode(input_charset, errors) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 9: ordinal not in range(128) ---------- components: email messages: 347577 nosy: barry, r.david.murray, yunlee priority: normal severity: normal status: open title: email.header.make_header() doesn't work if any `ascii` code is out of range(128) type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 17:30:38 2019 From: report at bugs.python.org (mike lojkovic) Date: Tue, 09 Jul 2019 21:30:38 +0000 Subject: [issue37533] Possible Unicode handling issue in python. Message-ID: <1562707838.13.0.896835317177.issue37533@roundup.psfhosted.org> New submission from mike lojkovic : Encode error on character '\u2193' was suggested by a tribler developer might indicate a problem with python's handling of unicdoe in specific cases. https://github.com/Tribler/tribler/issues/4666 ---------- components: Unicode messages: 347578 nosy: ezio.melotti, mike lojkovic, vstinner priority: normal severity: normal status: open title: Possible Unicode handling issue in python. type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 17:43:12 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Jul 2019 21:43:12 +0000 Subject: [issue26131] Raise ImportWarning when loader.load_module() is used In-Reply-To: <1452894244.92.0.478987355259.issue26131@psf.upfronthosting.co.za> Message-ID: <1562708592.12.0.0644555609288.issue26131@roundup.psfhosted.org> Brett Cannon added the comment: @joannah no clue if this ever happened. Could you check the code if DeprecationWarning is being raised yet? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 18:02:00 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 09 Jul 2019 22:02:00 +0000 Subject: [issue37533] Possible Unicode handling issue in python. In-Reply-To: <1562707838.13.0.896835317177.issue37533@roundup.psfhosted.org> Message-ID: <1562709720.17.0.359301159801.issue37533@roundup.psfhosted.org> Zachary Ware added the comment: That issue shows a traceback from Python 2.7, which handles Unicode significantly differently than (read "not as well as") Python 3. If the issue can be boiled down to a few lines of Python code that show a real problem in Python 3's Unicode handling (rather than in Tribler or PyQT) please reopen, but for now I see no indication that this is a problem in Python 3. The chances of changing Python 2's Unicode handling in any meaningful way at this point in its lifecycle are nearly nil. ---------- components: +Unicode nosy: +zach.ware -brett.cannon resolution: -> third party stage: -> resolved status: -> closed type: compile error -> behavior versions: +Python 2.7 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 18:06:07 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 09 Jul 2019 22:06:07 +0000 Subject: [issue37533] Possible Unicode handling issue in python. In-Reply-To: <1562707838.13.0.896835317177.issue37533@roundup.psfhosted.org> Message-ID: <1562709967.7.0.559218752449.issue37533@roundup.psfhosted.org> Change by Zachary Ware : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 18:32:30 2019 From: report at bugs.python.org (Benjamin Mintz) Date: Tue, 09 Jul 2019 22:32:30 +0000 Subject: [issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562711550.15.0.807768533057.issue37521@roundup.psfhosted.org> Benjamin Mintz added the comment: Updated. Also removed some old code which had irrelevant imports that I thought I removed already. The expected and actual output remain the same. ---------- Added file: https://bugs.python.org/file48463/importlib-util-module-from-spec-stale-reference.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 19:02:02 2019 From: report at bugs.python.org (Tianon) Date: Tue, 09 Jul 2019 23:02:02 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1562713322.65.0.21795633822.issue36044@roundup.psfhosted.org> Change by Tianon : ---------- nosy: +tianon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 19:26:51 2019 From: report at bugs.python.org (Henry Harutyunyan) Date: Tue, 09 Jul 2019 23:26:51 +0000 Subject: [issue37534] In minidom module ability to add Standalone Document Declaraion is missing while generating XML documents Message-ID: <1562714811.12.0.95150258791.issue37534@roundup.psfhosted.org> New submission from Henry Harutyunyan : Though the Standalone Document Declaration in XML Declaration is optional and the default value of "no" is assumed in case it's omitted, in certain cases it makes sense to change the value to indicate the absence of external markup declarations. It's a part of W3C recommendation on XML (https://www.w3.org/TR/xml/#sec-prolog-dtd). Though minidom module allows to modify the encoding declaration if needed, the same is not true for standalone declaration. As I've recently came up with an issue while generating XML documents with the module I suggest adding the ability to add and modify the declaration. ---------- components: XML messages: 347583 nosy: hharutyunyan priority: normal severity: normal status: open title: In minidom module ability to add Standalone Document Declaraion is missing while generating XML documents type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 20:43:37 2019 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2019 00:43:37 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1562719417.06.0.670239601222.issue19645@roundup.psfhosted.org> R. David Murray added the comment: "But - what are we solving for here?" I'll tell you what my fairly common use case is. Suppose I have some test infrastructure code, and I want to make some assertions in it. What I invariably end up doing is passing 'self' into the infrastructure method/class just so I can call the assert methods from it. I'd much rather be just calling the assertions, without carrying the whole test object around. It *works* to do that, but it bothers me every time I do it or read it in code, and it makes the infrastructure code needlessly more complicated and slightly harder to understand/read. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 20:57:54 2019 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2019 00:57:54 +0000 Subject: [issue32178] Some invalid email address groups cause an IndexError instead of a HeaderParseError In-Reply-To: <1512038434.94.0.213398074469.issue32178@psf.upfronthosting.co.za> Message-ID: <1562720274.2.0.652315027916.issue32178@roundup.psfhosted.org> R. David Murray added the comment: The fact that the original report mentions HeaderParserError implies that the new API is being used, though the report didn't make that clear. The problem still exists: >>> m = message_from_string("To: :Foo \n\n", policy=default) >>> m['To'] Traceback (most recent call last): File "", line 1, in File "/home/rdmurray/python/p38/Lib/email/message.py", line 391, in __getitem__ return self.get(name) File "/home/rdmurray/python/p38/Lib/email/message.py", line 471, in get return self.policy.header_fetch_parse(k, v) File "/home/rdmurray/python/p38/Lib/email/policy.py", line 163, in header_fetch_parse return self.header_factory(name, value) File "/home/rdmurray/python/p38/Lib/email/headerregistry.py", line 602, in __call__ return self[name](name, value) File "/home/rdmurray/python/p38/Lib/email/headerregistry.py", line 197, in __new__ cls.parse(value, kwds) File "/home/rdmurray/python/p38/Lib/email/headerregistry.py", line 343, in parse groups.append(Group(addr.display_name, File "/home/rdmurray/python/p38/Lib/email/_header_value_parser.py", line 315, in display_name return self[0].display_name File "/home/rdmurray/python/p38/Lib/email/_header_value_parser.py", line 382, in display_name return self[0].display_name File "/home/rdmurray/python/p38/Lib/email/_header_value_parser.py", line 564, in display_name if res[0].token_type == 'cfws': IndexError: list index out of range ---------- resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 21:00:23 2019 From: report at bugs.python.org (Robert Collins) Date: Wed, 10 Jul 2019 01:00:23 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1562720423.91.0.0158681917882.issue19645@roundup.psfhosted.org> Robert Collins added the comment: Ok so design wise - there is state on the TestCase that influences assertions; in potentially two ways. The first way is formatting - the amount of detail shown in long list comparisons etc. The second way I don't think we have at the moment, but potentially it could influence the fidelity of comparisons for NearlyEquals and the like - generally though we tend to pass those in as parameters. So just ripping everything off into standalone functions loses the home for that state. It either becomes global (ugh), or a new object that isn't a test case but is basically the same magic object that has to be known is carried around, or we find some other way of delegating the formatting choice and controls. hamcrest has some prior art in this space, and testtools experimented with that too. wordpress has managed to naff up the formatting on my old blog post about this https://rbtcollins.wordpress.com/2010/05/10/maintainable-pyunit-test-suites/ and https://testtools.readthedocs.io/en/latest/for-test-authors.html#matchers Its been on my TODO for a very long time to put together a PEP for adding matchers to the stdlib; I find the full system we did in testtools very useful because it can represent everything from a trivial in-memory string error through to a disk image for a broken postgresql database, without running out of memory or generating mojibake.... but if we wanted to do something smaller that didn't prejuidice extensions like testtools still doing more that would be fine too. The core idea of matchers is that rather than a standalone function f() -> nil/raise, you build a callable object f() -> Option(Mismatch), and a Mismatch can be shown to users, combined with other mismatches to form composites or sequences and so forth. So this would give room for the state around object formatting and the like too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 21:00:28 2019 From: report at bugs.python.org (Robert Collins) Date: Wed, 10 Jul 2019 01:00:28 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1562720428.26.0.000296405418351.issue19645@roundup.psfhosted.org> Change by Robert Collins : ---------- versions: +Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 21:01:52 2019 From: report at bugs.python.org (Robert Collins) Date: Wed, 10 Jul 2019 01:01:52 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1562720512.61.0.121172976092.issue19645@roundup.psfhosted.org> Robert Collins added the comment: Oh, I didn't mean to imply that these are the only options I'd support - just that these are the things I've thought through and that I think will all work well... I'm sure there are more options available ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 21:03:23 2019 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2019 01:03:23 +0000 Subject: [issue32179] Empty email address in headers triggers an IndexError In-Reply-To: <1512041238.12.0.213398074469.issue32179@psf.upfronthosting.co.za> Message-ID: <1562720603.46.0.487020283275.issue32179@roundup.psfhosted.org> R. David Murray added the comment: BareQuotedString implies the new API is being used, though that was not made clear in the report. However, unlike the other recently closed issue, this one was in fact fixed (and I have a vague memory of reviewing the PR): >>> m = message_from_string('ReplyTo: ""', policy=default) >>> m['ReplyTo'] '""' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 21:08:34 2019 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2019 01:08:34 +0000 Subject: [issue31445] Index out of range in get of message.EmailMessage.get() In-Reply-To: <1505296401.08.0.196475452437.issue31445@psf.upfronthosting.co.za> Message-ID: <1562720914.15.0.57018744289.issue31445@roundup.psfhosted.org> R. David Murray added the comment: Note that the reporter indicated that the message was an instance of EmailMessage (the new API). You'd need to use policy-default to get that using message_from_string. But yes, this was fixed in another issue. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 21:19:16 2019 From: report at bugs.python.org (Zach Valenta) Date: Wed, 10 Jul 2019 01:19:16 +0000 Subject: [issue37480] add ptpython to list of alternate interpreters In-Reply-To: <1562036636.74.0.198372246702.issue37480@roundup.psfhosted.org> Message-ID: <1562721556.35.0.190249496183.issue37480@roundup.psfhosted.org> Zach Valenta added the comment: Terry, I agree w/ you that this info has a better home in the wiki. Just commented on the PR to say as much there. I'll update the PR per Kyle Stanley's suggestion and port the info into the wiki. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 21:27:54 2019 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2019 01:27:54 +0000 Subject: [issue37357] mbox From line wrongly detected In-Reply-To: <1561106690.17.0.233145774515.issue37357@roundup.psfhosted.org> Message-ID: <1562722074.2.0.66673538822.issue37357@roundup.psfhosted.org> R. David Murray added the comment: This problem is the whole reason "mangle_from" exists in the email library... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 21:50:13 2019 From: report at bugs.python.org (Jack Wong) Date: Wed, 10 Jul 2019 01:50:13 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1562723413.26.0.780344129112.issue21478@roundup.psfhosted.org> Jack Wong added the comment: Can we reopen this bug? Karthikeyan's PR works for Dmitry's toy example, but it does not work in the usual case where patch() and attach_mock() are used. I encountered this bug on Python 3.7.3, which includes the PR. Non-toy example: import unittest.mock as mock def foo(): pass parent = mock.Mock() with mock.patch('__main__.foo', autospec=True) as mock_foo: parent.attach_mock(mock_foo, 'child') parent.child() print(parent.mock_calls) Actual output: [] Expected output: [call.child()] The reason why Karthikeyan's PR works on the toy example is that that mock's name is not set. In the usual case, the function mock's name will be set so this "if" block in _check_and_set_parent will return immediately. if ((value._mock_name or value._mock_new_name) or (value._mock_parent is not None) or (value._mock_new_parent is not None)): return False I think a possible fix is to move the inner mock extraction out to the attach_mock function as that function contains code to clear the mock's parent and name attributes. Downside is that that would make it fail on Dmitry's toy example. ---------- nosy: +iforapsy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:22:05 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Jul 2019 02:22:05 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1562725325.82.0.941464239208.issue21478@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks Jack for the report. I am reopening this issue. I will use your example as a unit test. I will try to look into it. If you have more cases or examples related to the issue feel free to add them. ---------- resolution: fixed -> stage: resolved -> status: closed -> open versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:23:21 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Jul 2019 02:23:21 +0000 Subject: [issue37534] In minidom module ability to add Standalone Document Declaraion is missing while generating XML documents In-Reply-To: <1562714811.12.0.95150258791.issue37534@roundup.psfhosted.org> Message-ID: <1562725401.75.0.991976806969.issue37534@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +scoder, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 22:59:49 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Jul 2019 02:59:49 +0000 Subject: [issue30663] IDLE: Add lineno sidebar to editor window In-Reply-To: <1497431681.4.0.503512983326.issue30663@psf.upfronthosting.co.za> Message-ID: <1562727589.04.0.763252897563.issue30663@roundup.psfhosted.org> Terry J. Reedy added the comment: Oakley's patch was intentionally very general, allowing line number heights to vary because of different fonts, font sizes, or widget inclusions. This required positioning line numbers by pixel (hence canvas) and accommodating line size changes even in the absence of newline changes. IDLE's need is simpler (fortunately)l. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 23:57:44 2019 From: report at bugs.python.org (Dean) Date: Wed, 10 Jul 2019 03:57:44 +0000 Subject: [issue37535] Client SSLSocket with select.select() always returns readable with OpenSSL 1.1.1 Message-ID: <1562731064.9.0.934832826159.issue37535@roundup.psfhosted.org> New submission from Dean : Hi, I've come across an issue with OpenSSL 1.1.1, when a client socket wrapped using ssl.wrap_socket() is used in select.select() its always returning ready for reading even though there appears to be nothing to read. To reproduce: 0. Extract files from attached zip 1. Run server.py 2. Run client.py I expect client.py to print "Nothing to read" and then b'\x00\x01\x02\x03', which it does with Python 2.7.14, 3.6.8 and 3.7.3 and OpenSSL 1.0.1f and 1.1.0g. With OpenSSL 1.1.1 it prints 'Pending: 0' and blocks on the sock.recv(1) call. Thanks! ---------- assignee: christian.heimes components: SSL files: ssl_select.zip messages: 347595 nosy: christian.heimes, ddddaaaa priority: normal severity: normal status: open title: Client SSLSocket with select.select() always returns readable with OpenSSL 1.1.1 type: behavior versions: Python 2.7, Python 3.6, Python 3.7 Added file: https://bugs.python.org/file48464/ssl_select.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 00:11:11 2019 From: report at bugs.python.org (Ma Lin) Date: Wed, 10 Jul 2019 04:11:11 +0000 Subject: [issue37527] Timestamp conversion on windows fails with timestamps close to EPOCH In-Reply-To: <1562668345.09.0.775729583969.issue37527@roundup.psfhosted.org> Message-ID: <1562731871.22.0.997450097732.issue37527@roundup.psfhosted.org> Ma Lin added the comment: Looks like a similar problem to issue29097. >>> from datetime import datetime >>> d = datetime.fromtimestamp(1) >>> d.timestamp() Traceback (most recent call last): File "", line 1, in OSError: [Errno 22] Invalid argument Neijwiert tried to analyzed it in stackoverflow: https://stackoverflow.com/questions/56931738/ ---------- nosy: +Ma Lin, ammar2, belopolsky, jleclanche versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 00:14:41 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Jul 2019 04:14:41 +0000 Subject: [issue37527] Timestamp conversion on windows fails with timestamps close to EPOCH In-Reply-To: <1562668345.09.0.775729583969.issue37527@roundup.psfhosted.org> Message-ID: <1562732081.06.0.0491830795875.issue37527@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 00:30:47 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Jul 2019 04:30:47 +0000 Subject: [issue37528] test_tarfile: test_extractall_symlinks() fails on Windows with: [WinError 206] The filename or extension is too long In-Reply-To: <1562672057.8.0.696699034391.issue37528@roundup.psfhosted.org> Message-ID: <1562733047.78.0.0117719880349.issue37528@roundup.psfhosted.org> Eryk Sun added the comment: If you want to harden the test for Windows, you could transform TEMPDIR into an extended path. os.path._getfinalpathname always returns an extended path. For example: >>> os.path._getfinalpathname('C:/Temp') '\\\\?\\C:\\Temp' >>> os.path._getfinalpathname('//localhost/C$/Temp') '\\\\?\\UNC\\localhost\\C$\\Temp' > windows.RtlAreLongPathsEnabled: > > RtlAreLongPathsEnabled() is not available on Windows 8.1. I don't > know if long paths support is enabled or not on this buildbot (I > guess that no, it isn't). Normalized long paths are implemented in Windows 10 1607 and later. Previous versions do not have RtlAreLongPathsEnabled and cannot support normalized long paths. RtlAreLongPathsEnabled() will be true if, at process startup, the "LongPathsEnabled" policy is enabled in the registry and the application manifest claims to be "longPathAware". In all supported versions of Windows, long paths are supported by most filesystem functions if we use an extended path, i.e. a fully-qualified Unicode path that starts with the \\?\ prefix. This path type is not normalized in a create or open context, so it can only use backslash as the path separator, not forward slash. Also, the process working directory does not allow extended paths, so when using extended paths we have to manage our own working directory and manually resolve relative paths, including "." and ".." components (e.g. by calling GetFullPathNameW). ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 00:36:50 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Wed, 10 Jul 2019 04:36:50 +0000 Subject: [issue37532] email.header.make_header() doesn't work if any `ascii` code is out of range(128) In-Reply-To: <1562707246.84.0.835768356919.issue37532@roundup.psfhosted.org> Message-ID: <1562733410.07.0.879647794751.issue37532@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: Maybe a solution, if no charset defined, then encode it as utf-8 in decode_header, because it's Python3's default encoding? diff --git a/Lib/email/header.py b/Lib/email/header.py index 4ab0032bc6..8dbfe58a57 100644 --- a/Lib/email/header.py +++ b/Lib/email/header.py @@ -135,7 +135,10 @@ def decode_header(header): collapsed = [] last_word = last_charset = None for word, charset in decoded_words: - if isinstance(word, str): + if not charset and isinstance(word, str): + word = word.encode('utf-8') + charset = 'utf-8' + elif isinstance(word, str): word = bytes(word, 'raw-unicode-escape') if last_word is None: last_word = word Python 3.9.0a0 (heads/master:110a47c4f4, Jul 10 2019, 11:32:53) [GCC 7.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import email.header >>> header = "Your booking at Voyager Int'l Hostel,=?UTF-8?B?IFBhbmFtw6EgQ2l0eQ==?=, Panam?- Casco Antiguo" >>> print(email.header.make_header(email.header.decode_header(header))) Your booking at Voyager Int'l Hostel, Panam? City, Panam?- Casco Antiguo >>> ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 00:42:52 2019 From: report at bugs.python.org (hai shi) Date: Wed, 10 Jul 2019 04:42:52 +0000 Subject: [issue34697] ctypes: Crash if manually-created CField instance is used In-Reply-To: <1537031593.26.0.956365154283.issue34697@psf.upfronthosting.co.za> Message-ID: <1562733772.36.0.701204101105.issue34697@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:06:30 2019 From: report at bugs.python.org (Zaar Hai) Date: Wed, 10 Jul 2019 05:06:30 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1562735190.5.0.503170144053.issue35545@roundup.psfhosted.org> Zaar Hai added the comment: Good day guys, Does anyone have an idea if it's going to be fixed for 3.8? ---------- nosy: +Zaar Hai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:07:40 2019 From: report at bugs.python.org (Ryan McCampbell) Date: Wed, 10 Jul 2019 05:07:40 +0000 Subject: [issue37536] ctypes.create_string_buffer fails on windows with non-BMP characters Message-ID: <1562735260.22.0.463850120288.issue37536@roundup.psfhosted.org> New submission from Ryan McCampbell : The ctypes.create_string_buffer function uses the length of the string to create the buffer if no size is provided. Since windows wide chars are UTF-16 the buffer may actually need to be larger to store surrogate pairs. This code crashes on windows: >>> create_unicode_buffer('\U00010000\U00010000') ValueError: string too long ---------- messages: 347600 nosy: rmccampbell7 priority: normal severity: normal status: open title: ctypes.create_string_buffer fails on windows with non-BMP characters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:08:33 2019 From: report at bugs.python.org (Ryan McCampbell) Date: Wed, 10 Jul 2019 05:08:33 +0000 Subject: [issue37536] ctypes.create_string_buffer fails on windows with non-BMP characters In-Reply-To: <1562735260.22.0.463850120288.issue37536@roundup.psfhosted.org> Message-ID: <1562735313.1.0.382513788466.issue37536@roundup.psfhosted.org> Change by Ryan McCampbell : ---------- components: +ctypes type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:11:35 2019 From: report at bugs.python.org (Ryan McCampbell) Date: Wed, 10 Jul 2019 05:11:35 +0000 Subject: [issue37536] ctypes.create_string_buffer fails on windows with non-BMP characters In-Reply-To: <1562735260.22.0.463850120288.issue37536@roundup.psfhosted.org> Message-ID: <1562735495.25.0.00415630999699.issue37536@roundup.psfhosted.org> Change by Ryan McCampbell : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:13:07 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Jul 2019 05:13:07 +0000 Subject: [issue37536] ctypes.create_string_buffer fails on windows with non-BMP characters In-Reply-To: <1562735260.22.0.463850120288.issue37536@roundup.psfhosted.org> Message-ID: <1562735587.86.0.347792559499.issue37536@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> create_unicode_buffer() fails on non-BMP strings on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:22:48 2019 From: report at bugs.python.org (Ryan McCampbell) Date: Wed, 10 Jul 2019 05:22:48 +0000 Subject: [issue37536] ctypes.create_string_buffer fails on windows with non-BMP characters In-Reply-To: <1562735260.22.0.463850120288.issue37536@roundup.psfhosted.org> Message-ID: <1562736168.65.0.917807557723.issue37536@roundup.psfhosted.org> Ryan McCampbell added the comment: Oops my bad, didn't realize this was already fixed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 01:33:22 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Jul 2019 05:33:22 +0000 Subject: [issue37532] email.header.make_header() doesn't work if any `ascii` code is out of range(128) In-Reply-To: <1562707246.84.0.835768356919.issue37532@roundup.psfhosted.org> Message-ID: <1562736802.71.0.355785102276.issue37532@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 02:27:59 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 10 Jul 2019 06:27:59 +0000 Subject: [issue37537] Compute allocated blocks in _Py_GetAllocatedBlocks() Message-ID: <1562740079.69.0.103809665288.issue37537@roundup.psfhosted.org> New submission from Neil Schemenauer : This is a small but measurable optimization for _PyObject_Malloc and _PyObject_Free. It slows down _Py_GetAllocatedBlocks a bit but I think that's a price worth paying. ---------- components: Interpreter Core messages: 347602 nosy: nascheme priority: normal severity: normal status: open title: Compute allocated blocks in _Py_GetAllocatedBlocks() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 02:30:32 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 10 Jul 2019 06:30:32 +0000 Subject: [issue37537] Compute allocated blocks in _Py_GetAllocatedBlocks() In-Reply-To: <1562740079.69.0.103809665288.issue37537@roundup.psfhosted.org> Message-ID: <1562740232.12.0.495902372954.issue37537@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- keywords: +patch pull_requests: +14486 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 02:34:12 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 10 Jul 2019 06:34:12 +0000 Subject: [issue37537] Compute allocated blocks in _Py_GetAllocatedBlocks() In-Reply-To: <1562740079.69.0.103809665288.issue37537@roundup.psfhosted.org> Message-ID: <1562740452.45.0.238816254173.issue37537@roundup.psfhosted.org> Neil Schemenauer added the comment: PyPerformance result, using --enable-optimizations +-------------------------+---------+------------------------------+ | Benchmark | base | no-allocated | +=========================+=========+==============================+ | 2to3 | 388 ms | 385 ms: 1.01x faster (-1%) | +-------------------------+---------+------------------------------+ | dulwich_log | 91.8 ms | 92.8 ms: 1.01x slower (+1%) | +-------------------------+---------+------------------------------+ | go | 302 ms | 296 ms: 1.02x faster (-2%) | +-------------------------+---------+------------------------------+ | hexiom | 11.4 ms | 11.5 ms: 1.01x slower (+1%) | +-------------------------+---------+------------------------------+ | json_dumps | 14.0 ms | 13.7 ms: 1.02x faster (-2%) | +-------------------------+---------+------------------------------+ | logging_format | 12.1 us | 11.9 us: 1.02x faster (-2%) | +-------------------------+---------+------------------------------+ | logging_simple | 10.9 us | 10.6 us: 1.02x faster (-2%) | +-------------------------+---------+------------------------------+ | pickle_dict | 23.6 us | 21.3 us: 1.11x faster (-10%) | +-------------------------+---------+------------------------------+ | pidigits | 208 ms | 210 ms: 1.01x slower (+1%) | +-------------------------+---------+------------------------------+ | python_startup | 9.73 ms | 9.66 ms: 1.01x faster (-1%) | +-------------------------+---------+------------------------------+ | python_startup_no_site | 6.70 ms | 6.66 ms: 1.01x faster (-1%) | +-------------------------+---------+------------------------------+ | regex_dna | 199 ms | 195 ms: 1.02x faster (-2%) | +-------------------------+---------+------------------------------+ | regex_effbot | 3.18 ms | 3.14 ms: 1.01x faster (-1%) | +-------------------------+---------+------------------------------+ | regex_v8 | 25.0 ms | 24.4 ms: 1.02x faster (-2%) | +-------------------------+---------+------------------------------+ | scimark_fft | 421 ms | 426 ms: 1.01x slower (+1%) | +-------------------------+---------+------------------------------+ | scimark_sor | 220 ms | 223 ms: 1.01x slower (+1%) | +-------------------------+---------+------------------------------+ | scimark_sparse_mat_mult | 5.18 ms | 5.33 ms: 1.03x slower (+3%) | +-------------------------+---------+------------------------------+ | spectral_norm | 159 ms | 156 ms: 1.02x faster (-2%) | +-------------------------+---------+------------------------------+ | unpickle | 14.6 us | 14.2 us: 1.02x faster (-2%) | +-------------------------+---------+------------------------------+ | unpickle_list | 4.46 us | 4.33 us: 1.03x faster (-3%) | +-------------------------+---------+------------------------------+ | xml_etree_iterparse | 141 ms | 139 ms: 1.01x faster (-1%) | +-------------------------+---------+------------------------------+ Not significant (36): chaos; crypto_pyaes; deltablue; django_template; fannkuch; float; html5lib; json_loads; logging_silent; mako; meteor_contest; nbody; nqueens; pathlib; pickle; pickle_list; pickle_pure_python; raytrace; regex_compile; richards; scimark_lu; scimark_monte_carlo; sqlalchemy_declarative; sqlalchemy_imperative; sqlite_synth; sympy_expand; sympy_integrate; sympy_sum; sympy_str; telco; tornado_http; unpack_sequence; unpickle_pure_python; xml_etree_parse; xml_etree_generate; xml_etree_process ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 02:58:30 2019 From: report at bugs.python.org (Daniel Hillier) Date: Wed, 10 Jul 2019 06:58:30 +0000 Subject: [issue37538] Refactor zipfile to ease subclassing and enhancement Message-ID: <1562741910.34.0.615692848434.issue37538@roundup.psfhosted.org> New submission from Daniel Hillier : I've written https://github.com/danifus/pyzipper which incorporates a refactor of zipfile.py in order to support winzip AES encryption. I don't intend to include the crypto code but I would like to incorporate the refactor to help others subclass and extend the objects found in zipfile.py For a longer description of the general approach I've taken to the refactor, see the python-ideas thread: https://mail.python.org/archives/list/python-ideas at python.org/thread/QCKHI5JYMKOPMIF6Q2NI7JIFHV6KO746/#QCKHI5JYMKOPMIF6Q2NI7JIFHV6KO746 ---------- components: Library (Lib) messages: 347604 nosy: dhillier priority: normal severity: normal status: open title: Refactor zipfile to ease subclassing and enhancement type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 03:15:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Jul 2019 07:15:27 +0000 Subject: [issue37538] Refactor zipfile to ease subclassing and enhancement In-Reply-To: <1562741910.34.0.615692848434.issue37538@roundup.psfhosted.org> Message-ID: <1562742927.74.0.558472581038.issue37538@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 03:40:42 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Jul 2019 07:40:42 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1562744442.17.0.593509736692.issue36044@roundup.psfhosted.org> Gregory P. Smith added the comment: In my experience, people overthink what needs to go into a CPython profiling run. Sure, our default PROFILE_TASK is rather unfortunate because it takes a very long time by including runs of super slow tests that won't meaningfully contribute profile data (multiprocessing, subprocess, concurrent_futures, heavy I/O, etc). But despite somewhat popular belief, it is not actually a problem that the suite exercises other sides of branches, because by and large just by executing Python code at all and exercising C extension module code, it still acts like most any Python program and spends most of the time on the common critical paths - regardless tests that trigger specific number of executions of other paths. Those executions pale in comparison to the ordinary ones in anywhere critical. I don't recommend making any claim about something "harming" the profile without reliable data to prove it. Feel free to tune what test.regrtest --pgo enables or disables by default. But try to do it in a scientific data based manner rather than guessing. Decreasing the total wall time for a default --enable-optimizations build would be a good thing for everyone, provided the resulting interpreter remains "effectively similar" in speed. If you somehow manage to find something that actually speeds up the resulting interpreter, amazing! https://github.com/python/pyperformance is your friend for real world performance measurement. Patience is key. The builds and benchmark runs are slow. One thing --enable-optimizations does _not_ do today is enable link time optimization by default. Various toolchain+platform versions were having problems successfully generating a working interpreter with LTO enabled. If you want a potential large speed up in the interpreter, figuring out how to get link time optimization on top of the existing PGO working reliably, detecting when toolchains+platform combos where it will be reliable, and enabling it by default on such systems is _likely_ the largest possible gain still to be had. ---------- components: +Build nosy: +gregory.p.smith versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 03:45:49 2019 From: report at bugs.python.org (Matej Cepl) Date: Wed, 10 Jul 2019 07:45:49 +0000 Subject: [issue37539] CheckCommitCursorReset regression sqlite3 test fails with old sqlite3 Message-ID: <1562744749.11.0.451053951717.issue37539@roundup.psfhosted.org> New submission from Matej Cepl : When building Python 2.7.16 on very old SUSE Enterprise Linux (SLE-11), with gcc 4.3, sqlite3 3.6.4, CheckCommitCursorReset fails with: test test_sqlite failed -- Traceback (most recent call last): File "/usr/src/packages/BUILD/Python-2.7.16/Lib/sqlite3/test/regression.py", line 338, in CheckCommitCursorReset con.commit() OperationalError: cannot commit transaction - SQL statements in progress It seems to me the problem is that the select from https://github.com/python/cpython/blob/master/Lib/sqlite3/test/regression.py#L353 is still open, while we run con.commit(). It should be probably better to store output of that enumerate somewhere and work on that variable instead. ---------- components: Library (Lib) files: log.txt messages: 347606 nosy: mcepl priority: normal severity: normal status: open title: CheckCommitCursorReset regression sqlite3 test fails with old sqlite3 versions: Python 2.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48465/log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 04:00:16 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Wed, 10 Jul 2019 08:00:16 +0000 Subject: [issue37532] email.header.make_header() doesn't work if any `ascii` code is out of range(128) In-Reply-To: <1562707246.84.0.835768356919.issue37532@roundup.psfhosted.org> Message-ID: <1562745616.54.0.31583456645.issue37532@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: Changing everything to utf-8 breaks a lot of tests, so here a less invasive solution? diff --git a/Lib/email/header.py b/Lib/email/header.py index 4ab0032bc6..1e71eeae7f 100644 --- a/Lib/email/header.py +++ b/Lib/email/header.py @@ -136,7 +136,14 @@ def decode_header(header): last_word = last_charset = None for word, charset in decoded_words: if isinstance(word, str): - word = bytes(word, 'raw-unicode-escape') + word_tmp = bytes(word, 'raw-unicode-escape') + input_charset = charset or 'us-ascii' + try: + _ = word_tmp.decode(input_charset, errors='strict') + word = word_tmp + except UnicodeDecodeError: + word = str(word).encode('utf-8') + charset = 'utf-8' if last_word is None: last_word = word last_charset = charset ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 04:06:51 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 10 Jul 2019 08:06:51 +0000 Subject: [issue37540] vectorcall: keyword names must be strings Message-ID: <1562746011.67.0.0539270871483.issue37540@roundup.psfhosted.org> New submission from Jeroen Demeyer : Keyword names in calls are expected to be strings, however it's currently not clear who should enforce/check this. I suggest to fix this for vectorcall/METH_FASTCALL and specify that it's the caller's job to make sure that keyword names are strings (str subclasses are allowed). ---------- components: Interpreter Core messages: 347608 nosy: Mark.Shannon, jdemeyer, petr.viktorin, vstinner priority: normal severity: normal status: open title: vectorcall: keyword names must be strings type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 04:15:39 2019 From: report at bugs.python.org (Daniel Hillier) Date: Wed, 10 Jul 2019 08:15:39 +0000 Subject: [issue37538] Refactor zipfile to ease subclassing and enhancement In-Reply-To: <1562741910.34.0.615692848434.issue37538@roundup.psfhosted.org> Message-ID: <1562746539.04.0.647800953917.issue37538@roundup.psfhosted.org> Daniel Hillier added the comment: I've started a branch on my github fork if anyone wants to follow along. https://github.com/danifus/cpython/tree/zipfile_refactor Is there a better way to manage this in terms of review and suggestions as I add more commits? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 04:38:13 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Jul 2019 08:38:13 +0000 Subject: [issue37517] Improve error messages for Windows reserved file names In-Reply-To: <1562457634.89.0.989040753976.issue37517@roundup.psfhosted.org> Message-ID: <1562747893.69.0.632241159521.issue37517@roundup.psfhosted.org> Eryk Sun added the comment: > if the operation succeeds, no error/message is displayed Some errors pass silently and may be confusing later on. For example, CreateDirectoryW calls NtCreateFile with the disposition FILE_CREATE and the option FILE_DIRECTORY_FILE (i.e. the call *must* create a new directory), but some non-filesystem devices ignore this and let the request succeed. For example: >>> os.mkdir('C:/Temp/nul') >>> os.mkdir('C:/Temp/conin$') Both calls 'succeed' but don't actually create a directory: >>> os.path.exists(r'\\?\C:\Temp\nul') False >>> os.path.exists(r'\\?\C:\Temp\conin$') False > either we need to search the string for the special names or find > an API that will clarify it GetFullPathNameW is a library function that shares the implementation that's used to normalize paths in a create or open context. If the path does not start with \\?\, then we resolve it via GetFullPathNameW. If it becomes a device path, or if the final component changes (e.g. a trailing dot or space is removed), then we can parenthetically include the resolved path. For example: os.stat('spam.'): FileNotFoundError: [WinError 2] The system cannot find the file specified: 'spam.' [resolved path: 'C:\\Temp\\spam'] os.startfile('con'): OSError: [WinError 1200] The specified device name is invalid: 'con' [resolved path: '\\\\.\\con'] os.open('C:/Temp/lpt9', 0): FileNotFoundError: [Errno 2] No such file or directory: 'C:/Temp/lpt9' [resolved path: '\\\\.\\lpt9'] For os.open() and open(), we should switch to using PyErr_SetExcFromWindowsErrWithFilenameObject instead of PyErr_SetFromErrnoWithFilenameObject. _doserrno is valid in this context, so we should be using it anyway to retain the more specific winerror value. Then we only have to special case reserved names in the Windows-only function PyErr_SetExcFromWindowsErrWithFilenameObjects. ---------- keywords: +3.6regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 04:52:25 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Jul 2019 08:52:25 +0000 Subject: [issue37524] IDLE error on closing 3.8+ debug build In-Reply-To: <1562664018.55.0.0863283493597.issue37524@roundup.psfhosted.org> Message-ID: <1562748745.74.0.324583058755.issue37524@roundup.psfhosted.org> Terry J. Reedy added the comment: One time after doing something unusual with IDLE (editing theme?, not sure) I did not get message on exit. But next time, back again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 05:02:54 2019 From: report at bugs.python.org (Saba Kauser) Date: Wed, 10 Jul 2019 09:02:54 +0000 Subject: [issue37541] get_python_lib() returns incorrect path for site-packages Message-ID: <1562749374.67.0.365304267455.issue37541@roundup.psfhosted.org> New submission from Saba Kauser : HI, I am using get_python_lib() to copy certain data files to site-pacakges location while installation of package ibm_db. I am using this function to execute a command as well on one of the shared library @package install location. So far, I have faced issue with this function in: virtual env, anaconda python and with pip cache enabled. The source can be found at: https://github.com/ibmdb/python-ibmdb/blob/master/IBM_DB/ibm_db/setup.py#L242 When I run through debugger for python setup.py build command, I can see following: (Pdb) p data_files [('C:\\Users\\skauser\\Anaconda\\Lib\\site-packages', ['./README.md']), ('C:\\Users\\skauser\\Anaconda\\Lib\\site-packages', ['./CHANGES']), ('C:\\Users\\skauser\\Anaconda\\Lib\\site-packages', ['./LICENSE']), ('C:\\Users\\skauser\\Anaconda\\Lib\\site-packages', ['./config.py.sample'])] However, in "python setup.py install", this folder structure is created: C:\Users\skauser\Anaconda\Lib\site-packages\users\skauser\appdata\local\programs\python\python37\Lib and no data files are copied. If I do : "pip install ." from source directory, The data_files are copied under "c:\users\skauser\anaconda\lib\site-packages\users\skauser\anaconda\lib\site-packages" when the expectation is to have the files copied under "c:\users\skauser\anaconda\lib\site-packages". Can you please look into this. Although this is not a serious problem for platforms other than mac, But on MAC, I am using this same function get_python_lib()to execute a system command and without this working properly, MAC users are unable to use the python ibm_db driver. This is blocking! Please help. ---------- components: Distutils messages: 347612 nosy: dstufft, eric.araujo, sabakauser priority: normal severity: normal status: open title: get_python_lib() returns incorrect path for site-packages type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 06:22:20 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 10 Jul 2019 10:22:20 +0000 Subject: [issue37540] vectorcall: keyword names must be strings In-Reply-To: <1562746011.67.0.0539270871483.issue37540@roundup.psfhosted.org> Message-ID: <1562754140.58.0.74054849359.issue37540@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +14487 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14682 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 06:43:20 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Jul 2019 10:43:20 +0000 Subject: [issue37538] Refactor zipfile to ease subclassing and enhancement In-Reply-To: <1562741910.34.0.615692848434.issue37538@roundup.psfhosted.org> Message-ID: <1562755399.99.0.554702161943.issue37538@roundup.psfhosted.org> Serhiy Storchaka added the comment: I did not read your code yet, but I think it is the right way. If your btanch contains changes which you do not want to commit to CPython, but which makes the purpose of other changes clearer, you can create a PR against the master in your fork ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 06:51:03 2019 From: report at bugs.python.org (Andy Papageorgiou) Date: Wed, 10 Jul 2019 10:51:03 +0000 Subject: [issue37542] UDP sendto() sends duplicate packets Message-ID: <1562755863.69.0.759157701288.issue37542@roundup.psfhosted.org> New submission from Andy Papageorgiou : Wireshark reports two identical back to back packets sent for each sendto(), timing between packets is between 2 and 10us. Note this is on a point to point ethernet (just 1 cable, no switches, routers or anything else in between) to an embedded platform (Zynq ARM) from an intel i7 Window 10 laptop from 2018. The python code is running on the laptop. python code: with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s: s.bind(('', 5704)) while(more_to_send == TRUE) s.sendto(bytes_to_send, (HOST, UDP_PORT)) data = s.recv(1024) Wireshark log. 43204 80.146000 192.168.1.20 192.168.1.10 UDP 566 5704 ? 5604 Len=524 (payload) 43205 80.146003 192.168.1.20 192.168.1.10 UDP 566 5704 ? 5604 Len=524 (duplicate at payload time + 3us) 43206 80.149112 192.168.1.10 192.168.1.20 UDP 48 5604 ? 5704 Len=6 (ack) 43207 80.149306 192.168.1.20 192.168.1.10 UDP 566 5704 ? 5604 Len=524 (payload) 43208 80.149311 192.168.1.20 192.168.1.10 UDP 566 5704 ? 5604 Len=524 (duplicate at payload time +5us) I am suspicious this is an artefact of the point to point link. ---------- components: Library (Lib) messages: 347614 nosy: Andy Papageorgiou priority: normal severity: normal status: open title: UDP sendto() sends duplicate packets versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 06:51:10 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 10 Jul 2019 10:51:10 +0000 Subject: [issue37483] Add PyObject_CallOneArg() In-Reply-To: <1562069683.82.0.624448792444.issue37483@roundup.psfhosted.org> Message-ID: <1562755870.29.0.715430607639.issue37483@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 06:51:35 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 10 Jul 2019 10:51:35 +0000 Subject: [issue37484] Use PY_VECTORCALL_ARGUMENTS_OFFSET for __exit__ In-Reply-To: <1562070125.47.0.376343884146.issue37484@roundup.psfhosted.org> Message-ID: <1562755895.78.0.737540460996.issue37484@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 06:59:54 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 10 Jul 2019 10:59:54 +0000 Subject: [issue37543] Optimize pymalloc for non PGO build Message-ID: <1562756394.12.0.431999649056.issue37543@roundup.psfhosted.org> New submission from Inada Naoki : When PGO is not used, compilers don't know which part is hot. So gcc failed to inline hot code in pymalloc_alloc and pymalloc_free into _PyObject_Malloc and _PyObject_Free. For example, only this code is inlined into _PyObject_Malloc. if (nbytes == 0) { return 0; } if (nbytes > SMALL_REQUEST_THRESHOLD) { return 0; } But the hottest part is taking memory block from freelist in the pool. To optimize it, * make pymalloc_alloc and pymalloc_free inline functions * Split code for rare / slow paths out to new functions In PR 14674, pymalloc is now as fast as mimalloc in spectral_norm benchmark. $ ./python bm_spectral_norm.py --compare-to=./python-master python-master: ..................... 199 ms +- 1 ms python: ..................... 176 ms +- 1 ms Mean +- std dev: [python-master] 199 ms +- 1 ms -> [python] 176 ms +- 1 ms: 1.13x faster (-11%) ---------- components: Interpreter Core messages: 347615 nosy: inada.naoki priority: normal severity: normal status: open title: Optimize pymalloc for non PGO build type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 07:06:08 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 10 Jul 2019 11:06:08 +0000 Subject: [issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs In-Reply-To: <1487007412.2.0.380189857134.issue29548@psf.upfronthosting.co.za> Message-ID: <1562756768.93.0.169125667537.issue29548@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14488 pull_request: https://github.com/python/cpython/pull/14683 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 07:17:58 2019 From: report at bugs.python.org (Jarek Zgoda) Date: Wed, 10 Jul 2019 11:17:58 +0000 Subject: [issue37544] Multiple test failures during build Message-ID: <1562757478.69.0.905991720528.issue37544@roundup.psfhosted.org> New submission from Jarek Zgoda : I'm trying to build Python-3.7.4 from release tarball. Configure line: ./configure --prefix=/opt/python-3.7.4 --disable-shared --enable-optimizations System: Ubuntu 18.04.2 amd64, 4.15.0-54-generic #58-Ubuntu SMP Build fails. ---------- components: Build files: pgo_task_log.txt messages: 347616 nosy: Jarek Zgoda priority: normal severity: normal status: open title: Multiple test failures during build versions: Python 3.7 Added file: https://bugs.python.org/file48466/pgo_task_log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 07:28:35 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 10 Jul 2019 11:28:35 +0000 Subject: [issue37543] Optimize pymalloc for non PGO build In-Reply-To: <1562756394.12.0.431999649056.issue37543@roundup.psfhosted.org> Message-ID: <1562758115.89.0.164381118209.issue37543@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +14489 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 07:54:30 2019 From: report at bugs.python.org (Nathan Oyama) Date: Wed, 10 Jul 2019 11:54:30 +0000 Subject: [issue37545] Argparse Tutorial - unreasonable operators Message-ID: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> New submission from Nathan Oyama : In "Python 3.7 Documentation > Python HOWTOs > Argparse Tutorial" (https://docs.python.org/3.7/howto/argparse.html), search this page for elif args.verbosity >= 1: The operator ">=" should read "==" because args.verbosity cannot be 2 or greater after the if statement. You would find the original codes unreasonable until you go through "if args.verbosity >= 1:". ---------- assignee: docs at python components: Documentation messages: 347617 nosy: Culip, docs at python priority: normal severity: normal status: open title: Argparse Tutorial - unreasonable operators type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 08:02:16 2019 From: report at bugs.python.org (Andy Papageorgiou) Date: Wed, 10 Jul 2019 12:02:16 +0000 Subject: [issue37542] UDP sendto() sends duplicate packets In-Reply-To: <1562755863.69.0.759157701288.issue37542@roundup.psfhosted.org> Message-ID: <1562760136.72.0.0882555111999.issue37542@roundup.psfhosted.org> Change by Andy Papageorgiou : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 08:03:43 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 10 Jul 2019 12:03:43 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1562760223.79.0.741253732982.issue37151@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14490 pull_request: https://github.com/python/cpython/pull/14684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 08:05:11 2019 From: report at bugs.python.org (dave) Date: Wed, 10 Jul 2019 12:05:11 +0000 Subject: [issue37546] colors in ttk treeview tags are ignored Message-ID: <1562760311.49.0.967129869118.issue37546@roundup.psfhosted.org> New submission from dave : The following example code fails in Python 3.7.3 64 bit (both lines are displayed in black). It works correctly in 3.7.2 and earlier. import tkinter as tk import tkinter.ttk as ttk root = tk.Tk() ttk.Label(root, text='This is a RED label', foreground='red').pack() tree = ttk.Treeview(root) tree.tag_configure('RED_TAG', foreground='red', font=('arial', 12)) tree.insert('', tk.END, text='Black line') tree.insert('', tk.END, text='Red line', tag='RED_TAG') tree.pack() root.mainloop() ---------- components: Tkinter messages: 347618 nosy: dave9000 priority: normal severity: normal status: open title: colors in ttk treeview tags are ignored type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 08:06:19 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 10 Jul 2019 12:06:19 +0000 Subject: [issue37547] Add _PyObject_CallMethodOneArg() Message-ID: <1562760379.8.0.22654038416.issue37547@roundup.psfhosted.org> New submission from Jeroen Demeyer : We already have _PyObject_CallNoArg() _PyObject_CallOneArg() _PyObject_CallMethodNoArgs() so it makes sense to also add _PyObject_CallMethodOneArg() ---------- components: Interpreter Core messages: 347619 nosy: inada.naoki, jdemeyer, vstinner priority: normal severity: normal status: open title: Add _PyObject_CallMethodOneArg() type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 08:06:57 2019 From: report at bugs.python.org (hai shi) Date: Wed, 10 Jul 2019 12:06:57 +0000 Subject: [issue34697] ctypes: Crash if manually-created CField instance is used In-Reply-To: <1537031593.26.0.956365154283.issue34697@psf.upfronthosting.co.za> Message-ID: <1562760417.41.0.934024242106.issue34697@roundup.psfhosted.org> Change by hai shi : ---------- nosy: -shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 08:16:31 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 10 Jul 2019 12:16:31 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1562760991.58.0.584972006998.issue37531@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- keywords: +patch pull_requests: +14491 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 08:32:52 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 10 Jul 2019 12:32:52 +0000 Subject: [issue37548] Document range of atan, acos and asin Message-ID: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> New submission from Mark Dickinson : A small nice-to-have: it would be good to document the range of the inverse trigonometric functions `math.atan`, `math.asin` and `math.acos`, in both the docstrings and the built documentation. There are standard "principal values" for each of these inverses, and Python is using these standard values, but that may not be obvious to a user. ---------- assignee: docs at python components: Documentation messages: 347620 nosy: docs at python, mark.dickinson priority: normal severity: normal status: open title: Document range of atan, acos and asin versions: Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 09:19:34 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 10 Jul 2019 13:19:34 +0000 Subject: [issue37547] Add _PyObject_CallMethodOneArg() In-Reply-To: <1562760379.8.0.22654038416.issue37547@roundup.psfhosted.org> Message-ID: <1562764774.97.0.919731483103.issue37547@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +14492 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 09:49:06 2019 From: report at bugs.python.org (Omer Katz) Date: Wed, 10 Jul 2019 13:49:06 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1562766546.9.0.107696521728.issue7946@roundup.psfhosted.org> Omer Katz added the comment: FYI I can verify that the original benchmark is still valid on Python 3.7.3. I'm running the client on an 8 core CPU. The result is 30.702 seconds (341534.322 bytes/sec). I'll need somebody to decide how we're going to fix this problem. I can do the legwork. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 10:22:44 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 10 Jul 2019 14:22:44 +0000 Subject: [issue33408] Enable AF_UNIX support in Windows In-Reply-To: <1525257332.06.0.682650639539.issue33408@psf.upfronthosting.co.za> Message-ID: <1562768564.5.0.866514712943.issue33408@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 10:45:37 2019 From: report at bugs.python.org (Tim Peters) Date: Wed, 10 Jul 2019 14:45:37 +0000 Subject: [issue37543] Optimize pymalloc for non PGO build In-Reply-To: <1562756394.12.0.431999649056.issue37543@roundup.psfhosted.org> Message-ID: <1562769937.29.0.451848836462.issue37543@roundup.psfhosted.org> Change by Tim Peters : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 10:51:55 2019 From: report at bugs.python.org (Tim Peters) Date: Wed, 10 Jul 2019 14:51:55 +0000 Subject: [issue37537] Compute allocated blocks in _Py_GetAllocatedBlocks() In-Reply-To: <1562740079.69.0.103809665288.issue37537@roundup.psfhosted.org> Message-ID: <1562770315.85.0.653571572635.issue37537@roundup.psfhosted.org> Change by Tim Peters : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 10:54:21 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jul 2019 14:54:21 +0000 Subject: [issue37546] colors in ttk treeview tags are ignored In-Reply-To: <1562760311.49.0.967129869118.issue37546@roundup.psfhosted.org> Message-ID: <1562770461.37.0.757611330195.issue37546@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report. The problem you are seeing here appears to be a duplicate of that described in Issue36468 which describes this behavior change as a regression in Tk and also suggests a workaround. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Treeview: wrong color change _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 11:02:55 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jul 2019 15:02:55 +0000 Subject: [issue37544] Multiple test failures during build In-Reply-To: <1562757478.69.0.905991720528.issue37544@roundup.psfhosted.org> Message-ID: <1562770975.16.0.871356879692.issue37544@roundup.psfhosted.org> Ned Deily added the comment: Sorry you are having problems. Suggest first trying a clean build without --enable-optimizations. If that works, please supply the output from: ./python -m test.pythoninfo ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 11:05:42 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jul 2019 15:05:42 +0000 Subject: [issue37544] Multiple test failures during build In-Reply-To: <1562757478.69.0.905991720528.issue37544@roundup.psfhosted.org> Message-ID: <1562771142.79.0.755773788437.issue37544@roundup.psfhosted.org> Ned Deily added the comment: And, if the unoptimized build succeeds, also try running the tests with it: make test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 11:30:54 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jul 2019 15:30:54 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1562772654.22.0.691474724549.issue37500@roundup.psfhosted.org> Change by Ned Deily : ---------- keywords: -3.7regression nosy: -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 11:37:05 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Jul 2019 15:37:05 +0000 Subject: [issue35021] Assertion failures in datetimemodule.c. In-Reply-To: <1539884234.35.0.788709270274.issue35021@psf.upfronthosting.co.za> Message-ID: <1562773025.01.0.69298780475.issue35021@roundup.psfhosted.org> Ned Deily added the comment: Assuming answer to previous question is "no" -> closing ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 11:58:02 2019 From: report at bugs.python.org (Phil Frost) Date: Wed, 10 Jul 2019 15:58:02 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1562774282.06.0.138037927543.issue37168@roundup.psfhosted.org> Phil Frost added the comment: Not yet. I had a hell of a time getting gdb to follow gunicorn forks so it would watch the workers but not also every other thing using popen or os.system(). And the lldb package on Alpine doesn't seem to work. So we're currently in the process of testing a Debian container for production, hoping the issue just goes away. If not, I'll continue digging in with a debugger. ---------- nosy: +Phil Frost2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 13:14:07 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Jul 2019 17:14:07 +0000 Subject: [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562778847.0.0.842082387823.issue37545@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 13:14:41 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Jul 2019 17:14:41 +0000 Subject: [issue37539] CheckCommitCursorReset regression sqlite3 test fails with old sqlite3 In-Reply-To: <1562744749.11.0.451053951717.issue37539@roundup.psfhosted.org> Message-ID: <1562778881.04.0.526028751367.issue37539@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 13:30:10 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 10 Jul 2019 17:30:10 +0000 Subject: [issue37548] Document range of atan, acos and asin In-Reply-To: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> Message-ID: <1562779810.33.0.570685684738.issue37548@roundup.psfhosted.org> Change by Mark Dickinson : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 13:52:05 2019 From: report at bugs.python.org (DaveB) Date: Wed, 10 Jul 2019 17:52:05 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 Message-ID: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> New submission from DaveB : os.dup(fd) generates an OSError for standard streams (0: stdin, 1: stdout, 2: stderr) on Windows 7. Works as expected on Windows 10. Working backwards we found the issue first appears in Python 3.7.4rc1 and 3.8.0b2 on Windows 7. Earlier releases work as expected. >>> import os >>> os.dup(1) Traceback (most recent call last): File "", line 1, in OSError: [WinError 87] The parameter is incorrect >>> ---------- components: Extension Modules messages: 347627 nosy: daveb priority: normal severity: normal status: open title: os.dup() fails for standard streams on Windows 7 type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 13:57:37 2019 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2019 17:57:37 +0000 Subject: [issue37482] Email address display name fails with both encoded words and special chars In-Reply-To: <1562068275.57.0.247896906946.issue37482@roundup.psfhosted.org> Message-ID: <1562781457.23.0.222726460611.issue37482@roundup.psfhosted.org> R. David Murray added the comment: FYI, it would have been most helpful if you had posted your example in the issue text instead of as an attached file, as it explains the problem better than your text does :) Here is a minimal reproducer: >>> m = EmailMessage(policy=strict) >>> m['From'] = '"Foo Bar, Espa?a" ' >>> bytes(m) b'From: Foo Bar, =?utf-8?q?Espa=C3=B1a?= \n\n' This serialization of the header is, as you say, invalid. Either the comma should be encoded, or the "Foo Bar," should be in quotes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:02:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Jul 2019 18:02:57 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1562781777.01.0.810942084636.issue37549@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:06:40 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 10 Jul 2019 18:06:40 +0000 Subject: [issue33408] Enable AF_UNIX support in Windows In-Reply-To: <1525257332.06.0.682650639539.issue33408@psf.upfronthosting.co.za> Message-ID: <1562782000.84.0.101688590431.issue33408@roundup.psfhosted.org> Paul Monson added the comment: I've been asked by my team to investigate what is required to enable AF_UNIX in Python. Is anyone else actively investigating this? I did a prelinary investigation and the impact on test in test_sockets was pretty simple. However there were 26 test failures in test_asyncio tests, with only the naive changes to all AF_UNIX to work with the socket class on Windows. The first failure I looked at was caused by ProactorEventLoop in windows_events.py not providing a windows-specific version of create_unix_server. This results in the code falling back to AbstractServer.create_unix_server which raises NotImplementedError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:19:17 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Jul 2019 18:19:17 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1562782757.47.0.600905330481.issue37549@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:24:04 2019 From: report at bugs.python.org (Bane Banane) Date: Wed, 10 Jul 2019 18:24:04 +0000 Subject: [issue37550] SSL Pip Error Message-ID: <1562783044.13.0.555415202194.issue37550@roundup.psfhosted.org> New submission from Bane Banane : Python PIP SSL module is not avaible when i start: pip install ---------- assignee: christian.heimes components: SSL messages: 347630 nosy: Bane Banane, christian.heimes priority: normal severity: normal status: open title: SSL Pip Error type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:32:26 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Jul 2019 18:32:26 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1562783546.48.0.391412318231.issue21478@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +14493 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:38:18 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Jul 2019 18:38:18 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1562783898.96.0.841175071474.issue21478@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > I think a possible fix is to move the inner mock extraction out to the attach_mock function as that function contains code to clear the mock's parent and name attributes. Downside is that that would make it fail on Dmitry's toy example. Moving the inner mock check would cause the original report to fail. But the same logic can be copied to attach_mock so that name and parent for inner mock set in "mock" attribute is cleared. So _check_and_set_parent code path is hit the mock attribute without name and parent would behave as expected. Jack, would appreciate your review of the PR. I have added your report as a unittest along with directly using create_autospec with attach_mock that behaves like patch and autospec=True. I have also asserted that name is reset to child as per the docs at https://docs.python.org/3/library/unittest.mock.html#attaching-mocks-as-attributes Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:38:20 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 10 Jul 2019 18:38:20 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1562783900.1.0.741019258677.issue37549@roundup.psfhosted.org> Josh Rosenberg added the comment: This seems likely to have been caused by the fixes for #37267, which fixes an issue with os.dup leaving character streams inheritable (when the documentation specifies that the result must be non-inheritable). The code originally didn't try to make the descriptor non-inheritable because someone believed it wasn't allowed for character files, and the subsequent patch comments say "That was a mistake". Is it possible it wasn't allowed on Windows 7, and is allowed on Windows 10? I'm nosying the folks from #37267 for input. ---------- nosy: +ZackerySpytz, josh.r, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:43:06 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 10 Jul 2019 18:43:06 +0000 Subject: [issue37267] os.dup() creates an inheritable fd when handling a character file on Windows In-Reply-To: <1560420750.69.0.156424123047.issue37267@roundup.psfhosted.org> Message-ID: <1562784186.83.0.992520064047.issue37267@roundup.psfhosted.org> Josh Rosenberg added the comment: This may have caused a regression, see #37549. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 14:43:38 2019 From: report at bugs.python.org (B Siemerink) Date: Wed, 10 Jul 2019 18:43:38 +0000 Subject: [issue37482] Email address display name fails with both encoded words and special chars In-Reply-To: <1562068275.57.0.247896906946.issue37482@roundup.psfhosted.org> Message-ID: <1562784218.28.0.511585333193.issue37482@roundup.psfhosted.org> B Siemerink added the comment: Hello David, thank you for the suggestion. Regarding your comment: > Either the comma should be encoded, or the "Foo Bar," should be in quotes. According to RFC5322 the display name cannot contain both a quoted part and an encoded word, so the only option is to encode the comma. Please let me know if I can do anything else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 15:04:39 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 10 Jul 2019 19:04:39 +0000 Subject: [issue37537] Compute allocated blocks in _Py_GetAllocatedBlocks() In-Reply-To: <1562740079.69.0.103809665288.issue37537@roundup.psfhosted.org> Message-ID: <1562785479.02.0.799842303793.issue37537@roundup.psfhosted.org> Neil Schemenauer added the comment: New changeset 5d25f2b70351fc6a56ce5513ccf5f58556c18837 by Neil Schemenauer in branch 'master': bpo-37537: Compute allocated blocks in _Py_GetAllocatedBlocks() (#14680) https://github.com/python/cpython/commit/5d25f2b70351fc6a56ce5513ccf5f58556c18837 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 15:12:06 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 10 Jul 2019 19:12:06 +0000 Subject: [issue37551] IDLE: Quitting with a new, unsaved editor window causes an exception Message-ID: <1562785926.2.0.442729400594.issue37551@roundup.psfhosted.org> New submission from Tal Einat : Observed on macOS 10.14.5 with Python 3.8 from python.org, and with latest master branch. Reproduction: 1. Open IDLE 2. "New File" (Cmd-Shift-n on macOS) 3. Quit using Cmd-q ("Quit Python" from the menu doesn't cause this!) The exception traceback: Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 1883, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/multicall.py", line 176, in handler r = l[i](event) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/filelist.py", line 54, in close_all_callback reply = edit.close() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/editor.py", line 1021, in close self._close() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/pyshell.py", line 312, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/editor.py", line 1025, in _close if self.io.filename: AttributeError: 'NoneType' object has no attribute 'filename' ---------- assignee: terry.reedy components: IDLE messages: 347636 nosy: taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE: Quitting with a new, unsaved editor window causes an exception type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 16:11:31 2019 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Jul 2019 20:11:31 +0000 Subject: [issue37482] Email address display name fails with both encoded words and special chars In-Reply-To: <1562068275.57.0.247896906946.issue37482@roundup.psfhosted.org> Message-ID: <1562789491.62.0.452698032576.issue37482@roundup.psfhosted.org> R. David Murray added the comment: The display name is a phrase, and a phrase is a sequence of words, and a word is either a quoted string or an atom. So it is legal to mix quoted strings and encoded words in a display name. I'd vote to do whichever one is easier to implement :) (I haven't looked at your PR yet and unfortunately my time is limited :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 16:23:27 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 10 Jul 2019 20:23:27 +0000 Subject: [issue37552] [Windows] strptime/strftime return invalid results with UCRT version 17763.615 Message-ID: <1562790207.54.0.930380586709.issue37552@roundup.psfhosted.org> New submission from Paul Monson : strptime/strftime return invalid results when using UCRT version 17763.615 ---------- components: Tests, Windows messages: 347638 nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: [Windows] strptime/strftime return invalid results with UCRT version 17763.615 versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 16:23:41 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 10 Jul 2019 20:23:41 +0000 Subject: [issue37552] [Windows] strptime/strftime return invalid results with UCRT version 17763.615 In-Reply-To: <1562790207.54.0.930380586709.issue37552@roundup.psfhosted.org> Message-ID: <1562790221.48.0.0388462258059.issue37552@roundup.psfhosted.org> Change by Paul Monson : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 16:35:03 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 10 Jul 2019 20:35:03 +0000 Subject: [issue37552] [Windows] strptime/strftime return invalid results with UCRT version 17763.615 In-Reply-To: <1562790207.54.0.930380586709.issue37552@roundup.psfhosted.org> Message-ID: <1562790903.37.0.549034775646.issue37552@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +14494 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14460 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 17:01:07 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Jul 2019 21:01:07 +0000 Subject: [issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562792467.51.0.250097177475.issue37521@roundup.psfhosted.org> Brett Cannon added the comment: Thanks! I'll try to have a look when I can. ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 18:41:08 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Jul 2019 22:41:08 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1562798468.35.0.373288797326.issue7946@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- priority: low -> normal versions: +Python 3.9 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 18:49:36 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Jul 2019 22:49:36 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1562798976.57.0.0238995791969.issue7946@roundup.psfhosted.org> Gregory P. Smith added the comment: I suggest: (1) turning one of the patches (probably the last BFS one?) into a PR against the github master branch (3.9) and, (2) if none of the existing pyperformance workloads already demonstrates the problems with the existing GIL implementation, adopt one of the benchmarks here into an additional pyperformance workload. (3) demonstrate pyperformance results (overall and targeted tests) before and after the change. Simultaneously, it'd also be interesting to see someone create an alternate PR using a PyPy inspired GIL implementation as that could prove to be a lot easier to maintain. Lets make a data driven decision here. People lost interest in actually landing a fix to this issue in the past because it wasn't impacting their daily lives or applications (or if it was, they already adopted a workaround). Someone being interested enough to do the work to justify it going in is all it should take to move forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 18:50:02 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Jul 2019 22:50:02 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1562799002.33.0.831006686295.issue7946@roundup.psfhosted.org> Gregory P. Smith added the comment: (unassigning as it doesn't make sense to assign to anyone unless they're actually working on it) ---------- assignee: pitrou -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 19:46:02 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Jul 2019 23:46:02 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1562802362.16.0.937540128793.issue37549@roundup.psfhosted.org> Eryk Sun added the comment: > OSError: [WinError 87] The parameter is incorrect This error didn't originate from the C dup() call, since that would be based on errno, like `OSError: [Errno 9] Bad file descriptor`. It must come from _Py_set_inheritable. The only WINAPI call there is SetHandleInformation [1], which is documented to support "console input buffer" and "console screen buffer" handles, though it may be that the documentation is wrong. Try the following code: >>> import os, msvcrt >>> msvcrt.get_osfhandle(0) 84 >>> os.set_handle_inheritable(msvcrt.get_osfhandle(0), False) Prior to Windows 8, a console handle is tagged by setting the lower 2 bits (e.g. 3, 7, 11). The system uses this tag to direct calls to special console functions that route requests over the console LPC port. Thus, in the domain of File handles, setting the lower 2 bits is reserved to tag console handles. This should also be true in Windows 8+, even though console handle tagging is no longer used (now they're kernel handles for the ConDrv device). The above test will confirm my suspicion, but it looks some time around Windows XP/2003, Microsoft removed the internal [Get|Set]ConsoleHandleInformation functions that used to implement [Get|Set]HandleInformation for console handles, and the people responsible for the change failed to update the docs. Since the internal DuplicateConsoleHandle function wasn't removed, dup() itself still succeeds. I suggest that _Py_set_inheritable should handle this case. If the call fails with ERROR_INVALID_PARAMETER, and the two tag bits of the handle are set, the handle is possibly (not necessarily) a console handle. In this case, if GetFileType is FILE_TYPE_CHARACTER, then it's a console handle, and the error should be ignored. [1] https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-sethandleinformation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 19:54:25 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 10 Jul 2019 23:54:25 +0000 Subject: [issue37553] SendfileUsingSendTest tests timeout too short for Windows ARM32 Message-ID: <1562802865.66.0.679596534727.issue37553@roundup.psfhosted.org> New submission from Paul Monson : 2 seconds doesn't seem to be a long enough timeout for os.sendfile tests on Windows ARM32 ---------- components: Tests, Windows messages: 347643 nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: SendfileUsingSendTest tests timeout too short for Windows ARM32 type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 19:57:40 2019 From: report at bugs.python.org (DaveB) Date: Wed, 10 Jul 2019 23:57:40 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1562803060.76.0.772911999677.issue37549@roundup.psfhosted.org> DaveB added the comment: Results with Python 3.7.4 on Windows 7 >>> import os, msvcrt >>> msvcrt.get_osfhandle(0) 15 >>> os.set_handle_inheritable(msvcrt.get_osfhandle(0), False) Traceback (most recent call last): File "", line 1, in OSError: [WinError 87] The parameter is incorrect >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 20:21:30 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 11 Jul 2019 00:21:30 +0000 Subject: [issue33408] Enable AF_UNIX support in Windows In-Reply-To: <1525257332.06.0.682650639539.issue33408@psf.upfronthosting.co.za> Message-ID: <1562804490.61.0.436199769609.issue33408@roundup.psfhosted.org> Ma Lin added the comment: Have you upgraded the building SDK that supports AF_UNIX? And should remove AF_UNIX flag at runtime on systems older than Windows 10 1804, see issue32394. ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 20:43:38 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 11 Jul 2019 00:43:38 +0000 Subject: [issue33408] Enable AF_UNIX support in Windows In-Reply-To: <1525257332.06.0.682650639539.issue33408@psf.upfronthosting.co.za> Message-ID: <1562805818.3.0.573790669195.issue33408@roundup.psfhosted.org> Ma Lin added the comment: It would be nice to investigate the habit of using AF_UNIX in Python code on GitHub: https://github.com/search?l=Python&q=AF_UNIX&type=Code If adding this flag will break a lot of code, due to lacking supports to datagram, maybe we should not add AF_UNIX at once, and waiting for full support to AF_UNIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 22:09:44 2019 From: report at bugs.python.org (Roy Wellington) Date: Thu, 11 Jul 2019 02:09:44 +0000 Subject: [issue37554] Typo in os.rename docs Message-ID: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> New submission from Roy Wellington : The documentation for os.rename (e.g., here, https://docs.python.org/3/library/os.html#os.rename but also for 3.8 and 3.9) currently reads, > On Unix, if src is a file and dst is a directory or vice-versa, anq:q IsADirectoryError or a NotADirectoryError will be raised respectively. That "anq:q" should probably be just "an"; it appears someone tried to quit vim ;-) ---------- assignee: docs at python components: Documentation messages: 347647 nosy: docs at python, roy.wellington priority: normal severity: normal status: open title: Typo in os.rename docs versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 22:39:44 2019 From: report at bugs.python.org (Mariatta) Date: Thu, 11 Jul 2019 02:39:44 +0000 Subject: [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562812784.74.0.186377426986.issue37554@roundup.psfhosted.org> Change by Mariatta : ---------- keywords: +patch pull_requests: +14495 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14692 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 22:46:22 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 11 Jul 2019 02:46:22 +0000 Subject: [issue37532] email.header.make_header() doesn't work if any `ascii` code is out of range(128) In-Reply-To: <1562707246.84.0.835768356919.issue37532@roundup.psfhosted.org> Message-ID: <1562813182.47.0.0976261862457.issue37532@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- keywords: +patch pull_requests: +14496 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 23:30:59 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Jul 2019 03:30:59 +0000 Subject: [issue30757] pyinstaller can be added to docs, py2exe ref can be updated In-Reply-To: <1498451168.27.0.593036349197.issue30757@psf.upfronthosting.co.za> Message-ID: <1562815859.32.0.409640699532.issue30757@roundup.psfhosted.org> Zachary Ware added the comment: I've just come across the fact that the Windows FAQ is out of date again. Denis, your PR still has some pending change requests; are you interested in updating your PR, or would you rather someone else take this over? ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: -> patch review versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 23:36:07 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 11 Jul 2019 03:36:07 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1562816167.52.0.240635961399.issue36044@roundup.psfhosted.org> Neil Schemenauer added the comment: > Decreasing the total wall time for a default --enable-optimizations build would > be a good thing for everyone, provided the resulting interpreter remains > "effectively similar" in speed. If you somehow manage to find something that > actually speeds up the resulting interpreter, amazing! I spent quite a lot of time making different PGO builds and comparing with pyperformance. The current PGO task is *really* slow. Just running the PROFILE_TASK takes 24 minutes on my decently fast PC. Using this set of tests seems to work pretty well: PROFILE_TASK=-m test.regrtest --pgo \ test_collections \ test_dataclasses \ test_difflib \ test_embed \ test_float \ test_functools \ test_generators \ test_int \ test_itertools \ test_json \ test_logging \ test_long \ test_ordered_dict \ test_pickle \ test_pprint \ test_re \ test_set \ test_statistics \ test_struct \ test_tabnanny \ test_xml_etree Instead of 24 minutes, the above task takes one and a half minutes. pyperformance results seem largely unchanged. Comparison below. Tuning the tests to get the best pyperformance result is a bit dangerous and perhaps running the whole test suite is safer (i.e. we are not optimizing for specific benchmarks). I didn't tweak the list too much. I added test_int, test_long, test_struct and test_itertools as a result of my pyperformance runs. Not too surprising those are important modules. I think the set of tests above should do a pretty good job of covering the hot code paths in most Python programs. So, maybe it is good enough given the massive speedup in build time. +-------------------------+----------+------------------------------+ | Benchmark | task-all | task-short | +=========================+==========+==============================+ | 2to3 | 311 ms | 315 ms: 1.01x slower (+1%) | +-------------------------+----------+------------------------------+ | chaos | 111 ms | 108 ms: 1.02x faster (-2%) | +-------------------------+----------+------------------------------+ | crypto_pyaes | 114 ms | 112 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | dulwich_log | 78.0 ms | 78.7 ms: 1.01x slower (+1%) | +-------------------------+----------+------------------------------+ | fannkuch | 470 ms | 452 ms: 1.04x faster (-4%) | +-------------------------+----------+------------------------------+ | float | 118 ms | 117 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | go | 253 ms | 255 ms: 1.01x slower (+1%) | +-------------------------+----------+------------------------------+ | json_dumps | 12.5 ms | 11.8 ms: 1.06x faster (-6%) | +-------------------------+----------+------------------------------+ | json_loads | 26.3 us | 25.4 us: 1.04x faster (-3%) | +-------------------------+----------+------------------------------+ | logging_format | 9.53 us | 9.66 us: 1.01x slower (+1%) | +-------------------------+----------+------------------------------+ | logging_silent | 198 ns | 196 ns: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | mako | 15.2 ms | 15.8 ms: 1.04x slower (+4%) | +-------------------------+----------+------------------------------+ | meteor_contest | 98.2 ms | 96.8 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | nbody | 135 ms | 133 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | nqueens | 97.2 ms | 96.6 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | pathlib | 19.4 ms | 19.7 ms: 1.02x slower (+2%) | +-------------------------+----------+------------------------------+ | pickle | 8.10 us | 9.07 us: 1.12x slower (+12%) | +-------------------------+----------+------------------------------+ | pickle_dict | 23.1 us | 18.6 us: 1.25x faster (-20%) | +-------------------------+----------+------------------------------+ | pickle_list | 3.64 us | 2.81 us: 1.30x faster (-23%) | +-------------------------+----------+------------------------------+ | pickle_pure_python | 470 us | 460 us: 1.02x faster (-2%) | +-------------------------+----------+------------------------------+ | pidigits | 169 ms | 173 ms: 1.02x slower (+2%) | +-------------------------+----------+------------------------------+ | python_startup | 7.94 ms | 8.02 ms: 1.01x slower (+1%) | +-------------------------+----------+------------------------------+ | python_startup_no_site | 5.44 ms | 5.49 ms: 1.01x slower (+1%) | +-------------------------+----------+------------------------------+ | raytrace | 495 ms | 490 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | regex_dna | 172 ms | 179 ms: 1.04x slower (+4%) | +-------------------------+----------+------------------------------+ | regex_effbot | 2.95 ms | 2.85 ms: 1.04x faster (-3%) | +-------------------------+----------+------------------------------+ | regex_v8 | 20.7 ms | 21.5 ms: 1.04x slower (+4%) | +-------------------------+----------+------------------------------+ | richards | 68.9 ms | 69.8 ms: 1.01x slower (+1%) | +-------------------------+----------+------------------------------+ | scimark_sparse_mat_mult | 4.57 ms | 4.29 ms: 1.07x faster (-6%) | +-------------------------+----------+------------------------------+ | spectral_norm | 134 ms | 133 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | sqlalchemy_declarative | 161 ms | 163 ms: 1.01x slower (+1%) | +-------------------------+----------+------------------------------+ | sqlalchemy_imperative | 30.6 ms | 31.0 ms: 1.01x slower (+1%) | +-------------------------+----------+------------------------------+ | sqlite_synth | 2.90 us | 2.95 us: 1.02x slower (+2%) | +-------------------------+----------+------------------------------+ | sympy_expand | 422 ms | 418 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ | sympy_integrate | 19.0 ms | 19.2 ms: 1.01x slower (+1%) | +-------------------------+----------+------------------------------+ | sympy_sum | 89.6 ms | 91.7 ms: 1.02x slower (+2%) | +-------------------------+----------+------------------------------+ | telco | 6.06 ms | 6.28 ms: 1.04x slower (+4%) | +-------------------------+----------+------------------------------+ | tornado_http | 178 ms | 181 ms: 1.02x slower (+2%) | +-------------------------+----------+------------------------------+ | unpickle_list | 3.97 us | 3.78 us: 1.05x faster (-5%) | +-------------------------+----------+------------------------------+ | unpickle_pure_python | 326 us | 324 us: 1.00x faster (-0%) | +-------------------------+----------+------------------------------+ | xml_etree_generate | 90.6 ms | 91.0 ms: 1.00x slower (+0%) | +-------------------------+----------+------------------------------+ | xml_etree_process | 72.0 ms | 71.4 ms: 1.01x faster (-1%) | +-------------------------+----------+------------------------------+ Not significant (15): deltablue; django_template; hexiom; html5lib; logging_simple; regex_compile; scimark_fft; scimark_lu; scimark_monte_carlo; scimark_sor; sympy_str; unpack_sequence; unpickle; xml_etree_parse; xml_etree_iterparse ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 23:37:44 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 11 Jul 2019 03:37:44 +0000 Subject: [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562816264.09.0.958330574319.issue37545@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- keywords: +patch pull_requests: +14497 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 23:38:34 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 11 Jul 2019 03:38:34 +0000 Subject: [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562816314.01.0.879287325351.issue37545@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 00:13:18 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 11 Jul 2019 04:13:18 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1562818398.88.0.0779262478212.issue36044@roundup.psfhosted.org> Gregory P. Smith added the comment: yeah I pulled a similar looking list of tests for the PROFILE_TASK to suggest to the Docker Python image maintainers - see https://github.com/docker-library/python/pull/404 and https://github.com/docker-library/python/issues/160. I haven't run comparisons of that vs the default overly long profile task, but a comparison against a non PGO enabled cpython 3.7 build shows the types of speedups i'd expect from a decent PGO build. doing proper comparisons against a full build would take a lot more time than I have right now. It'd be reasonable to change the default task to something that is faster to build so long as we don't appear to be making major sacrifices in speed somewhere. (your benchmark table's pickle result changes are inconsistent and odd, but that benchmark may not be very meaningful as written, i haven't looked at it) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 00:52:57 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 11 Jul 2019 04:52:57 +0000 Subject: [issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path In-Reply-To: <1513750045.01.0.213398074469.issue32381@psf.upfronthosting.co.za> Message-ID: <1562820777.48.0.411782090403.issue32381@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +14498 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/14699 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 00:53:26 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Jul 2019 04:53:26 +0000 Subject: [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562820806.49.0.95234652955.issue37545@roundup.psfhosted.org> Zachary Ware added the comment: I don't agree with the proposed change; I think the examples are fine as is. Using `>= 1` means if you later decide that the `-vv` message should actually only happen at `-vvv` and `-vv` should get the same message as `-v`, you only have to change the 2 to a 3 and you're done. With `== 1` you have to remember to either change `== 1` to `>= 1` or switch to `in {1, 2}`, or (more likely) forget to make the change initially and have to go back and fix it later. The last example especially must not be changed; it is explicitly showing how to emit additional messages at higher verbosity levels. I recommend closing this issue. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 01:12:04 2019 From: report at bugs.python.org (Elizabeth Uselton) Date: Thu, 11 Jul 2019 05:12:04 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. Message-ID: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> New submission from Elizabeth Uselton : I have a test that goes something like: ``` @patch('a.place.to.patch') def test_a_thing_calls_what_it_should(self, my_mock): # Set up logic here my_mock.assert_has_calls([ call( ANY, Decimal('20') ), call( ANY, Decimal('10') ) ])``` Which fails, where my_mock.call_args_list looks like ``` [(, Decimal('20')), (, Decimal('10'))] ``` This seems like wrong behavior. ANY should be happy to be compared to anything, even a Django object. Doing some digging, I found that on line 340 of cpython/Lib/unittest/mock.py _CallList is overriding __contains__ and comparing each item in the tuples with what I'd passed in to assert_has_calls on the right, which means that instead of using ANY.__eq__, it's calling the Django model's __eq__ with ANY as an argument. Django first checks if the thing it's comparing to is another Django model, and returns False if not. So, == ANY is False, but ANY == is True. I know that this could also be considered a bug with Django, and I plan to file one with them too, but I don't see any downside to improving the mock library to be more defensive in honoring ANY over any other custom class's overridden __eq__ method. ---------- components: Tests messages: 347652 nosy: Elizabeth Uselton priority: normal severity: normal status: open title: _CallList.__contains__ doesn't always respect ANY. 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 Jul 11 01:18:00 2019 From: report at bugs.python.org (Steve Barnes) Date: Thu, 11 Jul 2019 05:18:00 +0000 Subject: [issue37556] Launcher help does not mention configuration options Message-ID: <1562822280.29.0.253272841298.issue37556@roundup.psfhosted.org> New submission from Steve Barnes : py[w] --help on Windows launchers do not currently mention the options to configure versions used - just state latest. This leads some people to struggle with things like testing beta versions, etc. as they end up defaulting to the beta which is undesirable. ---------- components: Demos and Tools messages: 347653 nosy: Steve Barnes priority: normal severity: normal status: open title: Launcher help does not mention configuration options type: enhancement 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 Jul 11 01:42:04 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2019 05:42:04 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1562823724.61.0.74677479926.issue37555@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14499 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 01:46:59 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 11 Jul 2019 05:46:59 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1562824019.03.0.830984345958.issue37555@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. Can you please add an example without Django or other dependencies so that I can try reproducing it? I am trying out the below program from the report where Foo has overridden __eq__ to return False if the other object being compared is not a Foo object. In the next statements ANY == Foo() returns True since the left side's object.__eq__ is used which in this case is ANY.__eq__ as you have noted in the original report. When list of call objects are compared there is also a code comment about this in the tuple comparison of args and kwargs such that ANY is placed on the left side [0] so that ANY.__eq__ is used. A pure python example and traceback if any would help here. from unittest.mock import call, ANY, Mock class Foo: def __eq__(self, other): if not isinstance(other, Foo): return False return True m = Mock() obj = Foo() m(obj, 1) m.assert_has_calls([call(ANY, 1)]) print(ANY == Foo()) # ANY.__eq__ is called print(Foo() == ANY) # Foo().__eq__ is called Is the report more about the below case where position of call objects returns different values? print(call(ANY, 1) == call(obj, 1)) # False print(call(obj, 1) == call(ANY, 1)) # True [0] https://github.com/python/cpython/blob/2a3d4d9c53dd4831c3ecf56bc7c4a289c33030d6/Lib/unittest/mock.py#L2407 ---------- components: +Library (Lib) -Tests nosy: +xtreak versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 01:52:30 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 11 Jul 2019 05:52:30 +0000 Subject: [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562824350.97.0.692880085387.issue37545@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: The >= is unnecessary in this exact example, as is correctly noted by Nathan. I understand using >= for future purposes, after you explained, what is also correct but confusing because you specifically describe why you change the >= 2, but it doesn't make sense for >= 1 then. For the last example, I might be completely wrong (please don't shoot me), IMHO it can be == 1 also? It is not 'explicitly showing how to emit additional messages at higher verbosity levels', but to 'uses verbosity level to display more text'. So, removing the 'else' statement to always print(answer), no matter which verbosity is shown. To avoid confusion, I recommend the change and please have another look at the last statement that makes no difference in using == or >=. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 01:53:00 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 11 Jul 2019 05:53:00 +0000 Subject: [issue37556] Launcher help does not mention configuration options In-Reply-To: <1562822280.29.0.253272841298.issue37556@roundup.psfhosted.org> Message-ID: <1562824380.6.0.648719007032.issue37556@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 02:05:31 2019 From: report at bugs.python.org (Steve Barnes) Date: Thu, 11 Jul 2019 06:05:31 +0000 Subject: [issue37556] Launcher help does not mention configuration options In-Reply-To: <1562822280.29.0.253272841298.issue37556@roundup.psfhosted.org> Message-ID: <1562825131.55.0.393109117004.issue37556@roundup.psfhosted.org> Change by Steve Barnes : ---------- keywords: +patch pull_requests: +14500 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 02:16:47 2019 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 11 Jul 2019 06:16:47 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1562825807.06.0.394104492744.issue30550@roundup.psfhosted.org> Change by Dima Tisnek : ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 02:24:20 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 11 Jul 2019 06:24:20 +0000 Subject: [issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path In-Reply-To: <1513750045.01.0.213398074469.issue32381@psf.upfronthosting.co.za> Message-ID: <1562826260.21.0.467817294207.issue32381@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 02:24:47 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 11 Jul 2019 06:24:47 +0000 Subject: [issue37542] UDP sendto() sends duplicate packets In-Reply-To: <1562755863.69.0.759157701288.issue37542@roundup.psfhosted.org> Message-ID: <1562826287.55.0.558647122626.issue37542@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 02:37:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 11 Jul 2019 06:37:15 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1562827035.77.0.523228121447.issue30550@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 02:48:14 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 11 Jul 2019 06:48:14 +0000 Subject: [issue37529] Mimetype module duplicates In-Reply-To: <1562680761.15.0.288138014947.issue37529@roundup.psfhosted.org> Message-ID: <1562827694.06.0.36159808436.issue37529@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 02:49:39 2019 From: report at bugs.python.org (Kishore) Date: Thu, 11 Jul 2019 06:49:39 +0000 Subject: [issue37557] Example snippets for simpler functions/methods Message-ID: <1562827779.24.0.52309043258.issue37557@roundup.psfhosted.org> New submission from Kishore : Is there a reason why many (not all) of the simpler methods lack example snippets? Snippets which are present: 1. https://docs.python.org/3/library/stdtypes.html#str.rstrip 2. https://docs.python.org/3/library/stdtypes.html#str.strip Snippets which are not present: 1. https://docs.python.org/3/library/stdtypes.html#str.lower 2. https://docs.python.org/3/library/stdtypes.html#str.upper 3. https://docs.python.org/3/library/stdtypes.html#str.isupper Is there any recommendation against adding concise example snippets for all methods? I am of the opinion that short examples are more easier to read and visually skim through, than reading the description. I was hoping I could add example snippets to the simpler methods if anyone does not have any objection towards it. ---------- assignee: docs at python components: Documentation messages: 347656 nosy: docs at python, kishvanchee priority: normal severity: normal status: open title: Example snippets for simpler functions/methods type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 03:46:03 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 11 Jul 2019 07:46:03 +0000 Subject: [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562831163.48.0.537001335781.issue37545@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: @Zachary, you are right ... the last one should be >= 1. Now i see the difference with the previous examples. It changed the output drastically from "the square of {} equals {}" vs "{}^2 == {}" to suddenly printing the filename at -vv. I was focused more on the structural change to always print answer. ... I will adjust. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 03:46:27 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 11 Jul 2019 07:46:27 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1562831187.41.0.969143972736.issue36044@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- keywords: +patch pull_requests: +14501 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 03:48:53 2019 From: report at bugs.python.org (Jarek Zgoda) Date: Thu, 11 Jul 2019 07:48:53 +0000 Subject: [issue37544] Multiple test failures during build In-Reply-To: <1562757478.69.0.905991720528.issue37544@roundup.psfhosted.org> Message-ID: <1562831333.46.0.818675052822.issue37544@roundup.psfhosted.org> Jarek Zgoda added the comment: test.pythoninfo output ---------- Added file: https://bugs.python.org/file48467/test.pythoninfo.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 03:50:19 2019 From: report at bugs.python.org (Jarek Zgoda) Date: Thu, 11 Jul 2019 07:50:19 +0000 Subject: [issue37544] Multiple test failures during build In-Reply-To: <1562757478.69.0.905991720528.issue37544@roundup.psfhosted.org> Message-ID: <1562831419.6.0.859176914086.issue37544@roundup.psfhosted.org> Jarek Zgoda added the comment: make test output from unoptimized build with --disable-shared --prefix=/opt/python-3.7.4 ---------- Added file: https://bugs.python.org/file48468/3.7.4-test_output.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 04:16:25 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 11 Jul 2019 08:16:25 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1562832985.01.0.257530624468.issue36044@roundup.psfhosted.org> Neil Schemenauer added the comment: I tweaked the list of unit tests a little more, trying to incorporate some from your Docker build settings. Not sure what's going on with the pickle results. Below are new pyperformance runs, comparing my PR to the "master" version it is based on. I added the --with-profile-task configure option. If someone really wants to wait for a long build to gain a tiny bit of extra speed, that makes it pretty easy to do so. BTW, I tried making the --pgo disable most of the gc_collect() calls. It doesn't actually make much difference in profile generation time so I discarded those changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 04:20:25 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 11 Jul 2019 08:20:25 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1562833225.0.0.232426787969.issue36044@roundup.psfhosted.org> Neil Schemenauer added the comment: +-------------------------+-----------+-----------------------------+ | Benchmark | task-all2 | task-short7 | +=========================+===========+=============================+ | 2to3 | 304 ms | 305 ms: 1.00x slower (+0%) | +-------------------------+-----------+-----------------------------+ | crypto_pyaes | 109 ms | 107 ms: 1.01x faster (-1%) | +-------------------------+-----------+-----------------------------+ | django_template | 116 ms | 109 ms: 1.06x faster (-6%) | +-------------------------+-----------+-----------------------------+ | dulwich_log | 76.8 ms | 77.0 ms: 1.00x slower (+0%) | +-------------------------+-----------+-----------------------------+ | fannkuch | 454 ms | 449 ms: 1.01x faster (-1%) | +-------------------------+-----------+-----------------------------+ | float | 113 ms | 112 ms: 1.02x faster (-2%) | +-------------------------+-----------+-----------------------------+ | hexiom | 9.50 ms | 9.56 ms: 1.01x slower (+1%) | +-------------------------+-----------+-----------------------------+ | html5lib | 93.4 ms | 95.4 ms: 1.02x slower (+2%) | +-------------------------+-----------+-----------------------------+ | json_loads | 24.7 us | 26.5 us: 1.07x slower (+7%) | +-------------------------+-----------+-----------------------------+ | logging_format | 9.55 us | 9.63 us: 1.01x slower (+1%) | +-------------------------+-----------+-----------------------------+ | logging_simple | 8.54 us | 8.72 us: 1.02x slower (+2%) | +-------------------------+-----------+-----------------------------+ | nbody | 131 ms | 130 ms: 1.01x faster (-1%) | +-------------------------+-----------+-----------------------------+ | nqueens | 93.6 ms | 92.8 ms: 1.01x faster (-1%) | +-------------------------+-----------+-----------------------------+ | pathlib | 19.0 ms | 19.1 ms: 1.01x slower (+1%) | +-------------------------+-----------+-----------------------------+ | pickle_list | 2.72 us | 2.66 us: 1.02x faster (-2%) | +-------------------------+-----------+-----------------------------+ | pidigits | 168 ms | 168 ms: 1.00x faster (-0%) | +-------------------------+-----------+-----------------------------+ | python_startup | 7.89 ms | 7.89 ms: 1.00x slower (+0%) | +-------------------------+-----------+-----------------------------+ | python_startup_no_site | 5.41 ms | 5.41 ms: 1.00x slower (+0%) | +-------------------------+-----------+-----------------------------+ | raytrace | 470 ms | 481 ms: 1.02x slower (+2%) | +-------------------------+-----------+-----------------------------+ | regex_compile | 168 ms | 169 ms: 1.01x slower (+1%) | +-------------------------+-----------+-----------------------------+ | regex_dna | 168 ms | 173 ms: 1.03x slower (+3%) | +-------------------------+-----------+-----------------------------+ | regex_effbot | 2.91 ms | 2.72 ms: 1.07x faster (-7%) | +-------------------------+-----------+-----------------------------+ | regex_v8 | 20.4 ms | 21.1 ms: 1.03x slower (+3%) | +-------------------------+-----------+-----------------------------+ | richards | 67.6 ms | 66.9 ms: 1.01x faster (-1%) | +-------------------------+-----------+-----------------------------+ | scimark_fft | 341 ms | 339 ms: 1.01x faster (-1%) | +-------------------------+-----------+-----------------------------+ | scimark_monte_carlo | 101 ms | 98.2 ms: 1.03x faster (-3%) | +-------------------------+-----------+-----------------------------+ | scimark_sparse_mat_mult | 4.05 ms | 3.97 ms: 1.02x faster (-2%) | +-------------------------+-----------+-----------------------------+ | spectral_norm | 128 ms | 129 ms: 1.01x slower (+1%) | +-------------------------+-----------+-----------------------------+ | sqlalchemy_imperative | 30.0 ms | 30.4 ms: 1.01x slower (+1%) | +-------------------------+-----------+-----------------------------+ | sympy_expand | 408 ms | 411 ms: 1.01x slower (+1%) | +-------------------------+-----------+-----------------------------+ | sympy_sum | 90.1 ms | 89.6 ms: 1.01x faster (-1%) | +-------------------------+-----------+-----------------------------+ | sympy_str | 182 ms | 180 ms: 1.01x faster (-1%) | +-------------------------+-----------+-----------------------------+ | tornado_http | 175 ms | 179 ms: 1.03x slower (+3%) | +-------------------------+-----------+-----------------------------+ | unpack_sequence | 50.0 ns | 47.5 ns: 1.05x faster (-5%) | +-------------------------+-----------+-----------------------------+ | unpickle | 12.0 us | 12.3 us: 1.02x slower (+2%) | +-------------------------+-----------+-----------------------------+ | unpickle_list | 3.78 us | 3.89 us: 1.03x slower (+3%) | +-------------------------+-----------+-----------------------------+ | unpickle_pure_python | 320 us | 322 us: 1.01x slower (+1%) | +-------------------------+-----------+-----------------------------+ | xml_etree_parse | 128 ms | 127 ms: 1.01x faster (-1%) | +-------------------------+-----------+-----------------------------+ | xml_etree_generate | 88.2 ms | 86.9 ms: 1.02x faster (-2%) | +-------------------------+-----------+-----------------------------+ | xml_etree_process | 68.8 ms | 69.6 ms: 1.01x slower (+1%) | +-------------------------+-----------+-----------------------------+ Not significant (17): chaos; deltablue; go; json_dumps; logging_silent; mako; meteor_contest; pickle; pickle_dict; pickle_pure_python; scimark_lu; scimark_sor; sqlalchemy_declarative; sqlite_synth; sympy_integrate; telco; xml_etree_iterparse ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 04:33:10 2019 From: report at bugs.python.org (Jakub Kulik) Date: Thu, 11 Jul 2019 08:33:10 +0000 Subject: [issue37558] Shared memory tests are failing due to double slashes Message-ID: <1562833990.12.0.316941845993.issue37558@roundup.psfhosted.org> New submission from Jakub Kulik : Hi, with the addition of shared memory into Python 3.8, we now have three tests failing on Solaris, namely `test_multiprocessing_fork`, `test_multiprocessing_forkserver` and `test_multiprocessing_spawn`. All of them fail in the same way: ====================================================================== ERROR: test_shared_memory_cleaned_after_process_termination (test.test_multiprocessing_fork.WithProcessesTestSharedMemory) ---------------------------------------------------------------------- Traceback (most recent call last): File ".../Python-3.8.0b2/Lib/test/_test_multiprocessing.py", line 4013, in test_shared_memory_cleaned_after_process_termination smm = shared_memory.SharedMemory(name, create=False) File ".../Python-3.8.0b2/Lib/multiprocessing/shared_memory.py", line 100, in __init__ self._fd = _posixshmem.shm_open( OSError: [Errno 22] Invalid argument: '//psm_5c1b5800' The reason for this, in my opinion, is that the test suite is accessing private `sm._name` instead of the normalized `sm.name`. Returned value already has one slash prepended, and another one is prepended SharedMemory init is called, resulting in double slashes, which is incorrect. Change to `sm.name` fixes this problem. ---------- components: Tests messages: 347662 nosy: kulikjak priority: normal severity: normal status: open title: Shared memory tests are failing due to double slashes type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 04:38:42 2019 From: report at bugs.python.org (Jakub Kulik) Date: Thu, 11 Jul 2019 08:38:42 +0000 Subject: [issue37558] Shared memory tests are failing due to double slashes In-Reply-To: <1562833990.12.0.316941845993.issue37558@roundup.psfhosted.org> Message-ID: <1562834322.98.0.0791417632008.issue37558@roundup.psfhosted.org> Change by Jakub Kulik : ---------- keywords: +patch pull_requests: +14502 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 04:59:22 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 11 Jul 2019 08:59:22 +0000 Subject: [issue37547] Add _PyObject_CallMethodOneArg() In-Reply-To: <1562760379.8.0.22654038416.issue37547@roundup.psfhosted.org> Message-ID: <1562835562.86.0.945669440118.issue37547@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 59ad110d7a7784d53d0b502eebce0346597a6bef by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37547: add _PyObject_CallMethodOneArg (GH-14685) https://github.com/python/cpython/commit/59ad110d7a7784d53d0b502eebce0346597a6bef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 05:02:48 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 11 Jul 2019 09:02:48 +0000 Subject: [issue37547] Add _PyObject_CallMethodOneArg() In-Reply-To: <1562760379.8.0.22654038416.issue37547@roundup.psfhosted.org> Message-ID: <1562835768.19.0.464688970357.issue37547@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 05:11:37 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 11 Jul 2019 09:11:37 +0000 Subject: [issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs In-Reply-To: <1487007412.2.0.380189857134.issue29548@psf.upfronthosting.co.za> Message-ID: <1562836297.76.0.964841881647.issue29548@roundup.psfhosted.org> Jeroen Demeyer added the comment: I understand the arguments for not removing these functions. However, I still think that we should deprecate them but without planning in advance when they should be removed. Victor said that we should document these functions as "please don't use them", and that is exactly what a deprecation message accomplishes. Most other projects that I know have only a minimum deprecation period (i.e. feature X can only be removed if it was deprecated for Y time). I don't understand why CPython insists that the minimum of 2 releases should also be a maximum (i.e. feature X MUST be removed after it was deprecated for Y time). I don't see the problem with long-term deprecations for stuff that we don't plan to remove soon. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 05:23:46 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 09:23:46 +0000 Subject: [issue37524] IDLE error on closing 3.8+ debug build In-Reply-To: <1562664018.55.0.0863283493597.issue37524@roundup.psfhosted.org> Message-ID: <1562837026.93.0.537961634826.issue37524@roundup.psfhosted.org> Tal Einat added the comment: Doesn't reproduce on Win10 with current master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 06:00:19 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 10:00:19 +0000 Subject: [issue37559] IDLE: Scrolling issues with code context shown Message-ID: <1562839219.15.0.3914256467.issue37559@roundup.psfhosted.org> New submission from Tal Einat : With code context shown, scrolling a window by dragging the scrollbar causes the scrollbar's tab to "jump around" and sometimes some "flashing" visual artifacts. The "flashing" appears to occur only before the screen is resized for the first time, in which case the entire window is resized whenever the number of context lines changes during scrolling. See attached animated screen capture. Reproduced on latest versions of Win10 and macOS. See also PR GH-14030, adding line numbers, which makes this more likely to occur for users. ---------- assignee: terry.reedy components: IDLE files: code-context-scolling-compressed.gif messages: 347666 nosy: cheryl.sabella, taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE: Scrolling issues with code context shown versions: Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48469/code-context-scolling-compressed.gif _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 06:02:14 2019 From: report at bugs.python.org (=?utf-8?q?Stefanik_G=C3=A1bor?=) Date: Thu, 11 Jul 2019 10:02:14 +0000 Subject: [issue37560] with cgi.FieldStorage(...) fails on cleanup with AttributeError, missing try/except in __exit__ Message-ID: <1562839334.01.0.637880829238.issue37560@roundup.psfhosted.org> New submission from Stefanik G?bor : cgi.FieldStorage has this for its __del__ method: def __del__(self): try: self.file.close() except AttributeError: pass By contrast, __exit__ is missing the exception handler: def __exit__(self, *args): self.file.close() Because self.file isn't populated in every instance of the FieldStorage class, this can cause FieldStorage to fail with AttributeError when used in a with statement. ---------- components: Library (Lib) messages: 347667 nosy: Stefanik G?bor priority: normal severity: normal status: open title: with cgi.FieldStorage(...) fails on cleanup with AttributeError, missing try/except in __exit__ type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 06:03:34 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 10:03:34 +0000 Subject: [issue37559] IDLE: Scrolling issues with code context shown In-Reply-To: <1562839219.15.0.3914256467.issue37559@roundup.psfhosted.org> Message-ID: <1562839414.38.0.827127275351.issue37559@roundup.psfhosted.org> Change by Tal Einat : ---------- keywords: +patch pull_requests: +14503 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14030 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 06:11:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Jul 2019 10:11:42 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1562839902.53.0.993207759313.issue37549@roundup.psfhosted.org> STINNER Victor added the comment: Oh, os.dup() doc says: "On Windows, when duplicating a standard stream (0: stdin, 1: stdout, 2: stderr), the new file descriptor is inheritable." https://docs.python.org/dev/library/os.html Maybe we should add an inheritable paramater to os.dup() in Python 3.8? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 06:25:07 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Jul 2019 10:25:07 +0000 Subject: [issue37550] SSL Pip Error In-Reply-To: <1562783044.13.0.555415202194.issue37550@roundup.psfhosted.org> Message-ID: <1562840707.22.0.800191734531.issue37550@roundup.psfhosted.org> Christian Heimes added the comment: Please provide more information. What is your operating system, how did you install Python, and which error message are you getting? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 06:30:50 2019 From: report at bugs.python.org (Matthias Klose) Date: Thu, 11 Jul 2019 10:30:50 +0000 Subject: [issue37561] the _sysconfigdata name should not encode MACHDEP and PLATFORM_TRIPLET Message-ID: <1562841050.62.0.437512426388.issue37561@roundup.psfhosted.org> New submission from Matthias Klose : so issue28046 decided to encode both MACHDEP and PLATFORM_TRIPLET/MULTIARCH in the _sysconfigdata name. Unfortunately on KFreeBSD MACHDEP includes the kernel version, so you end up with a changing MACHDEP. The _sysconfigdata name should only encode the MULTIARCH triplet, and if that's not define, the MACHDEP. Working on a fix. ---------- messages: 347670 nosy: doko priority: normal severity: normal status: open title: the _sysconfigdata name should not encode MACHDEP and PLATFORM_TRIPLET versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 07:02:44 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 11 Jul 2019 11:02:44 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1562842964.87.0.303022507805.issue37549@roundup.psfhosted.org> Eryk Sun added the comment: > os.dup() doc says: "On Windows, when duplicating a standard stream > (0: stdin, 1: stdout, 2: stderr), the new file descriptor is > inheritable." That's not necessarily correct. For example, if stdout is a pipe or disk file: C:\>python -V Python 3.7.3 C:\>python -c "import os; fd = os.dup(1); print(os.get_inheritable(fd))" | more False C:\>python -c "import os; fd = os.dup(1); print(os.get_inheritable(fd))" > stdout.txt C:\>type stdout.txt False What 3.7.3 does is to skip calling _Py_set_inheritable for all files of type FILE_TYPE_CHAR, which is wrong for character devices in general, such as NUL and serial ports. NUL is a common target for standard I/O redirection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 07:26:56 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jul 2019 11:26:56 +0000 Subject: [issue37562] PEP 590 implementation introduced a performance regression Message-ID: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Many functions are significantly slower after commit aacc77fbd77640a8f03638216fa09372cc21673d was applied: aacc77fbd77640a8f03638216fa09372cc21673d is the first bad commit commit aacc77fbd77640a8f03638216fa09372cc21673d Author: Jeroen Demeyer Date: Wed May 29 20:31:52 2019 +0200 bpo-36974: implement PEP 590 (GH-13185) Co-authored-by: Jeroen Demeyer Co-authored-by: Mark Shannon Experiment in 3.8 ----------------- ./python -m perf timeit -s '_len=len' '_len("hello")' ..................... Mean +- std dev: 157 ns +- 3 ns Experiment in parent of aacc77fbd77640a8f03638216fa09372cc21673d ---------------------------------------------------------------- python -m perf timeit -s '_len=len' '_len("hello")' ..................... Mean +- std dev: 133 ns +- 3 ns The same regression happens consistently in many other functions (hex, len, deque methods....) ---------- components: Interpreter Core keywords: 3.8regression messages: 347672 nosy: Mark.Shannon, jdemeyer, pablogsal, petr.viktorin, rhettinger priority: high severity: normal status: open title: PEP 590 implementation introduced a performance regression type: performance versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 07:28:44 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jul 2019 11:28:44 +0000 Subject: [issue37562] PEP 590 implementation introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1562844524.87.0.14064272172.issue37562@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I have bisected again and I always get commit aacc77fbd77640a8f03638216fa09372cc21673d but it would be great if someone can confirm these results independently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 07:39:04 2019 From: report at bugs.python.org (tomas platz) Date: Thu, 11 Jul 2019 11:39:04 +0000 Subject: [issue24338] In argparse adding wrong arguments makes malformed namespace In-Reply-To: <1433070096.48.0.744562806973.issue24338@psf.upfronthosting.co.za> Message-ID: <1562845144.7.0.667115682069.issue24338@roundup.psfhosted.org> Change by tomas platz : Added file: https://bugs.python.org/file48470/126.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 07:43:33 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 11 Jul 2019 11:43:33 +0000 Subject: [issue24338] In argparse adding wrong arguments makes malformed namespace In-Reply-To: <1433070096.48.0.744562806973.issue24338@psf.upfronthosting.co.za> Message-ID: <1562845413.26.0.554922917621.issue24338@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : Removed file: https://bugs.python.org/file48470/126.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 07:45:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jul 2019 11:45:25 +0000 Subject: [issue37562] PEP 590 implementation introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1562845525.2.0.0446465781164.issue37562@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This is the stack difference for my previous experiment: * frame #0: 0x00000001001578ee python.exe`unicode_length(self=0x000000010140d220) at unicodeobject.c:12231:9 frame #1: 0x000000010000b453 python.exe`PyObject_Size(o=0x000000010140d220) at abstract.c:57:26 frame #2: 0x00000001001cea29 python.exe`builtin_len(module=0x00000001006ad280, obj=0x000000010140d220) at bltinmodule.c:1548:11 frame #3: 0x0000000100044518 python.exe`_PyMethodDef_RawFastCallKeywords(method=0x00000001003e5540, self=0x00000001006ad280, args=0x00000001013f0e10, nargs=1, kwnames=0x0000000000000000) at call.c:656:18 frame #4: 0x000000010004487a python.exe`_PyCFunction_FastCallKeywords(func=0x00000001006af210, args=0x00000001013f0e10, nargsf=9223372036854775809, kwnames=0x0000000000000000) at call.c:743:14 frame #5: 0x00000001001edc09 python.exe`_PyObject_Vectorcall(callable=0x00000001006af210, args=0x00000001013f0e10, nargsf=9223372036854775809, kwnames=0x0000000000000000) at abstract.h:128:21 frame #6: 0x00000001001eaa6a python.exe`call_function(tstate=0x0000000101103910, pp_stack=0x00007ffeefbfdc50, oparg=1, kwnames=0x0000000000000000) at ceval.c:4859:13 frame #7: 0x00000001001e5436 python.exe`_PyEval_EvalFrameDefault(f=0x00000001013f0c90, throwflag=0) at ceval.c:3356:19 ------- * frame #0: 0x0000000100153f7e python.exe`unicode_length(self=0x0000000101526580) at unicodeobject.c:12231:9 frame #1: 0x000000010000a623 python.exe`PyObject_Size(o=0x0000000101526580) at abstract.c:57:26 frame #2: 0x00000001001cab69 python.exe`builtin_len(module=0x00000001006a4280, obj=0x0000000101526580) at bltinmodule.c:1548:11 frame #3: 0x0000000100042d28 python.exe`_PyMethodDef_RawFastCallKeywords(method=0x00000001003deff0, self=0x00000001006a4280, args=0x000000010150fe10, nargs=1, kwnames=0x0000000000000000) at call.c:650:18 frame #4: 0x000000010004144d python.exe`_PyCFunction_FastCallKeywords(func=0x00000001006a6210, args=0x000000010150fe10, nargs=1, kwnames=0x0000000000000000) at call.c:736:14 frame #5: 0x00000001001e6c5e python.exe`call_function(tstate=0x0000000101103910, pp_stack=0x00007ffeefbfdc40, oparg=1, kwnames=0x0000000000000000) at ceval.c:4825:9 frame #6: 0x00000001001e1561 python.exe`_PyEval_EvalFrameDefault(f=0x000000010150fc90, throwflag=0) at ceval.c:3356:19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 08:40:57 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Jul 2019 12:40:57 +0000 Subject: [issue37562] PEP 590 implementation introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1562848857.79.0.524106330145.issue37562@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Updated stack for the tip of 3.8: * frame #0: 0x000000010015854e python.exe`unicode_length(self=0x00000001014a4040) at unicodeobject.c:12235:9 frame #1: 0x000000010000a913 python.exe`PyObject_Size(o=0x00000001014a4040) at abstract.c:57:26 frame #2: 0x00000001001cf709 python.exe`builtin_len(module=0x00000001006b22f0, obj=0x00000001014a4040) at bltinmodule.c:1551:11 frame #3: 0x0000000100043fd8 python.exe`_PyMethodDef_RawFastCallKeywords(method=0x00000001003e8ac0, self=0x00000001006b22f0, args=0x00000001013f5e10, nargs=1, kwnames=0x0000000000000000) at call.c:650:18 frame #4: 0x000000010004433a python.exe`_PyCFunction_Vectorcall(func=0x00000001006b4280, args=0x00000001013f5e10, nargsf=9223372036854775809, kwnames=0x0000000000000000) at call.c:737:14 frame #5: 0x00000001001eec89 python.exe`_PyObject_Vectorcall(callable=0x00000001006b4280, args=0x00000001013f5e10, nargsf=9223372036854775809, kwnames=0x0000000000000000) at abstract.h:127:11 frame #6: 0x00000001001ebc2a python.exe`call_function(tstate=0x0000000101103950, pp_stack=0x00007ffeefbfdc30, oparg=1, kwnames=0x0000000000000000) at ceval.c:4987:13 frame #7: 0x00000001001e65ef python.exe`_PyEval_EvalFrameDefault(f=0x00000001013f5c90, throwflag=0) at ceval.c:3500:19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 09:34:42 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 13:34:42 +0000 Subject: [issue37559] IDLE: Scrolling issues with code context shown In-Reply-To: <1562839219.15.0.3914256467.issue37559@roundup.psfhosted.org> Message-ID: <1562852082.32.0.422980852584.issue37559@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: -14503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 09:35:10 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 13:35:10 +0000 Subject: [issue37559] IDLE: Scrolling issues with code context shown In-Reply-To: <1562839219.15.0.3914256467.issue37559@roundup.psfhosted.org> Message-ID: <1562852110.45.0.592098046488.issue37559@roundup.psfhosted.org> Change by Tal Einat : ---------- stage: patch review -> type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:00:09 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:00:09 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562853609.41.0.484056324889.issue34369@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: +Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:01:01 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:01:01 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562853661.63.0.941872777965.issue34369@roundup.psfhosted.org> Tal Einat added the comment: New changeset 79042ac4348ccc09344014f20dd49401579f8795 by Tal Einat in branch 'master': bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499) https://github.com/python/cpython/commit/79042ac4348ccc09344014f20dd49401579f8795 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:01:09 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 14:01:09 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562853669.13.0.236337399979.issue34369@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14504 pull_request: https://github.com/python/cpython/pull/14704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:01:17 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 14:01:17 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562853677.82.0.195962050756.issue34369@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14505 pull_request: https://github.com/python/cpython/pull/14705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:01:34 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 14:01:34 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562853694.87.0.106213271086.issue34369@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14506 pull_request: https://github.com/python/cpython/pull/14706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:14:34 2019 From: report at bugs.python.org (Jonathan) Date: Thu, 11 Jul 2019 14:14:34 +0000 Subject: [issue37563] Documentation - default for StreamHandler Message-ID: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> New submission from Jonathan : https://docs.python.org/2/library/logging.handlers.html https://docs.python.org/3/library/logging.handlers.html Both say: """class logging.StreamHandler(stream=None) Returns a new instance of the StreamHandler class. If stream is specified, the instance will use it for logging output; otherwise, sys.stderr will be used.""" Surely that means from an user perspective that the default is actually `sys.stderr`, not `None`? ---------- assignee: docs at python components: Documentation messages: 347677 nosy: docs at python, jonathan-lp priority: normal severity: normal status: open title: Documentation - default for StreamHandler versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:16:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 11 Jul 2019 14:16:02 +0000 Subject: [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1562854562.13.0.918717566309.issue37563@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:16:09 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 14:16:09 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562854569.71.0.609944034765.issue34369@roundup.psfhosted.org> miss-islington added the comment: New changeset dc0b6af42eca70e520b67d0bcf4dc5278a3f02dd by Miss Islington (bot) in branch '3.8': bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499) https://github.com/python/cpython/commit/dc0b6af42eca70e520b67d0bcf4dc5278a3f02dd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:16:49 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:16:49 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562854609.19.0.514937205626.issue34369@roundup.psfhosted.org> Tal Einat added the comment: New changeset d3747fd8fa91b768b73b60f2e2a14044e5404afa by Tal Einat (Miss Islington (bot)) in branch '3.7': bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499) https://github.com/python/cpython/commit/d3747fd8fa91b768b73b60f2e2a14044e5404afa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:17:11 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:17:11 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562854631.57.0.254640781397.issue34369@roundup.psfhosted.org> Tal Einat added the comment: New changeset 46c2eff5adca7dc309f077ec65faf95b95c47b43 by Tal Einat (Miss Islington (bot)) in branch '2.7': bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499) https://github.com/python/cpython/commit/46c2eff5adca7dc309f077ec65faf95b95c47b43 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:19:17 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:19:17 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562854757.97.0.799322703359.issue34369@roundup.psfhosted.org> Change by Tal Einat : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:20:20 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:20:20 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562854820.93.0.0233824941011.issue36390@roundup.psfhosted.org> Tal Einat added the comment: New changeset 9b5ce62cac27fec9dea473865d79c2c654312957 by Tal Einat in branch 'master': bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500) https://github.com/python/cpython/commit/9b5ce62cac27fec9dea473865d79c2c654312957 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:20:41 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 14:20:41 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562854841.93.0.631176172428.issue36390@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14507 pull_request: https://github.com/python/cpython/pull/14707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:20:51 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 14:20:51 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562854851.29.0.884579836249.issue36390@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14508 pull_request: https://github.com/python/cpython/pull/14708 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:34:03 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:34:03 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562855643.2.0.0177473568222.issue36390@roundup.psfhosted.org> Tal Einat added the comment: > I propose to merge PR 12481 first, after review, with tests, and then include name change with rewrite in PR 14500. I've gone ahead and merged PR GH-14500 into master, since it was ready to get and a clear improvement. I've already merged this into PR GH-12481. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:34:17 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:34:17 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562855657.13.0.921837181084.issue36390@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: +Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:55:26 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:55:26 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562856926.32.0.0273604916571.issue36390@roundup.psfhosted.org> Tal Einat added the comment: New changeset 242ad1f375bf564c35cf99cd754b2c5819c4d056 by Tal Einat (Miss Islington (bot)) in branch '3.8': bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500) https://github.com/python/cpython/commit/242ad1f375bf564c35cf99cd754b2c5819c4d056 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:58:10 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:58:10 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562857090.98.0.396510771775.issue36390@roundup.psfhosted.org> Tal Einat added the comment: New changeset a2cf88efc417f1991720856f6913d16660e48941 by Tal Einat (Miss Islington (bot)) in branch '3.7': bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500) https://github.com/python/cpython/commit/a2cf88efc417f1991720856f6913d16660e48941 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:59:50 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 11 Jul 2019 14:59:50 +0000 Subject: [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1562857190.16.0.914564645645.issue37563@roundup.psfhosted.org> Vinay Sajip added the comment: If None is passed, that is interpreted to mean whatever the implementation default is, and that is sys.stderr. For backwards compatibility, that won't change: and I don't see any need to update the documentation, as it makes it perfectly clear that sys.stderr will be used if None is specified. Nor do I see a need to change the default parameter value from its current value of None. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:10:32 2019 From: report at bugs.python.org (Zach Beniash) Date: Thu, 11 Jul 2019 15:10:32 +0000 Subject: [issue37564] ArgumentParser should support bool type according to truth values Message-ID: <1562857832.91.0.995710130518.issue37564@roundup.psfhosted.org> New submission from Zach Beniash : Today when using argparse.ArgumentParser it seems that the bool type is not supported in a logical way. Foe example: ------------------------------------- import argparse parser = argparse.ArgumentParser() parser.add_argument("--mybool", type=bool) parsed_args = parser.parse(["--mybool", "False"]) -------------------------------------- parsed_args.my_bool evaluates to True Instead we should expect to evaluate False here. ---------- components: Library (Lib) messages: 347686 nosy: Zach Beniash priority: normal severity: normal status: open title: ArgumentParser should support bool type according to truth values 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 Jul 11 11:12:02 2019 From: report at bugs.python.org (Jonathan) Date: Thu, 11 Jul 2019 15:12:02 +0000 Subject: [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1562857922.92.0.143365711158.issue37563@roundup.psfhosted.org> Change by Jonathan : ---------- status: -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:12:51 2019 From: report at bugs.python.org (Michelle Johnson) Date: Thu, 11 Jul 2019 15:12:51 +0000 Subject: [issue37565] test_faulthandler failure Message-ID: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> New submission from Michelle Johnson : CentOS 7.6, running Linux gl-build.arc-ts.umich.edu 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18 15:06:45 UTC 2019 x86_64 on Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz. Using gcc 8.2.0 compiled from source to build python 3.7.4 from source, make test fails with the following errors: ``` 0:00:22 load avg: 3.12 [402/416/1] test_faulthandler failed test test_faulthandler failed -- Traceback (most recent call last): File "/tmp/shellysw/build/Python-3.7.4/Lib/test/test_faulthandler.py", line 724, in test_register_chain self.check_register(chain=True) File "/tmp/shellysw/build/Python-3.7.4/Lib/test/test_faulthandler.py", line 702, in check_register self.assertEqual(exitcode, 0) AssertionError: -11 != 0 ``` I found a similar error reported in RedHat bugzilla (1687171) and tried running the script provided by Victor Stinner, and this closed issue on GitHub seems like it might be related? #32 because of the Skylake chipset. Script: ``` import faulthandler, signal, os def handler(signum, frame): handler.called = True handler.called = False faulthandler.enable() signum = signal.SIGUSR1 signal.signal(signum, handler) faulthandler.register(signum, chain=True) os.kill(os.getpid(), signum) print("called", handler.called) ``` It produced a segmentation fault. I also ran that script using the python 3.6.6 binary that came installed with centos and it also produced a segmentation fault as well. ---------- components: Build, Tests messages: 347688 nosy: jshelly priority: normal severity: normal status: open title: test_faulthandler failure type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:15:09 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Jul 2019 15:15:09 +0000 Subject: [issue37564] ArgumentParser should support bool type according to truth values In-Reply-To: <1562857832.91.0.995710130518.issue37564@roundup.psfhosted.org> Message-ID: <1562858109.57.0.905457824979.issue37564@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14509 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14709 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:24:42 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 11 Jul 2019 15:24:42 +0000 Subject: [issue37564] ArgumentParser should support bool type according to truth values In-Reply-To: <1562857832.91.0.995710130518.issue37564@roundup.psfhosted.org> Message-ID: <1562858682.02.0.740301725676.issue37564@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:25:32 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 11 Jul 2019 15:25:32 +0000 Subject: [issue37565] test_faulthandler failure In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1562858732.67.0.38873438967.issue37565@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:27:08 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 11 Jul 2019 15:27:08 +0000 Subject: [issue3753] bytearray incompatible with y# In-Reply-To: <1220285023.36.0.49129522463.issue3753@psf.upfronthosting.co.za> Message-ID: <1562858828.47.0.136894985771.issue3753@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: -14485 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:48:42 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 11 Jul 2019 15:48:42 +0000 Subject: [issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs In-Reply-To: <1487007412.2.0.380189857134.issue29548@psf.upfronthosting.co.za> Message-ID: <1562860122.39.0.252985919714.issue29548@roundup.psfhosted.org> Inada Naoki added the comment: FYI, PyEval_CallFunction and PyEval_CallMethod doesn't respect Py_SSIZE_T_CLEAN. So runtime warning is raised when they are used with "#" format. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:58:01 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 11 Jul 2019 15:58:01 +0000 Subject: [issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs In-Reply-To: <1487007412.2.0.380189857134.issue29548@psf.upfronthosting.co.za> Message-ID: <1562860681.01.0.99712105791.issue29548@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 1dbd084f1f68d7293718b663df675cfbd0c65712 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-29548: no longer use PyEval_Call* functions (GH-14683) https://github.com/python/cpython/commit/1dbd084f1f68d7293718b663df675cfbd0c65712 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:06:52 2019 From: report at bugs.python.org (hai shi) Date: Thu, 11 Jul 2019 17:06:52 +0000 Subject: [issue27379] SocketType changed in Python 3 In-Reply-To: <1466738397.82.0.0999219877747.issue27379@psf.upfronthosting.co.za> Message-ID: <1562864812.44.0.795013154265.issue27379@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14510 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14710 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:09:09 2019 From: report at bugs.python.org (hai shi) Date: Thu, 11 Jul 2019 17:09:09 +0000 Subject: [issue27379] SocketType changed in Python 3 In-Reply-To: <1466738397.82.0.0999219877747.issue27379@psf.upfronthosting.co.za> Message-ID: <1562864949.49.0.393421726502.issue27379@roundup.psfhosted.org> hai shi added the comment: In order to keep back compatible, I would prefer to update SocketType ;) ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:21:31 2019 From: report at bugs.python.org (hai shi) Date: Thu, 11 Jul 2019 17:21:31 +0000 Subject: [issue37566] Remove redudant code in socket.py Message-ID: <1562865691.95.0.427308376748.issue37566@roundup.psfhosted.org> New submission from hai shi : Looks like the _realsocket in socket.py is redudnat. But I am not sure somebody would use it or not. REF: https://github.com/python/cpython/blob/master/Lib/socket.py#L107 ---------- components: Library (Lib) messages: 347692 nosy: shihai1991 priority: normal severity: normal status: open title: Remove redudant code in socket.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:24:06 2019 From: report at bugs.python.org (hai shi) Date: Thu, 11 Jul 2019 17:24:06 +0000 Subject: [issue37566] Remove redudant code in socket.py In-Reply-To: <1562865691.95.0.427308376748.issue37566@roundup.psfhosted.org> Message-ID: <1562865846.93.0.0620066681756.issue37566@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14511 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:31:42 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:31:42 +0000 Subject: [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562866302.21.0.202126908606.issue37554@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14512 pull_request: https://github.com/python/cpython/pull/14712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:31:54 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:31:54 +0000 Subject: [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562866314.09.0.41290256301.issue37554@roundup.psfhosted.org> miss-islington added the comment: New changeset 7cbef72902f32866a416ca6c4e732af4541951b8 by Miss Islington (bot) (Mariatta) in branch 'master': closes bpo-37554: Remove `q:q` in os.rst documentation (GH-14692) https://github.com/python/cpython/commit/7cbef72902f32866a416ca6c4e732af4541951b8 ---------- nosy: +miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:32:24 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:32:24 +0000 Subject: [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562866344.97.0.998707143283.issue37554@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14513 pull_request: https://github.com/python/cpython/pull/14713 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:39:42 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:39:42 +0000 Subject: [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562866782.75.0.215989380623.issue37554@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14514 pull_request: https://github.com/python/cpython/pull/14714 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:40:37 2019 From: report at bugs.python.org (Mariatta) Date: Thu, 11 Jul 2019 17:40:37 +0000 Subject: [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562866837.56.0.227824287712.issue37554@roundup.psfhosted.org> Mariatta added the comment: Thanks for the report! ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:45:40 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:45:40 +0000 Subject: [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562867140.85.0.176707427468.issue37554@roundup.psfhosted.org> miss-islington added the comment: New changeset 107171500d7d6e60f463eeb4db492c0ae292a669 by Miss Islington (bot) in branch '3.8': closes bpo-37554: Remove `q:q` in os.rst documentation (GH-14692) https://github.com/python/cpython/commit/107171500d7d6e60f463eeb4db492c0ae292a669 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:46:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2019 17:46:44 +0000 Subject: [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562867204.86.0.875343988808.issue37545@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with Zachary. The current writing is more errorproof. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:48:05 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:48:05 +0000 Subject: [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562867285.66.0.950953600497.issue37554@roundup.psfhosted.org> miss-islington added the comment: New changeset 71435f685c0423f878946e584f4b9eb01233d332 by Miss Islington (bot) in branch '3.7': closes bpo-37554: Remove `q:q` in os.rst documentation (GH-14692) https://github.com/python/cpython/commit/71435f685c0423f878946e584f4b9eb01233d332 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 14:01:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2019 18:01:08 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1562868068.38.0.497447400361.issue37555@roundup.psfhosted.org> Serhiy Storchaka added the comment: Karthikeyan, I think there is a flaw in your example. The good __eq__ should return NotImplemented instead of False for other types. This wil allow the right operand's __eq__ to play. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 14:04:19 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 18:04:19 +0000 Subject: [issue37558] Shared memory tests are failing due to double slashes In-Reply-To: <1562833990.12.0.316941845993.issue37558@roundup.psfhosted.org> Message-ID: <1562868259.0.0.937721353535.issue37558@roundup.psfhosted.org> miss-islington added the comment: New changeset 4737265622251756a9480ab84af2442b6b986850 by Miss Islington (bot) (Jakub Kul?k) in branch 'master': bpo-37558: Shared memory tests are failing due to double slashes (GH-14703) https://github.com/python/cpython/commit/4737265622251756a9480ab84af2442b6b986850 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 14:04:23 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 18:04:23 +0000 Subject: [issue37558] Shared memory tests are failing due to double slashes In-Reply-To: <1562833990.12.0.316941845993.issue37558@roundup.psfhosted.org> Message-ID: <1562868263.18.0.740880746238.issue37558@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14515 pull_request: https://github.com/python/cpython/pull/14715 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 14:38:59 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 18:38:59 +0000 Subject: [issue37558] Shared memory tests are failing due to double slashes In-Reply-To: <1562833990.12.0.316941845993.issue37558@roundup.psfhosted.org> Message-ID: <1562870339.28.0.412622509001.issue37558@roundup.psfhosted.org> miss-islington added the comment: New changeset 3d58b78481e0238593f85cc182b798fe3b77648c by Miss Islington (bot) in branch '3.8': bpo-37558: Shared memory tests are failing due to double slashes (GH-14703) https://github.com/python/cpython/commit/3d58b78481e0238593f85cc182b798fe3b77648c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 14:51:37 2019 From: report at bugs.python.org (Mike Lovelace) Date: Thu, 11 Jul 2019 18:51:37 +0000 Subject: [issue37567] Python compiles empty bytecode files when out of virtual memory on windows Message-ID: <1562871097.59.0.916925581077.issue37567@roundup.psfhosted.org> New submission from Mike Lovelace : On a system under heavy load last night Windows ran out of virtual memory, and it appears that python interpreted that as the pyc files did not exist and attempted to recreate them. In recreating them, it created essentially empty files, which caused further attempts to use the service to fail with 500 errors. ---------- files: urllib_RENAME.pyc messages: 347701 nosy: Mike Lovelace priority: normal severity: normal status: open title: Python compiles empty bytecode files when out of virtual memory on windows type: compile error versions: Python 2.7 Added file: https://bugs.python.org/file48471/urllib_RENAME.pyc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 14:59:25 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 18:59:25 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1562871565.53.0.469762492407.issue17535@roundup.psfhosted.org> Tal Einat added the comment: To those following this issue, PR GH-14030 is now in a very good state, and would benefit from more feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 15:27:45 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 11 Jul 2019 19:27:45 +0000 Subject: [issue37553] SendfileUsingSendTest tests timeout too short for Windows ARM32 In-Reply-To: <1562802865.66.0.679596534727.issue37553@roundup.psfhosted.org> Message-ID: <1562873265.98.0.905655206541.issue37553@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +14516 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14716 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 15:34:49 2019 From: report at bugs.python.org (kolia) Date: Thu, 11 Jul 2019 19:34:49 +0000 Subject: [issue37568] Misleading UnBoundLocalError on assignment to closure variable Message-ID: <1562873689.17.0.696922314347.issue37568@roundup.psfhosted.org> New submission from kolia : def outer(a): def inner(): print(a) a = 43 return inner t = outer(42) print(t()) Outputs: ~/Documents/repro.py in inner() 1 def outer(a): 2 def inner(): ----> 3 print(a) 4 a = 43 5 return inner UnboundLocalError: local variable 'a' referenced before assignment This is misleading, since `a` is actually in scope on line 3. What is making it fail is the assignment on line 4, since `a` has not been declared `nonlocal`. Instead, the error should point to line 4 and report an illegal assignment to a read-only closure variable. ---------- components: Interpreter Core messages: 347703 nosy: kolia priority: normal severity: normal status: open title: Misleading UnBoundLocalError on assignment to closure variable type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 16:06:49 2019 From: report at bugs.python.org (paul j3) Date: Thu, 11 Jul 2019 20:06:49 +0000 Subject: [issue37564] ArgumentParser should support bool type according to truth values In-Reply-To: <1562857832.91.0.995710130518.issue37564@roundup.psfhosted.org> Message-ID: <1562875609.46.0.657282581338.issue37564@roundup.psfhosted.org> paul j3 added the comment: This is an old topic, though it may be easier to find a relevant StackOverflow thread. https://stackoverflow.com/a/19233287/901925 (a 2013 thread) I and others have explained that the `type` parameter is supposed to be a callable. The default Python `bool` function only returns False for an empty string. Previous discussions have suggested writing a function that parses strings like 'False' and 'No'. It's nice that you have found a 'distutils.utils.strtobool' that does this well. But I have several qualms about the proposed patch: - do we need to define a 'bool' type? We already has 'store_true' and 'store_false' actions. - does this function need a 'bool' wrapper? - do we need another import? There's a relatively recent bug/issue that tries to speed up argparse by reducing the number of imports. - if added, should this type be registered as the object bool or string 'bool'? Seems to me that the patch could be simplified to: self.register('type', 'bool', _strtobool) According the original developer `type=bool` should be allowed (even if it doesn't do what many users expect): https://bugs.python.org/issue14392 I point out that users are used to providing strings for 'action', but not for 'type'. The registry mechanism can be used to provide specialized type but so far only 'None' is registered. https://bugs.python.org/issue26994 https://bugs.python.org/issue24754 This proposed patch might be innocuous, but it does break a consistent behavior - that 'type' should be a callable, and 'bool' is a standard Python function. An alternative is to add to the docs a note (in the 'type' section) that from distutils.util import strtobool type=strtobool could be used to parse strings as booleans. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 16:17:50 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 11 Jul 2019 20:17:50 +0000 Subject: [issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8 In-Reply-To: <1498409939.21.0.261757462715.issue30755@psf.upfronthosting.co.za> Message-ID: <1562876270.88.0.919956517778.issue30755@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 16:20:01 2019 From: report at bugs.python.org (Jack Wong) Date: Thu, 11 Jul 2019 20:20:01 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1562876401.77.0.777224775488.issue21478@roundup.psfhosted.org> Jack Wong added the comment: Thanks, Karthikeyan! I applied your change to Lib/unittest/mock.py, and it fixed the bug for me. I confirmed that calls to the child mock now appear in the parent's mock_calls in my test suite. Your PR looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 16:59:27 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 11 Jul 2019 20:59:27 +0000 Subject: [issue37568] Misleading UnBoundLocalError on assignment to closure variable In-Reply-To: <1562873689.17.0.696922314347.issue37568@roundup.psfhosted.org> Message-ID: <1562878767.92.0.784794779342.issue37568@roundup.psfhosted.org> Steven D'Aprano added the comment: The behaviour and error message is correct, and your interpretation is incorrect. You are not assigning to a closure variable on line 4; you are printing an unbound local variable on line 3, precisely as the error message says. That may not match your *intention*, but Python doesn't do what we want it to do, only what we tell it to do :-) Like global variables, nonlocals (closures) are NOT defined by "does this name match a name in the surrounding scope?". Rather, *local* variables are defined by assignment: any assignment in the body of the function defines a local, unless otherwise declared as nonlocal or global. > Instead, the error should point to line 4 and report an illegal assignment to a read-only closure variable. That can't happen without a huge and backwards-incompatible change to Python semantics. (Possibly in Python 5000?) The only reason I'm not closing this as "Not a bug" is in case someone would like to suggest an improvement to error message. Perhaps: UnboundLocalError: local variable 'a' referenced before assignment -- did you forget a nonlocal or global declaration? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 17:03:13 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 11 Jul 2019 21:03:13 +0000 Subject: [issue37562] PEP 590 implementation introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1562878993.2.0.108720365244.issue37562@roundup.psfhosted.org> Jeroen Demeyer added the comment: Could you please specify: - which commits are you comparing exactly? From your explanation, I guess aacc77fbd and its parent, but that's not completely fair since PEP 590 consists of many commits (see #36974). A better comparison would be master against 3.8a4. - are you compiling with PGO (--enable-optimizations) or not? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 17:04:39 2019 From: report at bugs.python.org (David) Date: Thu, 11 Jul 2019 21:04:39 +0000 Subject: [issue37569] Complete your registration to Python tracker In-Reply-To: <20190711205905.A319B52B1FA@bugs.ams1.psf.io> Message-ID: New submission from David : Here is the link to register. ________________________________ From: report=bugs.python.org at roundup.psfhosted.org on behalf of Python tracker Sent: Thursday, July 11, 2019 8:59 PM To: davedrouin at hotmail.com Subject: Complete your registration to Python tracker To complete your registration of the user "ddrouin" with Python tracker, please visit the following URL: https://bugs.python.org/?@action=confrego&otk=yx0D8CJvzNqeUY0usWJfgG0vnPc7HsWM ---------- messages: 347708 nosy: ddrouin priority: normal severity: normal status: open title: Complete your registration to Python tracker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 17:15:04 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 11 Jul 2019 21:15:04 +0000 Subject: [issue37568] Misleading UnBoundLocalError on assignment to closure variable In-Reply-To: <1562873689.17.0.696922314347.issue37568@roundup.psfhosted.org> Message-ID: <1562879704.94.0.982751340262.issue37568@roundup.psfhosted.org> Steven D'Aprano added the comment: To clarify further, unlike (say) Lua, Python doesn't allow variables to change scope part-way through a function. (At least not without hacking the byte-code.) In any function, a name refers to precisely one of (1) a local, (2) a nonlocal, and (3) a global, so you cannot have something like this: a = 1 def func(): print(a) # refers to global a a = a + 1 # make a new local 'a' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 17:21:29 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 11 Jul 2019 21:21:29 +0000 Subject: [issue37569] Complete your registration to Python tracker In-Reply-To: Message-ID: <1562880089.02.0.232263751041.issue37569@roundup.psfhosted.org> Steven D'Aprano added the comment: Seems to have been created in error. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 17:54:16 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Jul 2019 21:54:16 +0000 Subject: [issue37558] Shared memory tests are failing due to double slashes In-Reply-To: <1562833990.12.0.316941845993.issue37558@roundup.psfhosted.org> Message-ID: <1562882056.67.0.219701460659.issue37558@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 18:30:14 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 11 Jul 2019 22:30:14 +0000 Subject: [issue37568] Misleading UnBoundLocalError on assignment to closure variable In-Reply-To: <1562873689.17.0.696922314347.issue37568@roundup.psfhosted.org> Message-ID: <1562884214.98.0.305307974905.issue37568@roundup.psfhosted.org> Josh Rosenberg added the comment: I'm inclined to close as Not a Bug as well. I'm worried the expanded error message would confuse people when they simply failed to assign a variable, and make them try bad workarounds like adding global/nonlocal when it's not the problem, e.g.: def foo(bar): if bar > 0: baz = 'a' elif bar < 0: baz = 'b' return baz Even if baz exists in an outer scope, they almost certainly didn't intend to use it, they just didn't properly account for all the paths to ensure baz is initialized. Adding a global or nonlocal declaration would make calling with zero as the arg "work" if the function was called with a non-zero value first, but it wouldn't be correct. When the error message suggests a fix, people tend to do it without thinking critically (or understanding the underlying problem), which is worse than a message without a fix where solving it involves learning what it actually means. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 18:36:47 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 11 Jul 2019 22:36:47 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1562884607.1.0.146302599622.issue30550@roundup.psfhosted.org> Josh Rosenberg added the comment: Is there a reason to document object_pairs_hook=OrderedDict rather than just making the decoder populate a regular dict in an order-preserving way? (No idea if it does this already) ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 19:37:56 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Jul 2019 23:37:56 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562888276.64.0.995284563714.issue36390@roundup.psfhosted.org> Terry J. Reedy added the comment: I believe I meant the opposite of what I said, which fortunately is what Tal did. PR 14500 is the one I looked at and commented on and the name change in PR 14500 is what needed to be included in PR 12481 (done). I would like to retitle this issue 'IDLE: Move format functions into 1 file:. and put all the functions for the Format submenu in one file, format.py, with test_format.py. The result will be near 400 lines. Rename paragraph.py and test_paragraph.py and put contents of proposed new files in those instead. Add another class, FormatFile for the 3 file reforming functions. If you want, I would not mind merging the PR as is, but with 'region' removed from the names, and adding in FormatParagraph and a new FormatFile in a separate PR. But I don't know the consequence for the file history and git blame. I would prefer that format.py be seen as the successor of paragraph.py if that would enable blame to trace back through the rename. paragraph already has some utility functions, including get_indent, which is similar to get_line_indent. We might combine them in the follow-up refactoring. There is at least one bug, mentioned in file, to fix. Followup refactoring should include examination of docstrings and IDLE doc. The doc should briefly define 'region'. SimpleDialog.AskInteger should be replaced by a Query subclass both here and in EditorWindow.goto_line_event (another issue and PR). Menu adjustments: Move Format Paragraph to top, leaving the 3 file operations together at the bottom. ^[ also indents. (Tab indents if more than one line is selected.) Strip trailing whitespace should string trailing blank lines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 20:32:50 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2019 00:32:50 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1562891570.34.0.846230003115.issue36390@roundup.psfhosted.org> Terry J. Reedy added the comment: When this is merged, I will open a format menu master issue listing todos. Dependencies will include 4 issues, #24817, #5150 (two items), #18583 (with patch), and #23367 (with patch), other than #36219, follow-up code revisions, and revising README.txt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 20:35:42 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jul 2019 00:35:42 +0000 Subject: [issue37562] PEP 590 implementation introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1562891742.85.0.635447933945.issue37562@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >which commits are you comparing exactly? From your explanation, I guess aacc77fbd and its parent, but that's not completely fair since PEP 590 consists of many commits (see #36974). A better comparison would be master against 3.8a4. I am comparing the tip of 3.8 and the parent of aacc77fbd. (Notice that the first two stack traces correspond to aacc77fbd and its parent). >are you compiling with PGO (--enable-optimizations) or not? Yup, PGO and LTO. I can try repeat them without optimisations if you want. As I suggested previously I would like to confirm that this results can be reproduced first before exploring other things. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 20:38:35 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Jul 2019 00:38:35 +0000 Subject: [issue37562] PEP 590 implementation may have introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1562891915.82.0.515372813181.issue37562@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- title: PEP 590 implementation introduced a performance regression -> PEP 590 implementation may have introduced a performance regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 21:53:50 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 12 Jul 2019 01:53:50 +0000 Subject: [issue37566] Remove redudant code in socket.py In-Reply-To: <1562865691.95.0.427308376748.issue37566@roundup.psfhosted.org> Message-ID: <1562896430.55.0.751629254581.issue37566@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: seems it is/was used in socket._socketobject in 2.7 ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:18:15 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 12 Jul 2019 02:18:15 +0000 Subject: [issue37566] Remove redudant code in socket.py In-Reply-To: <1562865691.95.0.427308376748.issue37566@roundup.psfhosted.org> Message-ID: <1562897895.61.0.701992597099.issue37566@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset c8e7146de257930ea8d0d4aa74b3a64fcaa79d4b by Benjamin Peterson (Hai Shi) in branch 'master': closes bpo-37566: Remove _realsocket from socket.py. (GH-14711) https://github.com/python/cpython/commit/c8e7146de257930ea8d0d4aa74b3a64fcaa79d4b ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:28:51 2019 From: report at bugs.python.org (Suzumizaki) Date: Fri, 12 Jul 2019 02:28:51 +0000 Subject: [issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path. Message-ID: <1562898531.08.0.918115667827.issue37570@roundup.psfhosted.org> New submission from Suzumizaki : `distutils.util.byte_compile` fails _indirect_ byte compiling when the full-path of the .py file contains non-ASCII characters. Because there is the project (cx_Freeze) which directly uses `distutils.util.byte_compile`, the problem would happen while installing it under the non-ASCII path. Fortunately, it is easy to fix. Ofcourse, the files included in external libraries should be named ASCII only, but `distutils.util.byte_compile` makes and uses full path of them. I learned many of libraries uses setuptools instead of distutils, but please consider the following situations: 1) The case that venv creates the virtual environment under or with non-ASCII named folder. 2) And special cases of 1), on Windows, the name of end-users OFTEN be composed with non-ASCII characters, this means including theirs Documents, Desktop, or Downloads etc. The more they are not professional,they make easily the situation above. ---------- components: Distutils files: batch.diff keywords: patch messages: 347718 nosy: Suzumizaki, dstufft, eric.araujo priority: normal severity: normal status: open title: `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path. type: behavior versions: Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48472/batch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 22:31:26 2019 From: report at bugs.python.org (Suzumizaki) Date: Fri, 12 Jul 2019 02:31:26 +0000 Subject: [issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path. In-Reply-To: <1562898531.08.0.918115667827.issue37570@roundup.psfhosted.org> Message-ID: <1562898686.27.0.464156866715.issue37570@roundup.psfhosted.org> Suzumizaki added the comment: Here's test code. Note: I marked just Python 3.8 and 3.7 I tested, but maybe all versions. ---------- Added file: https://bugs.python.org/file48473/my_test_case.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:12:32 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Fri, 12 Jul 2019 03:12:32 +0000 Subject: [issue37548] Document range of atan, acos and asin In-Reply-To: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> Message-ID: <1562901152.45.0.00368510599483.issue37548@roundup.psfhosted.org> Change by Giovanni Cappellotto : ---------- keywords: +patch pull_requests: +14517 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:17:16 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Fri, 12 Jul 2019 03:17:16 +0000 Subject: [issue37548] Document range of atan, acos and asin In-Reply-To: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> Message-ID: <1562901436.48.0.993892482882.issue37548@roundup.psfhosted.org> Giovanni Cappellotto added the comment: I created a small diff to update the documentation of `math.atan`, `math.asin` and `math.acos`. ---------- nosy: +potomak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 00:30:29 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 12 Jul 2019 04:30:29 +0000 Subject: [issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path. In-Reply-To: <1562898531.08.0.918115667827.issue37570@roundup.psfhosted.org> Message-ID: <1562905829.26.0.724422086672.issue37570@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: All 'The byte compiling test seems succeeded.' when i tested your script on ubuntu 18.04 on latest 3.7.4rc2+, 3.8.0b1+ and 3.9.0a0. What are the exact python versions and the OS version you see the issue? ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 01:23:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 12 Jul 2019 05:23:57 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1562909037.66.0.649610656302.issue37555@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > Karthikeyan, I think there is a flaw in your example. The good __eq__ should return NotImplemented instead of False for other types. This wil allow the right operand's __eq__ to play. Serhiy, my example was to try reproducing the original report where Django model tries to check if the other's type and returns False if the type is not a Django model. There could be cases where __eq__ implementation of a class could be just returning False instead of raising a NotImplemented error due to difference in type that affects comparison of ANY. > Django first checks if the thing it's comparing to is another Django model, and returns False if not. So, == ANY is False, but ANY == is True. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 01:24:09 2019 From: report at bugs.python.org (Suzumizaki) Date: Fri, 12 Jul 2019 05:24:09 +0000 Subject: [issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path. In-Reply-To: <1562898531.08.0.918115667827.issue37570@roundup.psfhosted.org> Message-ID: <1562909049.41.0.325526582752.issue37570@roundup.psfhosted.org> Suzumizaki added the comment: Terribly Sorry! I forgot to write this is only Windows Issue! Thanks! ---------- components: +Unicode, Windows nosy: +ezio.melotti, paul.moore, steve.dower, tim.golden, vstinner, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 01:35:10 2019 From: report at bugs.python.org (Suzumizaki) Date: Fri, 12 Jul 2019 05:35:10 +0000 Subject: [issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path. In-Reply-To: <1562898531.08.0.918115667827.issue37570@roundup.psfhosted.org> Message-ID: <1562909710.97.0.730730753373.issue37570@roundup.psfhosted.org> Suzumizaki added the comment: ... and please check "batch.diff" (Oops, that's typo of 'patch'). I just added "encoding" parameter to calling open() function, and added the temp file to 'utf-8' code declaration. This bug could happen where the default encoding of open() function is not utf-8(may not only Windows). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 03:40:49 2019 From: report at bugs.python.org (Reuben Thomas) Date: Fri, 12 Jul 2019 07:40:49 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code Message-ID: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> New submission from Reuben Thomas : The CTypes documentation has this example: >>> s = c_char_p() >>> s.value = "abc def ghi" >>> s.value 'abc def ghi' >>> s.value is s.value False >>> It appears not to have been updated since Python 2: in Python 3, you can't assign a str to a c_char_p. If one tries the example code above, one gets: >>> s = c_char_p() >>> s.value = "abc def ghi" Traceback (most recent call last): File "", line 1, in TypeError: bytes or integer address expected instead of str instance Using a bytes works: >>> s = c_char_p() >>> s.value = b"abc def ghi" >>> s.value b'abc def ghi' >>> s.value is s.value False >>> Hence adding the two "b"s is an obvious fix. Note that the similar example with c_wchar_p does work fine with str. ---------- assignee: docs at python components: Documentation messages: 347725 nosy: docs at python, rrt priority: normal severity: normal status: open title: Incorrect use of c_char_p in example code versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 03:56:29 2019 From: report at bugs.python.org (neonene) Date: Fri, 12 Jul 2019 07:56:29 +0000 Subject: [issue35941] ssl.enum_certificates() regression In-Reply-To: <1549637009.73.0.764067041861.issue35941@roundup.psfhosted.org> Message-ID: <1562918189.83.0.233594231784.issue35941@roundup.psfhosted.org> neonene added the comment: After this patch applied, memory usage increases every https-access and is not released in my Win7x64SP1. I hope this will be fixed or reverted. (case sample) from urllib import request from time import sleep import gc while True: request.urlopen(request.Request('https://...')) gc.collect() sleep(2) ---------- nosy: +neonene _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 03:57:59 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 12 Jul 2019 07:57:59 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1562918279.19.0.521391251175.issue37571@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. Looks like a valid issue to me. Would you like to create a PR? ---------- components: +ctypes nosy: +amaury.forgeotdarc, belopolsky, meador.inge, xtreak versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 04:04:00 2019 From: report at bugs.python.org (neonene) Date: Fri, 12 Jul 2019 08:04:00 +0000 Subject: [issue37498] request.urlopen(), memory leak? In-Reply-To: <1562267513.1.0.161837527387.issue37498@roundup.psfhosted.org> Message-ID: <1562918640.93.0.648165139336.issue37498@roundup.psfhosted.org> neonene added the comment: issue35941 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 04:43:47 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Jul 2019 08:43:47 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1562921027.51.0.406242224223.issue37555@roundup.psfhosted.org> Serhiy Storchaka added the comment: Then I think the problem is with DjangoModel. I suggest to close this issue as "third party". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 04:45:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Jul 2019 08:45:43 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1562921143.7.0.340377699629.issue37555@roundup.psfhosted.org> Serhiy Storchaka added the comment: Though some __eq__ implementations in the stdlib should be fixed too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 05:17:46 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 12 Jul 2019 09:17:46 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1562923066.41.0.388205877557.issue37555@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: https://docs.python.org/3/library/unittest.mock.html#any mock.ANY doesn't make any guarantees that this is a generic implementation that can be used to test equality against any object irrespective of the order to return True. It's documented only to be used for mock calls but there are many users using it for other objects too outside of mock assertions. mock.ANY also depends on the order so that mock.ANY.__eq__ is used but I am not sure about documenting the order here. Would be helpful if Elizabeth presents a simplified example to evaluate if there are any bugs in the call comparison with ANY or to close it as third party as suggested. As noted in my PR comment there should be a test case for this change proposed to make sure someone doesn't change the order by accident in future : https://github.com/python/cpython/pull/14700#issuecomment-510342012 > Though some __eq__ implementations in the stdlib should be fixed too. Curious about what problems that this example surface in the stdlib definition of __eq__ . Are you saying that there are Django model like __eq__ definitions where they return False when other's type is different? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 05:19:00 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 12 Jul 2019 09:19:00 +0000 Subject: [issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path. In-Reply-To: <1562898531.08.0.918115667827.issue37570@roundup.psfhosted.org> Message-ID: <1562923140.21.0.538828227723.issue37570@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: FYI, PEP597 is created to avoid these issues (i think), target Python 3.9. https://www.python.org/dev/peps/pep-0597/ https://discuss.python.org/t/use-utf-8-as-default-text-file-encoding/1785 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 05:23:19 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Jul 2019 09:23:19 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1562923399.59.0.940182607341.issue37555@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, see timedelta.__eq__ for example. datetime.__eq__ looks correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 05:33:12 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 12 Jul 2019 09:33:12 +0000 Subject: [issue37541] get_python_lib() returns incorrect path for site-packages In-Reply-To: <1562749374.67.0.365304267455.issue37541@roundup.psfhosted.org> Message-ID: <1562923992.0.0.992910564578.issue37541@roundup.psfhosted.org> Steven D'Aprano added the comment: You say this is a problem affecting *Mac* users, but all of your examples show *Windows* paths. How do you know it affects Macs? You say that get_python_lib() returns the incorrect path, but you don't show us the output of calling get_python_lib(). If the result from the debugger is to be believed, it is returning the path you expect: 'C:\\Users\\skauser\\Anaconda\\Lib\\site-packages' so I'm afraid I don't understand why you think that the problem lies in get_python_lib(). Can you explain? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 05:41:45 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 12 Jul 2019 09:41:45 +0000 Subject: [issue37562] PEP 590 implementation may have introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1562924505.78.0.0431509485473.issue37562@roundup.psfhosted.org> Jeroen Demeyer added the comment: I will certainly have a look and try a few things, but it will probably be next week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 06:17:14 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 12 Jul 2019 10:17:14 +0000 Subject: [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1562926634.65.0.057150136304.issue37563@roundup.psfhosted.org> Vinay Sajip added the comment: The devil is in the detail. If stream=sys.stderr is specified, that takes effect at import time. If stream=None is specified and the implementation chooses to treat that as sys.stderr, that takes effect at the time of the call. The two are not equivalent. It was a conscious choice by me to implement it this way, and I believe it's clearly documented what happens, which should be sufficiently clear for users. Which part of "If stream is specified, the instance will use it for logging output; otherwise, sys.stderr will be used." is unclear? ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 06:30:42 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 12 Jul 2019 10:30:42 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1562927442.92.0.224134742223.issue37555@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Good catch, commenting out the c implementation of datetime in setup.py I can see the following difference. ? cpython git:(master) ? ./python.exe Python 3.9.0a0 (heads/master-dirty:c8e7146de2, Jul 12 2019, 15:51:00) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import datetime, sys, unittest.mock >>> datetime.timedelta(seconds=1) == unittest.mock.ANY False ? cpython git:(master) ? python3.7 Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:52:21) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import datetime, sys, unittest.mock >>> datetime.timedelta(seconds=1) == unittest.mock.ANY True The C implementation and Python are different for timedelta__eq__ as mentioned with datetime.__eq__ being same and correct in NotImplementedError. https://github.com/python/cpython/blob/c8e7146de257930ea8d0d4aa74b3a64fcaa79d4b/Modules/_datetimemodule.c#L2152 static PyObject * delta_richcompare(PyObject *self, PyObject *other, int op) { if (PyDelta_Check(other)) { int diff = delta_cmp(self, other); return diff_to_bool(diff, op); } else { Py_RETURN_NOTIMPLEMENTED; } } https://github.com/python/cpython/blob/c8e7146de257930ea8d0d4aa74b3a64fcaa79d4b/Lib/datetime.py#L732 def __eq__(self, other): if isinstance(other, timedelta): return self._cmp(other) == 0 else: return False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 06:57:59 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 12 Jul 2019 10:57:59 +0000 Subject: [issue37568] Misleading UnBoundLocalError on assignment to closure variable In-Reply-To: <1562873689.17.0.696922314347.issue37568@roundup.psfhosted.org> Message-ID: <1562929079.33.0.398089272591.issue37568@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for the great explanation, Steven. And I agree with Josh that changing the exception text would lead to blindly adding nonlocal or global in a superficial attempt to get the code to work. The much more likely problem is already mentioned: reference before assignment. So, I'm going to close this. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 07:10:06 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 12 Jul 2019 11:10:06 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1562929806.47.0.772048151291.issue37555@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I can see difference in time.__eq__ and timedelta.__eq__ C and Python implementations. Serhiy, are you planning to fix them or shall I raise an issue with PR for these? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:44:01 2019 From: report at bugs.python.org (famu xu) Date: Fri, 12 Jul 2019 12:44:01 +0000 Subject: [issue37572] email lib bug Message-ID: <1562935441.75.0.460848575163.issue37572@roundup.psfhosted.org> New submission from famu xu : file: email\_header_value_parser.py line : encoded_part = part.fold(policy=policy)[:-1] # strip nl modify to: encoded_part = part.fold(policy=policy)[:-2] # strip nl because the nl is "\r\n" ---------- components: email messages: 347740 nosy: barry, famu xu, r.david.murray priority: normal severity: normal status: open title: email lib bug versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:46:44 2019 From: report at bugs.python.org (famu xu) Date: Fri, 12 Jul 2019 12:46:44 +0000 Subject: [issue37572] email lib bug In-Reply-To: <1562935441.75.0.460848575163.issue37572@roundup.psfhosted.org> Message-ID: <1562935604.07.0.64560397643.issue37572@roundup.psfhosted.org> famu xu added the comment: python 3.7 same ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:55:53 2019 From: report at bugs.python.org (=?utf-8?q?Jo=C3=A3o_Eiras?=) Date: Fri, 12 Jul 2019 12:55:53 +0000 Subject: [issue9625] argparse: Problem with defaults for variable nargs when using choices In-Reply-To: <1282036744.37.0.964764969496.issue9625@psf.upfronthosting.co.za> Message-ID: <1562936153.17.0.511690868712.issue9625@roundup.psfhosted.org> Jo?o Eiras added the comment: Another workaround for who might ever need it. The benefit of this solution comparing to a custom type is that argparse will generate the help string properly with the choices, and this solution does workaround the place when the bug happens: class Choices(tuple): # Python bug https://bugs.python.org/issue27227 def __new__(cls, *args, **kwargs): x = tuple.__new__(cls, *args, **kwargs) Choices.__init__(x, *args, **kwargs) return x def __init__(self, *args, **kwargs): self.default = [] def __contains__(self, item): return tuple.__contains__(self, item) or item is self.default choices = Choices(("value1", "value2", "value3", ...)) parser.add_argument( ..., nargs="*", choices=choices, default=choices.default, ...) ---------- nosy: +Jo?o Eiras _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 08:57:35 2019 From: report at bugs.python.org (Jakub Kulik) Date: Fri, 12 Jul 2019 12:57:35 +0000 Subject: [issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris Message-ID: <1562936255.66.0.924337077063.issue37573@roundup.psfhosted.org> New submission from Jakub Kulik : Hi, since the 3.8.0b2 test_asyncio freezes in test_subprocess when MultiLoopChildWatcher is being used as a watcher (new in b2). All other watchers are working as expected. This is all on Solaris. I tried to find out the reason for these issues and it seems that awaited coroutines never end (there are many tests with this problem - I tested it on test_cancel_make_subprocess_transport_exec). I found out that commenting out `signal.siginterrupt(signal.SIGCHLD, False)` in `attach_loop` method of MultiLoopChildWatcher seems to fix the issue, however, I don't understand this enough to see why that should be a problem... I can provide more information if necessary. ---------- components: Library (Lib) messages: 347743 nosy: kulikjak priority: normal severity: normal status: open title: asyncio: freeze when using MultiLoopChildWatcher on Solaris versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 09:00:14 2019 From: report at bugs.python.org (=?utf-8?q?Jo=C3=A3o_Eiras?=) Date: Fri, 12 Jul 2019 13:00:14 +0000 Subject: [issue9625] argparse: Problem with defaults for variable nargs when using choices In-Reply-To: <1282036744.37.0.964764969496.issue9625@psf.upfronthosting.co.za> Message-ID: <1562936414.31.0.752846674503.issue9625@roundup.psfhosted.org> Change by Jo?o Eiras : ---------- nosy: -Jo?o Eiras _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 09:08:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 12 Jul 2019 13:08:57 +0000 Subject: [issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris In-Reply-To: <1562936255.66.0.924337077063.issue37573@roundup.psfhosted.org> Message-ID: <1562936937.68.0.0965230294768.issue37573@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 10:09:04 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jul 2019 14:09:04 +0000 Subject: [issue35941] ssl.enum_certificates() regression In-Reply-To: <1549637009.73.0.764067041861.issue35941@roundup.psfhosted.org> Message-ID: <1562940544.84.0.834386970542.issue35941@roundup.psfhosted.org> Christian Heimes added the comment: Which patch do you mean? Are you referring to the landed PR or my fix for performance regression https://github.com/python/cpython/pull/12610? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 10:38:14 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2019 14:38:14 +0000 Subject: [issue37524] IDLE error on closing 3.8+ debug build In-Reply-To: <1562664018.55.0.0863283493597.issue37524@roundup.psfhosted.org> Message-ID: <1562942294.55.0.0464198272116.issue37524@roundup.psfhosted.org> Terry J. Reedy added the comment: I still see it after update and rebuild. What could be different? An error in one of my files? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 11:21:23 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2019 15:21:23 +0000 Subject: [issue37524] IDLE error on closing 3.8+ debug build In-Reply-To: <1562664018.55.0.0863283493597.issue37524@roundup.psfhosted.org> Message-ID: <1562944882.99.0.621319840602.issue37524@roundup.psfhosted.org> Terry J. Reedy added the comment: "Exception ignored" is not produced by IDLE, and we have seen this before. multicall, line 29 says: # In 3.4, if no shell window is ever open, the underlying Tk widget is # destroyed before .__del__ methods here are called. The following # is used to selectively ignore shutdown exceptions to avoid # 'Exception ignored' messages. See http://bugs.python.org/issue20167 APPLICATION_GONE = "application has been destroyed" For #20167, the object, condensed traceback, and exception were different, but the format was the same. The check is in __del__, line 63. This 'sweep the problem under the rug' fix was suggested by Tal and committed by me in 2014 for 3.4. I hypothesized then that is had something to do with Python shutdown changing. Before 3.8 releases, we should either sweep this and #37751 under the rug also, or take a good look at shutdown and try to fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 11:32:57 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2019 15:32:57 +0000 Subject: [issue37524] IDLE error on closing 3.8+ debug build In-Reply-To: <1562664018.55.0.0863283493597.issue37524@roundup.psfhosted.org> Message-ID: <1562945577.62.0.674972829669.issue37524@roundup.psfhosted.org> Terry J. Reedy added the comment: Possible sweep-more-under-the-rug fix for both current issues: add links and, after current 'except tkinter.TclError', except AttributeError: pass ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 11:34:40 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Jul 2019 15:34:40 +0000 Subject: [issue37551] IDLE: Quitting with a new, unsaved editor window causes an exception In-Reply-To: <1562785926.2.0.442729400594.issue37551@roundup.psfhosted.org> Message-ID: <1562945680.23.0.334569208703.issue37551@roundup.psfhosted.org> Terry J. Reedy added the comment: I see the traceback I reported on #37524, whichever way I close. In both cases, EditorWindow.close is called and we get an AttributeError because a file has become None. close() calls maybesave before _close, so the exception I see happens before _close is called. It is possible I have seen this, before the #37524 errors started. See latter for possible fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 11:41:42 2019 From: report at bugs.python.org (Suzumizaki) Date: Fri, 12 Jul 2019 15:41:42 +0000 Subject: [issue37570] `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path. In-Reply-To: <1562898531.08.0.918115667827.issue37570@roundup.psfhosted.org> Message-ID: <1562946102.44.0.69767578888.issue37570@roundup.psfhosted.org> Suzumizaki added the comment: Thanks, but Those cannot resolve this issue. This is install time problem. In other words, whatever the default encoding is, even some users change it, `distutils.util.byte_compile` must always succeed. There's no relation between using non-ASCII path and the default encoding. No logically reason to fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 14:16:31 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 12 Jul 2019 18:16:31 +0000 Subject: [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. Message-ID: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> New submission from Eric Snow : When writing an importer, the finder (either MetaPathFinder or PathEntryFinder) must implement `find_spec()`. A useful tool for that is the existing `spec_from_loader()`. [1] The docs for `MetaPathFinder.find_spec()` and `PathEntryFinder.find_spec()` should mention it. [1] (https://docs.python.org/3/library/importlib.html#importlib.util.spec_from_loader ---------- assignee: docs at python components: Documentation keywords: easy messages: 347750 nosy: docs at python, eric.snow priority: normal severity: normal stage: needs patch status: open title: Mention spec_from_loader() in Finder.find_spec() docs. type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 14:49:12 2019 From: report at bugs.python.org (Michele Angrisano) Date: Fri, 12 Jul 2019 18:49:12 +0000 Subject: [issue37572] email lib bug In-Reply-To: <1562935441.75.0.460848575163.issue37572@roundup.psfhosted.org> Message-ID: <1562957352.52.0.886201160055.issue37572@roundup.psfhosted.org> Michele Angrisano added the comment: Hi and thank you for opening this issue. What is the behaviour? What is the test you used to reproduce this bug? ---------- nosy: +mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 14:55:03 2019 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Fri, 12 Jul 2019 18:55:03 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1562957703.15.0.297476496393.issue34226@roundup.psfhosted.org> Change by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 15:05:09 2019 From: report at bugs.python.org (Michele Angrisano) Date: Fri, 12 Jul 2019 19:05:09 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1562958309.88.0.00527635715919.issue37571@roundup.psfhosted.org> Change by Michele Angrisano : ---------- keywords: +patch pull_requests: +14518 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14721 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 15:18:12 2019 From: report at bugs.python.org (neonene) Date: Fri, 12 Jul 2019 19:18:12 +0000 Subject: [issue35941] ssl.enum_certificates() regression In-Reply-To: <1549637009.73.0.764067041861.issue35941@roundup.psfhosted.org> Message-ID: <1562959092.48.0.441770772903.issue35941@roundup.psfhosted.org> neonene added the comment: I meant 12609. (x86,x64 Py374rc1,Py380a4 and later) And though I tried merging 12610 and Py374, memory usage still increases. Sorry, I can't find out the cause. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 15:55:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Jul 2019 19:55:31 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1562961331.83.0.487999515577.issue37555@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can take it, please. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 16:01:09 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 12 Jul 2019 20:01:09 +0000 Subject: [issue37565] test_faulthandler failure In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1562961669.66.0.0502128819408.issue37565@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 16:05:01 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 12 Jul 2019 20:05:01 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1562961901.23.0.422252047332.issue37549@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 16:50:07 2019 From: report at bugs.python.org (Srikanth) Date: Fri, 12 Jul 2019 20:50:07 +0000 Subject: [issue37575] Python Documentation on strings ( section 3.1.2.) Message-ID: <1562964607.44.0.971161139684.issue37575@roundup.psfhosted.org> New submission from Srikanth : In section 3.1.2 of the python documentation, its mentioned as below: Two or more string literals (i.e. the ones enclosed between quotes) next to each other are automatically concatenated. This feature is particularly useful when you want to break long strings: This only works with two literals though, not with variables or expressions: However, the concatination operation works on variables and expressions also. Please find the below python code snippet and the output: Python Code: ------------- s1='Hello' s2=' World ' s3=' How are you ? ' print(s1, s2, "\n", s3, "\n") print('---------------------------') print('Long time ' 'No see mate ') print("Hope ", 'All is ' "good") print('---------------------------') print(s1, 'World'," !!") print((s1+s2+s3)*2," there ?") Output: -------- Hello World How are you ? --------------------------- Long time No see mate Hope All is good --------------------------- Hello World !! Hello World How are you ? Hello World How are you ? there ? ---------- assignee: docs at python components: Documentation files: Python_Docs_3.1.2_String_Concatination.py messages: 347754 nosy: Deshpande, docs at python priority: normal severity: normal status: open title: Python Documentation on strings ( section 3.1.2.) type: resource usage Added file: https://bugs.python.org/file48474/Python_Docs_3.1.2_String_Concatination.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:13:13 2019 From: report at bugs.python.org (Scott Sturdivant) Date: Fri, 12 Jul 2019 21:13:13 +0000 Subject: [issue37576] SSL Malloc Error w/OpenSSL 1.1.1c-fips & FIPS_mode_set(1) Message-ID: <1562965993.74.0.405648137897.issue37576@roundup.psfhosted.org> New submission from Scott Sturdivant : Using Py3{5,6,7} and OpenSSL 1.1.1b-fips, I have not encountered this error. Once OpenSSL has been upgraded to 1.1.1c-fips, the SSL Malloc Error rears its ugly head. Setup: Fedora 30 has openssl-fips by default. Install cryptography with 'pip install cryptography --no-binary=cryptography' so that it can link against your system openssl that is fips enabled. To verify: With openssl 1.1.1.b-fips, the following works: >>> import urllib.request >>> with urllib.request.urlopen('http://python.org/') as response: ... html = response.read() ... >>> from cryptography.hazmat.backends.openssl.backend import backend >>> backend._lib.FIPS_mode_set(1) 1 >>> with urllib.request.urlopen('http://python.org/') as response: ... html = response.read() ... With openssl 1.1.1c-fips, an error is now raised: >>> import urllib.request >>> with urllib.request.urlopen('http://python.org/') as response: ... html = response.read() ... >>> from cryptography.hazmat.backends.openssl.backend import backend >>> backend._lib.FIPS_mode_set(1) 1 >>> with urllib.request.urlopen('http://python.org/') as response: ... html = response.read() ... Traceback (most recent call last): File "/usr/lib64/python3.7/urllib/request.py", line 1317, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/usr/lib64/python3.7/http/client.py", line 1244, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib64/python3.7/http/client.py", line 1290, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib64/python3.7/http/client.py", line 1239, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib64/python3.7/http/client.py", line 1026, in _send_output self.send(msg) File "/usr/lib64/python3.7/http/client.py", line 966, in send self.connect() File "/usr/lib64/python3.7/http/client.py", line 1407, in connect server_hostname=server_hostname) File "/usr/lib64/python3.7/ssl.py", line 412, in wrap_socket session=session File "/usr/lib64/python3.7/ssl.py", line 853, in _create self.do_handshake() File "/usr/lib64/python3.7/ssl.py", line 1117, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL] malloc failure (_ssl.c:1056) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.7/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python3.7/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib64/python3.7/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python3.7/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib64/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args) File "/usr/lib64/python3.7/urllib/request.py", line 755, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/lib64/python3.7/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/lib64/python3.7/urllib/request.py", line 543, in _open '_open', req) File "/usr/lib64/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args) File "/usr/lib64/python3.7/urllib/request.py", line 1360, in https_open context=self._context, check_hostname=self._check_hostname) File "/usr/lib64/python3.7/urllib/request.py", line 1319, in do_open raise URLError(err) urllib.error.URLError: >>> ---------- assignee: christian.heimes components: SSL messages: 347755 nosy: Scott Sturdivant, christian.heimes priority: normal severity: normal status: open title: SSL Malloc Error w/OpenSSL 1.1.1c-fips & FIPS_mode_set(1) type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:14:25 2019 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 12 Jul 2019 21:14:25 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1562966065.07.0.8825812038.issue33944@roundup.psfhosted.org> Change by Ned Batchelder : ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:16:02 2019 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 12 Jul 2019 21:16:02 +0000 Subject: [issue37575] Python Documentation on strings ( section 3.1.2.) In-Reply-To: <1562964607.44.0.971161139684.issue37575@roundup.psfhosted.org> Message-ID: <1562966162.14.0.619038546701.issue37575@roundup.psfhosted.org> Mark Dickinson added the comment: The documentation is correct here; none of the examples you show demonstrates implicit concatenation of string-valued expressions. The tutorial documentation is referring to two strings placed directly next to each other with no other syntax (other than whitespace) in between. For example, taking just the first line you give (after the definitions): print(s1, s2, "\n", s3, "\n") Nowhere in this line are two string-value expressions placed right next to each other; they're occurring in an argument list to a function, separated by commas. The other lines are similar. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:17:55 2019 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 12 Jul 2019 21:17:55 +0000 Subject: [issue37575] Python Documentation on strings (tutorial section 3.1.2.) In-Reply-To: <1562964607.44.0.971161139684.issue37575@roundup.psfhosted.org> Message-ID: <1562966275.5.0.493597688743.issue37575@roundup.psfhosted.org> Change by Mark Dickinson : ---------- title: Python Documentation on strings ( section 3.1.2.) -> Python Documentation on strings (tutorial section 3.1.2.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:22:25 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jul 2019 21:22:25 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562966545.03.0.539006960727.issue19696@roundup.psfhosted.org> miss-islington added the comment: New changeset a65c977552507dd19d2cc073fc91ae22cc66bbff by Miss Islington (bot) (Kyle Stanley) in branch 'master': bpo-19696: Move threaded_import_hangers (GH-14655) https://github.com/python/cpython/commit/a65c977552507dd19d2cc073fc91ae22cc66bbff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:29:52 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Jul 2019 21:29:52 +0000 Subject: [issue28292] Make Calendar.itermonthdates() behave consistently in edge cases In-Reply-To: <1475031718.56.0.220203946513.issue28292@psf.upfronthosting.co.za> Message-ID: <1562966992.86.0.419099016046.issue28292@roundup.psfhosted.org> Raymond Hettinger added the comment: Please mark all the non-public helper functions as being private by using a leading underscore for their names. The __all__ listing is correct but is insufficient. Note, the module already used the leading underscore convention for the some of the non-public helper classes. Already, we have a user confused by this: https://twitter.com/andreportela85/status/1148956749652738049 ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:44:00 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2019 21:44:00 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562967840.82.0.0669360529911.issue37521@roundup.psfhosted.org> Brett Cannon added the comment: So the issue is the lines assigning to sys.modules and loader.exec_module() are reversed. Had you not done an import in your testext.__init__ you never would have noticed, but since you are then the normal import system is noticing there's nothing in sys.modules and thus inserting a module (importlib.uilt.module_from_spec() always creates a new module so your module that you create never ends up in sys.modules). ---------- components: +Documentation -Library (Lib) stage: -> needs patch title: importlib.util.module_from_spec return value is not the same as in sys.modules -> importlib examples have their exec_module()/sys.modules assignment lines reversed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 18:04:49 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2019 22:04:49 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562969089.52.0.288955737486.issue37521@roundup.psfhosted.org> Brett Cannon added the comment: I will have a PR up shortly to fix the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 18:11:28 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2019 22:11:28 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562969488.81.0.670218120088.issue37521@roundup.psfhosted.org> Change by Brett Cannon : ---------- keywords: +patch pull_requests: +14519 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14723 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 18:35:42 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jul 2019 22:35:42 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562970942.87.0.346277476355.issue37521@roundup.psfhosted.org> miss-islington added the comment: New changeset 0827064c955f88df8ba5621d8e3d81be3cfc26a9 by Miss Islington (bot) (Brett Cannon) in branch 'master': bpo-37521: No longer treat insertion into sys.modules as optional in importlib examples (GH-14723) https://github.com/python/cpython/commit/0827064c955f88df8ba5621d8e3d81be3cfc26a9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 18:35:58 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jul 2019 22:35:58 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562970958.33.0.643558441579.issue37521@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14520 pull_request: https://github.com/python/cpython/pull/14724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 18:51:51 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Jul 2019 22:51:51 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562971911.7.0.541054909909.issue37521@roundup.psfhosted.org> miss-islington added the comment: New changeset bfb709b771230e7e466961b5ddf4852962602450 by Miss Islington (bot) in branch '3.8': [3.8] bpo-37521: No longer treat insertion into sys.modules as optional in importlib examples (GH-14723) (GH-14724) https://github.com/python/cpython/commit/bfb709b771230e7e466961b5ddf4852962602450 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 18:52:23 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Jul 2019 22:52:23 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1562971943.14.0.791664921272.issue37521@roundup.psfhosted.org> Brett Cannon added the comment: Thanks for the report, Benjamin! ---------- resolution: -> fixed stage: patch review -> needs patch status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 18:58:03 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Jul 2019 22:58:03 +0000 Subject: [issue37576] SSL Malloc Error w/OpenSSL 1.1.1c-fips & FIPS_mode_set(1) In-Reply-To: <1562965993.74.0.405648137897.issue37576@roundup.psfhosted.org> Message-ID: <1562972283.67.0.424212469073.issue37576@roundup.psfhosted.org> Christian Heimes added the comment: The issue is out of scope for Python's ssl module. FIPS mode is not supported by Python and I have no intention to start supporting FIPS mode in Python upstream. Any FIPS related bug is most likely related to Fedora's FIPS patches. Please open a Red Hat Bugzilla and report the issue against the openssl component on Fedora. By the way Fedora is not FIPS certified, so it makes no sense to enable FIPS on Fedora at all. You just get a crippled system without any benefits. Further more OpenSSL 1.1.1 is also not FIPS certified. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 21:52:11 2019 From: report at bugs.python.org (=?utf-8?q?Luis_Alejandro_Mart=C3=ADnez_Faneyth?=) Date: Sat, 13 Jul 2019 01:52:11 +0000 Subject: [issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu' Message-ID: <1562982731.24.0.816575023926.issue37577@roundup.psfhosted.org> New submission from Luis Alejandro Mart?nez Faneyth : Hello everyone, I've been building some minimal python docker images for a while and a few days ago an error popped out in my CI when building python 3.8 on debian sid. The error happens when trying to install pip with the usual: curl -fsSL https://bootstrap.pypa.io/get-pip.py | python3.8 - setuptools The message: ERROR: Exception: Traceback (most recent call last): File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/cli/base_command.py", line 178, in main status = self.run(options, args) File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/commands/install.py", line 405, in run installed = install_given_reqs( File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/req/__init__.py", line 54, in install_given_reqs requirement.install( File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/req/req_install.py", line 919, in install self.move_wheel_files( File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/req/req_install.py", line 440, in move_wheel_files move_wheel_files( File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/wheel.py", line 318, in move_wheel_files scheme = distutils_scheme( File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/locations.py", line 180, in distutils_scheme i.finalize_options() File "/usr/lib/python3.8/distutils/command/install.py", line 306, in finalize_options (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') File "/usr/lib/python3.8/distutils/sysconfig.py", line 501, in get_config_vars func() File "/usr/lib/python3.8/distutils/sysconfig.py", line 461, in _init_posix _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu' You can check the full CI output[0] or the building script if you need to[1]. I've checked for similar bugs and I found #28046 but I don't know if this is related or not. Thanks for the great work and I'm looking forward to help you fix this issue. Luis [0]https://travis-ci.org/LuisAlejandro/dockershelf/jobs/557990064 [1]https://github.com/LuisAlejandro/dockershelf/blob/master/python/build-image.sh ---------- messages: 347765 nosy: luisalejandro priority: normal severity: normal status: open title: ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu' versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:10:38 2019 From: report at bugs.python.org (=?utf-8?q?Luis_Alejandro_Mart=C3=ADnez_Faneyth?=) Date: Sat, 13 Jul 2019 02:10:38 +0000 Subject: [issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu' In-Reply-To: <1562982731.24.0.816575023926.issue37577@roundup.psfhosted.org> Message-ID: <1562983838.35.0.210618018132.issue37577@roundup.psfhosted.org> Luis Alejandro Mart?nez Faneyth added the comment: New information on this: python3-distutils for 3.8 exists on Debian (experimental) but python3 (which is kind of a meta-package) for 3.8 doesn't exist. It depends on python3.8 or python3.7, resulting in the installation on python3.7. Perhaps this is a bug to report on Debian instead of here, idk. ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:23:53 2019 From: report at bugs.python.org (Kalev Maricq) Date: Sat, 13 Jul 2019 02:23:53 +0000 Subject: [issue37578] Change Glob: Allow Recursion for Hidden Files Message-ID: <1562984633.23.0.0355519865943.issue37578@roundup.psfhosted.org> New submission from Kalev Maricq : First, sorry if this isn't in the correct place or correctly labeled. I'm new to this platform. Feel free to edit this (if that's even possible on this platform). In the glob.py module, _ishidden(pattern) is used to determine whether to show hidden files and folders by checking if pattern[0]=='.'. It also uses _isrecursive(pattern) to determine whether to perform a recursive search by checking whether the pattern=='**'. As a result, one cannot perform a recursive search which shows hidden folders and files, since '**'[0]!='.'. Suggestion: Alter _isrecursive to return '**' in pattern to allow for this. ---------- messages: 347767 nosy: k64 priority: normal severity: normal status: open title: Change Glob: Allow Recursion for Hidden Files type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 22:30:15 2019 From: report at bugs.python.org (Scott Sturdivant) Date: Sat, 13 Jul 2019 02:30:15 +0000 Subject: [issue37576] SSL Malloc Error w/OpenSSL 1.1.1c-fips & FIPS_mode_set(1) In-Reply-To: <1562965993.74.0.405648137897.issue37576@roundup.psfhosted.org> Message-ID: <1562985015.57.0.444223450791.issue37576@roundup.psfhosted.org> Scott Sturdivant added the comment: Thank you for your input; I wasn't sure where to place the bug. Redhat it will be then! And no worries, I get the FIPS validated vs compliant nuances. My target system has OpenSSL compiled per their directions, I just mentioned Fedora since it's relatively straight forward to duplicate. I'll check my target system as well, then given that outcome may see what Redhat's Bugzilla has to say. Thank you again! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 23:16:06 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 03:16:06 +0000 Subject: [issue37347] Reference-counting problem in sqlite In-Reply-To: <1561029299.63.0.688173181801.issue37347@roundup.psfhosted.org> Message-ID: <1562987766.26.0.235763407527.issue37347@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14521 pull_request: https://github.com/python/cpython/pull/14725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 23:16:12 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 13 Jul 2019 03:16:12 +0000 Subject: [issue37347] Reference-counting problem in sqlite In-Reply-To: <1561029299.63.0.688173181801.issue37347@roundup.psfhosted.org> Message-ID: <1562987772.37.0.0528154288345.issue37347@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset b9a0376b0dedf16a2f82fa43d851119d1f7a2707 by Benjamin Peterson (gescheit) in branch 'master': closes bpo-37347: Fix refcount problem in sqlite3. (GH-14268) https://github.com/python/cpython/commit/b9a0376b0dedf16a2f82fa43d851119d1f7a2707 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 23:33:57 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 03:33:57 +0000 Subject: [issue37347] Reference-counting problem in sqlite In-Reply-To: <1561029299.63.0.688173181801.issue37347@roundup.psfhosted.org> Message-ID: <1562988837.34.0.707187452705.issue37347@roundup.psfhosted.org> miss-islington added the comment: New changeset 36101c2c5daf692d1716e17720c6c5197f28e25d by Miss Islington (bot) in branch '3.8': closes bpo-37347: Fix refcount problem in sqlite3. (GH-14268) https://github.com/python/cpython/commit/36101c2c5daf692d1716e17720c6c5197f28e25d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 00:53:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Jul 2019 04:53:53 +0000 Subject: [issue28292] Make Calendar.itermonthdates() behave consistently in edge cases In-Reply-To: <1475031718.56.0.220203946513.issue28292@psf.upfronthosting.co.za> Message-ID: <1562993633.52.0.392787591813.issue28292@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are two ways to indicate that a function is not public: either make its name underscored, or add __all__ and do not include the function name in it. The purpose of __all__ is to avoid mass renaming of internal functions whis is a code churn and reduces readability. If make all internal names underscored, __all__ would be not needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 01:23:08 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2019 05:23:08 +0000 Subject: [issue28292] Make Calendar.itermonthdates() behave consistently in edge cases In-Reply-To: <1475031718.56.0.220203946513.issue28292@psf.upfronthosting.co.za> Message-ID: <1562995388.83.0.21458913237.issue28292@roundup.psfhosted.org> Raymond Hettinger added the comment: For people using "import calendar", the __all__ variable has no effect. Running help(calendar) shows the functions as if they were public functions. The module historically hid its private details with the leading underscores. The patch in question violated that norm. We have evidence that a real user was confused by this. Please fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 01:25:41 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 05:25:41 +0000 Subject: [issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time Message-ID: <1562995541.72.0.689612631399.issue37579@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : As reported by Serhiy on https://bugs.python.org/issue37555#msg347733 there is a difference in __eq__ definition in datetime module's C and Python implementation for timedelta and time. When the other in __eq__ is not of the same type NotImplemented is not returned in Python implementation like C causing equality to behave differently. Difference in C implementation and Python implementation for datetime.timedelta.__eq__ https://github.com/python/cpython/blob/c8e7146de257930ea8d0d4aa74b3a64fcaa79d4b/Modules/_datetimemodule.c#L2152 static PyObject * delta_richcompare(PyObject *self, PyObject *other, int op) { if (PyDelta_Check(other)) { int diff = delta_cmp(self, other); return diff_to_bool(diff, op); } else { Py_RETURN_NOTIMPLEMENTED; } } https://github.com/python/cpython/blob/c8e7146de257930ea8d0d4aa74b3a64fcaa79d4b/Lib/datetime.py#L732 def __eq__(self, other): if isinstance(other, timedelta): return self._cmp(other) == 0 else: return False I will add a PR for this with test. ---------- components: Library (Lib) messages: 347773 nosy: belopolsky, p-ganssle, serhiy.storchaka, xtreak priority: normal severity: normal status: open title: Difference in equality check between C and Python implementation for datetime module's timedelta and time type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 01:36:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 05:36:56 +0000 Subject: [issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time In-Reply-To: <1562995541.72.0.689612631399.issue37579@roundup.psfhosted.org> Message-ID: <1562996216.21.0.357929453721.issue37579@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +14522 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 01:46:38 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2019 05:46:38 +0000 Subject: [issue28292] Make Calendar.itermonthdates() behave consistently in edge cases In-Reply-To: <1475031718.56.0.220203946513.issue28292@psf.upfronthosting.co.za> Message-ID: <1562996798.74.0.132112455189.issue28292@roundup.psfhosted.org> Raymond Hettinger added the comment: s/help/dir/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 01:49:45 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 05:49:45 +0000 Subject: [issue37580] Markup typo in http.cookiejar doc Message-ID: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : CookieJar.add_cookie_header in Doc/library/http.cookiejar.rst contains the below statement where .. is present that causes the markup to not link to the correct docs. The fix would be to remove extra dot in the docs and verify the rendered doc page. https://docs.python.org/3/library/http.cookiejar.html#http.cookiejar.CookieJar.add_cookie_header The *request* object (usually a :class:`urllib.request..Request` instance) Marking this as easy for first time contributors who have not made a PR. ---------- assignee: docs at python components: Documentation keywords: easy messages: 347775 nosy: docs at python, xtreak priority: normal severity: normal stage: needs patch status: open title: Markup typo in http.cookiejar doc type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 01:56:58 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 05:56:58 +0000 Subject: [issue37578] Change Glob: Allow Recursion for Hidden Files In-Reply-To: <1562984633.23.0.0355519865943.issue37578@roundup.psfhosted.org> Message-ID: <1562997418.94.0.944223751162.issue37578@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +Library (Lib) nosy: +serhiy.storchaka versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:03:42 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2019 06:03:42 +0000 Subject: [issue37557] Example snippets for simpler functions/methods In-Reply-To: <1562827779.24.0.52309043258.issue37557@roundup.psfhosted.org> Message-ID: <1562997822.64.0.634481136795.issue37557@roundup.psfhosted.org> Raymond Hettinger added the comment: We generally only put the examples where they add something substantive. Otherwise, it just make the docs verbose and time consuming to read start to finish. Adding an example for str.lower() contributes no additional value. Most published Python books would all avoid the unnecessary here as well. FWIW, we have no evidence that any user has ever found the current form hard to use. So, let's close this. If you're looking for places to contribute, please look at the open bugs where there are known problems. ---------- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:16:38 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 13 Jul 2019 06:16:38 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1562998598.97.0.284139764653.issue19696@roundup.psfhosted.org> Kyle Stanley added the comment: The latest PR-14655 moved the last file, "threaded_import_hangers.py" into the "test_importlib" directory. As far as I can tell, there's nothing else which needs to be moved there, so the issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:42:51 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 13 Jul 2019 06:42:51 +0000 Subject: [issue37581] Docs: Improve phrasing of flush argument for print() Message-ID: <1563000171.75.0.259144303863.issue37581@roundup.psfhosted.org> New submission from Kyle Stanley : Currently in the documentation for print() (https://docs.python.org/3/library/functions.html#print), the phrasing for the flush argument is: Whether output is buffered is usually determined by file, but if the flush keyword argument is true, the stream is forcibly flushed. For the sake of clarity, I would recommend changing it to one of the following: 1) Whether or not output is buffered is usually determined by *file*, but if the *flush* keyword argument is true, the stream is forcibly flushed. 2) Whether or not output is buffered is usually determined by *file*. However, if the *flush* keyword argument is true, the stream is forcibly flushed. 3) Output buffering is usually determined by *file*. However, if the *flush* keyword argument is true, the stream is forcibly flushed. 4) Output buffering is usually determined by *file*. However, if *flush* is true, the stream is forcibly flushed. Each of the options are ordered in difference from the original, with one being the closest. The first couple options simply attempt improve the readability without changing the message itself significantly. In the third option, "output is buffered" is replaced by "output buffering", which is a commonly used programming term for what is being described. The fourth option removes "keyword argument" after *flush*, since it was not mentioned for *file* (which is also a keyword argument). Users can simply look at the function arguments to see that it's a keyword argument. Explicitly specifying this seems like it might be in partial violation of https://devguide.python.org/documenting/#economy-of-expression and https://devguide.python.org/documenting/#audience. I'll be submitting a PR to attach to this issue soon. Let me know if this change is helpful, and if so, which option (or variation) provides the most concise and helpful explanation to users. ---------- messages: 347778 nosy: aeros167, eric.araujo, ezio.melotti, mdk, willingc priority: normal severity: normal status: open title: Docs: Improve phrasing of flush argument for print() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:44:11 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 13 Jul 2019 06:44:11 +0000 Subject: [issue37581] Docs: Improve phrasing of flush argument for print() In-Reply-To: <1563000171.75.0.259144303863.issue37581@roundup.psfhosted.org> Message-ID: <1563000251.6.0.509751987459.issue37581@roundup.psfhosted.org> Change by Kyle Stanley : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: -> enhancement versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:50:47 2019 From: report at bugs.python.org (dai dai) Date: Sat, 13 Jul 2019 06:50:47 +0000 Subject: [issue37582] can you add this new feature about grammar? Message-ID: <1563000647.96.0.457672921362.issue37582@roundup.psfhosted.org> New submission from dai dai : >> a = 1 >> b = 2 >> a, b += 1, 2 2 3 ---------- messages: 347779 nosy: dai dai priority: normal severity: normal status: open title: can you add this new feature about grammar? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:51:49 2019 From: report at bugs.python.org (dai dai) Date: Sat, 13 Jul 2019 06:51:49 +0000 Subject: [issue37582] can you add this new feature about grammar? In-Reply-To: <1563000647.96.0.457672921362.issue37582@roundup.psfhosted.org> Message-ID: <1563000709.05.0.656103756098.issue37582@roundup.psfhosted.org> dai dai added the comment: >> a = 1 >> b = 2 >> a, b += 1, 2 2, 4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 03:17:09 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 07:17:09 +0000 Subject: [issue37582] can you add this new feature about grammar? In-Reply-To: <1563000647.96.0.457672921362.issue37582@roundup.psfhosted.org> Message-ID: <1563002229.36.0.927262992786.issue37582@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Changes like this needs to be discussed in python-ideas first https://mail.python.org/mailman3/lists/python-ideas.python.org/ . The current behavior is as below : >>> a, b += 1, 2 File "", line 1 SyntaxError: illegal expression for augmented assignment See also for some reference to the initial PEP proposal : https://stackoverflow.com/a/18132749/2610955 There is also a comment related to this where this error is raised https://github.com/python/cpython/blob/b9a0376b0dedf16a2f82fa43d851119d1f7a2707/Python/ast.c#L3302 Augmented assignments can only have a name, a subscript, or an attribute on the left, though, so we have to explicitly check for those. I would propose closing this now and reopening this if there is some consensus on moving forward with this in python-ideas. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 03:23:01 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 13 Jul 2019 07:23:01 +0000 Subject: [issue37582] can you add this new feature about grammar? In-Reply-To: <1563000647.96.0.457672921362.issue37582@roundup.psfhosted.org> Message-ID: <1563002581.61.0.899235248475.issue37582@roundup.psfhosted.org> Steven D'Aprano added the comment: A new language feature like this needs to be discussed on Python-Ideas first, to get community feedback, to decide whether the feature is desired by the community, to iron-out any bugs in the specification, and decide whether or not you will need to write a PEP first. (You probably will.) https://mail.python.org/mailman3/lists/python-ideas.python.org/ https://www.python.org/dev/peps/ Until then, I'm closing this as Postponed. ---------- components: +Interpreter Core nosy: +steven.daprano -xtreak resolution: -> postponed stage: -> resolved status: open -> closed type: -> enhancement versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 03:23:21 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 07:23:21 +0000 Subject: [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. In-Reply-To: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> Message-ID: <1563002601.4.0.519591182433.issue37574@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 03:24:42 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 13 Jul 2019 07:24:42 +0000 Subject: [issue37582] can you add this new feature about grammar? In-Reply-To: <1563000647.96.0.457672921362.issue37582@roundup.psfhosted.org> Message-ID: <1563002682.49.0.0125615142847.issue37582@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks for the suggestion. Personally I wouldn't be in favor of this particular change. It doesn't add any additional functionality beyond saving a couple of characters. Also, this could quickly get rather convoluted. For separation and clarity, the assignment operators ("+=", "-=", "/=", "*=", etc) should affect one variable. If you wanted to fit multiple on the same line, you could simply use: >>> a += 1; b += 2 ---------- nosy: +aeros167 -steven.daprano type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 03:28:59 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 13 Jul 2019 07:28:59 +0000 Subject: [issue37582] can you add this new feature about grammar? In-Reply-To: <1563000647.96.0.457672921362.issue37582@roundup.psfhosted.org> Message-ID: <1563002939.48.0.746127471726.issue37582@roundup.psfhosted.org> Steven D'Aprano added the comment: Oops, I accidentally removed xtreak, and then aeros167 accidentally removed me. ---------- nosy: +steven.daprano, xtreak type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 04:29:38 2019 From: report at bugs.python.org (Milan Oberkirch) Date: Sat, 13 Jul 2019 08:29:38 +0000 Subject: [issue21992] New AST node Else() should be introduced In-Reply-To: <1405527228.32.0.961029538035.issue21992@psf.upfronthosting.co.za> Message-ID: <1563006578.6.0.987191278655.issue21992@roundup.psfhosted.org> Milan Oberkirch added the comment: Is there a reason for this still being open? /me trying to find issues to work on using [random issue] ---------- nosy: +zvyn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 04:34:31 2019 From: report at bugs.python.org (hai shi) Date: Sat, 13 Jul 2019 08:34:31 +0000 Subject: [issue37583] Got a 113 error when running the test_socket Message-ID: <1563006871.17.0.626459715079.issue37583@roundup.psfhosted.org> New submission from hai shi : When I run test_socket.py, I got a error. Looks it's a problem of security group. My env: a vm of centos May be I need add `EHOSTUNREACH` in support.get_socket_conn_refused_errs()? ====================================================================== FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shihai/workspace/cpython/Lib/test/test_socket.py", line 4961, in test_create_connection self.assertIn(cm.exception.errno, expected_errnos) AssertionError: 113 not found in [111, 101, 99, 97] ---------------------------------------------------------------------- Ran 814 tests in 25.929s FAILED (failures=1, errors=117, skipped=197) ---------- components: Tests messages: 347786 nosy: shihai1991 priority: normal severity: normal status: open title: Got a 113 error when running the test_socket _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 04:37:52 2019 From: report at bugs.python.org (hai shi) Date: Sat, 13 Jul 2019 08:37:52 +0000 Subject: [issue37583] Got a 113 error when running the test_socket In-Reply-To: <1563006871.17.0.626459715079.issue37583@roundup.psfhosted.org> Message-ID: <1563007072.01.0.332023054559.issue37583@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14523 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14729 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 04:38:13 2019 From: report at bugs.python.org (Jonathan) Date: Sat, 13 Jul 2019 08:38:13 +0000 Subject: [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1563007093.59.0.165088856932.issue37563@roundup.psfhosted.org> Jonathan added the comment: > The devil is in the detail. If stream=sys.stderr is specified, that takes effect at import time. If stream=None is specified and the implementation chooses to treat that as sys.stderr, that takes effect at the time of the call. The two are not equivalent. But this isn't what the prose says at all. You're right, the prose clearly say that the default is sys.stderr, however the code doesn't show that, and many people won't read the prose (I don't a lot of the time), they'll only look at the code snippet because that's all they think they need. The code-snippet claims that the default is None, which from a user perspective isn't true. Again I point out that the documentation is for users, not implementers. We users Do. Not. Care. about how wonderfully clever your implementation is, we care about how it actually works. Whatever Rube-Goldbergian implementation details there are behind the scenes are of no interest to us. Yet again: There's a standard for documenting defaults for keyword arguments, I would ask that it please be used consistently to help us users. Fine, lets try this another way - does anyone else have opinions on this? What's the convention for documentation defaults? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 05:06:51 2019 From: report at bugs.python.org (Milan Oberkirch) Date: Sat, 13 Jul 2019 09:06:51 +0000 Subject: [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563008811.06.0.0452753650011.issue37580@roundup.psfhosted.org> Change by Milan Oberkirch : ---------- keywords: +patch pull_requests: +14524 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14731 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 05:15:29 2019 From: report at bugs.python.org (Ilya Kamenshchikov) Date: Sat, 13 Jul 2019 09:15:29 +0000 Subject: [issue37352] Typo in documentation: "to making it easy" In-Reply-To: <1561051076.38.0.680855087082.issue37352@roundup.psfhosted.org> Message-ID: <1563009329.58.0.0245067573349.issue37352@roundup.psfhosted.org> Change by Ilya Kamenshchikov : ---------- keywords: +patch pull_requests: +14525 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14730 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 05:15:58 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Jul 2019 09:15:58 +0000 Subject: [issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu' In-Reply-To: <1562982731.24.0.816575023926.issue37577@roundup.psfhosted.org> Message-ID: <1563009358.61.0.160064981809.issue37577@roundup.psfhosted.org> Christian Heimes added the comment: Yes, this is most likely a packaging bug on Debian. By the way, Python comes with an ensurepip module. To install pip, just execute "python3.8 -m ensurepip". ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 05:30:28 2019 From: report at bugs.python.org (Ilya Kamenshchikov) Date: Sat, 13 Jul 2019 09:30:28 +0000 Subject: [issue37352] Typo in documentation: "to making it easy" In-Reply-To: <1561051076.38.0.680855087082.issue37352@roundup.psfhosted.org> Message-ID: <1563010228.42.0.983275964179.issue37352@roundup.psfhosted.org> Ilya Kamenshchikov added the comment: The wording from Carol Willing makes it read simpler. Also in the next sentence, 'test-directed development' goes under the name 'test-driven development' as of 2019 (search in google -> https://en.wikipedia.org/wiki/Test-driven_development). I have created a pull request with simpler wording and 'test-driven development'. CLA is signed, will take time to propagate. ---------- nosy: +Ilya Kamenshchikov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 05:46:03 2019 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Sat, 13 Jul 2019 09:46:03 +0000 Subject: [issue25998] doctest terminates when accessing __wrapped__ raises an error In-Reply-To: <1451773843.64.0.986014558431.issue25998@psf.upfronthosting.co.za> Message-ID: <1563011163.47.0.510703697806.issue25998@roundup.psfhosted.org> Micka?l Schoentgen added the comment: Working on it at EuroPython 2019. FTR I tested on Python 3.6.9, 3.7.4 and 3.9.0a0 without issue. I think this was fixed with https://github.com/rtweeks/werkzeug/commit/c643980b93e9bde4431cd99ece30f07e00160f84. But the doctest issue remains and this is on what I will focus. ---------- nosy: +Tiger-222 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 05:48:16 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Jul 2019 09:48:16 +0000 Subject: [issue37576] SSL Malloc Error w/OpenSSL 1.1.1c-fips & FIPS_mode_set(1) In-Reply-To: <1562965993.74.0.405648137897.issue37576@roundup.psfhosted.org> Message-ID: <1563011296.44.0.145060928478.issue37576@roundup.psfhosted.org> Christian Heimes added the comment: You are welcome! Could you please do me a favor and post the RHBZ# here after you have created a ticket? Thanks :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:10:51 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 13 Jul 2019 10:10:51 +0000 Subject: [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1563012651.26.0.956418690915.issue37563@roundup.psfhosted.org> Vinay Sajip added the comment: > the prose clearly say that the default is sys.stderr, however the code doesn't show that Which code are you looking at? Here is the entirety of StreamHandler.__init__: def __init__(self, stream=None): """ Initialize the handler. If stream is not specified, sys.stderr is used. """ Handler.__init__(self) if stream is None: stream = sys.stderr self.stream = stream > We users Do. Not. Care. about how wonderfully clever your implementation is, we care about how it actually works. Whatever Rube-Goldbergian implementation details there are behind the scenes are of no interest to us. I'm not sure your tone is particularly constructive here. I don't regard the code you say you've read, reproduced above, is particularly Rube-Goldbergian, or even Heath-Robinsonish. And are you presuming to speak for all Python users here? > Fine, lets try this another way - does anyone else have opinions on this? As far as I can remember, you're the first person to bring this up since logging was added to Python in 2003. In all that time, no-one appears to have been confused by that prose, which has been there since pretty much the beginning, though there was a spelling change and a logging documentation reorganisation around 9 years ago. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:13:57 2019 From: report at bugs.python.org (Dimiter Naydenov) Date: Sat, 13 Jul 2019 10:13:57 +0000 Subject: [issue37584] Multiple test failures with OSError: [Errno 84] Invalid or incomplete multibyte or wide character on ZFS with utf8only=on Message-ID: <1563012837.05.0.658851590788.issue37584@roundup.psfhosted.org> New submission from Dimiter Naydenov : I'm running Ubuntu 19.04 on a ZFS mirrored pool, where my home partition is configured with 'utf8only=on' attribute. I've cloned cpython and after running the tests, as described in devguide.python.org, I have 11 test failures: == Tests result: FAILURE == 389 tests OK. 11 tests failed: test_cmd_line_script test_httpservers test_imp test_import test_ntpath test_os test_posixpath test_socket test_unicode_file test_unicode_file_functions test_zipimport I've been looking for similar or matching reported issues, but could not find one. I'm on the EuroPython 2019 CPython sprint and we'll be looking into this with the help of some of the core devs. ---------- components: Tests, Unicode files: cpython_test_output.log messages: 347794 nosy: benjamin.peterson, dimitern, ezio.melotti, vstinner priority: normal severity: normal status: open title: Multiple test failures with OSError: [Errno 84] Invalid or incomplete multibyte or wide character on ZFS with utf8only=on type: behavior versions: Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48475/cpython_test_output.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:17:19 2019 From: report at bugs.python.org (Ilya Kamenshchikov) Date: Sat, 13 Jul 2019 10:17:19 +0000 Subject: [issue7951] Should str.format allow negative indexes when used for __getitem__ access? In-Reply-To: <1266450859.13.0.906832569526.issue7951@psf.upfronthosting.co.za> Message-ID: <1563013039.02.0.924233662994.issue7951@roundup.psfhosted.org> Ilya Kamenshchikov added the comment: Py3.6+ f-strings support any indexing as they actually evaluate python expressions. >>> a = ['Java', 'Python'] >>> var = f"Hello {a[-1]}" Hello Python ---------- nosy: +Ilya Kamenshchikov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:17:20 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 10:17:20 +0000 Subject: [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563013040.4.0.787520959869.issue37580@roundup.psfhosted.org> miss-islington added the comment: New changeset b5bbb8a740eaf46c78d122185de8b072e9deea2a by Miss Islington (bot) (Milan Oberkirch) in branch 'master': bpo-37580: Fix typo in http.cookiejar documentation (GH-14731) https://github.com/python/cpython/commit/b5bbb8a740eaf46c78d122185de8b072e9deea2a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:17:35 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 10:17:35 +0000 Subject: [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563013055.75.0.711396117206.issue37580@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14527 pull_request: https://github.com/python/cpython/pull/14733 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:18:03 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 10:18:03 +0000 Subject: [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563013083.71.0.596505561216.issue37580@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14528 pull_request: https://github.com/python/cpython/pull/14734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:23:13 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 10:23:13 +0000 Subject: [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563013393.45.0.0179959980356.issue37580@roundup.psfhosted.org> miss-islington added the comment: New changeset 36494a94914c4d3f249ca10b6a2d6194f6093cc6 by Miss Islington (bot) in branch '3.7': bpo-37580: Fix typo in http.cookiejar documentation (GH-14731) https://github.com/python/cpython/commit/36494a94914c4d3f249ca10b6a2d6194f6093cc6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:24:51 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 10:24:51 +0000 Subject: [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563013491.75.0.000218599099378.issue37580@roundup.psfhosted.org> miss-islington added the comment: New changeset 5da83b417e48aecd7698387d3f37c603162fd46e by Miss Islington (bot) in branch '3.8': bpo-37580: Fix typo in http.cookiejar documentation (GH-14731) https://github.com/python/cpython/commit/5da83b417e48aecd7698387d3f37c603162fd46e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:25:59 2019 From: report at bugs.python.org (Jonathan) Date: Sat, 13 Jul 2019 10:25:59 +0000 Subject: [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1563013559.95.0.720002075815.issue37563@roundup.psfhosted.org> Jonathan added the comment: > I'm not sure your tone is particularly constructive here. Apologies, my bad. > Which code are you looking at? The documentation code: `class logging.StreamHandler(stream=None)`. Sorry, I don't know what you'd call that. I'm not referring to the code proper. > As far as I can remember, you're the first person to bring this up since logging was added to Python in 2003. This is a fallacy. Just because no-one else has reported it doesn't mean it hasn't caused a problem. I mean, I'm sure there are plenty of spelling errors/typos in the docs that no-one has reported for years, it doesn't mean they shouldn't be fixed when raised. It's also assuming you have seen and remember every single bug report related to this from the past 16 years which, nothing personal, seems incredibly unlikely given how poor humans are at remembering things in the first place. > And are you presuming to speak for all Python users here? I'm presuming to speak for end-users yes, why not? I did ask for other input too you'll note. After a few decades of practice I'm fairly decent at getting into the headspace of users (of which I am one in this case), and I know it's something many developers don't really do well. A common mistake we developers make is to assume that everyone knows what we know and thinks like us. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:32:16 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 10:32:16 +0000 Subject: [issue37583] Got a 113 error when running the test_socket In-Reply-To: <1563006871.17.0.626459715079.issue37583@roundup.psfhosted.org> Message-ID: <1563013936.81.0.139664771627.issue37583@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Victor handled similar errors in issue36629 where this helper was introduced. ---------- nosy: +vstinner, xtreak type: -> enhancement versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:33:32 2019 From: report at bugs.python.org (Mark Shannon) Date: Sat, 13 Jul 2019 10:33:32 +0000 Subject: [issue37562] PEP 590 implementation may have introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1563014012.8.0.442970371513.issue37562@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +14529 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14735 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:35:22 2019 From: report at bugs.python.org (Dimiter Naydenov) Date: Sat, 13 Jul 2019 10:35:22 +0000 Subject: [issue37584] Multiple test failures with OSError: [Errno 84] Invalid or incomplete multibyte or wide character on ZFS with utf8only=on In-Reply-To: <1563012837.05.0.658851590788.issue37584@roundup.psfhosted.org> Message-ID: <1563014122.71.0.077199360561.issue37584@roundup.psfhosted.org> Dimiter Naydenov added the comment: Here's some additional information I found for that specific attribute: >From the documentation at http://dlc.sun.com/osol/docs/content/ZFSADMIN/gazss.html (link is dead, but here's where I found the section below: https://zfs-discuss.opensolaris.narkive.com/3NqQVG0H/utf8only-and-normalization-properties#post1) utf8only Boolean Off This property indicates whether a file system should reject file names that include characters that are not present in the UTF-8 character code set. If this property is explicitly set to off, the normalization property must either not be explicitly set or be set to none. The default value for the utf8only property is off. This property cannot be changed after the file system is created. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:42:35 2019 From: report at bugs.python.org (Milan Oberkirch) Date: Sat, 13 Jul 2019 10:42:35 +0000 Subject: [issue7202] "python setup.py cmd --verbose" does not set verbosity In-Reply-To: <1256481428.97.0.691214379627.issue7202@psf.upfronthosting.co.za> Message-ID: <1563014555.33.0.266340177968.issue7202@roundup.psfhosted.org> Milan Oberkirch added the comment: The help states: > usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] so I would argue that setup.py ignoring global_opts after cmd1 is not a bug. But I do think that the fact that "python setup.py build --dry-run" does not prevent the build from running is not ideal. Maybe throwing an error for misplaced global options is the best solution? ---------- nosy: +zvyn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:55:27 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 13 Jul 2019 10:55:27 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1563015327.13.0.127649081046.issue18378@roundup.psfhosted.org> Ronald Oussoren added the comment: LC_CTYPE=UTF-8 is a valid configuration on macOS, and is in the default environment when you install a fresh system. This includes the beta's for macOS 10.15 and is therefore unlikely to change anytime soon. Interestingly enough I get this error even when I unset the relevant environment variables. For some reason LC_CTYPE is reset when I start the interpreter, even if it is set to something else. This means the usual way of working around this problem no longer works. I'll create a pull request with an up-to-date version of my latest patch for further discussion. BTW. I'm testing with the current tip of the tree, but 3.7.3 fails in the same way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 07:35:46 2019 From: report at bugs.python.org (Milan Oberkirch) Date: Sat, 13 Jul 2019 11:35:46 +0000 Subject: [issue9938] Documentation for argparse interactive use In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1563017746.81.0.207779108493.issue9938@roundup.psfhosted.org> Milan Oberkirch added the comment: This issue is a duplicate of issue 9112 which was resolved by commit 9375492b ---------- nosy: +zvyn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 07:46:22 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 13 Jul 2019 11:46:22 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1563018382.32.0.250031696564.issue18378@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- pull_requests: +14530 pull_request: https://github.com/python/cpython/pull/14736 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 07:52:01 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 13 Jul 2019 11:52:01 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1563018721.32.0.897135517248.issue18378@roundup.psfhosted.org> Ronald Oussoren added the comment: As promised there is now a pull request. I'd love a review (and a change to approve the pull request when reviewers are happy, I'm trying to get back into actively contributing). --- I now understand why locale.getdefaultlocale() fails even when LC_CTYPE is not set: pylifecycle sets LC_CTYPE to UTF-8 in the UTF-8 coercion code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 07:58:48 2019 From: report at bugs.python.org (Kristian Klette) Date: Sat, 13 Jul 2019 11:58:48 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results Message-ID: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> New submission from Kristian Klette : As a user, I expect to be able to compare the different parts a `dict` in the same manner. Currently, `PyDictValues` does not implement the `dictview_richcompare`, causing the `__eq__` to always return false, even if the values are identical. ``` my_dict = {'foo': 'bar'} dict_copy = my_dict.copy() other_dict = {'foo': 'bar', 'bar': 1234} assert my_dict.keys() == my_dict.keys() assert my_dict.keys() == dict_copy.keys() assert my_dict.keys() != other_dict.keys() assert my_dict.items() == my_dict.items() assert my_dict.items() == dict_copy.items() assert my_dict.items() != other_dict.items() assert my_dict.values() == my_dict.values() assert my_dict.values() == dict_copy.values() assert my_dict.values() != other_dict.values() ``` ---------- components: Library (Lib) messages: 347806 nosy: Kristian Klette priority: normal severity: normal status: open title: Comparing PyDictValues does not give expected results type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:04:11 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2019 12:04:11 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1563019451.29.0.798908913074.issue37585@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14531 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:16:09 2019 From: report at bugs.python.org (Batuhan) Date: Sat, 13 Jul 2019 12:16:09 +0000 Subject: [issue35476] _imp_create_dynamic_impl() does not clear error. In-Reply-To: <1544642479.77.0.788709270274.issue35476@psf.upfronthosting.co.za> Message-ID: <1563020169.25.0.832576143927.issue35476@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +14533 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:36:58 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 12:36:58 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1563021418.85.0.93724511636.issue37585@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also issue12445 which was a similar proposal rejected in the past. ---------- nosy: +inada.naoki, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:46:20 2019 From: report at bugs.python.org (Sviatoslav Sydorenko) Date: Sat, 13 Jul 2019 12:46:20 +0000 Subject: [issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists In-Reply-To: <1492415274.72.0.826528835648.issue30088@psf.upfronthosting.co.za> Message-ID: <1563021980.83.0.888487186917.issue30088@roundup.psfhosted.org> Sviatoslav Sydorenko added the comment: Hi, I've tried clarifying this in docs as suggested @ https://github.com/python/cpython/pull/1163 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:49:10 2019 From: report at bugs.python.org (Batuhan) Date: Sat, 13 Jul 2019 12:49:10 +0000 Subject: [issue35476] _imp_create_dynamic_impl() does not clear error. In-Reply-To: <1544642479.77.0.788709270274.issue35476@psf.upfronthosting.co.za> Message-ID: <1563022150.44.0.342546741894.issue35476@roundup.psfhosted.org> Batuhan added the comment: Can you give me the case so i can reproduce this and test it. ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:49:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Jul 2019 12:49:40 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1563022180.18.0.0249968854091.issue37585@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> dict view values objects are missing tp_richcmp and tp_as_number _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:56:41 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 13 Jul 2019 12:56:41 +0000 Subject: [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563022601.19.0.904791522877.issue37580@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:05:29 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2019 13:05:29 +0000 Subject: [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. In-Reply-To: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> Message-ID: <1563023129.36.0.345199856633.issue37574@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14535 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:06:45 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Jul 2019 13:06:45 +0000 Subject: [issue28292] Make Calendar.itermonthdates() behave consistently in edge cases In-Reply-To: <1475031718.56.0.220203946513.issue28292@psf.upfronthosting.co.za> Message-ID: <1563023205.42.0.618344543436.issue28292@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are hundreds or thousands of private names in other modules. Do you propose to change them all? I afraid that this will cause more harm than benefit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:08:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Jul 2019 13:08:53 +0000 Subject: [issue37578] Change Glob: Allow Recursion for Hidden Files In-Reply-To: <1562984633.23.0.0355519865943.issue37578@roundup.psfhosted.org> Message-ID: <1563023333.45.0.702812354912.issue37578@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is an interesting question. What other implementations behave? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:11:46 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Jul 2019 13:11:46 +0000 Subject: [issue28269] [MinGW] Can't compile Python/dynload_win.c due to static strcasecmp In-Reply-To: <1474800483.31.0.700864577383.issue28269@psf.upfronthosting.co.za> Message-ID: <1563023506.77.0.913756640231.issue28269@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 05f2d84cae4ba1ff15b7a1d0347305393f4bdcc5 by Serhiy Storchaka (Minmin Gong) in branch 'master': bpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095) https://github.com/python/cpython/commit/05f2d84cae4ba1ff15b7a1d0347305393f4bdcc5 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:12:01 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 13:12:01 +0000 Subject: [issue28269] [MinGW] Can't compile Python/dynload_win.c due to static strcasecmp In-Reply-To: <1474800483.31.0.700864577383.issue28269@psf.upfronthosting.co.za> Message-ID: <1563023521.21.0.417218810592.issue28269@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14536 pull_request: https://github.com/python/cpython/pull/14740 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:12:09 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 13:12:09 +0000 Subject: [issue28269] [MinGW] Can't compile Python/dynload_win.c due to static strcasecmp In-Reply-To: <1474800483.31.0.700864577383.issue28269@psf.upfronthosting.co.za> Message-ID: <1563023529.68.0.613232977584.issue28269@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14537 pull_request: https://github.com/python/cpython/pull/14741 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:13:46 2019 From: report at bugs.python.org (Batuhan) Date: Sat, 13 Jul 2019 13:13:46 +0000 Subject: [issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type In-Reply-To: <1524336762.03.0.682650639539.issue33326@psf.upfronthosting.co.za> Message-ID: <1563023626.29.0.603667936001.issue33326@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +14538 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14742 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:15:52 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Jul 2019 13:15:52 +0000 Subject: [issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time In-Reply-To: <1562995541.72.0.689612631399.issue37579@roundup.psfhosted.org> Message-ID: <1563023752.88.0.467029429616.issue37579@roundup.psfhosted.org> Serhiy Storchaka added the comment: Do you mind to fix also other similar cases if they are? __lt__ and others should have the same property. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:18:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Jul 2019 13:18:37 +0000 Subject: [issue34697] ctypes: Crash if manually-created CField instance is used In-Reply-To: <1537031593.26.0.956365154283.issue34697@psf.upfronthosting.co.za> Message-ID: <1563023917.54.0.920580087018.issue34697@roundup.psfhosted.org> Serhiy Storchaka added the comment: > Is this issue worth fixing? Definitely yes. > If so, is the correct way to set tp_new slot to NULL and fix the internal callers so that users wouldn't be able to create CField instances? I think yes. Do you mind to create a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:22:25 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 13 Jul 2019 13:22:25 +0000 Subject: [issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time In-Reply-To: <1562995541.72.0.689612631399.issue37579@roundup.psfhosted.org> Message-ID: <1563024145.41.0.675739284239.issue37579@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset e6b46aafad3427463d6264a68824df4797e682f1 by Paul Ganssle (Xtreak) in branch 'master': bpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726) https://github.com/python/cpython/commit/e6b46aafad3427463d6264a68824df4797e682f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:27:37 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 13 Jul 2019 13:27:37 +0000 Subject: [issue37586] macOS: posix_spawn(..., setsid=True) Message-ID: <1563024457.33.0.250849204696.issue37586@roundup.psfhosted.org> New submission from Ronald Oussoren : The Xcode 11 beta introduced a definition for POSIX_SPAWN_SETSID, but that flag is only supported on macOS 10.15 (also beta), not on earlier versions. Because of this the testsuite will have failures when you build using Xcode 11 on macOS 10.14. I'm not sure what the best way to patch this is, but lean toward a fix that detects the use of setsid=True on macOS 10.14 or earlier and then fails. Possibly as part of a larger effort to start supporting building on macOS "latest" and running on older versions. Marked as low priority for now, Xcode 11 is in beta and not used to build release binaries. ---------- assignee: ronaldoussoren components: macOS messages: 347816 nosy: ned.deily, ronaldoussoren priority: low severity: normal stage: needs patch status: open title: macOS: posix_spawn(..., setsid=True) type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:31:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Jul 2019 13:31:31 +0000 Subject: [issue37586] macOS: posix_spawn(..., setsid=True) In-Reply-To: <1563024457.33.0.250849204696.issue37586@roundup.psfhosted.org> Message-ID: <1563024691.75.0.920055083775.issue37586@roundup.psfhosted.org> Serhiy Storchaka added the comment: File a bug in Xcode 11? If it will not be fixed we will need to add a workaround (like checking the macOS version explicitly). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:32:12 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Jul 2019 13:32:12 +0000 Subject: [issue37575] Python Documentation on strings (tutorial section 3.1.2.) In-Reply-To: <1562964607.44.0.971161139684.issue37575@roundup.psfhosted.org> Message-ID: <1563024732.8.0.194091318441.issue37575@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: -> not a bug status: open -> pending type: resource usage -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:33:03 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Jul 2019 13:33:03 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1563024783.15.0.304685754065.issue37555@roundup.psfhosted.org> Serhiy Storchaka added the comment: Would be nice to report a bug in Django. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:37:44 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 13:37:44 +0000 Subject: [issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time In-Reply-To: <1562995541.72.0.689612631399.issue37579@roundup.psfhosted.org> Message-ID: <1563025064.28.0.284390919701.issue37579@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14539 pull_request: https://github.com/python/cpython/pull/14743 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:38:13 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2019 13:38:13 +0000 Subject: [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563025093.28.0.979583620683.issue7940@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +14540 pull_request: https://github.com/python/cpython/pull/14744 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:43:16 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 13:43:16 +0000 Subject: [issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time In-Reply-To: <1562995541.72.0.689612631399.issue37579@roundup.psfhosted.org> Message-ID: <1563025396.06.0.0656639142537.issue37579@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +14541 pull_request: https://github.com/python/cpython/pull/14745 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:50:35 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 13 Jul 2019 13:50:35 +0000 Subject: [issue37586] macOS: posix_spawn(..., setsid=True) In-Reply-To: <1563024457.33.0.250849204696.issue37586@roundup.psfhosted.org> Message-ID: <1563025835.37.0.771386907813.issue37586@roundup.psfhosted.org> Ronald Oussoren added the comment: This is not a bug in Xcode 11. Xcode 11 includes definitions for new flags that get picked up by Python's build, but only work on a new version of macOS. I guess this could be seen as a bug in macOS 10.14 (and earlier) because it ignores an unknown flag instead of returning an error. Knowing Apple that's unlikely to get fixed, if it even is a bug ( says that returning EINVAL is optional for an invalid value of "flags"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:52:34 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 13 Jul 2019 13:52:34 +0000 Subject: [issue34722] Non-deterministic bytecode generation In-Reply-To: <1537278827.47.0.956365154283.issue34722@psf.upfronthosting.co.za> Message-ID: <1563025954.08.0.153083318748.issue34722@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: I encounter another case that leads to non-deterministic bytecode. For example, with commit e6b46aafad3427463d6264a68824df4797e682f1 + PR 9472, I got: $ cat foobar.py _m = None $ PYTHONHASHSEED=0 ./python -m compileall --invalidation-mode=unchecked-hash foobar.py Compiling 'foobar.py'... $ sha256sum __pycache__/foobar.cpython-39.pyc 7f84b08d5536390d6ce4ccb2d65e259449c56549ee9cc67560f61771824f20ea __pycache__/foobar.cpython-39.pyc $ rm __pycache__/foobar.cpython-39.pyc $ PYTHONHASHSEED=1 ./python -m compileall --invalidation-mode=unchecked-hash foobar.py Compiling 'foobar.py'... $ sha256sum __pycache__/foobar.cpython-39.pyc 46dadbb92ad6e1e5b5f8abe9f107086cd231b2b80c15fe84f86e2081a6b8c428 __pycache__/foobar.cpython-39.pyc In this case there are no sets. I guess the cause is different. Should I open a new issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:59:40 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 13:59:40 +0000 Subject: [issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time In-Reply-To: <1562995541.72.0.689612631399.issue37579@roundup.psfhosted.org> Message-ID: <1563026380.22.0.578939672382.issue37579@roundup.psfhosted.org> miss-islington added the comment: New changeset 143672cf028740fc549e532c049559c522930c95 by Miss Islington (bot) in branch '3.8': bpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726) https://github.com/python/cpython/commit/143672cf028740fc549e532c049559c522930c95 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:59:58 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Jul 2019 13:59:58 +0000 Subject: [issue37548] Document range of atan, acos and asin In-Reply-To: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> Message-ID: <1563026398.05.0.0176439366731.issue37548@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset dc3f99fa77f415077c20a9c2b3e953e5cd894076 by Mark Dickinson (Giovanni Cappellotto) in branch 'master': bpo-37548: Document range of atan, acos and asin (GH-14717) https://github.com/python/cpython/commit/dc3f99fa77f415077c20a9c2b3e953e5cd894076 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:02:59 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Jul 2019 14:02:59 +0000 Subject: [issue37548] Document range of atan, acos and asin In-Reply-To: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> Message-ID: <1563026579.0.0.650776921396.issue37548@roundup.psfhosted.org> Mark Dickinson added the comment: Done for 3.9; closing. Thank you for the contribution! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:11:38 2019 From: report at bugs.python.org (Larry Hastings) Date: Sat, 13 Jul 2019 14:11:38 +0000 Subject: [issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type In-Reply-To: <1524336762.03.0.682650639539.issue33326@psf.upfronthosting.co.za> Message-ID: <1563027098.9.0.166269592529.issue33326@roundup.psfhosted.org> Larry Hastings added the comment: Maynard is unsupported; it only understands the old bytecode format, pre-3.6 16-bit "wordcode". https://docs.python.org/3.6/whatsnew/3.6.html#optimizations ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:13:58 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 13 Jul 2019 14:13:58 +0000 Subject: [issue34264] Inconsistency between stack size in main thread and secondary threads on macOS In-Reply-To: <1532793644.93.0.56676864532.issue34264@psf.upfronthosting.co.za> Message-ID: <1563027238.04.0.715060393455.issue34264@roundup.psfhosted.org> Ronald Oussoren added the comment: This is a duplicate of 18049, which has a more complete patch. ---------- resolution: -> duplicate stage: patch review -> resolved superseder: -> Re-enable threading test on OSX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:14:06 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 13 Jul 2019 14:14:06 +0000 Subject: [issue34264] Inconsistency between stack size in main thread and secondary threads on macOS In-Reply-To: <1532793644.93.0.56676864532.issue34264@psf.upfronthosting.co.za> Message-ID: <1563027246.06.0.314716493705.issue34264@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:19:48 2019 From: report at bugs.python.org (Carl Bordum Hansen) Date: Sat, 13 Jul 2019 14:19:48 +0000 Subject: [issue30588] Missing documentation for codecs.escape_decode In-Reply-To: <1496847775.57.0.842403144977.issue30588@psf.upfronthosting.co.za> Message-ID: <1563027588.35.0.768341286524.issue30588@roundup.psfhosted.org> Change by Carl Bordum Hansen : ---------- keywords: +patch pull_requests: +14542 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14747 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:20:56 2019 From: report at bugs.python.org (famu xu) Date: Sat, 13 Jul 2019 14:20:56 +0000 Subject: [issue37572] email lib bug In-Reply-To: <1562935441.75.0.460848575163.issue37572@roundup.psfhosted.org> Message-ID: <1563027656.0.0.057124418286.issue37572@roundup.psfhosted.org> famu xu added the comment: import smtplib from email.message import EmailMessage from email.utils import formataddr server = smtplib.SMTP('smtp.xxx.com',port=25) server.login('you at xxx.com', 'password') msg = EmailMessage() #if address username include Chinese or other multibytes language, it will be encode to utf8 and base64, like '?utf-8?B?6YKu5Lu25rWL6K+V?= ', but the raw smtp request data error, "From: xxx" and "To: xxx" fields has the error end char:"\r\r\r\r\n". #From: ?utf-8?B?6YKu5Lu25rWL6K+V?= \r\r\r\r\n msg['From'] =formataddr(('??','you at xxx.com')) msg['To'] = formataddr(('????','to at yyy.com')) msg['Subject'] =subject msg.set_content('something') server.send_message(msg) server.quit() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:32:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Jul 2019 14:32:02 +0000 Subject: [issue30588] Missing documentation for codecs.escape_decode In-Reply-To: <1496847775.57.0.842403144977.issue30588@psf.upfronthosting.co.za> Message-ID: <1563028322.29.0.386803630399.issue30588@roundup.psfhosted.org> Serhiy Storchaka added the comment: I disagree. We can change, rename or remove it because it is not public function and never was. But we can not just remove it while it is used in the pickle module, and there is no reason to change it as it works pretty good for its purpose. If you want to make it public and maintain it, I suggest first discuss this on the Python-Ideas mailing list. You should prove that the benefit of adding it is larger than the cost of the maintance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:34:45 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 13 Jul 2019 14:34:45 +0000 Subject: [issue18049] Re-enable threading test on OSX In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1563028485.57.0.259685830271.issue18049@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- pull_requests: +14543 pull_request: https://github.com/python/cpython/pull/14748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:35:33 2019 From: report at bugs.python.org (Carl Bordum Hansen) Date: Sat, 13 Jul 2019 14:35:33 +0000 Subject: [issue16520] subprocess.Popen() TypeError message incorrect without args argument In-Reply-To: <1353487512.93.0.371965893186.issue16520@psf.upfronthosting.co.za> Message-ID: <1563028533.93.0.658317463871.issue16520@roundup.psfhosted.org> Carl Bordum Hansen added the comment: I think changing the message will break a lot of tests. Here are some examples just from CPython: https://github.com/python/cpython/blob/master/Lib/test/test_dataclasses.py#L2655 https://github.com/python/cpython/blob/master/Lib/test/test_extcall.py It would also outdate some documentation examples. ---------- nosy: +carlbordum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:36:15 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 13 Jul 2019 14:36:15 +0000 Subject: [issue37572] email lib bug In-Reply-To: <1562935441.75.0.460848575163.issue37572@roundup.psfhosted.org> Message-ID: <1563028575.86.0.346319876217.issue37572@roundup.psfhosted.org> SilentGhost added the comment: This seems to be a duplicate of #34424. You'd have to upgrade to the latest 3.7 to get the fix. ---------- nosy: +SilentGhost resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Unicode names break email header type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:38:17 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 13 Jul 2019 14:38:17 +0000 Subject: [issue18049] Re-enable threading test on macOS In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1563028697.86.0.448219411592.issue18049@roundup.psfhosted.org> Ronald Oussoren added the comment: I've converted the patch to a pull request (and closed to other issue because that has a patch that is less complete). I'm not sure if it is acceptable to backport this patch to 3.8 at this time. ---------- title: Re-enable threading test on OSX -> Re-enable threading test on macOS versions: +Python 3.8, Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:39:21 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 14:39:21 +0000 Subject: [issue37358] Use vectorcall for functools.partial In-Reply-To: <1561107113.25.0.81334317867.issue37358@roundup.psfhosted.org> Message-ID: <1563028761.74.0.302196740228.issue37358@roundup.psfhosted.org> miss-islington added the comment: New changeset ed184c06e2e610e12050c5d5c9b0c1c2ecabb930 by Miss Islington (bot) (Jeroen Demeyer) in branch 'master': bpo-37358: Use vectorcall for functools.partial (GH-14284) https://github.com/python/cpython/commit/ed184c06e2e610e12050c5d5c9b0c1c2ecabb930 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:42:02 2019 From: report at bugs.python.org (Marco Paolini) Date: Sat, 13 Jul 2019 14:42:02 +0000 Subject: [issue37587] JSON loads performance improvement for long strings Message-ID: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> New submission from Marco Paolini : I analysed the performance of json.loads in one production workload we have. Spy-py tells me the majority of time is spent into C json module (see events.svg) Digging deeper, linux perf tells me hottest loop (where 20%+ of the time is spent) in _json.scanstring_unicode, in this loop: 189: movzx eax,BYTE PTR [rbp+rbx*1+0x0] mov DWORD PTR [rsp+0x44],eax cmp eax,0x22 je 22f cmp eax,0x5c je 22f test r13d,r13d je 180 cmp eax,0x1f which is related to this code in Modules/_json.c /* Find the end of the string or the next escape */ Py_UCS4 c = 0; for (next = end; next < len; next++) { c = PyUnicode_READ(kind, buf, next); if (c == '"' || c == '\\') { break; } else if (strict && c <= 0x1f) { raise_errmsg("Invalid control character at", pystr, next); goto bail; } } Two optimisations can be done: 1. remove the mov entirely. It is not needed inside the loop and it is only needed later, outside the loop to access the variable 2. switch around the strict check (in the second if) because strict defaults to 1 so it will likely pass the test, while the likelyness of finding an invalid character is lower Running the pyperformance json_loads benchmark I get: +------------+----------------------+-----------------------------+ | Benchmark | vanilla-pyperf-pgo38 | patched-pyperf-pgo38 | +============+======================+=============================+ | json_loads | 54.9 us | 53.9 us: 1.02x faster (-2%) | +------------+----------------------+-----------------------------+ A micro benchmark on a 1MB long json string gives better results: python -m pyperf timeit -s "import json; x = json.dumps({'k': '1' * 2 ** 20})" "json.loads(x)" +-----------+------------+-----------------------------+ | Benchmark | vanilla-1m | patched-1m | +===========+============+=============================+ | timeit | 2.62 ms | 2.39 ms: 1.10x faster (-9%) | +-----------+------------+-----------------------------+ ---------- components: Library (Lib) files: events.svg messages: 347832 nosy: christian.heimes, mpaolini, pablogsal priority: normal severity: normal status: open title: JSON loads performance improvement for long strings type: performance versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48476/events.svg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:45:33 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 13 Jul 2019 14:45:33 +0000 Subject: [issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x In-Reply-To: <1476450540.6.0.486887198503.issue28440@psf.upfronthosting.co.za> Message-ID: <1563029133.67.0.217845566166.issue28440@roundup.psfhosted.org> Ronald Oussoren added the comment: In response to msg282272: That day has come, the beta for 10.15 contains Python 3.7.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:47:17 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 14:47:17 +0000 Subject: [issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists In-Reply-To: <1492415274.72.0.826528835648.issue30088@psf.upfronthosting.co.za> Message-ID: <1563029237.98.0.960023699769.issue30088@roundup.psfhosted.org> miss-islington added the comment: New changeset e44184749c2fd0921867ea5cd20b8e226c2146c2 by Miss Islington (bot) (Sviatoslav Sydorenko) in branch 'master': bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163) https://github.com/python/cpython/commit/e44184749c2fd0921867ea5cd20b8e226c2146c2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:47:26 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 14:47:26 +0000 Subject: [issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists In-Reply-To: <1492415274.72.0.826528835648.issue30088@psf.upfronthosting.co.za> Message-ID: <1563029246.7.0.894464309872.issue30088@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +14544 pull_request: https://github.com/python/cpython/pull/14749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:47:32 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 14:47:32 +0000 Subject: [issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists In-Reply-To: <1492415274.72.0.826528835648.issue30088@psf.upfronthosting.co.za> Message-ID: <1563029252.52.0.610715663032.issue30088@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14545 pull_request: https://github.com/python/cpython/pull/14750 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:49:08 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Jul 2019 14:49:08 +0000 Subject: [issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists In-Reply-To: <1492415274.72.0.826528835648.issue30088@psf.upfronthosting.co.za> Message-ID: <1563029348.83.0.768931224957.issue30088@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:50:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 14:50:56 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1563029456.9.0.939674065193.issue37587@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:53:27 2019 From: report at bugs.python.org (Carl Bordum Hansen) Date: Sat, 13 Jul 2019 14:53:27 +0000 Subject: [issue36261] email examples should not gratuitously mess with preamble In-Reply-To: <1552303649.8.0.648804018015.issue36261@roundup.psfhosted.org> Message-ID: <1563029607.39.0.30380317086.issue36261@roundup.psfhosted.org> Change by Carl Bordum Hansen : ---------- keywords: +patch pull_requests: +14546 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:54:05 2019 From: report at bugs.python.org (Carl Bordum Hansen) Date: Sat, 13 Jul 2019 14:54:05 +0000 Subject: [issue36261] email examples should not gratuitously mess with preamble In-Reply-To: <1552303649.8.0.648804018015.issue36261@roundup.psfhosted.org> Message-ID: <1563029645.05.0.750940819002.issue36261@roundup.psfhosted.org> Carl Bordum Hansen added the comment: I also only found the one case. Submitted a patch. ---------- nosy: +carlbordum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:57:28 2019 From: report at bugs.python.org (Sviatoslav Sydorenko) Date: Sat, 13 Jul 2019 14:57:28 +0000 Subject: [issue36608] Replace bundled pip and setuptools with a downloader in the ensurepip module In-Reply-To: <1555020782.09.0.948988048159.issue36608@roundup.psfhosted.org> Message-ID: <1563029848.64.0.800120491855.issue36608@roundup.psfhosted.org> Sviatoslav Sydorenko added the comment: Thanks for the feedback! I've changed it a bit to have a separate command for downloading bundles to the source tree. It'd work as in `python -m ensurepip.bundle` (needs a better name/CLI args probably). Does it sound better now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:59:35 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 14:59:35 +0000 Subject: [issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists In-Reply-To: <1492415274.72.0.826528835648.issue30088@psf.upfronthosting.co.za> Message-ID: <1563029975.49.0.828764124148.issue30088@roundup.psfhosted.org> miss-islington added the comment: New changeset d1524148cd08f00c0b7c1dfdf698bf96c246350d by Miss Islington (bot) in branch '3.7': bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163) https://github.com/python/cpython/commit/d1524148cd08f00c0b7c1dfdf698bf96c246350d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:59:52 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 14:59:52 +0000 Subject: [issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists In-Reply-To: <1492415274.72.0.826528835648.issue30088@psf.upfronthosting.co.za> Message-ID: <1563029992.06.0.0293438138177.issue30088@roundup.psfhosted.org> miss-islington added the comment: New changeset b815669c833c543b0f6696c3121a179f6b2383a6 by Miss Islington (bot) in branch '3.8': bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163) https://github.com/python/cpython/commit/b815669c833c543b0f6696c3121a179f6b2383a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:05:22 2019 From: report at bugs.python.org (Marco Paolini) Date: Sat, 13 Jul 2019 15:05:22 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1563030322.97.0.769744401052.issue37587@roundup.psfhosted.org> Change by Marco Paolini : ---------- keywords: +patch pull_requests: +14547 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14752 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:08:29 2019 From: report at bugs.python.org (Marco Paolini) Date: Sat, 13 Jul 2019 15:08:29 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1563030509.88.0.893325034605.issue37587@roundup.psfhosted.org> Change by Marco Paolini : ---------- nosy: +ezio.melotti, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:10:03 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 13 Jul 2019 15:10:03 +0000 Subject: [issue37358] Use vectorcall for functools.partial In-Reply-To: <1561107113.25.0.81334317867.issue37358@roundup.psfhosted.org> Message-ID: <1563030603.11.0.830664849005.issue37358@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:12:53 2019 From: report at bugs.python.org (Marco Paolini) Date: Sat, 13 Jul 2019 15:12:53 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1563030773.64.0.307453686597.issue37587@roundup.psfhosted.org> Marco Paolini added the comment: Also on my real workload (loading 60GB jsonl file containing mostly strings) I measured a 10% improvement ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:23:04 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Jul 2019 15:23:04 +0000 Subject: [issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x In-Reply-To: <1476450540.6.0.486887198503.issue28440@psf.upfronthosting.co.za> Message-ID: <1563031384.89.0.493228438752.issue28440@roundup.psfhosted.org> Ned Deily added the comment: > That day has come, the beta for 10.15 contains Python 3.7.3. Yay! FTR, 763f094b1f0ce2a07768828e78afe9687e9ad3bb was released in 3.7.0. The only reason I have left this issues open was that I also wanted to make sure that ensurepip failures in the post-install script do not fail silently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:35:39 2019 From: report at bugs.python.org (Larry Hastings) Date: Sat, 13 Jul 2019 15:35:39 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1563032139.85.0.666960820005.issue36816@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 221178aea686abf13ff92b7e2b5ed3e739a53b3f by larryhastings (Gregory P. Smith) in branch '3.5': [3.5] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (#13200) https://github.com/python/cpython/commit/221178aea686abf13ff92b7e2b5ed3e739a53b3f ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:42:21 2019 From: report at bugs.python.org (Andy Harrington) Date: Sat, 13 Jul 2019 15:42:21 +0000 Subject: [issue22121] IDLE should start with HOME as the initial working directory In-Reply-To: <1406966032.01.0.548285467026.issue22121@psf.upfronthosting.co.za> Message-ID: <1563032541.46.0.728067056979.issue22121@roundup.psfhosted.org> Andy Harrington added the comment: This is really important for newbies. They have no business being in the system Python folder. And Idle is for newbies! I was teaching an intro Python class, and tried to help a student who had been writing programs in Idle, but now could not get Python going. It took many minutes for me to discover that he had created a new file while the shell window had focus, and innocently saved the file as math.py, without looking for a new directory to put it in. What a pain tracking that down! ---------- nosy: +andyharrington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:51:33 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2019 15:51:33 +0000 Subject: [issue25433] whitespace in strip()/lstrip()/rstrip() In-Reply-To: <1445170536.34.0.94220475409.issue25433@psf.upfronthosting.co.za> Message-ID: <1563033093.28.0.882877110372.issue25433@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14548 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:57:54 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2019 15:57:54 +0000 Subject: [issue12217] Cross-link docs for faulthandler, traceback and pdb In-Reply-To: <1306770313.4.0.799430970978.issue12217@psf.upfronthosting.co.za> Message-ID: <1563033474.52.0.00211754161662.issue12217@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14549 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14754 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 12:04:04 2019 From: report at bugs.python.org (Vincent Michel) Date: Sat, 13 Jul 2019 16:04:04 +0000 Subject: [issue35409] Async generator might re-throw GeneratorExit on aclose() In-Reply-To: <1543929680.9.0.788709270274.issue35409@psf.upfronthosting.co.za> Message-ID: <1563033844.08.0.520175148983.issue35409@roundup.psfhosted.org> Change by Vincent Michel : ---------- pull_requests: +14550 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 12:27:16 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Jul 2019 16:27:16 +0000 Subject: [issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris In-Reply-To: <1562936255.66.0.924337077063.issue37573@roundup.psfhosted.org> Message-ID: <1563035236.63.0.63613660101.issue37573@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks for the report. ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 12:42:51 2019 From: report at bugs.python.org (Benjamin Mintz) Date: Sat, 13 Jul 2019 16:42:51 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1563036171.77.0.820234553609.issue37521@roundup.psfhosted.org> Benjamin Mintz added the comment: Hmm, why is the assignment to sys.modules necessary at all, if module_from_spec() always does so? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 12:43:05 2019 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Sat, 13 Jul 2019 16:43:05 +0000 Subject: [issue25998] doctest terminates when accessing __wrapped__ raises an error In-Reply-To: <1451773843.64.0.986014558431.issue25998@psf.upfronthosting.co.za> Message-ID: <1563036185.31.0.238676863007.issue25998@roundup.psfhosted.org> Change by Micka?l Schoentgen : ---------- keywords: +patch pull_requests: +14551 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14756 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 12:45:13 2019 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Sat, 13 Jul 2019 16:45:13 +0000 Subject: [issue25998] doctest terminates when accessing __wrapped__ raises an error In-Reply-To: <1451773843.64.0.986014558431.issue25998@psf.upfronthosting.co.za> Message-ID: <1563036313.69.0.338756516409.issue25998@roundup.psfhosted.org> Micka?l Schoentgen added the comment: Attached a simple reproduction script. ---------- Added file: https://bugs.python.org/file48477/unwrapable_ob.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 12:48:08 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 13 Jul 2019 16:48:08 +0000 Subject: [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1563036488.76.0.411224271752.issue37563@roundup.psfhosted.org> Vinay Sajip added the comment: > This is a fallacy. What fallacy? I was responding to "does anyone else have opinions on this?" I can't read minds of people all over the world, so I have to go by my best guess, which is based on how many times this issue has been reported before - which I believe is zero. > It's also assuming you have seen and remember every single bug report related to this from the past 16 years which, nothing personal, seems incredibly unlikely given how poor humans are at remembering things in the first place. Feel free to do a search on here to see if you can find an earlier issue about this. > I'm presuming to speak for end-users yes, why not? Because they're a very diverse bunch who don't all speak with one voice. I, too, am a user (of other people's code) as much as a developer. I don't see things the same way as you do, here, and it's not because it's my code. I'd probably feel the same way if you'd pointed to some other instance of Python code which does the same kind of thing. There are numerous examples in the stdlib where None is passed in and some other value (e.g. 'utf-8' for an encoding) are used as a default, without that value appearing in any documented argument list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 12:55:18 2019 From: report at bugs.python.org (Jonathan) Date: Sat, 13 Jul 2019 16:55:18 +0000 Subject: [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1563036918.0.0.940734022686.issue37563@roundup.psfhosted.org> Jonathan added the comment: >What fallacy? You appeared to be saying (to paraphrase) "no-one else has ever reported this, so it's never been a problem". That's a fallacy. > I was responding to "does anyone else have opinions on this?" I was asking if anyone else wanted to chime in with an opinion. > There are numerous examples in the stdlib where None is passed in and some other value (e.g. 'utf-8' for an encoding) are used as a default Then for clarity's purpose I'd suggest those be changed too, but that's another ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 13:53:56 2019 From: report at bugs.python.org (Phil Thompson) Date: Sat, 13 Jul 2019 17:53:56 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings Message-ID: <1563040436.19.0.276806879722.issue37588@roundup.psfhosted.org> New submission from Phil Thompson : I have a number of static PyTypeObject declarations. In order to avoid compiler warnings about missing field initialisers I always provide explicit 0 values for unused fields (protected by #if PY_HEX_VERSION >= ...). However with v3.8b2 this triggers new warnings from Py_DEPRECATED because of the initialiser for tp_print. I would like some way of locally suppressing Py_DEPRECATED. The attached trivial patch would do this by allowing me to define a null Py_DEPRECATED before including Python.h. ---------- components: Interpreter Core files: pyport.h.diff keywords: patch messages: 347848 nosy: philthompson10 priority: normal severity: normal status: open title: Py_DEPRECATED and unavoidable warnings type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file48478/pyport.h.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 14:09:49 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2019 18:09:49 +0000 Subject: [issue22121] IDLE should start with HOME as the initial working directory In-Reply-To: <1406966032.01.0.548285467026.issue22121@psf.upfronthosting.co.za> Message-ID: <1563041389.82.0.379205248465.issue22121@roundup.psfhosted.org> Raymond Hettinger added the comment: > When I start IDLE ("python -m idle") from my project directory > I expect that it doesn't change current directory and I can > access files in this directory by short relative name. I rely on this behavior when teaching Python courses. IIRC, David Beazley does as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 14:11:54 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2019 18:11:54 +0000 Subject: [issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type In-Reply-To: <1524336762.03.0.682650639539.issue33326@psf.upfronthosting.co.za> Message-ID: <1563041514.76.0.458511002123.issue33326@roundup.psfhosted.org> Raymond Hettinger added the comment: +1 for switching to sets or frozensets. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 14:12:00 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2019 18:12:00 +0000 Subject: [issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type In-Reply-To: <1524336762.03.0.682650639539.issue33326@psf.upfronthosting.co.za> Message-ID: <1563041520.26.0.0662729723921.issue33326@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- versions: +Python 3.9 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 14:15:01 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2019 18:15:01 +0000 Subject: [issue28292] Make Calendar.itermonthdates() behave consistently in edge cases In-Reply-To: <1475031718.56.0.220203946513.issue28292@psf.upfronthosting.co.za> Message-ID: <1563041701.22.0.30718911363.issue28292@roundup.psfhosted.org> Raymond Hettinger added the comment: > Do you propose to change them all? No. But we have precedent in this module and should maintain it. FWIW, there are a number of modules that have been conscientious in this regard (for example, collections and random). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 14:37:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2019 18:37:32 +0000 Subject: [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563043052.67.0.337933741369.issue7940@roundup.psfhosted.org> Raymond Hettinger added the comment: -1 on the proposal. We don't know of any strong use cases, so there isn't a real problem being solved here. Rather than providing a benefit, this feature request makes it more likely that people will write convoluted code or that it will let bugs pass silently that would otherwise be caught. ISTM the actual issue here is an incorrect user expectation that "all things that having indexing will support negative indexing". While it is common for objects to implement negative index support, it is not universal or required. Even collections.abc.Sequence does not insist on negative index support. I think this warrants a FAQ entry (which should also mention that slice support as well is not universal or required, some objects have it, some don't). Reclassifying this as documentation issue. ---------- assignee: -> docs at python components: +Documentation -Library (Lib), Regular Expressions nosy: +docs at python, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 14:38:27 2019 From: report at bugs.python.org (Ulf Rompe) Date: Sat, 13 Jul 2019 18:38:27 +0000 Subject: [issue25433] whitespace in strip()/lstrip()/rstrip() In-Reply-To: <1445170536.34.0.94220475409.issue25433@psf.upfronthosting.co.za> Message-ID: <1563043107.74.0.50935545081.issue25433@roundup.psfhosted.org> Ulf Rompe added the comment: Using a re.sub() call as documentation: 1. wouldn't be helpful for many developers. If they need to look up the documentation of a simple method they shouldn't be forced to learn about a more complex one as well to understand it. 2. would be wild guessing since the re module defines its own whitespace as well. I have created a pull request that aligns the strip methods of bytearray to those of bytes objects. The implementation found there is cleaner and even a little bit faster. Current master: ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.lstrip()' 1000000 loops, best of 5: 245 nsec per loop ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.rstrip()' 1000000 loops, best of 5: 245 nsec per loop ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.strip()' 1000000 loops, best of 5: 260 nsec per loop Using my patch: ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.lstrip()' 1000000 loops, best of 5: 235 nsec per loop ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.rstrip()' 1000000 loops, best of 5: 235 nsec per loop ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.strip()' 1000000 loops, best of 5: 239 nsec per loop I have also updated the documentation, adding "whitespace" to the glossary and linking to it from many places in the documentation of standard types. ---------- nosy: +rompe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 16:57:24 2019 From: report at bugs.python.org (Marco Paolini) Date: Sat, 13 Jul 2019 20:57:24 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1563051444.93.0.958690720226.issue37587@roundup.psfhosted.org> Marco Paolini added the comment: Here's the real world example $ ls -hs events-100k.json 84M events-100k.json +-----------+-------------------------+-----------------------------+ | Benchmark | vanilla-bpo-events-100k | patched-bpo-events-100k | +===========+=========================+=============================+ | timeit | 985 ms | 871 ms: 1.13x faster (-12%) | +-----------+-------------------------+-----------------------------+ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 17:12:10 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2019 21:12:10 +0000 Subject: [issue37559] IDLE: Scrolling issues with code context shown In-Reply-To: <1562839219.15.0.3914256467.issue37559@roundup.psfhosted.org> Message-ID: <1563052330.1.0.216493821438.issue37559@roundup.psfhosted.org> Terry J. Reedy added the comment: I repeated Tal's experiment, on Windows, and added more. I list below multiple issues related to code context and scrolling, and possible solutions. 1: two geometry modes. After the text height is set on start up or by restore height, CC height is added to the fixed text height, making frame (and window height) vary. After the window height is set by the user or zoom height, CC height is subtracted from the frame height, derived from the window height, making text height vary. I don't remember noticing such switching between add and sub modes when CC height was fixed, but I presume it occurred. (I don't have pre-3.6.8 3.x to check.) But it is now confusing and a nuisance. I think we should prefer sub mode because add mode would undo correct zooming when zoomed, results in status line artifacts when row and column spaces temporarily left black, and is overall more obnoxious. Perhaps we could do this by setting window height after setting text height. 2. text top. With CC height varying, the top of text bobs up and down regardless of mode. My initial opinion is that the visual effect is muted if the context foreground color is the same as normal text and the background similar. Or maybe vice versa. We might reconsider the current default, or add a doc recommendation. We might experiment with border styles and their affect on the boundary between CC and text. 3. text bottom. In sub mode, this stays put, but there is some white flashing that for me is only noticeable with a dark theme. What happens seems to be this. We start with n exposed lines of text and k lines of context. We change the exposed text, still n lines, by scrolling, whether with arrow key, mouse wheel, scrollbar arrow or trough clicks, or slider drag. (No scroll arrows on my Macbook Air.) Suppose CC adjusts the context and the result is k' < k lines. The text box increases by d = k-k' lines and the existing n lines are moved or copied up. In either case, the d lines at the bottom get a white background for a fraction of a second before being syntax colored. There are two oddities. First, the padding between border and text line ends remains dark. Second, after moving up and down a line where flashing happens, it sometimes stops after about 3 repetitions. (Example editor.py, CC on, line 41 top line visible, move down and back up, repeat.) Perhaps making sure that both toplevel and frame have the proper background will solve the issue. I don't know the colorizer well enough to know whether it is relevant here. 4. scrollbar slider. When the scrollbar jumps up or down with the text, the slider necessarily jumps up or down with it. (I am ignoring slider size changes in sub mode, which will nearly always be minor in comparison.) This is most obvious (and obnoxious) to me when dragging the slider, which I seldom do. One way to prevent the bouncing is to fix the CC height, like it used to be. Rather than revert, I would add a min height, so that min == max means fixed. Another way to prevent the bouncing is to avoid mixing CC and scrolling, especially dragging. Adding a CC hot key would enable quick looks at current context while mostly having it off. With line numbers on, I think that this would be even more needed. 5. arrow keys (not related to CC). With Notepad++, down arrow scrolls through editor.py (1722 lines), from beginning to end, at about 30 lines per second. With IDLE on my machine, down arrow goes a few hundred lines at about 23 lines per second, with the cursor blinking as normal. But then the cursor blinks off, and and scrolling stops for perhaps 2 seconds. When the cursor comes back on, the file jumps about 50 lines. This happens a few times, and the the cursor blinks off and stays off for at least several seconds. It is like the key got tired and went to sleep. If I then move the cursor some other key, arrow key works again, for a while. Anyone else see anything like this? The tests needed would mostly be suggestions added to an htest. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 17:37:55 2019 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Jul 2019 21:37:55 +0000 Subject: [issue37492] should email.utils.parseaddr treat a@b. as invalid email ? In-Reply-To: <1562148740.76.0.680982453684.issue37492@roundup.psfhosted.org> Message-ID: <1563053875.33.0.578442731401.issue37492@roundup.psfhosted.org> R. David Murray added the comment: Right, those absolutely are valid addresses. A resolver will normally look up a name with an internal dot first as if it were an FQDN, but if it does so and does not get an answer it will then look it up again as a "local" address (appending in turn the strings from the 'search' directive in resolv.conf or equivalent) *if* it does not end in a final dot. If it does end in a final dot, no further lookup as local is done. While it isn't *normal* to send email to a TLD using a trailing dot, it is *legal*. In theory the address 'postmaster at com.' ought to be a valid email address (I doubt that it actually is, though). On the other hand, I will be very surprised if *all other* TLDs are without valid email addresses, especially the new ones. It is also easy to imagine an environment using email with private single label domain names using trailing dots specifically to suppress appending of search domains for sandboxing reasons. Thus the email library must support it as valid, both for RFC reasons and for practical reasons. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 17:57:40 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 13 Jul 2019 21:57:40 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563055060.61.0.596656191256.issue30550@roundup.psfhosted.org> Kyle Stanley added the comment: > The JSON encoder for dictionaries preserves the order of the items in a dictionary >From what I can tell, the JSON encoder does nothing to preserve the order of the keys. Although the default option is to not modify the existing dictionary, the items() method returns the k,v pairs in a non-random arbitrary manner, which may not match the order the values were entered in. See https://docs.python.org/2/library/stdtypes.html#dict.items. ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 18:08:56 2019 From: report at bugs.python.org (jpic) Date: Sat, 13 Jul 2019 22:08:56 +0000 Subject: [issue37492] should email.utils.parseaddr treat a@b. as invalid email ? In-Reply-To: <1563053875.33.0.578442731401.issue37492@roundup.psfhosted.org> Message-ID: jpic added the comment: Thanks for the heads up. There is still one last case where maybe parseaddr should return a tuple of empty strings, currently: >>> parseaddr('a@') ('', 'a@') Is this worth changing ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 18:10:59 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2019 22:10:59 +0000 Subject: [issue22121] Start IDLE from icon in a better place. In-Reply-To: <1406966032.01.0.548285467026.issue22121@psf.upfronthosting.co.za> Message-ID: <1563055859.33.0.986799918571.issue22121@roundup.psfhosted.org> Terry J. Reedy added the comment: Steve, there is a problem in both lines of this suggestion. if os.path.normcase(os.getcwd()) == os.path.normcase(sys.prefix): os.chdir(get_default_location(sys.platform)) On my 3.8 repository build, >>> import os; os.getcwd() 'F:\\dev\\38\\PCbuild\\win32' >>> import sys; sys.prefix 'F:\\dev\\38' # Don't match. The following does. >>> os.path.dirname(sys.executable) 'F:\\dev\\3x\\PCbuild\\win32' >>> get_default_location Traceback (most recent call last): File "", line 1, in NameError: name 'get_default_location' is not defined Raymond, I understand that you are saying that the current behavior when starting from a command prompt is correct (I agree) and depended upon. I changed the title to be clear about that. Starting IDLE from an icon includes starting python from an icon and then starting IDLE with 'import idlelib.idle', which I do routinely for repository builds. ---------- title: IDLE should start with HOME as the initial working directory -> Start IDLE from icon in a better place. versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 18:45:40 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Sat, 13 Jul 2019 22:45:40 +0000 Subject: [issue13127] xml.dom.Attr.name is not labeled as read-only In-Reply-To: <1318047492.07.0.217686953928.issue13127@psf.upfronthosting.co.za> Message-ID: <1563057940.67.0.293113354134.issue13127@roundup.psfhosted.org> Change by Giovanni Cappellotto : ---------- keywords: +patch pull_requests: +14552 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 18:46:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Jul 2019 22:46:04 +0000 Subject: [issue22121] Start IDLE from icon in a better place. In-Reply-To: <1406966032.01.0.548285467026.issue22121@psf.upfronthosting.co.za> Message-ID: <1563057964.14.0.460853834223.issue22121@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- assignee: -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 18:51:14 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Sat, 13 Jul 2019 22:51:14 +0000 Subject: [issue13127] xml.dom.Attr.name is not labeled as read-only In-Reply-To: <1318047492.07.0.217686953928.issue13127@psf.upfronthosting.co.za> Message-ID: <1563058274.82.0.713534205383.issue13127@roundup.psfhosted.org> Giovanni Cappellotto added the comment: In https://github.com/python/cpython/pull/14757 I tried updating the implementation of `Attr._set_name` to remove and reset the attr node in the owner element. So now `Attr._set_name` behaves similarly to `Document.renameNode`. All existing tests are still passing and I added one more test for checking the issue described here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 21:13:00 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Jul 2019 01:13:00 +0000 Subject: [issue22121] Start IDLE from icon in a better place. In-Reply-To: <1406966032.01.0.548285467026.issue22121@psf.upfronthosting.co.za> Message-ID: <1563066780.76.0.300873921436.issue22121@roundup.psfhosted.org> Raymond Hettinger added the comment: Looking at the revised title, +1 for changing the IDLE Icon startup, but let's keep the command-line startup sticking with the current directory: $ mkdir pyclass $ cd pyclass $ python3.8 -m idlelib.idle # Should start in the pyclass directory ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 23:27:13 2019 From: report at bugs.python.org (hai shi) Date: Sun, 14 Jul 2019 03:27:13 +0000 Subject: [issue37583] Got a 113 error when running the test_socket In-Reply-To: <1563006871.17.0.626459715079.issue37583@roundup.psfhosted.org> Message-ID: <1563074833.31.0.153333097519.issue37583@roundup.psfhosted.org> hai shi added the comment: So I add this 113 error in `get_socket_conn_refused_errs` too ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 00:00:17 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 14 Jul 2019 04:00:17 +0000 Subject: [issue28292] Make Calendar.itermonthdates() behave consistently in edge cases In-Reply-To: <1475031718.56.0.220203946513.issue28292@psf.upfronthosting.co.za> Message-ID: <1563076817.66.0.869956316292.issue28292@roundup.psfhosted.org> Kyle Stanley added the comment: >But we have precedent in this module and should maintain it. In general, applying different rules to standard library modules and changing private function naming conventions on a case-by-case basis creates rather drastic inconsistency. There definitely should be a universal standard across stdlib, especially for something as fundamental as private function naming. The precedent really should not be on a per-module basis. As someone who joined the Python development community only a month ago but was a user of the language for 5 years, the most common convention to denote privation functions was a preceding underscore. In a perfect world where simplicity is the only concern, this should be the guideline in which stdlib follow consistently across the modules. However, Serhiy makes a very valid point: > There are hundreds or thousands of private names in other modules. Do you propose to change them all? I afraid that this will cause more harm than benefit. __all__ has been far easier to maintain since functions can be added or removed without issue and there's no need to rename them. However, as far as I am aware, this is no clear documentation that membership on the __all__ list denotes whether or not a function is public. Also, any user using "import module" instead of "from module import *" may not be aware they are accessing a private function. Here's a few solutions I thought of (not mutually exclusive): 1) Document that "The list from __all__ is the universal stdlib convention for marking functions as public, and any not on the list are considered private. When possible, underscore is preferred as well, but the lack of an underscore does not necessarily mean the function is public." 2) When a user attempts to import or use a function that is not in __all__, a minimally intrusive warning message is shown upon execution to notify them that they are using a private function which is not officially supported for external usage. There should be a way to easily suppress this message if the user desires. 3) Add a new syntax similar to "import module" that only imports public functions. Currently, "from module import *" somewhat provides this, but does not allow for using the "module.function" syntax for referencing the functions. The exact convention for marking functions as public or private is not nearly as important as having universal consistency across stdlib and clear communication to the users. This does not seem to be the case at the moment. ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 01:36:03 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 05:36:03 +0000 Subject: [issue26967] argparse: allow_abbrev=False stops -vv from working In-Reply-To: <1462475086.65.0.670765920247.issue26967@psf.upfronthosting.co.za> Message-ID: <1563082563.45.0.115060551123.issue26967@roundup.psfhosted.org> miss-islington added the comment: New changeset dffca9e925ee5c3072663cbe8d4d4768406d5307 by Miss Islington (bot) (Zac Hatfield-Dodds) in branch 'master': bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316) https://github.com/python/cpython/commit/dffca9e925ee5c3072663cbe8d4d4768406d5307 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 01:36:12 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 05:36:12 +0000 Subject: [issue26967] argparse: allow_abbrev=False stops -vv from working In-Reply-To: <1462475086.65.0.670765920247.issue26967@psf.upfronthosting.co.za> Message-ID: <1563082572.31.0.570949508612.issue26967@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14553 pull_request: https://github.com/python/cpython/pull/14759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 02:00:04 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 14 Jul 2019 06:00:04 +0000 Subject: [issue26967] argparse: allow_abbrev=False stops -vv from working In-Reply-To: <1462475086.65.0.670765920247.issue26967@psf.upfronthosting.co.za> Message-ID: <1563084004.41.0.866431031805.issue26967@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset b1e4d1b6032d4c82b549233fa08a2c7cfe7e818b by Petr Viktorin (Miss Islington (bot)) in branch '3.8': bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316) (GH-14759) https://github.com/python/cpython/commit/b1e4d1b6032d4c82b549233fa08a2c7cfe7e818b ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 02:53:07 2019 From: report at bugs.python.org (Vemake) Date: Sun, 14 Jul 2019 06:53:07 +0000 Subject: [issue37589] Missing dependences in the Makefile Message-ID: <1563087187.08.0.733315200631.issue37589@roundup.psfhosted.org> New submission from Vemake : We use a tool to detect 138 dependence issues in the Makefile. Most of them are missing of c source files and header files. Those issues can cause incorrect results when we want to do incremental build and parallel build. For example, any changes in "Include/typeslots.h" will not cause "Modules/atexitmodule.o" to be rebuilt, which is incorrect. I've fixed all of them in the github PR: https://github.com/python/cpython/pull/14758 I've tested it on my computer and the fixed version works as expected. ---------- components: Build messages: 347866 nosy: vemakereporter priority: normal pull_requests: 14554 severity: normal status: open title: Missing dependences in the Makefile versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:04:22 2019 From: report at bugs.python.org (Larry Hastings) Date: Sun, 14 Jul 2019 07:04:22 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1563087862.83.0.759541473884.issue35907@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 4fe82a8eef7aed60de05bfca0f2c322730ea921e by larryhastings (Victor Stinner) in branch '3.5': bpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-13474) (GH-13505) (#13510) https://github.com/python/cpython/commit/4fe82a8eef7aed60de05bfca0f2c322730ea921e ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:35:24 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 07:35:24 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1563089724.89.0.883860740461.issue37587@roundup.psfhosted.org> Change by Steve Dower : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:40:56 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sun, 14 Jul 2019 07:40:56 +0000 Subject: [issue26967] argparse: allow_abbrev=False stops -vv from working In-Reply-To: <1462475086.65.0.670765920247.issue26967@psf.upfronthosting.co.za> Message-ID: <1563090056.32.0.114110379093.issue26967@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:44:03 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 07:44:03 +0000 Subject: [issue18049] Re-enable threading test on macOS In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1563090243.27.0.317323748251.issue18049@roundup.psfhosted.org> Steve Dower added the comment: I believe this is acceptable to include in 3.8, provided it makes sense for 3.9, so I added the backport tag on the PR. That said, I'm not making any comment on whether it's appropriate at all :) For Windows we found some ways to reduce the stack usage of debug builds (IIRC, refactoring some large local variables into their own function) and improved recursion depth that way. Without any data on whether worker threads generally go deeper than the main thread, I would hesitate to say that they ought to be the same, as there is a definite advantage to having a smaller stack by default when you have many worker threads. But if someone else confidently approves the change, it can go into 3.8. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:45:31 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 07:45:31 +0000 Subject: [issue36261] email examples should not gratuitously mess with preamble In-Reply-To: <1552303649.8.0.648804018015.issue36261@roundup.psfhosted.org> Message-ID: <1563090331.89.0.218975162132.issue36261@roundup.psfhosted.org> Change by Steve Dower : ---------- versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:46:29 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 07:46:29 +0000 Subject: [issue36261] email examples should not gratuitously mess with preamble In-Reply-To: <1552303649.8.0.648804018015.issue36261@roundup.psfhosted.org> Message-ID: <1563090389.85.0.151899606845.issue36261@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14555 pull_request: https://github.com/python/cpython/pull/14760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:46:28 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 07:46:28 +0000 Subject: [issue36261] email examples should not gratuitously mess with preamble In-Reply-To: <1552303649.8.0.648804018015.issue36261@roundup.psfhosted.org> Message-ID: <1563090388.64.0.149843880853.issue36261@roundup.psfhosted.org> Steve Dower added the comment: New changeset 8efade91b12a13102a09a3856179021e579da5e9 by Steve Dower (Carl Bordum Hansen) in branch 'master': bpo-36261: Improve example of the preamble field in email docs (GH-14751) https://github.com/python/cpython/commit/8efade91b12a13102a09a3856179021e579da5e9 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:46:36 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 07:46:36 +0000 Subject: [issue36261] email examples should not gratuitously mess with preamble In-Reply-To: <1552303649.8.0.648804018015.issue36261@roundup.psfhosted.org> Message-ID: <1563090396.62.0.117842690841.issue36261@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14556 pull_request: https://github.com/python/cpython/pull/14761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:51:35 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 07:51:35 +0000 Subject: [issue36261] email examples should not gratuitously mess with preamble In-Reply-To: <1552303649.8.0.648804018015.issue36261@roundup.psfhosted.org> Message-ID: <1563090695.93.0.806284080625.issue36261@roundup.psfhosted.org> Steve Dower added the comment: Merged, and I am assuming the backports will merge fine too. Thanks for the patch! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:51:53 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 07:51:53 +0000 Subject: [issue36261] email examples should not gratuitously mess with preamble In-Reply-To: <1552303649.8.0.648804018015.issue36261@roundup.psfhosted.org> Message-ID: <1563090713.99.0.214611599012.issue36261@roundup.psfhosted.org> miss-islington added the comment: New changeset fb58024688050385ed2fd93caf02a5807d1ccfed by Miss Islington (bot) in branch '3.7': bpo-36261: Improve example of the preamble field in email docs (GH-14751) https://github.com/python/cpython/commit/fb58024688050385ed2fd93caf02a5807d1ccfed ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:53:18 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 07:53:18 +0000 Subject: [issue36261] email examples should not gratuitously mess with preamble In-Reply-To: <1552303649.8.0.648804018015.issue36261@roundup.psfhosted.org> Message-ID: <1563090798.3.0.898445262919.issue36261@roundup.psfhosted.org> miss-islington added the comment: New changeset 262779fb5038db7574180c6a89b4f0968f29bd79 by Miss Islington (bot) in branch '3.8': bpo-36261: Improve example of the preamble field in email docs (GH-14751) https://github.com/python/cpython/commit/262779fb5038db7574180c6a89b4f0968f29bd79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:55:14 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 07:55:14 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563090914.2.0.776739475227.issue37571@roundup.psfhosted.org> Steve Dower added the comment: New changeset 6b929580eb018cfef386db7f7f66b3a58532eada by Steve Dower (Michele Angrisano) in branch 'master': bpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721) https://github.com/python/cpython/commit/6b929580eb018cfef386db7f7f66b3a58532eada ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:55:22 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 07:55:22 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563090922.49.0.267649677732.issue37571@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14557 pull_request: https://github.com/python/cpython/pull/14762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:55:28 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 07:55:28 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563090928.63.0.512988848133.issue37571@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14558 pull_request: https://github.com/python/cpython/pull/14763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:59:14 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 07:59:14 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091154.17.0.395947819048.issue37571@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +14559 pull_request: https://github.com/python/cpython/pull/14764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:05:24 2019 From: report at bugs.python.org (hai shi) Date: Sun, 14 Jul 2019 08:05:24 +0000 Subject: [issue37590] Remove redundant docs of PyEval_EvalFrameEx Message-ID: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> New submission from hai shi : PyEval_EvalFrameEx have been updated. so remove redundant info in https://github.com/python/cpython/blob/master/Python/ceval.c#L733-L738 ---------- assignee: docs at python components: Documentation messages: 347874 nosy: docs at python, shihai1991 priority: normal severity: normal status: open title: Remove redundant docs of PyEval_EvalFrameEx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:07:09 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:07:09 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091629.58.0.172972913265.issue37571@roundup.psfhosted.org> miss-islington added the comment: New changeset e7c114df38eaef0cec3457f55835a2276eccbff6 by Miss Islington (bot) in branch '3.8': bpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721) https://github.com/python/cpython/commit/e7c114df38eaef0cec3457f55835a2276eccbff6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:08:51 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:08:51 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091731.65.0.417516798915.issue37571@roundup.psfhosted.org> miss-islington added the comment: New changeset d7caf75c73626d7df4c0628c63761738b7063463 by Miss Islington (bot) in branch '3.7': bpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721) https://github.com/python/cpython/commit/d7caf75c73626d7df4c0628c63761738b7063463 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:09:05 2019 From: report at bugs.python.org (hai shi) Date: Sun, 14 Jul 2019 08:09:05 +0000 Subject: [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563091745.37.0.99971318949.issue37590@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14560 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:09:26 2019 From: report at bugs.python.org (hai shi) Date: Sun, 14 Jul 2019 08:09:26 +0000 Subject: [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563091766.64.0.4500275698.issue37590@roundup.psfhosted.org> hai shi added the comment: sorry, the upstair's comment is wrong PyEval_EvalFrameEx have been updated. so remove redundant info?`It is literally 2000 lines long.` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:09:48 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:09:48 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091788.0.0.198740343762.issue37571@roundup.psfhosted.org> Steve Dower added the comment: New changeset 68c74d05c1fdaf59d8711431884af975ac2ac5f8 by Steve Dower in branch 'master': bpo-37571: Remove extra space in ctypes docs (GH14764) https://github.com/python/cpython/commit/68c74d05c1fdaf59d8711431884af975ac2ac5f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:10:06 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:10:06 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091806.75.0.0450574516231.issue37571@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14561 pull_request: https://github.com/python/cpython/pull/14766 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:10:13 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:10:13 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091813.84.0.210522442738.issue37571@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14562 pull_request: https://github.com/python/cpython/pull/14767 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:14:38 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:14:38 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563092078.36.0.617003968045.issue37571@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the patch! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:16:23 2019 From: report at bugs.python.org (Larry Hastings) Date: Sun, 14 Jul 2019 08:16:23 +0000 Subject: [issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@ In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1563092183.24.0.101958989734.issue36742@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 4655d576141ee56a69d2052431c636858fcb916a by larryhastings (Steve Dower) in branch '3.5': bpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017) (#13042) https://github.com/python/cpython/commit/4655d576141ee56a69d2052431c636858fcb916a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:20:44 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:20:44 +0000 Subject: [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563092444.77.0.106745846436.issue37590@roundup.psfhosted.org> Steve Dower added the comment: I agree. This isn't important information for the documentation anyway. ---------- nosy: +steve.dower versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:21:50 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:21:50 +0000 Subject: [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563092510.75.0.130911550424.issue37590@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14563 pull_request: https://github.com/python/cpython/pull/14768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:23:00 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:23:00 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563092580.04.0.135100558209.issue37571@roundup.psfhosted.org> miss-islington added the comment: New changeset 4f733f48b48735231b79cd0f6605d3d0a2d5b511 by Miss Islington (bot) in branch '3.8': bpo-37571: Remove extra space in ctypes docs (GH14764) https://github.com/python/cpython/commit/4f733f48b48735231b79cd0f6605d3d0a2d5b511 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:24:30 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 14 Jul 2019 08:24:30 +0000 Subject: [issue37524] IDLE error on closing 3.8+ debug build In-Reply-To: <1562664018.55.0.0863283493597.issue37524@roundup.psfhosted.org> Message-ID: <1563092670.98.0.502708112265.issue37524@roundup.psfhosted.org> Tal Einat added the comment: > Doesn't reproduce on Win10 with current master. Sorry, my mistake; I meant to post that on #37551, and got mixed up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:24:38 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:24:38 +0000 Subject: [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563092678.45.0.43794433125.issue37571@roundup.psfhosted.org> miss-islington added the comment: New changeset 13c89f3c876363c44d35ec5f8dc374aecbca62a1 by Miss Islington (bot) in branch '3.7': bpo-37571: Remove extra space in ctypes docs (GH14764) https://github.com/python/cpython/commit/13c89f3c876363c44d35ec5f8dc374aecbca62a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:24:44 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 14 Jul 2019 08:24:44 +0000 Subject: [issue37551] IDLE: Quitting with a new, unsaved editor window causes an exception In-Reply-To: <1562785926.2.0.442729400594.issue37551@roundup.psfhosted.org> Message-ID: <1563092684.79.0.715896927863.issue37551@roundup.psfhosted.org> Tal Einat added the comment: Doesn't reproduce on Win10 with current master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:26:12 2019 From: report at bugs.python.org (hai shi) Date: Sun, 14 Jul 2019 08:26:12 +0000 Subject: [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563092772.19.0.910215947952.issue37590@roundup.psfhosted.org> hai shi added the comment: Thanks, Steve ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:30:31 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:30:31 +0000 Subject: [issue37553] SendfileUsingSendTest tests timeout too short for Windows ARM32 In-Reply-To: <1562802865.66.0.679596534727.issue37553@roundup.psfhosted.org> Message-ID: <1563093031.93.0.115514547627.issue37553@roundup.psfhosted.org> Steve Dower added the comment: New changeset 52c8c090870c4e45dc48d1991d7ef7de2e40b2a8 by Steve Dower (Paul Monson) in branch 'master': bpo-37553: SendfileUsingSendTest tests timeout too short for Windows ARM32 (GH-14716) https://github.com/python/cpython/commit/52c8c090870c4e45dc48d1991d7ef7de2e40b2a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:38:58 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jul 2019 08:38:58 +0000 Subject: [issue18049] Re-enable threading test on macOS In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1563093538.21.0.225330077778.issue18049@roundup.psfhosted.org> Ronald Oussoren added the comment: I've done some more testing, and the thread stack size could be smaller than 16MB, but definitely not as small as the value that's currently in thread_pthread.h. I prefer to have a slightly too large value here because IIRC the relation between the recursion limit and C stack usage is a heuristic. BTW. It should be possible to implement PyOS_CheckStack() on macOS. There are (undocumented) APIs in the public header files to get the stack base and size for the current thread. These APIs also work for the main thread: # --- #include #include int main(void) { printf("%#lx\n", (long)pthread_get_stacksize_np(pthread_self())); printf("%p\n", pthread_get_stackaddr_np(pthread_self())); } # --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:51:37 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:51:37 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1563094297.88.0.0996886960375.issue36044@roundup.psfhosted.org> Steve Dower added the comment: Looking at PR 14702, I would much rather update what `-m test --pgo` does than make this exclusive to Makefile. Back when we added the --pgo flag, the intent was always to move toward an equivalently good profile, but for practical reasons we settled at the time for "skip tests that break PGO". I know that will make the change far more skips throughout the test suite, so perhaps we want to change how --pgo works completely, but it would certainly be better to make --pgo do what it advertises than have multiple lists of PGO profiles. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:53:02 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 14 Jul 2019 08:53:02 +0000 Subject: [issue37559] IDLE: Scrolling issues with code context shown In-Reply-To: <1562839219.15.0.3914256467.issue37559@roundup.psfhosted.org> Message-ID: <1563094382.18.0.656395714405.issue37559@roundup.psfhosted.org> Tal Einat added the comment: Regarding point #4, scrolling by dragging the scrollbar, note that the current PR for adding line numbers (GH-14030) does effectively the same when dragging on the line numbers to select lines. Therefore, if/when that PR is merged, this will become more common. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:53:21 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:53:21 +0000 Subject: [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563094401.66.0.997383053377.issue37590@roundup.psfhosted.org> Steve Dower added the comment: New changeset 7a430109b983806c57babf229c60d0245d0b541c by Steve Dower (Miss Islington (bot)) in branch '3.8': bpo-37590: Remove redundant docs of PyEval_EvalFrameEx (GH-14765) https://github.com/python/cpython/commit/7a430109b983806c57babf229c60d0245d0b541c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:53:42 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:53:42 +0000 Subject: [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563094422.62.0.371745344942.issue37590@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:54:02 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:54:02 +0000 Subject: [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563094442.0.0.261309534151.issue37590@roundup.psfhosted.org> Steve Dower added the comment: The commit to master succeeded, but we missed the bpo number in the message, which is why it didn't appear here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:57:09 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 14 Jul 2019 08:57:09 +0000 Subject: [issue37559] IDLE: Scrolling issues with code context shown In-Reply-To: <1562839219.15.0.3914256467.issue37559@roundup.psfhosted.org> Message-ID: <1563094629.78.0.0708052970379.issue37559@roundup.psfhosted.org> Tal Einat added the comment: > One way to prevent the bouncing is to fix the CC height, like it used to be. +1 from me. I find this behavior very distracting and unnatural. I suggest we do consider reverting rather than adding another config value (minimum context lines), working towards our goal of simplicity and friendliness to novices and new users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:02:19 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 09:02:19 +0000 Subject: [issue22121] Start IDLE from icon in a better place. In-Reply-To: <1406966032.01.0.548285467026.issue22121@psf.upfronthosting.co.za> Message-ID: <1563094939.61.0.517676201703.issue22121@roundup.psfhosted.org> Steve Dower added the comment: > Steve, there is a problem in both lines of this suggestion. The only problem is that you ran from your own build. Once running from an installed layout (which you can now easily generate with `python.bat PC\layout --preset-default --copy `), the comparison will be fine. I think it's fair to assume that the new users we are concerned about are *not* building Python from source :) Otherwise, there's still my suggestion of a command line option to specify the start directory - e.g. --start-in-home - that we can put into the shortcut so it only affects GUI launches and not command line launches. (Though this idea may not be possible with the Store package, as the shortcut is the same for both Start and command line.) Besides those two options, I don't know of another way to make this work. So we either need to choose one of them, choose not to fix it, or wait for someone to come up with something new. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:03:36 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 09:03:36 +0000 Subject: [issue22121] Start IDLE from icon in a better place. In-Reply-To: <1406966032.01.0.548285467026.issue22121@psf.upfronthosting.co.za> Message-ID: <1563095016.96.0.382128298232.issue22121@roundup.psfhosted.org> Steve Dower added the comment: > NameError: name 'get_default_location' is not defined Also, this was a hypothetical function that you would implement in IDLE to determine whatever the default location ought to be. I'm personally happy to stay out of that part of the argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:06:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 09:06:09 +0000 Subject: [issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path In-Reply-To: <1513750045.01.0.213398074469.issue32381@psf.upfronthosting.co.za> Message-ID: <1563095169.92.0.869874234925.issue32381@roundup.psfhosted.org> STINNER Victor added the comment: Hum. In fact, this problem can be fixed differently: modify PyRun_xxx() functions to pass the filename as an Unicode string. Maybe pass it as a wchar_t* string or even a Python str object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:07:14 2019 From: report at bugs.python.org (Larry Hastings) Date: Sun, 14 Jul 2019 09:07:14 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1563095234.47.0.95148932591.issue30458@roundup.psfhosted.org> Larry Hastings added the comment: New changeset afe3a4975cf93c97e5d6eb8800e48f368011d37a by larryhastings (Miro Hron?ok) in branch '3.5': bpo-30458: Disallow control chars in http URLs. (GH-12755) (#13207) https://github.com/python/cpython/commit/afe3a4975cf93c97e5d6eb8800e48f368011d37a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:08:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 09:08:25 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1563095305.39.0.877064019333.issue37549@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +lukasz.langa, ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:10:55 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 14 Jul 2019 09:10:55 +0000 Subject: [issue37551] IDLE: Quitting with a new, unsaved editor window causes an exception In-Reply-To: <1562785926.2.0.442729400594.issue37551@roundup.psfhosted.org> Message-ID: <1563095455.51.0.178712149119.issue37551@roundup.psfhosted.org> Tal Einat added the comment: This also happens on Ubuntu 18.10, with a traceback similar to that reported on issue #37524: Exception ignored in: Traceback (most recent call last): File "Lib/idlelib/run.py", line 488, in close File "Lib/idlelib/pyshell.py", line 1017, in close File "Lib/idlelib/editor.py", line 1019, in close File "Lib/idlelib/outwin.py", line 94, in maybesave File "Lib/idlelib/editor.py", line 952, in get_saved AttributeError: 'NoneType' object has no attribute 'get_saved' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:12:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 09:12:28 +0000 Subject: [issue37565] test_faulthandler failure In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1563095548.99.0.73106463486.issue37565@roundup.psfhosted.org> STINNER Victor added the comment: I don't know why you get a crash. Can you try attached sigusr1.py script? Expected output: $ python3 sigusr1.py called True ---------- Added file: https://bugs.python.org/file48479/sigusr1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:13:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 09:13:35 +0000 Subject: [issue37565] test_faulthandler failure In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1563095615.71.0.0395266104259.issue37565@roundup.psfhosted.org> STINNER Victor added the comment: > I found a similar error reported in RedHat bugzilla (1687171) and tried running the script provided by Victor Stinner Link: https://bugzilla.redhat.com/show_bug.cgi?id=1687171 > and this closed issue on GitHub seems like it might be related? #32 because of the Skylake chipset. I guess that you mean: https://github.com/vstinner/faulthandler/issues/36 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:17:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 09:17:13 +0000 Subject: [issue37570] [Windows] distutils.util.byte_compile() fails indirect byte compiling with non-ASCII full-path In-Reply-To: <1562898531.08.0.918115667827.issue37570@roundup.psfhosted.org> Message-ID: <1563095833.97.0.320151050628.issue37570@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: `distutils.util.byte_compile` fails indirect byte compiling with non-ASCII full-path. -> [Windows] distutils.util.byte_compile() fails indirect byte compiling with non-ASCII full-path _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:17:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 09:17:26 +0000 Subject: [issue37570] [Windows] distutils.util.byte_compile() fails indirect byte compiling with non-ASCII full-path In-Reply-To: <1562898531.08.0.918115667827.issue37570@roundup.psfhosted.org> Message-ID: <1563095846.72.0.27533240446.issue37570@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:27:43 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jul 2019 09:27:43 +0000 Subject: [issue18049] Re-enable threading test on macOS In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1563096463.97.0.40530665023.issue18049@roundup.psfhosted.org> Ronald Oussoren added the comment: W.r.t. PyOS_CheckStack: I had that idea last year as well, and someone contributed a pull request, see issue33955. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:37:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 09:37:35 +0000 Subject: [issue37583] Got a 113 error when running the test_socket In-Reply-To: <1563006871.17.0.626459715079.issue37583@roundup.psfhosted.org> Message-ID: <1563097054.99.0.0761994272087.issue37583@roundup.psfhosted.org> STINNER Victor added the comment: Can you copy/paste the full output of test_socket, or better: of the whole test suite? Put it in a file and attach it to the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:46:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 09:46:51 +0000 Subject: [issue21992] New AST node Else() should be introduced In-Reply-To: <1405527228.32.0.961029538035.issue21992@psf.upfronthosting.co.za> Message-ID: <1563097611.44.0.788449069927.issue21992@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +inada.naoki, pablogsal, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:47:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 09:47:13 +0000 Subject: [issue21992] New AST node Else() should be introduced In-Reply-To: <1405527228.32.0.961029538035.issue21992@psf.upfronthosting.co.za> Message-ID: <1563097633.52.0.43251473757.issue21992@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:49:57 2019 From: report at bugs.python.org (Ulf Rompe) Date: Sun, 14 Jul 2019 09:49:57 +0000 Subject: [issue25433] whitespace in strip()/lstrip()/rstrip() In-Reply-To: <1445170536.34.0.94220475409.issue25433@psf.upfronthosting.co.za> Message-ID: <1563097797.08.0.349616013947.issue25433@roundup.psfhosted.org> Change by Ulf Rompe : ---------- pull_requests: +14564 pull_request: https://github.com/python/cpython/pull/14771 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:54:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 09:54:17 +0000 Subject: [issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@ In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1563098057.67.0.81020890048.issue36742@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +14565 pull_request: https://github.com/python/cpython/pull/14772 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 06:04:38 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sun, 14 Jul 2019 10:04:38 +0000 Subject: [issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time In-Reply-To: <1562995541.72.0.689612631399.issue37579@roundup.psfhosted.org> Message-ID: <1563098678.82.0.41304115622.issue37579@roundup.psfhosted.org> Change by Paul Ganssle : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 06:14:03 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 10:14:03 +0000 Subject: [issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time In-Reply-To: <1562995541.72.0.689612631399.issue37579@roundup.psfhosted.org> Message-ID: <1563099243.2.0.91591950344.issue37579@roundup.psfhosted.org> miss-islington added the comment: New changeset c6b31061997526b31961ec34328408ca421f51fc by Miss Islington (bot) (Xtreak) in branch '3.7': [3.7] bpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726) (GH-14745) https://github.com/python/cpython/commit/c6b31061997526b31961ec34328408ca421f51fc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 06:26:44 2019 From: report at bugs.python.org (Arnold Dumas) Date: Sun, 14 Jul 2019 10:26:44 +0000 Subject: [issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys In-Reply-To: <1429890469.94.0.27310602141.issue24053@psf.upfronthosting.co.za> Message-ID: <1563100004.17.0.463917287249.issue24053@roundup.psfhosted.org> Change by Arnold Dumas : ---------- pull_requests: +14566 pull_request: https://github.com/python/cpython/pull/14773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 06:30:19 2019 From: report at bugs.python.org (hai shi) Date: Sun, 14 Jul 2019 10:30:19 +0000 Subject: [issue37583] Got a 113 error when running the test_socket In-Reply-To: <1563006871.17.0.626459715079.issue37583@roundup.psfhosted.org> Message-ID: <1563100219.57.0.186690629042.issue37583@roundup.psfhosted.org> hai shi added the comment: sure, i copied the full output of test_socket. more failed test case looks like need add two property functions. ---------- Added file: https://bugs.python.org/file48480/test_socket_fail_info.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 06:31:59 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jul 2019 10:31:59 +0000 Subject: [issue30757] pyinstaller can be added to docs, py2exe ref can be updated In-Reply-To: <1498451168.27.0.593036349197.issue30757@psf.upfronthosting.co.za> Message-ID: <1563100319.04.0.307712554029.issue30757@roundup.psfhosted.org> Ronald Oussoren added the comment: Please also add a reference to py2app (at least of the programming FAQ as py2app is macOS-only). ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 06:47:32 2019 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Jul 2019 10:47:32 +0000 Subject: [issue21861] io class name are hardcoded in reprs In-Reply-To: <1403631418.74.0.109096243494.issue21861@psf.upfronthosting.co.za> Message-ID: <1563101252.84.0.263668049357.issue21861@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14567 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14774 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 07:12:59 2019 From: report at bugs.python.org (Maayan Keshet) Date: Sun, 14 Jul 2019 11:12:59 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1563102779.82.0.0613585880711.issue37226@roundup.psfhosted.org> Maayan Keshet added the comment: Hey Ben! Unfortunately our use case is too involved to distill into a neat example. We use a websocket library (autobahn) to connect to a server of a 3rd party which is outside our control (which is not written in python, but rather node.js). We receive the errors on our client. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 07:58:14 2019 From: report at bugs.python.org (Ulf Rompe) Date: Sun, 14 Jul 2019 11:58:14 +0000 Subject: [issue25433] whitespace in strip()/lstrip()/rstrip() In-Reply-To: <1445170536.34.0.94220475409.issue25433@psf.upfronthosting.co.za> Message-ID: <1563105494.94.0.460456675665.issue25433@roundup.psfhosted.org> Change by Ulf Rompe : ---------- pull_requests: +14569 pull_request: https://github.com/python/cpython/pull/14775 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 08:15:36 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 12:15:36 +0000 Subject: [issue34749] improve performance of binascii.a2b_base64() In-Reply-To: <1537443910.98.0.956365154283.issue34749@psf.upfronthosting.co.za> Message-ID: <1563106536.05.0.717769516202.issue34749@roundup.psfhosted.org> miss-islington added the comment: New changeset 1c5e68e7145f0825f9b952389141edb9436eb43d by Miss Islington (bot) (Sergey Fedoseev) in branch 'master': bpo-34749: Improved performance of binascii.a2b_base64(). (GH-9444) https://github.com/python/cpython/commit/1c5e68e7145f0825f9b952389141edb9436eb43d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 08:19:30 2019 From: report at bugs.python.org (Martin Bammer) Date: Sun, 14 Jul 2019 12:19:30 +0000 Subject: [issue37591] test_concurrent_future failed Message-ID: <1563106770.47.0.449024295444.issue37591@roundup.psfhosted.org> New submission from Martin Bammer : When building Python 3.7.4 from source on Ubuntu 18.10 I'm getting the following error: 0:04:38 load avg: 2.40 [ 78/416] test_complex 0:04:39 load avg: 2.40 [ 79/416] test_concurrent_futures Traceback: Thread 0x00007f936b7fe700 (most recent call first): File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 296 in wait File "/media/Daten/src/Python-3.7.4/Lib/multiprocessing/queues.py", line 224 in _feed File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 870 in run File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 926 in _bootstrap_inner File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 890 in _bootstrap Thread 0x00007f93487fc700 (most recent call first): File "/media/Daten/src/Python-3.7.4/Lib/selectors.py", line 415 in select File "/media/Daten/src/Python-3.7.4/Lib/multiprocessing/connection.py", line 920 in wait File "/media/Daten/src/Python-3.7.4/Lib/concurrent/futures/process.py", line 361 in _queue_management_worker File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 870 in run File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 926 in _bootstrap_inner File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 890 in _bootstrap Current thread 0x00007f9396eb5140 (most recent call first): File "/media/Daten/src/Python-3.7.4/Lib/test/test_concurrent_futures.py", line 917 in _fail_on_deadlock File "/media/Daten/src/Python-3.7.4/Lib/test/test_concurrent_futures.py", line 978 in test_crash File "/media/Daten/src/Python-3.7.4/Lib/unittest/case.py", line 628 in run File "/media/Daten/src/Python-3.7.4/Lib/unittest/case.py", line 676 in __call__ File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 122 in run File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 84 in __call__ File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 122 in run File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 84 in __call__ File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 122 in run File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 84 in __call__ File "/media/Daten/src/Python-3.7.4/Lib/test/support/testresult.py", line 162 in run File "/media/Daten/src/Python-3.7.4/Lib/test/support/__init__.py", line 1915 in _run_suite File "/media/Daten/src/Python-3.7.4/Lib/test/support/__init__.py", line 2011 in run_unittest File "/media/Daten/src/Python-3.7.4/Lib/test/test_concurrent_futures.py", line 1245 in test_main File "/media/Daten/src/Python-3.7.4/Lib/test/support/__init__.py", line 2143 in decorator File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 228 in _runtest_inner2 File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 264 in _runtest_inner File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 149 in _runtest File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 187 in runtest File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/main.py", line 390 in run_tests_sequential File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/main.py", line 488 in run_tests File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/main.py", line 642 in _main File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/main.py", line 588 in main File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/main.py", line 663 in main File "/media/Daten/src/Python-3.7.4/Lib/test/regrtest.py", line 46 in _main File "/media/Daten/src/Python-3.7.4/Lib/test/regrtest.py", line 50 in File "/media/Daten/src/Python-3.7.4/Lib/runpy.py", line 85 in _run_code File "/media/Daten/src/Python-3.7.4/Lib/runpy.py", line 193 in _run_module_as_main test test_concurrent_futures failed 0:07:27 load avg: 2.55 [ 80/416] test_configparser -- test_concurrent_futures failed in 2 min 47 sec 0:07:29 load avg: 2.75 [ 81/416] test_contains Commands executed for the build: ./configure --enable-optimizations --prefix=/opt/python-3.7.4 make -j8 ---------- components: Build messages: 347908 nosy: Martin Bammer priority: normal severity: normal status: open title: test_concurrent_future failed type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 08:57:30 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jul 2019 12:57:30 +0000 Subject: [issue15730] Silence unused value warnings under Mac OS X 10.8/clang In-Reply-To: <1345423593.46.0.41871412241.issue15730@psf.upfronthosting.co.za> Message-ID: <1563109050.77.0.868121597959.issue15730@roundup.psfhosted.org> Ronald Oussoren added the comment: I'm closing this as out of date. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:01:08 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jul 2019 13:01:08 +0000 Subject: [issue34105] test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6 In-Reply-To: <1531421390.98.0.56676864532.issue34105@psf.upfronthosting.co.za> Message-ID: <1563109268.33.0.654815147421.issue34105@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:10:33 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 14 Jul 2019 13:10:33 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <1563040436.19.0.276806879722.issue37588@roundup.psfhosted.org> Message-ID: <1563109833.71.0.536085207257.issue37588@roundup.psfhosted.org> Zackery Spytz added the comment: > I would like some way of locally suppressing Py_DEPRECATED. There was some discussion (and a pull request) on bpo-19569. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:12:08 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 14 Jul 2019 13:12:08 +0000 Subject: [issue37291] AST - code cleanup In-Reply-To: <1560598249.35.0.0160143221148.issue37291@roundup.psfhosted.org> Message-ID: <1563109928.45.0.491555255277.issue37291@roundup.psfhosted.org> Zackery Spytz added the comment: The linked PR was merged, so I think this issue can be closed. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:19:46 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jul 2019 13:19:46 +0000 Subject: [issue37344] plistlib doesn't skip whitespace in XML format detection In-Reply-To: <1560986315.2.0.263815565154.issue37344@roundup.psfhosted.org> Message-ID: <1563110386.71.0.338469963199.issue37344@roundup.psfhosted.org> Ronald Oussoren added the comment: I don't agree with calling lstrip() before checking which format is used because leading whitespace is invalid for binary plist files (and plutil agrees with me on that). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:26:18 2019 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Jul 2019 13:26:18 +0000 Subject: [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563110778.45.0.672069800364.issue7940@roundup.psfhosted.org> Ezio Melotti added the comment: The current behavior is inconsistent because the start position accepts both positive and negative indices, whereas the end position only accepts positive indices. I think the proposal and the PR written by Anil are reasonable and should be merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:56:29 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jul 2019 13:56:29 +0000 Subject: [issue15898] OSX TTY bug In-Reply-To: <1347238694.31.0.649838162085.issue15898@psf.upfronthosting.co.za> Message-ID: <1563112589.32.0.0147013788102.issue15898@roundup.psfhosted.org> Ronald Oussoren added the comment: This is IMHO not a bug in Python, the problem can been seen when you rewrite the code in msg170261 in C, see the code below. An observation with the C code below: Both moving ``close(slave)`` to above the sleep or removing that close entirely fixes the problem for me. Likewise with adding ``usleep(700000);`` to the child before exiting. It is unclear to me who's at fault here, this could be a bug in the macOS kernel but could also be a bug in this code. It looks like the output is lost when ``close(slave)`` happens after the child proces has exited. BTW. All testing was done on macOS 10.14.5, with python 3.8. Anyway: I propose closing this issue because this is not a bug in CPython. /* The C code used to test system behaviour */ #include #include #include #include #include int main(void) { int master, slave; int r; pid_t pid; r = openpty(&master, &slave, NULL, NULL, NULL); if (r == -1) { perror("openpty"); exit(1); } pid = fork(); if (pid == 0) { /* child */ setsid(); close(master); dup2(slave, 0); dup2(slave, 1); dup2(slave, 2); close(slave); write(1, "testing", 7); _exit(255); } else { /* parent */ char buf[1024]; usleep(500000); /* 0.5 */ close(slave); r = read(master, buf, 1024); if (r == -1) { perror("read"); exit(1); } printf("%d\n", r); write(1, buf, r); kill(pid, SIGKILL); } } ---------- resolution: -> not a bug status: open -> pending versions: +Python 3.7, Python 3.8, Python 3.9 -Python 2.6, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:01:58 2019 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Jul 2019 14:01:58 +0000 Subject: [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563112918.31.0.236227535878.issue7940@roundup.psfhosted.org> Ezio Melotti added the comment: Sorry, I was wrong. re.findall accepts negative indices for both start and end but they silently get converted to 0, which is arguably an unexpected behavior. This is an example of the current behavior: >>> s, e = 1, 4; re.compile('.').findall('abcde', s, e), 'abcde'[s:e] (['b', 'c', 'd'], 'bcd') >>> s, e = -4, 4; re.compile('.').findall('abcde', s, e), 'abcde'[s:e] (['a', 'b', 'c', 'd'], 'bcd') >>> s, e = 1, -1; re.compile('.').findall('abcde', s, e), 'abcde'[s:e] ([], 'bcd') >>> s, e = -4, -1; re.compile('.').findall('abcde', s, e), 'abcde'[s:e] ([], 'bcd') With the patch, all these return ['b', 'c', 'd']. This change might indeed cause issues because it's a change in behavior, but I'm also not sure there are many cases where one would want a negative index to be treated as 0. Maybe we could raise a FutureWarning in the next release and change the behavior afterwards? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:03:59 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jul 2019 14:03:59 +0000 Subject: [issue33450] unexpected EPROTOTYPE returned by sendto on MAC OSX In-Reply-To: <1525892699.63.0.682650639539.issue33450@psf.upfronthosting.co.za> Message-ID: <1563113039.05.0.669991099751.issue33450@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- assignee: -> ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:18:09 2019 From: report at bugs.python.org (Carl Bordum Hansen) Date: Sun, 14 Jul 2019 14:18:09 +0000 Subject: [issue37592] sysconfig should not rely on sys.version Message-ID: <1563113889.28.0.678925745587.issue37592@roundup.psfhosted.org> New submission from Carl Bordum Hansen : I found this FIXME and replaced it with code that follows the git tags naming scheme. ---------- components: Library (Lib) messages: 347916 nosy: carlbordum, tarek priority: normal severity: normal status: open title: sysconfig should not rely on sys.version type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:19:03 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 14 Jul 2019 14:19:03 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1563113943.3.0.203121976473.issue36044@roundup.psfhosted.org> Gregory P. Smith added the comment: As far as where to put the lists of tests, you're probably right. putting it within test.regrtest itself under the --pgo banner makes sense. (though we should keep logic to accept a list of explicit tests to add or exclude if the user has also provided those) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:20:50 2019 From: report at bugs.python.org (Carl Bordum Hansen) Date: Sun, 14 Jul 2019 14:20:50 +0000 Subject: [issue37592] sysconfig should not rely on sys.version In-Reply-To: <1563113889.28.0.678925745587.issue37592@roundup.psfhosted.org> Message-ID: <1563114050.87.0.950231138739.issue37592@roundup.psfhosted.org> Change by Carl Bordum Hansen : ---------- keywords: +patch pull_requests: +14570 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14776 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:21:50 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2019 14:21:50 +0000 Subject: [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563114110.09.0.775963832634.issue7940@roundup.psfhosted.org> Serhiy Storchaka added the comment: Are there any real world examples which show the benefit of supporting negative indices? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:30:25 2019 From: report at bugs.python.org (Carl Bordum Hansen) Date: Sun, 14 Jul 2019 14:30:25 +0000 Subject: [issue30588] Missing documentation for codecs.escape_decode In-Reply-To: <1496847775.57.0.842403144977.issue30588@psf.upfronthosting.co.za> Message-ID: <1563114625.78.0.0980212797751.issue30588@roundup.psfhosted.org> Carl Bordum Hansen added the comment: You have a point, the function is not in codecs.__all__. Reading the stackoverflow questions, it seems like this is a function that is useful. ---------- nosy: +carlbordum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:30:45 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2019 14:30:45 +0000 Subject: [issue37344] plistlib doesn't skip whitespace in XML format detection In-Reply-To: <1560986315.2.0.263815565154.issue37344@roundup.psfhosted.org> Message-ID: <1563114645.78.0.536477167972.issue37344@roundup.psfhosted.org> Serhiy Storchaka added the comment: lstrip() would not work with UTF-16 encoded plist files neither with BOM. Who produces plist files with leading whitespaces? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:40:43 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jul 2019 14:40:43 +0000 Subject: [issue37344] plistlib doesn't skip whitespace in XML format detection In-Reply-To: <1560986315.2.0.263815565154.issue37344@roundup.psfhosted.org> Message-ID: <1563115243.83.0.0226343643202.issue37344@roundup.psfhosted.org> Ronald Oussoren added the comment: @shaneg, could you elaborate on why you created this issue? I don't know of tooling that would generate such files, and it is highly unlikely that Apple's system tooling/libraries would do so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:55:14 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2019 14:55:14 +0000 Subject: [issue30588] Missing documentation for codecs.escape_decode In-Reply-To: <1496847775.57.0.842403144977.issue30588@psf.upfronthosting.co.za> Message-ID: <1563116114.73.0.602236337626.issue30588@roundup.psfhosted.org> Serhiy Storchaka added the comment: Reading the stackoverflow questions, I am not sure that this function would be useful for the author of the question. He just needs to remove b'\\000', this is only what we know. There are many ways to do it, and after using codecs.escape_decode() you will need to remove b'\000'. If you want to add a feature similar to the "string-escape" codec in Python 3, it is better to provide it officially as a new codec "bytes-escape" (functions like codecs.utf_16_le_decode() are internal). But we should discuss its behavior taking to account the difference between string literals in Python 2 and bytes literals in Python 3. For example how to treat non-escaped non-ascii bytes (they where acceptable in Python 2, but not in Python 3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:56:19 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2019 14:56:19 +0000 Subject: [issue37291] AST - code cleanup In-Reply-To: <1560598249.35.0.0160143221148.issue37291@roundup.psfhosted.org> Message-ID: <1563116179.92.0.273802887168.issue37291@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 12:10:14 2019 From: report at bugs.python.org (Shane G) Date: Sun, 14 Jul 2019 16:10:14 +0000 Subject: [issue37344] plistlib doesn't skip whitespace in XML format detection In-Reply-To: <1560986315.2.0.263815565154.issue37344@roundup.psfhosted.org> Message-ID: <1563120614.12.0.609607663194.issue37344@roundup.psfhosted.org> Shane G added the comment: This issue was created because I ran across a plist like this when parsing entitlements in an IPA. I assume that this happened by some unusual step in the toolchain when building the application. To some other points: * agreed lstrip()ing just the key would not work (unfortunately I suggested this before actually coding up a workaround for my case). * agreed that binary plists should not have any stripping. * I have not tried testing apple tools (e.g. plutil) against XML plists with BOMs before any leading whitespace. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 12:13:50 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jul 2019 16:13:50 +0000 Subject: [issue37344] plistlib doesn't skip whitespace in XML format detection In-Reply-To: <1560986315.2.0.263815565154.issue37344@roundup.psfhosted.org> Message-ID: <1563120830.75.0.64266358278.issue37344@roundup.psfhosted.org> Ronald Oussoren added the comment: You can always strip the file yourself :-) Ignoring leading whitespace for XML would be fairly invasive due to the way the code is set up. I'm not set against it, but I'm not in favour of complicating the implementation for an edge case like this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 12:35:42 2019 From: report at bugs.python.org (B Siemerink) Date: Sun, 14 Jul 2019 16:35:42 +0000 Subject: [issue37482] Email address display name fails with both encoded words and special chars In-Reply-To: <1562068275.57.0.247896906946.issue37482@roundup.psfhosted.org> Message-ID: <1563122142.48.0.206002740104.issue37482@roundup.psfhosted.org> B Siemerink added the comment: Yes, you are right! The fix is to encode the special characters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 13:08:12 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2019 17:08:12 +0000 Subject: [issue21992] New AST node Else() should be introduced In-Reply-To: <1405527228.32.0.961029538035.issue21992@psf.upfronthosting.co.za> Message-ID: <1563124092.39.0.102591927668.issue21992@roundup.psfhosted.org> Serhiy Storchaka added the comment: In general case the AST does not preserve detailed information about all syntactic elements. For example in the AST for `a + b` does not include lineno and col_offset for "+". >>> ast.dump(ast.parse('a + b'), include_attributes=True) "Module(body=[Expr(value=BinOp(left=Name(id='a', ctx=Load(), lineno=1, col_offset=0, end_lineno=1, end_col_offset=1), op=Add(), right=Name(id='b', ctx=Load(), lineno=1, col_offset=4, end_lineno=1, end_col_offset=5), lineno=1, col_offset=0, end_lineno=1, end_col_offset=5), lineno=1, col_offset=0, end_lineno=1, end_col_offset=5)], type_ignores=[])" But in most cases you can determine it from the position of the surrounded nodes. "+" lies between the end of BinOp.left and the beginning of BinOp.right, i.e. between columns 1 and 4 at line 1. What is left is to count the number of whitespace character before and after "+" to determine its exact position. The same method you can use to find the position of the "else" keyword. It is easier in 3.8 since the AST contains now also the position of the end of the node (end_lineno and end_col_offset). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 13:31:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 17:31:24 +0000 Subject: [issue37473] importlib: Remove libregrtest hack: "We import importlib *ASAP* in order to test #15386" In-Reply-To: <1561994692.63.0.367663564424.issue37473@roundup.psfhosted.org> Message-ID: <1563125484.55.0.213985561936.issue37473@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8b7db5a1114e2113a756bdf8877fbe366055c69a by Victor Stinner in branch 'master': bpo-37473: Don't import importlib ASAP in tests (GH-14661) https://github.com/python/cpython/commit/8b7db5a1114e2113a756bdf8877fbe366055c69a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 13:31:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 17:31:24 +0000 Subject: [issue15386] Still getting two copies of importlib._bootstrap In-Reply-To: <1342611094.8.0.638334167677.issue15386@psf.upfronthosting.co.za> Message-ID: <1563125484.7.0.00453297697029.issue15386@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8b7db5a1114e2113a756bdf8877fbe366055c69a by Victor Stinner in branch 'master': bpo-37473: Don't import importlib ASAP in tests (GH-14661) https://github.com/python/cpython/commit/8b7db5a1114e2113a756bdf8877fbe366055c69a ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 13:32:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Jul 2019 17:32:22 +0000 Subject: [issue37473] importlib: Remove libregrtest hack: "We import importlib *ASAP* in order to test #15386" In-Reply-To: <1561994692.63.0.367663564424.issue37473@roundup.psfhosted.org> Message-ID: <1563125542.15.0.240662017818.issue37473@roundup.psfhosted.org> STINNER Victor added the comment: I merged your PR. If someone considers than test_there_can_be_only_one() is not enough, please add a new test. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 13:39:24 2019 From: report at bugs.python.org (M. Anil Tuncel) Date: Sun, 14 Jul 2019 17:39:24 +0000 Subject: [issue19820] docs are missing info about module attributes In-Reply-To: <1385620941.03.0.287546381963.issue19820@psf.upfronthosting.co.za> Message-ID: <1563125964.82.0.782463579164.issue19820@roundup.psfhosted.org> M. Anil Tuncel added the comment: Are they still missing? inspect.ismodule() seems to be there at least. https://docs.python.org/3/library/inspect.html ---------- nosy: +anilbey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 13:45:20 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Jul 2019 17:45:20 +0000 Subject: [issue37559] IDLE: Scrolling issues with code context shown In-Reply-To: <1562839219.15.0.3914256467.issue37559@roundup.psfhosted.org> Message-ID: <1563126320.29.0.937068094135.issue37559@roundup.psfhosted.org> Terry J. Reedy added the comment: Whereas I found the fixed size to be much less usable. The default of 3 lines was too few and often useless when context is needed whereas a realistic size of, say, 8, wasted too much space too much of the time. I might prefer deleting the feature to reverting. It is probably a good thing to have 2 developers with different visual processing systems ;-). With integral lines at the top of the text, scrolling one line down with a header line at the top means that the header line stays put while the background changes and the separator lines moves. A dedent line moves up as the context shrinks. I *like* the CC size changes because the size indicates the indent depth. Changing the general tab line from Max context lines: [ ] to Code context lines: min [ ] max [ ] strike me as an improvement even without adding min, and the somewhat obvious addition of min (it is currently fixed at 1) should not confuse users. The scrollbar slider bobble does not bother me much when scrolling with key or mouse wheel because I hardly see it. My eyes are focused on the text. Another possible solution is suppressing CC update at least while the mouse button is held down over the scrollbar. Button down/up on the scrollbar instance sets text.pause_CC to True/False and CC update checks self.text.pauseCC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 14:55:37 2019 From: report at bugs.python.org (Benjamin S Wolf) Date: Sun, 14 Jul 2019 18:55:37 +0000 Subject: [issue37593] ast.arguments has confusing args/posonlyargs ordering Message-ID: <1563130537.16.0.669672983776.issue37593@roundup.psfhosted.org> New submission from Benjamin S Wolf : Positional-only arguments come before position-or-keyword arguments. def f(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2): However, the posonlyargs are defined to come after args in the AST: arguments = (arg* args, arg* posonlyargs, arg? vararg, arg* kwonlyargs, expr* kw_defaults, arg? kwarg, expr* defaults) which results in confusing ast.dump output because they share defaults: >>> r = ast.parse('lambda a=1,/,b=2:a+b', mode='eval') >>> ast.dump(r.body.args) "arguments( args=[arg(arg='b', annotation=None, type_comment=None)], posonlyargs=[arg(arg='a', annotation=None, type_comment=None)], vararg=None, kwonlyargs=[], kw_defaults=[], kwarg=None, defaults=[Constant(value=1, kind=None), Constant(value=2, kind=None)])" [manually prettified] Note how the ordering is 'args b', then 'posonlyargs a', but the defaults are still 1 then 2. This can be confusing to someone building an ast.arguments using keywords because the elements in 'defaults' have to be supplied in a specific order, but the keyword args 'args' and 'posonlyargs' do not, or to someone building an ast.arguments using positional arguments (because, maybe ironically, they're not keyword-only arguments) because 'posonlyargs' and 'args' must be supplied in a different order than the ordering of elements in 'defaults' would imply. Potential solutions: 1. Swap posonlyargs and args. 2. Add a separate pos_defaults list. ---------- messages: 347932 nosy: Benjamin.S.Wolf priority: normal severity: normal status: open title: ast.arguments has confusing args/posonlyargs ordering type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 15:27:31 2019 From: report at bugs.python.org (brent s.) Date: Sun, 14 Jul 2019 19:27:31 +0000 Subject: [issue37594] re does not honor matching trailing multiple periods Message-ID: <1563132450.99.0.557456146194.issue37594@roundup.psfhosted.org> New submission from brent s. : (Sorry for the title; not quite sure how to summarize this) SO! Have I got an interesting one for you. ISSUE: In release 3.7.3 (and possibly later), the re module, if one has a string e.g. 'a.b.', a pattern such as '\.*$' will successfully *match* any number of multiple trailing periods. HOWEVER, when attempting to substitute those with actual character(s), it chokes. See attached poc.py NOTES: - This *is a regression* from 2.6.6, 2.7.16, and 3.6.7 (other releases were not tested). This behaviour does not occur on those versions. ---------- components: Library (Lib) files: example.py messages: 347933 nosy: bsaner priority: normal severity: normal status: open title: re does not honor matching trailing multiple periods versions: Python 3.7 Added file: https://bugs.python.org/file48481/example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 15:29:11 2019 From: report at bugs.python.org (brent s.) Date: Sun, 14 Jul 2019 19:29:11 +0000 Subject: [issue37594] re does not honor matching trailing multiple periods In-Reply-To: <1563132450.99.0.557456146194.issue37594@roundup.psfhosted.org> Message-ID: <1563132551.82.0.119701863962.issue37594@roundup.psfhosted.org> brent s. added the comment: Sorry- by "chokes", I mean "substitutes in multiple replacements". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 15:34:49 2019 From: report at bugs.python.org (brent s.) Date: Sun, 14 Jul 2019 19:34:49 +0000 Subject: [issue37594] re does not honor matching trailing multiple periods In-Reply-To: <1563132450.99.0.557456146194.issue37594@roundup.psfhosted.org> Message-ID: <1563132889.7.0.625392318768.issue37594@roundup.psfhosted.org> brent s. added the comment: WORKAROUND: Obviously, str.rstrip('.') still works, but this is of course quite inflexible compared to a regex pattern. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 15:39:26 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 14 Jul 2019 19:39:26 +0000 Subject: [issue37594] re does not honor matching trailing multiple periods In-Reply-To: <1563132450.99.0.557456146194.issue37594@roundup.psfhosted.org> Message-ID: <1563133166.14.0.0301275769811.issue37594@roundup.psfhosted.org> Eric V. Smith added the comment: '\.' is an invalid escape sequence. Could you try it with a raw string? Also, it's not really clear to me what you're seeing, vs. what you expect to see. For one example that you think is incorrect, could you show what you get vs. what you expect to get? And, if that's different on different python versions, could you show what each version does? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 16:00:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2019 20:00:43 +0000 Subject: [issue37594] re does not honor matching trailing multiple periods In-Reply-To: <1563132450.99.0.557456146194.issue37594@roundup.psfhosted.org> Message-ID: <1563134443.01.0.267464501588.issue37594@roundup.psfhosted.org> Serhiy Storchaka added the comment: This change was intentional and documented. It fixed old bug in the Python implementation of RE and removed the discrepancy with other RE engines. The pattern r'\.*$' matches not only a sequence of dots at the of the line, but also an empty string at the end of line. If this is not what you want, use r'\.+$'. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 16:06:39 2019 From: report at bugs.python.org (Eric O. LEBIGOT) Date: Sun, 14 Jul 2019 20:06:39 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563134799.75.0.612287238944.issue30550@roundup.psfhosted.org> Eric O. LEBIGOT added the comment: Kyle, what you're saying is correct but is unfortunately unrelated to any of the points in the original issue. In fact, the JSON encoder does preserve whatever order the dictionary elements are in, and it would be useful to document this. Thus, if a user gives an OrderedDict (or a dict with a known order, in Python 3.7+), it is useful that he know that the order of its elements will not be changed upon transformation into JSON. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 16:22:02 2019 From: report at bugs.python.org (Alex Gaynor) Date: Sun, 14 Jul 2019 20:22:02 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563135722.25.0.650009196676.issue37461@roundup.psfhosted.org> Change by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 16:25:43 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Jul 2019 20:25:43 +0000 Subject: [issue37593] ast.arguments has confusing args/posonlyargs ordering In-Reply-To: <1563130537.16.0.669672983776.issue37593@roundup.psfhosted.org> Message-ID: <1563135943.53.0.162183063775.issue37593@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +levkivskyi, pablogsal, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 16:28:42 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 14 Jul 2019 20:28:42 +0000 Subject: [issue28009] core logic of uuid.getnode() needs refresh In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1563136122.66.0.626834283427.issue28009@roundup.psfhosted.org> Tal Einat added the comment: >> The current code and proposed changes use 'netstat -ia' to find the node however if netstat needs to perform a reverse DNS query to resolve some interfaces this makes using uuid1 *really* slow especially when reverse DNS queries aren't set up correctly or timeout. >> mac = _find_mac_netstat('netstat', '-ia', b'Address', lambda i: i) >> >> Would it be possible to change the netstat call to add 'n' to the nestat options, i.e. _find_mac_netstat('netstat', '-ian', ...) to prevent netstat from attempting to resolve addresses? > Sounds like an excellent idea. Gives me a reason to get started again. Thx! I don't see this in PR GH-28009; should this change be made? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 17:07:28 2019 From: report at bugs.python.org (Elizabeth Uselton) Date: Sun, 14 Jul 2019 21:07:28 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1563138448.66.0.713354476519.issue37555@roundup.psfhosted.org> Elizabeth Uselton added the comment: Hi there, I completely missed that this had caused so much interesting discussion. I've added a regression test that shows the bug I was encountering, which seems to be related to spec_set bypassing _Call's overwritten __eq__ and so not respecting ANY https://github.com/python/cpython/pull/14700 I agree, this is definitely also a third party bug with Django, but I think it's a problem here too, and am working on a fix. ---------- components: +Tests -Library (Lib) nosy: -serhiy.storchaka, xtreak versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 17:17:55 2019 From: report at bugs.python.org (brent s.) Date: Sun, 14 Jul 2019 21:17:55 +0000 Subject: [issue37594] re does not honor matching trailing multiple periods In-Reply-To: <1563132450.99.0.557456146194.issue37594@roundup.psfhosted.org> Message-ID: <1563139075.17.0.76463721948.issue37594@roundup.psfhosted.org> brent s. added the comment: "'\.' is an invalid escape sequence. Could you try it with a raw string?" Well, a valid regex escape, but right. Point taken. I am under the impression, however, that given the value in ptrn (in example.py) is already a string, it should be interpreted as a raw string in the re.compile(), no? Because otherwise it'd be a dickens of a time getting a regex pattern that's dynamic/programmatically assigned to a name, since there's no raw(), str.raw(), or str.encode('raw'). They both evaluate to the same, for what it's worth: >>> repr('\.+$') "'\\\\.+$'" >>> repr(r'\.+$') "'\\\\.+$'" >>> ptrn = '\.+$' >>> repr(ptrn) "'\\\\.+$'" So. "Also, it's not really clear to me what you're seeing, vs. what you expect to see. For one example that you think is incorrect, could you show what you get vs. what you expect to get? And, if that's different on different python versions, could you show what each version does?" The comment from Serhiy clarifies that this was indeed something that was changed. You can see the difference pretty easily by just calling the example.py between python2 and python3. -- "This change was intentional and documented. It fixed old bug in the Python implementation of RE and removed the discrepancy with other RE engines." Okay, so I'm not going insane. That's good. Do you have the bug ID it fixes and where it's documented? Do you know which other RE engines were doing this? Because GNU sed, for instance, does not behave like this - it behaves as the "pre-bugfix" behaviour did: $ echo 'a.b.' | sed -e 's/\.*$/./g' a.b. $ echo 'a.b...' | sed -e 's/\.*$/./g' a.b. $ echo 'a.b' | sed -e 's/\.*$/./g' a.b. "The pattern r'\.*$' matches not only a sequence of dots at the of the line, but also an empty string at the end of line. If this is not what you want, use r'\.+$'." Right; it's to guarantee there is one and only one period at the end of a line, whether there is no period, one period, or many periods in the original string (think e.g. enforcing RFC1025-compatible FQDNs, for instance). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 17:31:19 2019 From: report at bugs.python.org (brent s.) Date: Sun, 14 Jul 2019 21:31:19 +0000 Subject: [issue37594] re does not honor matching trailing multiple periods In-Reply-To: <1563132450.99.0.557456146194.issue37594@roundup.psfhosted.org> Message-ID: <1563139879.75.0.962723518629.issue37594@roundup.psfhosted.org> brent s. added the comment: Oh for pete's sake. I wish I could edit comments. Eric- To make it clear: ***** VERSION: 2.7.16 (default, Mar 11 2019, 18:59:25) [GCC 8.2.1 20181127] PATTERN: \.*$ BEFORE: a.b WITHOUT: a.b DUMMY: a.bX AFTER: a.b. RSTRIP: a.b == BEFORE: a.b. WITHOUT: a.b DUMMY: a.bX AFTER: a.b. RSTRIP: a.b == BEFORE: a.b.. WITHOUT: a.b DUMMY: a.bX AFTER: a.b. RSTRIP: a.b == BEFORE: a.b... WITHOUT: a.b DUMMY: a.bX AFTER: a.b. RSTRIP: a.b == ***** VERSION: 3.7.3 (default, Jun 24 2019, 04:54:02) [GCC 9.1.0] PATTERN: \.*$ BEFORE: a.b WITHOUT: a.b DUMMY: a.bX AFTER: a.b. RSTRIP: a.b == BEFORE: a.b. WITHOUT: a.b DUMMY: a.bXX AFTER: a.b.. RSTRIP: a.b == BEFORE: a.b.. WITHOUT: a.b DUMMY: a.bXX AFTER: a.b.. RSTRIP: a.b == BEFORE: a.b... WITHOUT: a.b DUMMY: a.bXX AFTER: a.b.. RSTRIP: a.b == Note the differences between versions for cases a.b., a.b.., and a.b... ("BEFORE: ..." lines). Compare their "AFTER" and "DUMMY" lines between python2 and python3. Serhiy- Apologies; I meant RFC1035; I typo'd that. But as shown above, the difference is pretty distinct (and inconsistent with GNU sed behaviour). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 18:35:08 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 14 Jul 2019 22:35:08 +0000 Subject: [issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError In-Reply-To: <1535559532.49.0.56676864532.issue34543@psf.upfronthosting.co.za> Message-ID: <1563143708.8.0.346837522875.issue34543@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +14573 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14777 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 18:35:13 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 14 Jul 2019 22:35:13 +0000 Subject: [issue37594] re does not honor matching trailing multiple periods In-Reply-To: <1563132450.99.0.557456146194.issue37594@roundup.psfhosted.org> Message-ID: <1563143713.91.0.968219635402.issue37594@roundup.psfhosted.org> Eric V. Smith added the comment: Sorry. '\.' will be invalid in the future. I got ahead of myself. $ python3 -Werror -q >>> '\.' File "", line 1 SyntaxError: invalid escape sequence \. Not that it would have affected your issue, so I apologize for the red herring. But "switch to raw strings when you have backslashes in a regex" is always my first reaction. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 18:40:39 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 14 Jul 2019 22:40:39 +0000 Subject: [issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError In-Reply-To: <1535559532.49.0.56676864532.issue34543@psf.upfronthosting.co.za> Message-ID: <1563144039.89.0.364213706828.issue34543@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 2.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 19:00:47 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Jul 2019 23:00:47 +0000 Subject: [issue37593] ast.arguments has confusing args/posonlyargs ordering In-Reply-To: <1563130537.16.0.669672983776.issue37593@roundup.psfhosted.org> Message-ID: <1563145247.18.0.110667275893.issue37593@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +14574 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14778 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 19:32:21 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 23:32:21 +0000 Subject: [issue37593] ast.arguments has confusing args/posonlyargs ordering In-Reply-To: <1563130537.16.0.669672983776.issue37593@roundup.psfhosted.org> Message-ID: <1563147141.74.0.975220440956.issue37593@roundup.psfhosted.org> miss-islington added the comment: New changeset cd6e83b4810549c308ab2d7315dbab526e35ccf6 by Miss Islington (bot) (Pablo Galindo) in branch 'master': bpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.parameters nodes (GH-14778) https://github.com/python/cpython/commit/cd6e83b4810549c308ab2d7315dbab526e35ccf6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 19:32:34 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 23:32:34 +0000 Subject: [issue37593] ast.arguments has confusing args/posonlyargs ordering In-Reply-To: <1563130537.16.0.669672983776.issue37593@roundup.psfhosted.org> Message-ID: <1563147154.66.0.832072775416.issue37593@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14575 pull_request: https://github.com/python/cpython/pull/14779 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 19:49:55 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 23:49:55 +0000 Subject: [issue37593] ast.arguments has confusing args/posonlyargs ordering In-Reply-To: <1563130537.16.0.669672983776.issue37593@roundup.psfhosted.org> Message-ID: <1563148195.9.0.630282918412.issue37593@roundup.psfhosted.org> miss-islington added the comment: New changeset cf9a63c6c7e19f3d27cf3b5731d02cc216ef3dd1 by Miss Islington (bot) in branch '3.8': bpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.parameters nodes (GH-14778) https://github.com/python/cpython/commit/cf9a63c6c7e19f3d27cf3b5731d02cc216ef3dd1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 20:08:34 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Jul 2019 00:08:34 +0000 Subject: [issue37593] ast.arguments has confusing args/posonlyargs ordering In-Reply-To: <1563130537.16.0.669672983776.issue37593@roundup.psfhosted.org> Message-ID: <1563149314.74.0.861979477674.issue37593@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks for the report, Benjamin! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 20:14:13 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 15 Jul 2019 00:14:13 +0000 Subject: [issue34749] improve performance of binascii.a2b_base64() In-Reply-To: <1537443910.98.0.956365154283.issue34749@psf.upfronthosting.co.za> Message-ID: <1563149653.71.0.880292112266.issue34749@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 21:46:39 2019 From: report at bugs.python.org (Kal Sze) Date: Mon, 15 Jul 2019 01:46:39 +0000 Subject: [issue37595] Python 3.7.4 does not build on Raspbian Buster Message-ID: <1563155199.46.0.613653313897.issue37595@roundup.psfhosted.org> New submission from Kal Sze : Like the title says. Tried building with these `configure` options: --enable-optimizations \ --with-lto \ --enable-shared \ --enable-loadable-sqlite-extensions \ --enable-ipv6 \ --with-system-expat \ --with-system-ffi \ --with-system-libmpdec \ --with-doc-strings \ --with-pymalloc \ --with-c-locale-coercion \ --with-ensurepip=upgrade And `CFLAGS="-O3 -march=native"` But got this error message: ``` /usr/bin/ld: ./libpython3.7m.so: undefined reference to `__gcov_pow2_profiler_atomic' /usr/bin/ld: ./libpython3.7m.so: undefined reference to `__gcov_average_profiler_atomic' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:733: Programs/_testembed] Error 1 make[3]: Leaving directory '/tmp/python-build.20190712163526.2762/Python-3.7.4' make[2]: *** [Makefile:521: build_all_generate_profile] Error 2 make[2]: Leaving directory '/tmp/python-build.20190712163526.2762/Python-3.7.4' make[1]: *** [Makefile:497: profile-gen-stamp] Error 2 make[1]: Leaving directory '/tmp/python-build.20190712163526.2762/Python-3.7.4' make: *** [Makefile:509: profile-run-stamp] Error 2 ``` ---------- components: Build files: python-build.20190711104717.24526.log messages: 347948 nosy: kal.sze priority: normal severity: normal status: open title: Python 3.7.4 does not build on Raspbian Buster type: compile error versions: Python 3.7 Added file: https://bugs.python.org/file48482/python-build.20190711104717.24526.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 22:28:05 2019 From: report at bugs.python.org (Nam Nguyen) Date: Mon, 15 Jul 2019 02:28:05 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563157685.43.0.852461018386.issue37461@roundup.psfhosted.org> Change by Nam Nguyen : ---------- nosy: +Nam.Nguyen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 23:40:18 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Mon, 15 Jul 2019 03:40:18 +0000 Subject: [issue37496] Support annotations in signature strings. In-Reply-To: <1562197526.36.0.0415942737779.issue37496@roundup.psfhosted.org> Message-ID: <1563162018.09.0.480773297487.issue37496@roundup.psfhosted.org> Change by Giovanni Cappellotto : ---------- nosy: +potomak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 00:39:39 2019 From: report at bugs.python.org (hai shi) Date: Mon, 15 Jul 2019 04:39:39 +0000 Subject: [issue29753] Ctypes Packing Bitfields Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1563165579.43.0.437694724605.issue29753@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 01:40:17 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 15 Jul 2019 05:40:17 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1563169217.46.0.496585452564.issue37555@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks Elizabeth for the test. The regression test seems to be same as the case noted by Serhiy that Foo.__eq__ is not returning NotImplemented so that ANY.__eq__ can be executed. Below would be the correct implementation that passes. The actual comparison is done at [0]. If Foo.__eq__ returned NotImplemented due to type difference it would have called other.arguments. So there is no chance for ANY.__eq__ to be executed. I feel it's more about the third party class that needs to be fixed rather than the stdlib code here and changing the order of arguments for ANY's __eq__ precedence might introduce other subtle bugs. self.arguments = OrderedDict([('args', (<__main__.Foo object at 0x10a54b500>,))]) other.arguments = OrderedDict([('args', (,))]) def __eq__(self, other): if self is other: return True if not isinstance(other, BoundArguments): return NotImplemented return (self.signature == other.signature and self.arguments == other.arguments) # Better implementation from unittest.mock import Mock, call, ANY class Foo(object): def __eq__(self, other): if not isinstance(other, self.__class__): return NotImplemented return True def __ne__(self, other): pass mock = Mock(spec_set=Foo) expected = [call(ANY)] mock(Foo()) mock.assert_has_calls(expected) [0] https://github.com/python/cpython/blob/cd6e83b4810549c308ab2d7315dbab526e35ccf6/Lib/inspect.py#L2708 3.5 and 3.6 are in security fixes only mode. If this is considered to be a bug it can go in master, 3.8 and 3.7. The tests section is for CPython test suite and not for the unittest related bugs. So triaging it back. ---------- components: +Library (Lib) -Tests nosy: +serhiy.storchaka, xtreak versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 04:19:58 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 15 Jul 2019 08:19:58 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <1563040436.19.0.276806879722.issue37588@roundup.psfhosted.org> Message-ID: <1563178798.22.0.127816592905.issue37588@roundup.psfhosted.org> Jeroen Demeyer added the comment: See also https://github.com/python/cpython/pull/14193#pullrequestreview-251630953 ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 04:30:53 2019 From: report at bugs.python.org (Riccardo Schirone) Date: Mon, 15 Jul 2019 08:30:53 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1563179453.1.0.0424884168072.issue35121@roundup.psfhosted.org> Riccardo Schirone added the comment: CVE-2018-20852 has been assigned to this flaw. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 05:15:21 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 09:15:21 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1563182121.49.0.426817429513.issue37500@roundup.psfhosted.org> miss-islington added the comment: New changeset 18c5f9d44dde37c0fae5585a604c6027825252d2 by Miss Islington (bot) (Pablo Galindo) in branch 'master': bpo-37500: Make sure dead code does not generate bytecode but also detect syntax errors (GH-14612) https://github.com/python/cpython/commit/18c5f9d44dde37c0fae5585a604c6027825252d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 05:15:22 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 09:15:22 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1563182122.22.0.531787859458.issue37500@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14576 pull_request: https://github.com/python/cpython/pull/14780 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 05:22:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 09:22:54 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563182574.84.0.955458548039.issue37461@roundup.psfhosted.org> Change by STINNER Victor : ---------- type: crash -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 05:35:23 2019 From: report at bugs.python.org (Leonard Lausen) Date: Mon, 15 Jul 2019 09:35:23 +0000 Subject: [issue30140] Binary arithmetic does not always call subclasses first In-Reply-To: <1492921304.69.0.401017078402.issue30140@psf.upfronthosting.co.za> Message-ID: <1563183323.77.0.603052704327.issue30140@roundup.psfhosted.org> Change by Leonard Lausen : ---------- nosy: +leezu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 05:36:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 09:36:10 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563183370.5.0.0401573365199.issue37461@roundup.psfhosted.org> STINNER Victor added the comment: >>> bytes([0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x78, 0x3b, 0x61, 0x72, 0x1b, 0x2a, 0x3d, 0x22, 0x73, 0x4f, 0x27, 0x23, 0x61, 0xff, 0xff, 0x27, 0x5c, 0x22]) b'Content-Type:x;ar\x1b*="sO\'#a\xff\xff\'\\"' The following loop of Lib/email/_header_value_parser.py does never stop: def get_parameter(value): """ attribute [section] ["*"] [CFWS] "=" value The CFWS is implied by the RFC but not made explicit in the BNF. This simplified form of the BNF from the RFC is made to conform with the RFC BNF through some extra checks. We do it this way because it makes both error recovery and working with the resulting parse tree easier. """ ... if remainder is not None: ... while value: ... Attached reproducer.py is code from initial msg346953. reproducer2.py simplify the input and calls directly get_parameter(). Simplified input string: r*="'a'\" ---------- nosy: +vstinner Added file: https://bugs.python.org/file48483/reproducer.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 05:36:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 09:36:17 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563183377.34.0.880040615312.issue37461@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file48484/reproducer2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 05:41:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 09:41:35 +0000 Subject: [issue35121] [ CVE-2018-20852] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1563183695.83.0.944190874563.issue35121@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Cookie domain check returns incorrect results -> [ CVE-2018-20852] Cookie domain check returns incorrect results _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 05:42:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 09:42:01 +0000 Subject: [issue35121] [CVE-2018-20852] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1563183721.66.0.974057834069.issue35121@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: [ CVE-2018-20852] Cookie domain check returns incorrect results -> [CVE-2018-20852] Cookie domain check returns incorrect results _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 05:46:55 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 15 Jul 2019 09:46:55 +0000 Subject: [issue37559] IDLE: Scrolling issues with code context shown In-Reply-To: <1562839219.15.0.3914256467.issue37559@roundup.psfhosted.org> Message-ID: <1563184015.09.0.866498220702.issue37559@roundup.psfhosted.org> Tal Einat added the comment: > I *like* the CC size changes because the size indicates the indent depth. My feeling is that you would be in a minority here. IMO most new/novice users would find this surprising and confusing, since it is far from a customary UI experience. Since our opinions obviously differ rather greatly on this, I suggest that we try to be objective and get some opinions from other users. > The scrollbar slider bobble does not bother me much when scrolling with key or mouse wheel because I hardly see it. My eyes are focused on the text. On Windows, when scrolling with a mouse scroll wheel or a trackpad, I find that this makes scrolling rather inconsistent, since it will scroll more or less lines depending on the change in the number of context lines. > Another possible solution is suppressing CC update at least while the mouse button is held down over the scrollbar. Button down/up on the scrollbar instance sets text.pause_CC to True/False and CC update checks self.text.pauseCC. I also see artifacts and scrollbar "jitter" when scrolling with a mouse wheel or trackpad, so IMO that wouldn't be a thorough enough solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 06:21:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 10:21:26 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1563186086.89.0.46330829749.issue34160@roundup.psfhosted.org> STINNER Victor added the comment: Other examples of projects broken by this change: * python-glyphsLib: https://bugzilla.redhat.com/show_bug.cgi?id=1705391 * pcs: https://bugzilla.redhat.com/show_bug.cgi?id=1705475 What's New In Python 3.8 only briefly mention this change: "The writexml(), toxml() and toprettyxml() methods of the xml.dom.minidom module, and xml.etree now preserve the attribute order specified by the user. (Contributed by Diego Rojas and Raymond Hettinger in bpo-34160.)" https://docs.python.org/dev/whatsnew/3.8.html#changes-in-the-python-api Would it be possible to suggest solutions for this backward incompatible change? Like https://bugs.python.org/issue34160#msg338102 recipe. Maybe we should even put it in the XML documentation, somewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 06:44:59 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 15 Jul 2019 10:44:59 +0000 Subject: [issue37562] PEP 590 implementation may have introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1563187499.05.0.0411213237872.issue37562@roundup.psfhosted.org> Jeroen Demeyer added the comment: I did some benchmarks WITHOUT PGO (simply because it's much faster to compile and therefore easier to test things out). The command I used for testing is ./python -m perf timeit --duplicate 200 -s 'f = len; x = ()' 'f(x)' * d30da5dd9a8a965cf24a22bbaff8a5b1341c2944 (before PEP 590) Mean +- std dev: 25.1 ns +- 0.2 ns * aacc77fbd77640a8f03638216fa09372cc21673d (first commit of PEP 590) Mean +- std dev: 29.3 ns +- 0.9 ns * b8e198a5d09ca876b87baaf6efd2b2e7c9e3a0b3 (3.8 branch) Mean +- std dev: 29.5 ns +- 0.3 ns * cd6e83b4810549c308ab2d7315dbab526e35ccf6 (master) Mean +- std dev: 25.1 ns +- 0.2 ns So there does seem to be a regression with 3.8 but not with 3.9. I don't know what to do with this... can we backport more of the PEP 590 commits to 3.8? Or will the release manager complain? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 06:46:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 10:46:53 +0000 Subject: [issue37562] PEP 590 implementation may have introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1563187613.81.0.256242262309.issue37562@roundup.psfhosted.org> STINNER Victor added the comment: > can we backport more of the PEP 590 commits to 3.8? Or will the release manager complain? I would opt for a case by case discussion. Would you be able to identify which master commits have the most significant impact on performance for builtin functions? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 08:04:20 2019 From: report at bugs.python.org (MeiK) Date: Mon, 15 Jul 2019 12:04:20 +0000 Subject: [issue37522] http.cookies.SimpleCookie doesn't seem to be parsed using regulars In-Reply-To: <1562587209.99.0.655930628175.issue37522@roundup.psfhosted.org> Message-ID: <1563192260.5.0.994279611139.issue37522@roundup.psfhosted.org> Change by MeiK : ---------- keywords: +patch pull_requests: +14577 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14781 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 08:09:03 2019 From: report at bugs.python.org (M. Anil Tuncel) Date: Mon, 15 Jul 2019 12:09:03 +0000 Subject: [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563192543.37.0.603691997041.issue7940@roundup.psfhosted.org> M. Anil Tuncel added the comment: I guess the use of negative indices serve the same purpose here as in lists or strings. Though as Ezio pointed out, the current behaviour is already accepting negative indices but providing inconsistent results in comparison to various other Python modules that support negative indices. In my opinion: If the negative indices are to be used here (which is what the current implementation suggests), they should behave in the same way as the rest of the Python modules. Otherwise, perhaps negative indices should not be allowed here at all. What do you think? P.S. this patch is already applied to the regex module by @mrabarnett ---------- nosy: +anilbey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 08:46:24 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 15 Jul 2019 12:46:24 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1563194784.55.0.524898527175.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14578 pull_request: https://github.com/python/cpython/pull/14782 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 08:46:24 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 15 Jul 2019 12:46:24 +0000 Subject: [issue37562] PEP 590 implementation may have introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1563194784.63.0.206022571113.issue37562@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14579 pull_request: https://github.com/python/cpython/pull/14782 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 08:48:09 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 15 Jul 2019 12:48:09 +0000 Subject: [issue37562] PEP 590 implementation may have introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1563194889.11.0.447935575428.issue37562@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 08:51:08 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 15 Jul 2019 12:51:08 +0000 Subject: [issue37562] PEP 590 implementation may have introduced a performance regression In-Reply-To: <1562844416.61.0.409622240812.issue37562@roundup.psfhosted.org> Message-ID: <1563195068.62.0.983736960055.issue37562@roundup.psfhosted.org> Jeroen Demeyer added the comment: PR 14782 (backport of PR 13781) fixes the regression for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:09:52 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 15 Jul 2019 14:09:52 +0000 Subject: [issue37519] Three inconsistent module attributes In-Reply-To: <1562502652.41.0.952456238618.issue37519@roundup.psfhosted.org> Message-ID: <1563199792.41.0.655070232638.issue37519@roundup.psfhosted.org> G?ry added the comment: @Brett Cannon > PEPs actually become historical documents once they are implemented Actually the inconsistency of the values of the 3 module attributes (``__file__``, ``__cached__`` and ``__package__``) is with respect to the other values within the current implementation (not only with respect to the values specified in PEP 451). Sorry if I did not explain this well. Let me detail: For ``__file__``, if you look at the current output of the above "Imported modules" section, you have: - __file__: None, for an imported namespace package; - __file__: 'not set', for an imported built-in module; - __file__: 'not set', for an imported frozen module, which is inconsistent: it should always be 'not set' when ``__file__`` has no meaning. For ``__cached__``, if you look at the current output of the above "Run modules" section, you have: - __cached__: None, for a non-package module run from the file system (``python3 module.py``) or run from standard input (``cat module.py | python3``); - __path__: 'not set', for a non-package module run from the file system (``python3 module.py``) or run from standard input (``cat module.py | python3``), which is inconsistent: it should always be 'not set' when ``__cached__`` has no meaning, like it is already the case for ``__path__`` and other module attributes. For ``__package__``, if you look at the current output of the above "Run modules" section, you have: - __package__: None, for a non-package module run from the file system (``python3 module.py``) or run from standard input (``cat module.py | python3``); - __package__: '', for a non-package module run from the module namespace (``python3 -m module``) or a package run from the file system (``python3 module/``). which is inconsistent: it should always be ``''`` when there is no parent package for ``__package__`` to refer to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:10:45 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 15 Jul 2019 14:10:45 +0000 Subject: [issue37519] Three inconsistent module attributes In-Reply-To: <1562502652.41.0.952456238618.issue37519@roundup.psfhosted.org> Message-ID: <1563199845.13.0.989909308786.issue37519@roundup.psfhosted.org> Change by G?ry : ---------- nosy: +eric.snow -eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:20:09 2019 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 15 Jul 2019 14:20:09 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1563200409.62.0.480955192044.issue37555@roundup.psfhosted.org> Paul Ganssle added the comment: Maybe I am missing something, but while it is true that DjangoModel is doing the wrong thing by returning False instead of NotImplemented, the `ANY` sentinel is supposed to match *anything*, not just things that compare equal to it, right? I would expect this to work, for example: class EqualsNothing: def __eq__(self, other): return False m = Mock(spec_set=EqualsNothing) obj = EqualsNothing() m(obj) m.assert_has_calls([call(ANY)]) In that example, it is deliberate that EqualsNothing returns False for any type, but ANY should still match it. I think maybe the solution here is to special-case the matching with ANY so the criterion for a call matching would be `y is ANY or x == y`. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:30:00 2019 From: report at bugs.python.org (Michelle Johnson) Date: Mon, 15 Jul 2019 14:30:00 +0000 Subject: [issue37565] test_faulthandler failure In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1563201000.44.0.818611751496.issue37565@roundup.psfhosted.org> Michelle Johnson added the comment: Hello Victor. Thank you for looking into this. I ran the attached script, sigusr1.py as you requested. The output was as expected: [jshelly at gl-build bin]$ ./python3.7 ~/sigusr1.py called True Not sure if that helps identify the problem. Regarding the related bugs I mentioned, I think my first comments were mixed up. There were 2 possibly related bugs. 1. Redhat bugzilla 1687171, which may have been related to the skylake chipset: https://bugzilla.redhat.com/show_bug.cgi?id=1687171 2. Github # 32: https://github.com/vstinner/faulthandler/issues/32 That is an older one (2017), and maybe not related. Bug # 36 at Github is one that I opened initially, and that one is a duplicate of this bug report. It is closed now as I was asked to open the bug here instead. Thanks for any further insight or suggestions you can provide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:36:56 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 15 Jul 2019 14:36:56 +0000 Subject: [issue30140] Binary arithmetic does not always call subclasses first In-Reply-To: <1492921304.69.0.401017078402.issue30140@psf.upfronthosting.co.za> Message-ID: <1563201416.91.0.843708589024.issue30140@roundup.psfhosted.org> Guido van Rossum added the comment: Are there any core devs who care enough to make a decision here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:37:35 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 14:37:35 +0000 Subject: [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563201455.24.0.240898661438.issue37284@roundup.psfhosted.org> miss-islington added the comment: New changeset 52693c10e82622d883433b779a45d0bd792f17ed by Miss Islington (bot) (Giovanni Cappellotto) in branch 'master': bpo-37284: Add note to sys.implementation doc (GH-14328) https://github.com/python/cpython/commit/52693c10e82622d883433b779a45d0bd792f17ed ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:38:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 14:38:03 +0000 Subject: [issue30140] Binary arithmetic does not always call subclasses first In-Reply-To: <1492921304.69.0.401017078402.issue30140@psf.upfronthosting.co.za> Message-ID: <1563201483.93.0.977717146732.issue30140@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:38:48 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 14:38:48 +0000 Subject: [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563201528.95.0.56609837442.issue37284@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14580 pull_request: https://github.com/python/cpython/pull/14783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:38:56 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 14:38:56 +0000 Subject: [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563201536.51.0.359377415766.issue37284@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14581 pull_request: https://github.com/python/cpython/pull/14784 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:44:32 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 14:44:32 +0000 Subject: [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563201872.04.0.298673824638.issue37284@roundup.psfhosted.org> miss-islington added the comment: New changeset 134f79682d6729e3cf84b665d615f576075550e8 by Miss Islington (bot) in branch '3.7': bpo-37284: Add note to sys.implementation doc (GH-14328) https://github.com/python/cpython/commit/134f79682d6729e3cf84b665d615f576075550e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:45:16 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 14:45:16 +0000 Subject: [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563201916.5.0.981544364754.issue37284@roundup.psfhosted.org> miss-islington added the comment: New changeset 1ff4c4277421c02df5ca0894fb95de70cd9cd5f4 by Miss Islington (bot) in branch '3.8': bpo-37284: Add note to sys.implementation doc (GH-14328) https://github.com/python/cpython/commit/1ff4c4277421c02df5ca0894fb95de70cd9cd5f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:47:22 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 15 Jul 2019 14:47:22 +0000 Subject: [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563202042.78.0.750905452838.issue37284@roundup.psfhosted.org> Change by Eric Snow : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:47:52 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 15 Jul 2019 14:47:52 +0000 Subject: [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563202072.72.0.554607337051.issue37284@roundup.psfhosted.org> Eric Snow added the comment: @potomak, thanks for doing this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:50:10 2019 From: report at bugs.python.org (Michael Felt) Date: Mon, 15 Jul 2019 14:50:10 +0000 Subject: [issue28009] core logic of uuid.getnode() needs refresh In-Reply-To: <1563136122.66.0.626834283427.issue28009@roundup.psfhosted.org> Message-ID: <76714338-2205-59fc-acd1-6ec5b6520e7a@felt.demon.nl> Michael Felt added the comment: On 14/07/2019 22:28, Tal Einat wrote: > Tal Einat added the comment: > >>> The current code and proposed changes use 'netstat -ia' to find the node however if netstat needs to perform a reverse DNS query to resolve some interfaces this makes using uuid1 *really* slow especially when reverse DNS queries aren't set up correctly or timeout. >>> mac = _find_mac_netstat('netstat', '-ia', b'Address', lambda i: i) >>> >>> Would it be possible to change the netstat call to add 'n' to the nestat options, i.e. _find_mac_netstat('netstat', '-ian', ...) to prevent netstat from attempting to resolve addresses? >> Sounds like an excellent idea. Gives me a reason to get started again. Thx! > I don't see this in PR GH-28009; should this change be made? I am testing with "-ian" - on top of the changes you have already made. I'll push asap, assuming all goes well. > > ---------- > nosy: +taleinat > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:05:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 15:05:11 +0000 Subject: [issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order Message-ID: <1563203111.95.0.786255267379.issue37596@roundup.psfhosted.org> New submission from STINNER Victor : See bpo-29708 meta issue and https://reproducible-builds.org/ for reproducible builds. pyc files are not fully reproducible yet: frozenset items are not serialized in a deterministic order One solution would be to modify marshal to sort frozenset items before serializing them. The issue is how to handle items which cannot be compared. Example: >>> l=[float("nan"), b'bytes', 'unicode'] >>> l.sort() Traceback (most recent call last): File "", line 1, in TypeError: '<' not supported between instances of 'bytes' and 'float' One workaround for types which cannot be compared is to use the type name in the key used to compare items: >>> l.sort(key=lambda x: (type(x).__name__, x)) >>> l [b'bytes', nan, 'unicode'] Note: comparison between bytes and str raises a BytesWarning exception when using python3 -bb. Second problem: how to handle exceptions when comparison raises an error anyway? Another solution would be to use the PYTHONHASHSEED environment variable. For example, if SOURCE_DATE_EPOCH is set, PYTHONHASHSEED would be set to 0. This option is not my favorite because it disables a security fix against denial of service on dict and set: https://python-security.readthedocs.io/vuln/hash-dos.html -- Previous discussions on reproducible frozenset: * https://mail.python.org/pipermail/python-dev/2018-July/154604.html * https://bugs.python.org/issue34093#msg321523 See also bpo-34093: "Reproducible pyc: FLAG_REF is not stable" and PEP 552 "Deterministic pycs". ---------- components: Interpreter Core messages: 347969 nosy: vstinner priority: normal severity: normal status: open title: Reproducible pyc: frozenset is not serialized in a deterministic order versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:05:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 15:05:42 +0000 Subject: [issue34093] Reproducible pyc: FLAG_REF is not stable. In-Reply-To: <1531305608.98.0.56676864532.issue34093@psf.upfronthosting.co.za> Message-ID: <1563203142.4.0.225904112994.issue34093@roundup.psfhosted.org> STINNER Victor added the comment: > According to Serhiy Storchaka, currently marshal.dumps() writes frozenset in arbitrary order, and so frozenset serialization is not reproducible: https://mail.python.org/pipermail/python-dev/2018-July/154604.html I created bpo-37596 "Reproducible pyc: frozenset is not serialized in a deterministic order" to track this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:06:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 15:06:34 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1563203194.09.0.452436485633.issue29708@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-37596 "Reproducible pyc: frozenset is not serialized in a deterministic order". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:15:28 2019 From: report at bugs.python.org (Daniel Hillier) Date: Mon, 15 Jul 2019 15:15:28 +0000 Subject: [issue37538] Refactor zipfile to ease subclassing and enhancement In-Reply-To: <1562741910.34.0.615692848434.issue37538@roundup.psfhosted.org> Message-ID: <1563203728.97.0.603852794533.issue37538@roundup.psfhosted.org> Daniel Hillier added the comment: Hi, Here is a pull request against my fork: https://github.com/danifus/cpython/pull/1/files The overall behaviour of zipfile remains the same and I've tried to call out any behaviour changes in the extended commit messages (usually with ** markers). There is another branch (https://github.com/danifus/cpython/tree/zipfile_refactor_2) which has a couple of extra commits which slightly changes some functionality. Any review would be greatly appreciated! Happy to make any changes to the code or general approach taken. Thanks, Dan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:19:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 15:19:19 +0000 Subject: [issue37468] Don't install wininst*.exe on non-Windows platforms In-Reply-To: <1561984669.65.0.392603753819.issue37468@roundup.psfhosted.org> Message-ID: <1563203959.5.0.529195677108.issue37468@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e8692818afd731c1b7e925c626ac8200b1f1c31e by Victor Stinner in branch 'master': bpo-37468: make install no longer install wininst-*.exe files (GH-14511) https://github.com/python/cpython/commit/e8692818afd731c1b7e925c626ac8200b1f1c31e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:24:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 15:24:49 +0000 Subject: [issue37468] Don't install wininst*.exe on non-Windows platforms In-Reply-To: <1561984669.65.0.392603753819.issue37468@roundup.psfhosted.org> Message-ID: <1563204289.24.0.933953183116.issue37468@roundup.psfhosted.org> STINNER Victor added the comment: I sent a notice to python-dev about this change. If someone considers that my change is wrong on Cygwin or MinGW, please propose a pull request. https://mail.python.org/archives/list/python-dev at python.org/thread/53T647PT4F5QZ5NOX2GDLMMPC5EPJY4Y/ In the meanwhile, I close the issue. Thanks for the review Paul Ganssle! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:46:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 15:46:39 +0000 Subject: [issue37565] test_faulthandler failure In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1563205599.0.0.964556580824.issue37565@roundup.psfhosted.org> STINNER Victor added the comment: More tests. (*) What is the output of signal.getsignal(signal.SIGUSR1) before importing faulthandler (before calling any faulthandler method)? Example: $ python3 Python 3.7.3 (default, May 11 2019, 00:38:04) >>> import signal; signal.getsignal(signal.SIGUSR1) (*) Can you try to run attached script in gdb? If you get a crash, type "where" to get the traceback. Example: $ gdb -args ./python script.py (gdb) handle SIGUSR1 nostop Signal Stop Print Pass to program Description SIGUSR1 No Yes Yes User defined signal 1 (gdb) run Starting program: /home/vstinner/python/master/python script.py Program received signal SIGUSR1, User defined signal 1. Current thread 0x00007ffff7c27740 (most recent call first): File "/home/vstinner/python/master/script.py", line 13 in Program received signal SIGUSR1, User defined signal 1. called True [Inferior 1 (process 24361) exited normally] ---------- Added file: https://bugs.python.org/file48485/script.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:47:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 15:47:05 +0000 Subject: [issue37565] test_faulthandler: test_register_chain() crash on Skylake chipset In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1563205625.86.0.631934768754.issue37565@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: test_faulthandler failure -> test_faulthandler: test_register_chain() crash on Skylake chipset _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 11:49:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 15:49:17 +0000 Subject: [issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1563205757.45.0.638065874565.issue37565@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: test_faulthandler: test_register_chain() crash on Skylake chipset -> test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 12:05:08 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Jul 2019 16:05:08 +0000 Subject: [issue34788] ipaddress module fails on rfc4007 scoped IPv6 addresses In-Reply-To: <1537799403.03.0.956365154283.issue34788@psf.upfronthosting.co.za> Message-ID: <1563206708.32.0.801999366697.issue34788@roundup.psfhosted.org> Terry J. Reedy added the comment: FWIW: Marking Component: Documentation means that the issue is only about changing the doc. Hence the auto-assignment to the nebulous docs group, which no longer exists in the form it once did. Enhancement issues nearly always need a doc change but are not marked 'Documentation'. I am not sure what Jeremy's original intent was, but the actual PR is mostly code implementing and testing the newly documented addition. ---------- assignee: docs at python -> components: -Documentation nosy: +terry.reedy -docs at python type: behavior -> enhancement versions: +Python 3.9 -Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 12:05:50 2019 From: report at bugs.python.org (Michelle Johnson) Date: Mon, 15 Jul 2019 16:05:50 +0000 Subject: [issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1563206750.51.0.742106673682.issue37565@roundup.psfhosted.org> Michelle Johnson added the comment: 1. Here is the output of the signal.getsignal test: [jshelly at gl-build bin]$ ./python3 Python 3.7.4 (default, Jul 15 2019, 10:08:37) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import signal >>> signal.getsignal(signal.SIGUSR1) 2. Here is the output after running the provided script in gdb: [jshelly at gl-build bin]$ gdb -args ./python3 ~/script.py GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /sw/arcts/centos7/python/3.7.4/bin/python3.7...done. (gdb) handle SIGUSR1 nostop Signal Stop Print Pass to program Description SIGUSR1 No Yes Yes User defined signal 1 (gdb) run Starting program: /sw/arcts/centos7/python/3.7.4/bin/./python3 /home/jshelly/script.py [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Program received signal SIGUSR1, User defined signal 1. Current thread 0x00002aaaaaaf59c0 (most recent call first): File "/home/jshelly/script.py", line 12 in Program received signal SIGUSR1, User defined signal 1. called True Program received signal SIGSEGV, Segmentation fault. 0x00002aaaaae88924 in visit_decref (op=0x2aaaaacd3468, data=0x0) at Modules/gcmodule.c:271 271 if (PyObject_IS_GC(op)) { Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7_6.3.x86_64 nss-softokn-freebl-3.36.0-5.el7_5.x86_64 (gdb) where #0 0x00002aaaaae88924 in visit_decref (op=0x2aaaaacd3468, data=0x0) at Modules/gcmodule.c:271 #1 0x00002aaaaad92d8d in dict_traverse (op=, visit=0x2aaaaae88920 , arg=0x0) at Objects/dictobject.c:2987 #2 0x00002aaaaae87b3d in subtract_refs (containers=) at Modules/gcmodule.c:296 #3 collect (generation=generation at entry=2, n_collected=n_collected at entry=0x7fffffffce20, n_uncollectable=n_uncollectable at entry=0x7fffffffce28, nofail=nofail at entry=0) at Modules/gcmodule.c:853 #4 0x00002aaaaae891c9 in collect_with_callback (generation=2) at Modules/gcmodule.c:1028 #5 PyGC_Collect () at Modules/gcmodule.c:1573 #6 0x00002aaaaae5e62a in Py_FinalizeEx () at Python/pylifecycle.c:1185 #7 0x00002aaaaae86d58 in pymain_main (pymain=pymain at entry=0x7fffffffcf60) at Modules/main.c:3030 #8 0x00002aaaaae874e9 in _Py_UnixMain (argc=, argv=) at Modules/main.c:3063 #9 0x00002aaaabd843d5 in __libc_start_main () from /lib64/libc.so.6 #10 0x000000000040067e in _start () (gdb) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 12:29:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 16:29:12 +0000 Subject: [issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1563208152.01.0.0849926829648.issue37565@roundup.psfhosted.org> STINNER Victor added the comment: Oh. So Py_FinalizeEx() does get a SIGSEGV when triggering a garbage collection: the test doesn't crash, it's Python which crash at exit. > Program received signal SIGSEGV, Segmentation fault. > 0x00002aaaaae88924 in visit_decref (op=0x2aaaaacd3468, data=0x0) at Modules/gcmodule.c:271 > 271 if (PyObject_IS_GC(op)) { You can try to dump the content of op? For example: (gdb) print *op (gdb) print *op->ob_type Can you try to rebuild Python from source in debug mode, and then retry the script? Something like: --- wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz tar -xf Python-3.7.4.tar.xz cd Python-3.7.4/ ./configure --with-pydebug --prefix /opt/py37 make ./python script.py # no need to install Python --- If it works, maybe retry without --with-pydebug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 12:29:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Jul 2019 16:29:32 +0000 Subject: [issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1563208172.09.0.835761619851.issue37565@roundup.psfhosted.org> STINNER Victor added the comment: My notes to debug a crash on a GC collection: https://pythondev.readthedocs.io/debug_tools.html#debug-crash-in-garbage-collection-visit-decref ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 12:34:23 2019 From: report at bugs.python.org (Julien Palard) Date: Mon, 15 Jul 2019 16:34:23 +0000 Subject: [issue37597] audit event table breaks PDF sphinx build Message-ID: <1563208463.4.0.49055543405.issue37597@roundup.psfhosted.org> New submission from Julien Palard : The following commit: 44f91c388a6f4da9ed3300df32ca290b8aa104ea bpo-37390: Add audit event table to documentations (GH-14406) Also updates some (unreleased) event names to be consistent with the others. breaks PDF builds. Reproductible using: (cd Doc; sphinx-build -b latex -d build/doctrees -D latex_elements.papersize=a4 -D latex_engine=xelatex -D latex_elements.inputenc= -D latex_elements.fontenc=\\\\usepackage{xeCJK} -Ea -A daily=1 -A switchers=1 . build/latex) The exception raised is "NoUri", I patched sphinx [1] to add a few info, so it is a "sphinx.errors.NoUri: c-api/code". [1]: https://github.com/sphinx-doc/sphinx/pull/6583/files ---------- messages: 347980 nosy: christian.heimes, mdk, steve.dower priority: normal severity: normal status: open title: audit event table breaks PDF sphinx build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 12:37:40 2019 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 15 Jul 2019 16:37:40 +0000 Subject: [issue37547] Add _PyObject_CallMethodOneArg() In-Reply-To: <1562760379.8.0.22654038416.issue37547@roundup.psfhosted.org> Message-ID: <1563208660.14.0.95101620396.issue37547@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +14582 pull_request: https://github.com/python/cpython/pull/14785 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 12:42:20 2019 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 15 Jul 2019 16:42:20 +0000 Subject: [issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np In-Reply-To: <1529925495.69.0.56676864532.issue33955@psf.upfronthosting.co.za> Message-ID: <1563208940.29.0.799142918656.issue33955@roundup.psfhosted.org> Zackery Spytz added the comment: It seems that this issue is a duplicate of bpo-25518. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 12:43:38 2019 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 15 Jul 2019 16:43:38 +0000 Subject: [issue37547] Add _PyObject_CallMethodOneArg() In-Reply-To: <1562760379.8.0.22654038416.issue37547@roundup.psfhosted.org> Message-ID: <1563209018.39.0.879291386727.issue37547@roundup.psfhosted.org> Zackery Spytz added the comment: It seems that 59ad110d7a7784d53d0b502eebce0346597a6bef introduced a compiler warning in Modules/_io/winconsoleio.c. c:\projects\cpython\modules\_io\winconsoleio.c(208): warning C4133: 'function': incompatible types - from 'winconsoleio *' to 'PyObject *' [C:\projects\cpython\PCbuild\pythoncore.vcxproj] PR 14785 fixes this. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 13:08:42 2019 From: report at bugs.python.org (Michelle Johnson) Date: Mon, 15 Jul 2019 17:08:42 +0000 Subject: [issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1563210522.54.0.216942965561.issue37565@roundup.psfhosted.org> Michelle Johnson added the comment: Oh, ok. So, it doesn't seem like trying to get the contents of op was successful: (gdb) print *op $1 = {ob_refcnt = 0, ob_type = 0x0} (gdb) print *op->ob_type Cannot access memory at address 0x0 (gdb) I then followed your instructions to recompile in debug mode and retried the script. Here are the results: [jshelly at gl-build Python-3.7.4]$ ./python ~/script.py Current thread 0x00002ab43fe0d400 (most recent call first): File "/home/jshelly/script.py", line 12 in called True [jshelly at gl-build Python-3.7.4]$ Does that help at all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 13:11:21 2019 From: report at bugs.python.org (Andrew Carter) Date: Mon, 15 Jul 2019 17:11:21 +0000 Subject: [issue37598] Don't use _ as a function name in logging documentation cookbook Message-ID: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> New submission from Andrew Carter : Current docs link: https://docs.python.org/3/howto/logging-cookbook.html#implementing-structured-logging GitHub commit link: https://github.com/python/cpython/commit/4b88d6c6642450240a9dc22e6efbdc69baf890dd The suggestion is that for structured logging, a StructuredMessage class should be created with a __str__ method defined and then assigned to an _ variable and used as a logging formatter. As the _ variable is commonly used as a "skip variable" and it has other meanings inside the Python interactive shell - I recommend that this example is changed to one that maybe just defines a simple wrapper function. I'm happy to create a PR for this - but only if there's agreement that it's worthwhile and will get merged if suitable. Thanks, Andrew ---------- assignee: docs at python components: Documentation messages: 347984 nosy: AndrewCarterUK, docs at python priority: normal severity: normal status: open title: Don't use _ as a function name in logging documentation cookbook versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 13:35:38 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 15 Jul 2019 17:35:38 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1542070337.94.0.788709270274.issue35224@psf.upfronthosting.co.za> Message-ID: <1563212138.96.0.629320124096.issue35224@roundup.psfhosted.org> Barry A. Warsaw added the comment: I might be missing it, but I think the Language Reference still doesn't document assignment expressions. https://docs.python.org/3/reference/lexical_analysis.html#operators There are likely other places in the LR that need to be filled out with PEP 572 documentation. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:50:42 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Jul 2019 18:50:42 +0000 Subject: [issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu' In-Reply-To: <1562982731.24.0.816575023926.issue37577@roundup.psfhosted.org> Message-ID: <1563216642.58.0.830682933129.issue37577@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:52:15 2019 From: report at bugs.python.org (Diego Rojas) Date: Mon, 15 Jul 2019 18:52:15 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1563216735.78.0.223285262302.issue34160@roundup.psfhosted.org> Diego Rojas added the comment: Victor, you mean place again this code? https://github.com/python/cpython/pull/10163/files#diff-d5a064acb6ae44dcb7e01fee148c733dR926 And the recipe proposed in https://bugs.python.org/issue34160#msg338102 place it as a method of ElementTree or just as a helper function? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:52:27 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Jul 2019 18:52:27 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1563216747.49.0.106418775956.issue19696@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:55:56 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Jul 2019 18:55:56 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1563216956.72.0.032358150977.issue37521@roundup.psfhosted.org> Brett Cannon added the comment: I'm not sure why you think importlib.util.module_from_spec() adds a module to sys.modules? https://docs.python.org/3/library/importlib.html#importlib.util.module_from_spec doesn't say that nor does https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap.py#L549 actually do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:57:38 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Jul 2019 18:57:38 +0000 Subject: [issue37519] Three inconsistent module attributes In-Reply-To: <1562502652.41.0.952456238618.issue37519@roundup.psfhosted.org> Message-ID: <1563217058.69.0.372419589786.issue37519@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:59:34 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 15 Jul 2019 18:59:34 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1563217174.43.0.0264560698878.issue34160@roundup.psfhosted.org> Change by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 14:59:48 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 15 Jul 2019 18:59:48 +0000 Subject: [issue37519] Three inconsistent module attributes In-Reply-To: <1562502652.41.0.952456238618.issue37519@roundup.psfhosted.org> Message-ID: <1563217188.46.0.533411561174.issue37519@roundup.psfhosted.org> Eric V. Smith added the comment: While some of these might be inconsistent (I haven't really looked at it thoroughly yet), I think it might be problematic to change them at this point, since there's no doubt code out there that depends on the current behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 15:21:32 2019 From: report at bugs.python.org (paul j3) Date: Mon, 15 Jul 2019 19:21:32 +0000 Subject: [issue37564] ArgumentParser should support bool type according to truth values In-Reply-To: <1562857832.91.0.995710130518.issue37564@roundup.psfhosted.org> Message-ID: <1563218492.4.0.288691887828.issue37564@roundup.psfhosted.org> paul j3 added the comment: The use of `bool` as registry key only works because that object already exists as a builtin. This amounts a form of shadowing, and sets a dangerous precedent. type=bool should work as documented at https://docs.python.org/3/library/functions.html?highlight=bool#bool even if that is not what a casual user would expect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 15:22:50 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 15 Jul 2019 19:22:50 +0000 Subject: [issue37598] Don't use _ as a function name in logging documentation cookbook In-Reply-To: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> Message-ID: <1563218570.15.0.691178879392.issue37598@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:25:11 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 15 Jul 2019 20:25:11 +0000 Subject: [issue37522] http.cookies.SimpleCookie doesn't seem to be parsed using regulars In-Reply-To: <1562587209.99.0.655930628175.issue37522@roundup.psfhosted.org> Message-ID: <1563222311.98.0.372775412198.issue37522@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Library (Lib) -Extension Modules versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:39:43 2019 From: report at bugs.python.org (sgal) Date: Mon, 15 Jul 2019 20:39:43 +0000 Subject: [issue37599] Remove a vague statement in documentation of Integer Objects Message-ID: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> New submission from sgal : In current Python document (3.7 - 3.9) there is such statement in documentation of Integer Objects: The current implementation keeps an array of integer objects for all integers between ``-5`` and ``256``, when you create an int in that range you actually just get back a reference to the existing object. So it should be possible to change the value of ``1``. I suspect the behaviour of Python in this case is undefined. :-) The last sentence is vague. It is irresponsible to write "I suspect" in documentation. And as the statements ahead has already clarified the sense that this is "a current implementation", the last sentence should be removed. ---------- assignee: docs at python components: Documentation messages: 347990 nosy: docs at python, sgal priority: normal severity: normal status: open title: Remove a vague statement in documentation of Integer Objects type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:41:14 2019 From: report at bugs.python.org (Eric N. Vander Weele) Date: Mon, 15 Jul 2019 20:41:14 +0000 Subject: [issue37599] Remove a vague statement in documentation of Integer Objects In-Reply-To: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> Message-ID: <1563223274.18.0.854521475961.issue37599@roundup.psfhosted.org> Change by Eric N. Vander Weele : ---------- nosy: +ericvw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:46:29 2019 From: report at bugs.python.org (sgal) Date: Mon, 15 Jul 2019 20:46:29 +0000 Subject: [issue37599] Remove a vague statement in documentation of Integer Objects In-Reply-To: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> Message-ID: <1563223589.88.0.410128101443.issue37599@roundup.psfhosted.org> Change by sgal : ---------- keywords: +patch pull_requests: +14583 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14786 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 17:08:09 2019 From: report at bugs.python.org (wesinator) Date: Mon, 15 Jul 2019 21:08:09 +0000 Subject: [issue37600] sched_getaffinity() is missing - module 'os' has no attribute 'sched_getaffinity' Message-ID: <1563224889.65.0.0527195323011.issue37600@roundup.psfhosted.org> New submission from wesinator <13hurdw at gmail.com>: Python 3.7.4 macOS 10.14.5 (homebrew) According to https://docs.python.org/3/library/os.html#os.cpu_count , there is a method `os.sched_getaffinity()` (https://docs.python.org/3/library/os.html#os.sched_getaffinity) Code to reproduce : - ``` import os len(os.sched_getaffinity(0)) ``` Traceback (most recent call last): File "", line 1, in AttributeError: module 'os' has no attribute 'sched_getaffinity' ---------- components: Library (Lib) messages: 347991 nosy: wesinator priority: normal severity: normal status: open title: sched_getaffinity() is missing - module 'os' has no attribute 'sched_getaffinity' type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 17:09:07 2019 From: report at bugs.python.org (wesinator) Date: Mon, 15 Jul 2019 21:09:07 +0000 Subject: [issue37600] os.sched_getaffinity() is missing - module 'os' has no attribute 'sched_getaffinity' In-Reply-To: <1563224889.65.0.0527195323011.issue37600@roundup.psfhosted.org> Message-ID: <1563224947.91.0.103980392294.issue37600@roundup.psfhosted.org> Change by wesinator <13hurdw at gmail.com>: ---------- title: sched_getaffinity() is missing - module 'os' has no attribute 'sched_getaffinity' -> os.sched_getaffinity() is missing - module 'os' has no attribute 'sched_getaffinity' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 17:09:59 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 15 Jul 2019 21:09:59 +0000 Subject: [issue37598] Don't use _ as a function name in logging documentation cookbook In-Reply-To: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> Message-ID: <1563224999.47.0.685152316291.issue37598@roundup.psfhosted.org> Vinay Sajip added the comment: The comment at the end of the "_ = ..." line indicates clearly that it's optional to do that, and I assume that any reader will realise that they can use any suitable variable name rather than "_". There's no particular "recommendation" to use "_" and cookbook recipes are generally regarded as starting points for one's own code, rather than being copied verbatim into production scenarios. I specifically picked "_", despite knowing its other uses, because: * One use of "_" is as a function that does some form of translation on a passed string argument - language translation being the most common example - and this recipe is a very loose analogue of that type of usage * A very brief notation assists readability because once you've looked at the "_" definition, you can use constructions like the one further down in the recipe. Since "_" wasn't picked at random, I'd rather not change it - if people decide to use this recipe, it would be better for brevity and standardisation if "_" were to be used, IMO. I don't believe the usage of "_" in interactive interpreter sessions is relevant to this cookbook recipe and shouldn't, in my opinion, cause confusion, any more than where the use of "_" for language translations is being explored in an interactive session. In summary - please don't waste your time on this, though I appreciate the intent behind your suggestion - thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 17:47:30 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 15 Jul 2019 21:47:30 +0000 Subject: [issue37589] Missing dependences in the Makefile In-Reply-To: <1563087187.08.0.733315200631.issue37589@roundup.psfhosted.org> Message-ID: <1563227250.52.0.615333299753.issue37589@roundup.psfhosted.org> Kyle Stanley added the comment: Added twouters to the nosy list since he's the makefile expert according to https://devguide.python.org/experts/#miscellaneous. ---------- nosy: +aeros167, twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 18:34:54 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 15 Jul 2019 22:34:54 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1563230094.51.0.166206125642.issue36044@roundup.psfhosted.org> Neil Schemenauer added the comment: Thanks for the feedback. I agree that putting the tests in regrtest is better. I've made the following changes: - the --pgo option now uses the shorter list of tests by default - I added --pgo-extended as a regrtest option that enables the old behavior of running most of the tests. I considered being more fancy and having named sets of different tests (like the -u option) but I think just the two options (fast or slow) is good enough. I used "pgo-extended" because I think "fast" or "slow" is confusing (i.e. build is slower but hopefully resulting binary is faster). - You can still pass an explicit list of tests if you use the --pgo option. That should avoid breaking builds like the Docker one. - You can now configure the the PGO task using 'configure'. I think that is cleaner than trying to modify the Makefile after the fact. e.g. ./configure [...] --with-profile-task='-m test --pgo-extended' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 19:14:32 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 15 Jul 2019 23:14:32 +0000 Subject: [issue37600] os.sched_getaffinity() is missing - module 'os' has no attribute 'sched_getaffinity' In-Reply-To: <1563224889.65.0.0527195323011.issue37600@roundup.psfhosted.org> Message-ID: <1563232472.29.0.549755683768.issue37600@roundup.psfhosted.org> Josh Rosenberg added the comment: Per the docs on the function group that includes os.sched_getaffinity ( https://docs.python.org/3/library/os.html#interface-to-the-scheduler ): > These functions control how a process is allocated CPU time by the operating system. They are only available on some Unix platforms. For more detailed information, consult your Unix manpages. > New in version 3.3. > The following scheduling policies are exposed if they are supported by the operating system. OSX doesn't support these APIs, so Python on OSX won't have them. ---------- nosy: +josh.r resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 20:15:38 2019 From: report at bugs.python.org (Kevin Teague) Date: Tue, 16 Jul 2019 00:15:38 +0000 Subject: [issue37601] shutil.make_archive does not follow symlinks for zip archives Message-ID: <1563236138.18.0.17460405679.issue37601@roundup.psfhosted.org> New submission from Kevin Teague : Zip archives created with shutil.make_archive will not follow symlinks. The shutil._make_zipfile uses os.walk: for dirpath, dirnames, filenames in os.walk(base_dir) os.walk has the followlinks parameter: for dirpath, dirnames, filenames in os.walk(base_dir, followlinks=True) Setting followlinks to True will include symlinks in a zip archive. Could a followlinks parameter be added to shutil.make_archive? ---------- components: Library (Lib) messages: 347996 nosy: Kevin Teague priority: normal severity: normal status: open title: shutil.make_archive does not follow symlinks for zip archives versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 20:22:04 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Jul 2019 00:22:04 +0000 Subject: [issue37601] shutil.make_archive does not follow symlinks for zip archives In-Reply-To: <1563236138.18.0.17460405679.issue37601@roundup.psfhosted.org> Message-ID: <1563236524.8.0.0232857317766.issue37601@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +giampaolo.rodola, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 20:22:35 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Jul 2019 00:22:35 +0000 Subject: [issue37601] shutil.make_archive does not follow symlinks for zip archives In-Reply-To: <1563236138.18.0.17460405679.issue37601@roundup.psfhosted.org> Message-ID: <1563236555.36.0.781281847016.issue37601@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- type: -> enhancement versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 20:36:45 2019 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Jul 2019 00:36:45 +0000 Subject: [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563237405.05.0.879538158389.issue7940@roundup.psfhosted.org> Ezio Melotti added the comment: > Are there any real world examples which show the benefit of supporting > negative indices? A common case is ignoring parentheses at the beginning/end, e.g. >>> re.compile('[^,]+').findall('(foo,123,(),bar)') ['(foo', '123', '()', 'bar)'] >>> # ignore the surrounding () >>> re.compile('[^,]+').findall('(foo,123,(),bar)', 1, 15) ['foo', '123', '()', 'bar'] >>> >>> # extract attributes from a tag (poc, doesn't handle all cases) >>> re.compile('[^ ]+').findall('', 7, 39) ['type="checkbox"', 'id="foo"', 'checked'] In both cases using -1 as endpos is simpler. ---------- versions: +Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 21:05:20 2019 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Jul 2019 01:05:20 +0000 Subject: [issue37584] Multiple test failures with OSError: [Errno 84] Invalid or incomplete multibyte or wide character on ZFS with utf8only=on In-Reply-To: <1563012837.05.0.658851590788.issue37584@roundup.psfhosted.org> Message-ID: <1563239120.13.0.336643650174.issue37584@roundup.psfhosted.org> Ezio Melotti added the comment: I think Dimiter was able to fix most of the failures, except test_unicode_file_functions. Yesterday during the sprints we were looking at it, and we did some tests using the following snippet: import os import unicodedata upsilon_diaeresis_and_hook = "?" for form in ["NFC", "NFD", "NFKC", "NFKD"]: unicode_filename = unicodedata.normalize(form, upsilon_diaeresis_and_hook) with open(unicode_filename, "w") as f: f.write(form) print("N:", ascii(unicode_filename)) print([ascii(filename) for filename in os.listdir('.')]) On ext4 this creates 4 different files: ['\u03d4', '\u03d2\u0308', '\u03ab', '\u03a5\u0308'] On ZFS with utf8only=true (and I believe normalization=formD), only 2 files are created but each of the 4 filenames can be used to access either of the 2 files. This is also the default behavior on Mac. The test is already skipped on darwin (Lib/test/test_unicode_file_functions.py:120), and should be skipped for ZFS too (might depend on the exact flags used), however we weren't able to find a portable way to determine the filesystem and flags. An alternative is to try creating the 4 files and skip the test if only 2 gets created and if all the names can be used to open these two files, however this might mask other failures. Unless someone can come up with a better way to do this, I think this is the only option. In addition, different filesystems that don't exhibit this behavior can be used on Mac, so the test shouldn't be skipped in those cases. ---------- nosy: +serhiy.storchaka stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 22:29:44 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Tue, 16 Jul 2019 02:29:44 +0000 Subject: [issue7202] "python setup.py cmd --verbose" does not set verbosity In-Reply-To: <1256481428.97.0.691214379627.issue7202@psf.upfronthosting.co.za> Message-ID: <1563244184.4.0.987299054756.issue7202@roundup.psfhosted.org> Change by Giovanni Cappellotto : ---------- keywords: +patch pull_requests: +14585 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14787 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 22:35:40 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Tue, 16 Jul 2019 02:35:40 +0000 Subject: [issue7202] "python setup.py cmd --verbose" does not set verbosity In-Reply-To: <1256481428.97.0.691214379627.issue7202@psf.upfronthosting.co.za> Message-ID: <1563244540.5.0.0656069216099.issue7202@roundup.psfhosted.org> Giovanni Cappellotto added the comment: I took a stab at this, see attached PR. I was able encode the first two cases described by @tarek, but not the first one because `_parse_command_opts` doesn't have visibility to the list of global options that have already been parsed. Note: I had to move `log.set_verbosity(self.verbose)` after the call to `_parse_command_opts` in order to correctly apply the verbosity level after all command options are parsed. I think there should be a better way to handle this case, maybe by creating a `verbose` setter that re-runs `log.set_verbosity` every time `verbose` value is updated. ---------- nosy: +potomak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 23:17:12 2019 From: report at bugs.python.org (Ethan Furman) Date: Tue, 16 Jul 2019 03:17:12 +0000 Subject: [issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned In-Reply-To: <1535485064.24.0.56676864532.issue34536@psf.upfronthosting.co.za> Message-ID: <1563247032.41.0.641896206651.issue34536@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 23:20:42 2019 From: report at bugs.python.org (Ethan Furman) Date: Tue, 16 Jul 2019 03:20:42 +0000 Subject: [issue34443] enum repr should use __qualname__ In-Reply-To: <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za> Message-ID: <1563247242.88.0.218674845276.issue34443@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 23:27:52 2019 From: report at bugs.python.org (Ethan Furman) Date: Tue, 16 Jul 2019 03:27:52 +0000 Subject: [issue29577] Enum: mixin classes don't mix well with already mixed Enums In-Reply-To: <1487210984.19.0.348647583319.issue29577@psf.upfronthosting.co.za> Message-ID: <1563247672.43.0.0787190428468.issue29577@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 00:58:57 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2019 04:58:57 +0000 Subject: [issue37530] IDLE: simplify, optimize, and clean up code context In-Reply-To: <1562694287.35.0.507911055212.issue37530@roundup.psfhosted.org> Message-ID: <1563253137.23.0.949507846597.issue37530@roundup.psfhosted.org> Terry J. Reedy added the comment: PR 14030 for #17535 (line numbers) also has code for 1. I want to merge this first, and fix-up the other. Changing context font at the same time as the text font, instead of up to 1 second later, eliminates a visual glitch and is a user-visible improvement. Ditto for highlight changes, although the situation is more complicated due to text recoloring (a separate issue). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 01:10:25 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2019 05:10:25 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563253825.5.0.0370665893199.issue33610@roundup.psfhosted.org> Terry J. Reedy added the comment: I2: replace font/hightlight loop with notification and immediate change instead of a delay is a bugfix. In testing PR 14675 for #37530 I discovered a bug. 'Show' always shows a single blank line, as if the top visible line were the top line of the file. One should not have to scroll to trigger the context calculation. This exists now, prior to the new PR. If/when we add a hotkey (M4), once should be able to show, see context, and hide just by hitting hotkey twice. Add C3: Make 'Show' show the context for the current top visible line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 01:30:27 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Tue, 16 Jul 2019 05:30:27 +0000 Subject: [issue37602] nonzero fixer problem Message-ID: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> New submission from ?? : An easy problem. It seems like nonzero fixer can only fix definition, not usage. nonzero fixer cannot fix problems like below: a = 1 a.__nonzero__() And there are no cases of __nonzero__() usage in test cases from test_fixers.py.(all cases test only definition rename) It might not be a bug, since in DOC it just says "rename", not "convert". (If it is not a bug, the doc must be considered to be kinds of confusing and should add additional description.)but adding this automatic transformation is really useful in my current work, so at least an optional fixer is needed for 2to3. A fixer of __oct__(),__hex__() to oct(),hex() is also in need, but 2to3 lacks such fixer. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 348002 nosy: shiyuchong priority: normal severity: normal status: open title: nonzero fixer problem type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 01:42:43 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2019 05:42:43 +0000 Subject: [issue37559] IDLE: Scrolling issues with code context shown In-Reply-To: <1562839219.15.0.3914256467.issue37559@roundup.psfhosted.org> Message-ID: <1563255763.73.0.733076167105.issue37559@roundup.psfhosted.org> Terry J. Reedy added the comment: 'at least' means 'get something working, then consider expanding'. The scrollwheel is tougher without built-in start/stop events equivalent to press/release. We could, however, synthesize them. But I want to start with mouse button, and it that works, consider keys next. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 01:53:15 2019 From: report at bugs.python.org (Eric Wieser) Date: Tue, 16 Jul 2019 05:53:15 +0000 Subject: [issue32782] memoryview & ctypes: incorrect itemsize for empty array In-Reply-To: <1517943201.04.0.467229070634.issue32782@psf.upfronthosting.co.za> Message-ID: <1563256395.1.0.535738293102.issue32782@roundup.psfhosted.org> Eric Wieser added the comment: Pinging again, now that the patch has undergone a revision with some cleanup thanks to @skrah ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 03:43:18 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Jul 2019 07:43:18 +0000 Subject: [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1563262998.94.0.0348570906228.issue37602@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 03:51:35 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Jul 2019 07:51:35 +0000 Subject: [issue37598] Don't use _ as a function name in logging documentation cookbook In-Reply-To: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> Message-ID: <1563263495.94.0.825534165769.issue37598@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Slightly unrelated to the issue but I noticed the below statement in the docs page couple of times. I think it's related to the order of kwargs when the statement was added in 3d9e972270270e1498712065a17ec3a589ae8986. Since order of kwargs is guaranteed from Python 3.6 can this be removed? > Note that the order of items might be different according to the version of Python used. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 04:46:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 08:46:21 +0000 Subject: [issue37584] Multiple test failures with OSError: [Errno 84] Invalid or incomplete multibyte or wide character on ZFS with utf8only=on In-Reply-To: <1563012837.05.0.658851590788.issue37584@roundup.psfhosted.org> Message-ID: <1563266781.2.0.471279387604.issue37584@roundup.psfhosted.org> STINNER Victor added the comment: """ On ext4 this creates 4 different files: ['\u03d4', '\u03d2\u0308', '\u03ab', '\u03a5\u0308'] On ZFS with utf8only=true (and I believe normalization=formD), only 2 files are created but each of the 4 filenames can be used to access either of the 2 files. This is also the default behavior on Mac. The test is already skipped on darwin (Lib/test/test_unicode_file_functions.py:120), and should be skipped for ZFS too (might depend on the exact flags used), however we weren't able to find a portable way to determine the filesystem and flags. """ I suggest to create a temporary directory, create the 4 files and see how many files you can using os.listdir(). If you get 4, the FS doesn't normalize anything. If you get less, it's likely that the FS normalizes names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 04:59:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 08:59:25 +0000 Subject: [issue37330] open(): remove 'U' mode, deprecated since Python 3.3 In-Reply-To: <1560872905.7.0.609892598407.issue37330@roundup.psfhosted.org> Message-ID: <1563267565.43.0.695430146694.issue37330@roundup.psfhosted.org> STINNER Victor added the comment: docutils is already fixed in the development version. I requested a release: https://sourceforge.net/p/docutils/bugs/364/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 05:52:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 09:52:21 +0000 Subject: [issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py Message-ID: <1563270741.47.0.416934432776.issue37603@roundup.psfhosted.org> New submission from STINNER Victor : bpo-16806 introduced a regression with the following change: commit 995d9b92979768125ced4da3a56f755bcdf80f6e (refs/bisect/bad) Author: Anthony Sottile Date: Sat Jan 12 20:05:13 2019 -0800 bpo-16806: Fix `lineno` and `col_offset` for multi-line string tokens (GH-10021) get-pip.py does now crash: $ ./python get-pip.py --help python: Parser/parsetok.c:266: parsetok: Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed. Aborted (core dumped) Python 3.8 is also affected. get-pip.py comes from: https://bootstrap.pypa.io/get-pip.py Reproducing depends if REALLOC() returns a new pointer, see below. I attached get-pip2.py: simplified version which crash when using "./python get-pip2.py --help". If it doesn't crash, duplicate lines to make the file larger. -- The root issue seems to be that tok->multi_line_start isn't updated on REALLOC() in tok_nextc(): newbuf = (char *)PyMem_REALLOC(newbuf, newsize); if (newbuf == NULL) { tok->done = E_NOMEM; tok->cur = tok->inp; return EOF; } tok->buf = newbuf; tok->cur = tok->buf + cur; tok->line_start = tok->cur; I guess that multi_line_start should also be updated there? tok->multi_line_start = tok->cur; ---------- components: Interpreter Core keywords: 3.8regression messages: 348008 nosy: lukasz.langa, vstinner priority: release blocker severity: normal status: open title: parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 05:52:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 09:52:31 +0000 Subject: [issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py In-Reply-To: <1563270741.47.0.416934432776.issue37603@roundup.psfhosted.org> Message-ID: <1563270751.83.0.426914662752.issue37603@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +inada.naoki, pablogsal, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 05:52:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 09:52:56 +0000 Subject: [issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py In-Reply-To: <1563270741.47.0.416934432776.issue37603@roundup.psfhosted.org> Message-ID: <1563270776.93.0.957133536644.issue37603@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file48486/get-pip2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 05:53:44 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 16 Jul 2019 09:53:44 +0000 Subject: [issue37598] Don't use _ as a function name in logging documentation cookbook In-Reply-To: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> Message-ID: <1563270824.54.0.0298811823105.issue37598@roundup.psfhosted.org> Vinay Sajip added the comment: > Since order of kwargs is guaranteed from Python 3.6 can this be removed? Well, the statement about order isn't inaccurate when talking about Python in general and the cookbook is a resource meant to be useful across multiple Python implementations and versions, so I'd be inclined to leave it as is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 05:54:22 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 16 Jul 2019 09:54:22 +0000 Subject: [issue37598] Don't use _ as a function name in logging documentation cookbook In-Reply-To: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> Message-ID: <1563270862.97.0.00724631781835.issue37598@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 06:04:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 10:04:01 +0000 Subject: [issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py In-Reply-To: <1563270741.47.0.416934432776.issue37603@roundup.psfhosted.org> Message-ID: <1563271441.38.0.739919363583.issue37603@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +14586 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14789 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 06:04:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 10:04:59 +0000 Subject: [issue16806] col_offset is -1 and lineno is wrong for multiline string expressions In-Reply-To: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> Message-ID: <1563271499.56.0.934869224417.issue16806@roundup.psfhosted.org> STINNER Victor added the comment: commit 995d9b92979768125ced4da3a56f755bcdf80f6e introduced a regression: bpo-37603: parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 06:09:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 10:09:27 +0000 Subject: [issue37324] collections: remove deprecated aliases to ABC classes In-Reply-To: <1560803912.16.0.0813723259969.issue37324@roundup.psfhosted.org> Message-ID: <1563271767.68.0.26783543924.issue37324@roundup.psfhosted.org> STINNER Victor added the comment: Right now (pip 19.1.1?), "./python -m venv env" still fails because of html5lib/_trie/py.py. There is still no activitiy on the request to get a new release: https://github.com/html5lib/html5lib-python/issues/419 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 06:13:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 10:13:32 +0000 Subject: [issue37406] Disable runtime checks in release mode In-Reply-To: <1561504591.64.0.387503975069.issue37406@roundup.psfhosted.org> Message-ID: <1563272012.3.0.246293049305.issue37406@roundup.psfhosted.org> STINNER Victor added the comment: I didn't find time to write a proper a rationale for this change, and I will not be available next weeks. So I prefer to close this issue. I may reopen it later once I have a strong rationale :-) In the meanwhile, have a look at the new PyHandle API idea which will start without sanity check in release mode since day 1 :-) https://github.com/pyhandle/pyhandle/ ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 06:27:32 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Jul 2019 10:27:32 +0000 Subject: [issue37601] shutil.make_archive does not follow symlinks for zip archives In-Reply-To: <1563236138.18.0.17460405679.issue37601@roundup.psfhosted.org> Message-ID: <1563272852.43.0.439092603953.issue37601@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This looks like a reasonable addition to me. Other APIs in shutil have follow_symlinks parameter. ? /tmp ls -al sym total 0 drwxr-xr-x 3 karthikeyansingaravelan staff 102 Jul 16 15:52 . drwxr-xr-x 58 karthikeyansingaravelan staff 1972 Jul 16 15:52 .. -rw-r--r-- 1 karthikeyansingaravelan staff 0 Jul 16 15:05 a ? /tmp ls -al foo total 8 drwxr-xr-x 5 karthikeyansingaravelan staff 170 Jul 16 15:43 . drwxr-xr-x 58 karthikeyansingaravelan staff 1972 Jul 16 15:52 .. -rw-r--r-- 1 karthikeyansingaravelan staff 0 Jul 16 15:00 a -rw-r--r-- 1 karthikeyansingaravelan staff 0 Jul 16 15:00 b lrwxr-xr-x 1 karthikeyansingaravelan staff 8 Jul 16 15:04 c -> /tmp/sym # Using zip in Mac and zipfile module ? /tmp python3 -m zipfile -c cmd.zip foo/* ? /tmp python3 -m zipfile -l cmd.zip File Name Modified Size a 2019-07-16 15:00:04 0 b 2019-07-16 15:00:10 0 c/ 2019-07-16 15:52:06 0 c/a 2019-07-16 15:05:46 0 # Using make_archive ? /tmp python3 -c "import shutil; shutil.make_archive('make_archive', 'zip', 'foo')" ? /tmp python3 -m zipfile -l make_archive.zip File Name Modified Size c/ 2019-07-16 15:52:06 0 a 2019-07-16 15:00:04 0 b 2019-07-16 15:00:10 0 ---------- nosy: +serhiy.storchaka, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 08:03:41 2019 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Tue, 16 Jul 2019 12:03:41 +0000 Subject: [issue34443] enum repr should use __qualname__ In-Reply-To: <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za> Message-ID: <1563278621.12.0.725151841015.issue34443@roundup.psfhosted.org> Walter D?rwald added the comment: Can we at least get the __qualname__ in exception messages? Currently enum.Enum.__new__() and enum.Enum._missing_() use: raise ValueError("%r is not a valid %s" % (value, cls.__name__)) IMHO this should be: raise ValueError("%r is not a valid %s" % (value, cls.__qualname__)) in both spots. Example code: class Person: class Type(enum.Enum): EMPLOYEE = "employee" CUSTOMER = "customer" SUPPLIER = "supplier" class Contact: class Type(enum.Enum): EMAIL = "email" PHONE = "phone" MOBILE = "mobile" with this the following code: Person.Type('foo') raises the exception: ValueError: 'foo' is not a valid Type During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/enum.py", line 310, in __call__ return cls.__new__(cls, value) File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/enum.py", line 564, in __new__ raise exc File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/enum.py", line 548, in __new__ result = cls._missing_(value) File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/enum.py", line 577, in _missing_ raise ValueError("%r is not a valid %s" % (value, cls.__name__)) ValueError: 'foo' is not a valid Type IMHO the exception message: ValueError: 'foo' is not a valid Person.Type would be much more helpful and unambiguous. And BTW, maybe we should suppress exception chaining here, i.e. use: raise ValueError("%r is not a valid %s" % (value, cls.__qualname__)) from None ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 09:24:57 2019 From: report at bugs.python.org (Thomas Grainger) Date: Tue, 16 Jul 2019 13:24:57 +0000 Subject: [issue37604] warnings should use a ContextVar to manage filters/registry Message-ID: <1563283497.67.0.626244687635.issue37604@roundup.psfhosted.org> New submission from Thomas Grainger : this would allow ``warnings.catch_warnings`` to be threadsafe ---------- messages: 348015 nosy: graingert priority: normal severity: normal status: open title: warnings should use a ContextVar to manage filters/registry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 09:26:35 2019 From: report at bugs.python.org (Thomas Grainger) Date: Tue, 16 Jul 2019 13:26:35 +0000 Subject: [issue37604] warnings should use a ContextVar to manage filters/registry In-Reply-To: <1563283497.67.0.626244687635.issue37604@roundup.psfhosted.org> Message-ID: <1563283595.72.0.563502590671.issue37604@roundup.psfhosted.org> Thomas Grainger added the comment: note that PEP 550 previously mentions catch_warnings as something that would benefit from some sort of Execution Context management > Context managers like decimal contexts, numpy.errstate, and warnings.catch_warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 10:39:19 2019 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Jul 2019 14:39:19 +0000 Subject: [issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu' In-Reply-To: <1562982731.24.0.816575023926.issue37577@roundup.psfhosted.org> Message-ID: <1563287959.86.0.260586452429.issue37577@roundup.psfhosted.org> Matthias Klose added the comment: this is issue #37561, making the sysconfigdata file name not changing with the kernel version of the OS. I need to commit that patch to the trunk and 3.8. But apparently pip needs to be aware of that as well ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 10:46:07 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Tue, 16 Jul 2019 14:46:07 +0000 Subject: [issue37256] urllib.request.Request documentation erroneously refers to the "final two" In-Reply-To: <1560366755.97.0.221740241329.issue37256@roundup.psfhosted.org> Message-ID: <1563288367.18.0.366817596732.issue37256@roundup.psfhosted.org> Change by Ngalim Siregar : ---------- keywords: +patch pull_requests: +14587 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14792 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 10:51:32 2019 From: report at bugs.python.org (=?utf-8?q?Luis_Alejandro_Mart=C3=ADnez_Faneyth?=) Date: Tue, 16 Jul 2019 14:51:32 +0000 Subject: [issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu' In-Reply-To: <1562982731.24.0.816575023926.issue37577@roundup.psfhosted.org> Message-ID: <1563288692.23.0.502976068637.issue37577@roundup.psfhosted.org> Luis Alejandro Mart?nez Faneyth added the comment: Thanks Christian for the suggestion and Matthias. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 10:57:06 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jul 2019 14:57:06 +0000 Subject: [issue37599] Remove a vague statement in documentation of Integer Objects In-Reply-To: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> Message-ID: <1563289026.22.0.854561046197.issue37599@roundup.psfhosted.org> Raymond Hettinger added the comment: There's nothing wrong with a little wry humor in the docs, especially when the provide a little insight into the implementation. It isn't irresponsible at all -- please avoid those pejoratives. That said, I'll accept the patch because the sentence isn't necessary and has other issues (the statement makes more sense in the ctypes module where such changes are possible and it applies broadly to all immutable objects, not just pre-computed singleton integers). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:08:58 2019 From: report at bugs.python.org (Abhilash Raj) Date: Tue, 16 Jul 2019 15:08:58 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563289738.87.0.55504769115.issue37461@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +14588 pull_request: https://github.com/python/cpython/pull/14794 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:13:43 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jul 2019 15:13:43 +0000 Subject: [issue37352] Typo in documentation: "to making it easy" In-Reply-To: <1561051076.38.0.680855087082.issue37352@roundup.psfhosted.org> Message-ID: <1563290023.58.0.32554808004.issue37352@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset a0f7119f1584db5b32deffb60a68d830673ebbdf by Raymond Hettinger (Ilya Kamenshchikov) in branch 'master': bpo-37352: Minor word-smithing for design.rst (GH #14730) https://github.com/python/cpython/commit/a0f7119f1584db5b32deffb60a68d830673ebbdf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:14:36 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jul 2019 15:14:36 +0000 Subject: [issue37352] Typo in documentation: "to making it easy" In-Reply-To: <1561051076.38.0.680855087082.issue37352@roundup.psfhosted.org> Message-ID: <1563290076.08.0.688907389621.issue37352@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:15:23 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jul 2019 15:15:23 +0000 Subject: [issue37599] Remove a vague statement in documentation of Integer Objects In-Reply-To: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> Message-ID: <1563290123.19.0.134783425275.issue37599@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 1d8b04edfdc3030e645730492bfcc27b75718b96 by Raymond Hettinger (sgal) in branch 'master': bpo-37599: Remove a vague statement in documentation of Integer Objects (#14786) https://github.com/python/cpython/commit/1d8b04edfdc3030e645730492bfcc27b75718b96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:16:14 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jul 2019 15:16:14 +0000 Subject: [issue37599] Remove a vague statement in documentation of Integer Objects In-Reply-To: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> Message-ID: <1563290174.1.0.293674618766.issue37599@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:22:37 2019 From: report at bugs.python.org (Michelle Johnson) Date: Tue, 16 Jul 2019 15:22:37 +0000 Subject: [issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset In-Reply-To: <1562857971.79.0.0137287316017.issue37565@roundup.psfhosted.org> Message-ID: <1563290557.48.0.143925639803.issue37565@roundup.psfhosted.org> Michelle Johnson added the comment: Is the problem I'm seeing possibly related to this issue: https://bugs.python.org/issue21131 It seems to share a lot of similarities. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:39:23 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 16 Jul 2019 15:39:23 +0000 Subject: [issue37499] test_gdb.test_pycfunction should use dedicated test functions In-Reply-To: <1562272164.16.0.880170642341.issue37499@roundup.psfhosted.org> Message-ID: <1563291563.93.0.0451901469321.issue37499@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +14589 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14795 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:49:35 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2019 15:49:35 +0000 Subject: [issue37605] CI should not depend on gmane response Message-ID: <1563292175.7.0.185090199306.issue37605@roundup.psfhosted.org> New submission from Terry J. Reedy : On Travis, 'Documentation tests' passing is apparently required. Line 23 of nntplib.rst is ">>> s = NNTP('news.gmane.org')" I use gmane and occasional failures to respond are routine. Being able to merge should not depend on this external site. In addition to a real failure, the following happen on PR 14675 earlier today. https://travis-ci.org/python/cpython/jobs/559289634 Warning, treated as error: ********************************************************************** File "library/nntplib.rst", line ?, in default Failed example: s = NNTP('news.gmane.org') Exception raised: Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/doctest.py", line 1328, in __run exec(compile(example.source, filename, "single", File "", line 1, in s = NNTP('news.gmane.org') File "/home/travis/build/python/cpython/Lib/nntplib.py", line 1050, in __init__ _NNTPBase.__init__(self, file, host, File "/home/travis/build/python/cpython/Lib/nntplib.py", line 331, in __init__ self.welcome = self._getresp() File "/home/travis/build/python/cpython/Lib/nntplib.py", line 456, in _getresp raise NNTPTemporaryError(resp) nntplib.NNTPTemporaryError: 400 load at 16.59, try later Try later is what I do. This exception should somehow be skipped. I don't know anything about Travis and doctest tests and how flakey doctests are supposed to be handled. If nothing else, put the whole example is a try-except block? >>> try: # News sites can fail to respond. ... s = NNTP('news.gmane.org') ... ... ... except: # If site failure, try later. ... pass Since output varies, I presume output checking is suppressed. ---------- components: Tests messages: 348023 nosy: pablogsal, terry.reedy, vstinner priority: normal severity: normal stage: needs patch status: open title: CI should not depend on gmane response type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:53:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 15:53:36 +0000 Subject: [issue37605] CI should not depend on gmane response In-Reply-To: <1563292175.7.0.185090199306.issue37605@roundup.psfhosted.org> Message-ID: <1563292416.91.0.30477417171.issue37605@roundup.psfhosted.org> STINNER Victor added the comment: > On Travis, 'Documentation tests' passing is apparently required. Line 23 of nntplib.rst is ">>> s = NNTP('news.gmane.org')" I use gmane and occasional failures to respond are routine. Being able to merge should not depend on this external site. Python test suite uses many external services: https://pythondev.readthedocs.io/infra.html#services-used-by-unit-tests You should all be skipped if the "network" resource is not used, which is the default. Many tests were modified to catch network failures and ignore the test in this case. test_nntplib is known to be very fragile: it doesn't handle network issues. I would suggest to remove functional tests which depend on external servers, since these tests fail often and nobody seems to care of test_nntplib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:57:51 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 Jul 2019 15:57:51 +0000 Subject: [issue37605] CI should not depend on gmane response In-Reply-To: <1563292175.7.0.185090199306.issue37605@roundup.psfhosted.org> Message-ID: <1563292671.18.0.768485376268.issue37605@roundup.psfhosted.org> Zachary Ware added the comment: Victor, note that this issue is about the nntplib doctests in Doc/library/nntplib.rst. I agree that any examples in that file that actually hit an external server should be marked as not doctests. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, zach.ware versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:01:20 2019 From: report at bugs.python.org (Ethan Furman) Date: Tue, 16 Jul 2019 16:01:20 +0000 Subject: [issue34443] enum repr should use __qualname__ In-Reply-To: <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za> Message-ID: <1563292880.77.0.160837822528.issue34443@roundup.psfhosted.org> Ethan Furman added the comment: Both are good suggestions. The first should definitely happen. I'll investigate the second. ---------- resolution: rejected -> stage: resolved -> test needed status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:05:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 16:05:54 +0000 Subject: [issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py In-Reply-To: <1563270741.47.0.416934432776.issue37603@roundup.psfhosted.org> Message-ID: <1563293154.95.0.95807753685.issue37603@roundup.psfhosted.org> STINNER Victor added the comment: PR 14433 seems to fix this issue and it contains a test. My PR 14789 fixed get-pip.py, but it introduces another bug: I closed it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:16:40 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 16 Jul 2019 16:16:40 +0000 Subject: [issue3753] bytearray incompatible with y# In-Reply-To: <1220285023.36.0.49129522463.issue3753@psf.upfronthosting.co.za> Message-ID: <1563293800.32.0.990308474461.issue3753@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- pull_requests: +14590 pull_request: https://github.com/python/cpython/pull/14679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:16:40 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 16 Jul 2019 16:16:40 +0000 Subject: [issue3753] bytearray incompatible with y# In-Reply-To: <1220285023.36.0.49129522463.issue3753@psf.upfronthosting.co.za> Message-ID: <1563293800.38.0.900384976.issue3753@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- pull_requests: +14590, 14591 pull_request: https://github.com/python/cpython/pull/14679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:21:54 2019 From: report at bugs.python.org (Benjamin Mintz) Date: Tue, 16 Jul 2019 16:21:54 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1563294114.83.0.720947857569.issue37521@roundup.psfhosted.org> Benjamin Mintz added the comment: I dunno, one of those three does. I suppose it's spec.loader.exec_module(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:23:04 2019 From: report at bugs.python.org (hai shi) Date: Tue, 16 Jul 2019 16:23:04 +0000 Subject: [issue37606] Improve test_dtrace.py Message-ID: <1563294184.02.0.420310265228.issue37606@roundup.psfhosted.org> New submission from hai shi : $ ./python -m unittest test.test_dtrace ssssE ====================================================================== ERROR: setUpClass (test.test_dtrace.TraceTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shihai/workspace/cpython/Lib/test/test_dtrace.py", line 110, in setUpClass self.backend.assert_usable() AttributeError: 'NoneType' object has no attribute 'assert_usable' ---------------------------------------------------------------------- Ran 0 tests in 0.008s FAILED (errors=1, skipped=4) ---------- components: Tests messages: 348029 nosy: shihai1991 priority: normal severity: normal status: open title: Improve test_dtrace.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:26:27 2019 From: report at bugs.python.org (hai shi) Date: Tue, 16 Jul 2019 16:26:27 +0000 Subject: [issue37606] Improve test_dtrace.py In-Reply-To: <1563294184.02.0.420310265228.issue37606@roundup.psfhosted.org> Message-ID: <1563294387.9.0.0616251976251.issue37606@roundup.psfhosted.org> hai shi added the comment: Looks backend should be estimated before running unit tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:28:17 2019 From: report at bugs.python.org (hai shi) Date: Tue, 16 Jul 2019 16:28:17 +0000 Subject: [issue37606] Improve test_dtrace.py In-Reply-To: <1563294184.02.0.420310265228.issue37606@roundup.psfhosted.org> Message-ID: <1563294497.56.0.511101817012.issue37606@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14592 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14796 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:52:53 2019 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 16 Jul 2019 16:52:53 +0000 Subject: [issue37606] Improve test_dtrace.py In-Reply-To: <1563294184.02.0.420310265228.issue37606@roundup.psfhosted.org> Message-ID: <1563295973.34.0.429363798537.issue37606@roundup.psfhosted.org> Xiang Zhang added the comment: In Py3, you should use `python -m test test_dtrace` to run the test suite. ---------- nosy: +xiang.zhang resolution: -> not a bug stage: patch review -> resolved status: open -> closed versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:53:15 2019 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 16 Jul 2019 16:53:15 +0000 Subject: [issue37606] Improve test_dtrace.py In-Reply-To: <1563294184.02.0.420310265228.issue37606@roundup.psfhosted.org> Message-ID: <1563295995.75.0.719115008229.issue37606@roundup.psfhosted.org> Change by Xiang Zhang : ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 12:56:43 2019 From: report at bugs.python.org (wesinator) Date: Tue, 16 Jul 2019 16:56:43 +0000 Subject: [issue37607] segfault running code in jupyter on macOS 10.14.5 - crashed on child side of fork pre-exec Message-ID: <1563296203.64.0.981111226039.issue37607@roundup.psfhosted.org> New submission from wesinator <13hurdw at gmail.com>: python 3.7.4 (homebrew) macOS 10.14.5 16 GB DDR4 segfault encountered when running test code in jupyter. Application Specific Information: crashed on child side of fork pre-exec I'm not in a position to share the code unfortunately, but I can say it was running multiple iterations of subprocess.Popen() within a multiprocessing Pool using os.cpu_count() / 2 number of processes (in this case 12/2 = 6). macOS .crash dump file attached ---------- components: macOS files: Python_2019-07-16-123850_MacBook-Pro.crash messages: 348032 nosy: ned.deily, ronaldoussoren, wesinator priority: normal severity: normal status: open title: segfault running code in jupyter on macOS 10.14.5 - crashed on child side of fork pre-exec type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48487/Python_2019-07-16-123850_MacBook-Pro.crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 13:01:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Jul 2019 17:01:17 +0000 Subject: [issue37607] segfault running code in jupyter on macOS 10.14.5 - crashed on child side of fork pre-exec In-Reply-To: <1563296203.64.0.981111226039.issue37607@roundup.psfhosted.org> Message-ID: <1563296477.5.0.111240324452.issue37607@roundup.psfhosted.org> STINNER Victor added the comment: See bpo-33725 and multiprocessing documentation: https://docs.python.org/dev/library/multiprocessing.html#contexts-and-start-methods "Changed in version 3.8: On macOS, the spawn start method is now the default. The fork start method should be considered unsafe as it can lead to crashes of the subprocess. See bpo-33725." Change the start method to spawn. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 13:24:55 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 16 Jul 2019 17:24:55 +0000 Subject: [issue37597] audit event table breaks PDF sphinx build In-Reply-To: <1563208463.4.0.49055543405.issue37597@roundup.psfhosted.org> Message-ID: <1563297895.87.0.429992552584.issue37597@roundup.psfhosted.org> Steve Dower added the comment: Guess we need a real Sphinx expert to help out here. Somehow we need to get explicit backlinks, but I couldn't figure out how to resolve them normally through an extension. If we can do that, this will probably go away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 13:35:21 2019 From: report at bugs.python.org (hai shi) Date: Tue, 16 Jul 2019 17:35:21 +0000 Subject: [issue37606] Improve test_dtrace.py In-Reply-To: <1563294184.02.0.420310265228.issue37606@roundup.psfhosted.org> Message-ID: <1563298521.11.0.048569116357.issue37606@roundup.psfhosted.org> hai shi added the comment: Thanks, copy that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 13:50:16 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jul 2019 17:50:16 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1563299416.28.0.0156740098298.issue36564@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14593 pull_request: https://github.com/python/cpython/pull/14797 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 13:50:23 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jul 2019 17:50:23 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1563299423.39.0.609959443032.issue36564@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14594 pull_request: https://github.com/python/cpython/pull/14798 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 13:50:24 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Jul 2019 17:50:24 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1563299424.4.0.805853001905.issue36564@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset f69d5c61981ea97d251db515c7ff280fcc17182d by Barry Warsaw (Paul Ganssle) in branch 'master': Fix infinite loop in email folding logic (GH-12732) https://github.com/python/cpython/commit/f69d5c61981ea97d251db515c7ff280fcc17182d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 13:50:33 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jul 2019 17:50:33 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1563299433.51.0.897558908583.issue36564@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14595 pull_request: https://github.com/python/cpython/pull/14799 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 14:06:01 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 16 Jul 2019 18:06:01 +0000 Subject: [issue36712] duplicate method definition in Lib/email/test/test_email_renamed.py In-Reply-To: <1556119037.17.0.0080436933891.issue36712@roundup.psfhosted.org> Message-ID: <1563300361.08.0.970763785957.issue36712@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +14596 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14800 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 14:08:42 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jul 2019 18:08:42 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1563300522.16.0.178215359465.issue36564@roundup.psfhosted.org> miss-islington added the comment: New changeset 6a2aec0ff587032beb8aac8cbebb09e7a52f6694 by Miss Islington (bot) in branch '3.8': Fix infinite loop in email folding logic (GH-12732) https://github.com/python/cpython/commit/6a2aec0ff587032beb8aac8cbebb09e7a52f6694 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 14:15:46 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jul 2019 18:15:46 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1563300946.42.0.0670263709874.issue36564@roundup.psfhosted.org> miss-islington added the comment: New changeset e7bec26937ce602ca21cc1f78a391adcf5eafdf1 by Miss Islington (bot) in branch '3.7': Fix infinite loop in email folding logic (GH-12732) https://github.com/python/cpython/commit/e7bec26937ce602ca21cc1f78a391adcf5eafdf1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 14:19:16 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 16 Jul 2019 18:19:16 +0000 Subject: [issue36711] duplicate method definition in Lib/email/feedparser.py In-Reply-To: <1556118864.95.0.640018454718.issue36711@roundup.psfhosted.org> Message-ID: <1563301156.18.0.645559827645.issue36711@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +14597 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14801 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 14:31:39 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 16 Jul 2019 18:31:39 +0000 Subject: [issue36711] duplicate method definition in Lib/email/feedparser.py In-Reply-To: <1556118864.95.0.640018454718.issue36711@roundup.psfhosted.org> Message-ID: <1563301899.59.0.291084560926.issue36711@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 14:31:53 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 16 Jul 2019 18:31:53 +0000 Subject: [issue36712] duplicate method definition in Lib/email/test/test_email_renamed.py In-Reply-To: <1556119037.17.0.0080436933891.issue36712@roundup.psfhosted.org> Message-ID: <1563301913.04.0.4823155404.issue36712@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:10:32 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 16 Jul 2019 20:10:32 +0000 Subject: [issue37529] Mimetype module duplicates In-Reply-To: <1562680761.15.0.288138014947.issue37529@roundup.psfhosted.org> Message-ID: <1563307832.83.0.260617316541.issue37529@roundup.psfhosted.org> Jeffrey Kintscher added the comment: This appears to have been fixed by issue #4963 and backported to the 3.7 and 3.8 branches: Python 3.7.4+ (heads/3.7-dirty:e7bec26937, Jul 16 2019, 12:53:26) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import mimetypes >>> mimetypes.guess_extension('image/bmp') '.bmp' >>> mimetypes.guess_extension('image/x-ms-bmp') '.bmp' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:58:31 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2019 20:58:31 +0000 Subject: [issue27452] IDLE: Cleanup config code In-Reply-To: <1467662991.07.0.187758431637.issue27452@psf.upfronthosting.co.za> Message-ID: <1563310711.54.0.908292070237.issue27452@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset f8d4cc7dbbf54b9c5435c3080582a4aa421a067d by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-27452: IDLE: Cleanup config.py code (GH-14577) https://github.com/python/cpython/commit/f8d4cc7dbbf54b9c5435c3080582a4aa421a067d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 16:58:57 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jul 2019 20:58:57 +0000 Subject: [issue27452] IDLE: Cleanup config code In-Reply-To: <1467662991.07.0.187758431637.issue27452@psf.upfronthosting.co.za> Message-ID: <1563310737.06.0.216805868572.issue27452@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14598 pull_request: https://github.com/python/cpython/pull/14802 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 17:01:07 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Jul 2019 21:01:07 +0000 Subject: [issue27452] IDLE: Cleanup config code In-Reply-To: <1467662991.07.0.187758431637.issue27452@psf.upfronthosting.co.za> Message-ID: <1563310867.11.0.414257070527.issue27452@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14599 pull_request: https://github.com/python/cpython/pull/14803 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 17:03:58 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2019 21:03:58 +0000 Subject: [issue27452] IDLE: Cleanup config code In-Reply-To: <1467662991.07.0.187758431637.issue27452@psf.upfronthosting.co.za> Message-ID: <1563311038.44.0.815386772355.issue27452@roundup.psfhosted.org> Terry J. Reedy added the comment: As near as I can tell, 'python file.py' results in absolute __file__ in 3.9 versus still relative in 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 17:18:40 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2019 21:18:40 +0000 Subject: [issue22121] Start IDLE from icon in a better place. In-Reply-To: <1406966032.01.0.548285467026.issue22121@psf.upfronthosting.co.za> Message-ID: <1563311920.86.0.90108395516.issue22121@roundup.psfhosted.org> Terry J. Reedy added the comment: An implementation note mostly to myself: In 3.8 and before, 'python relative/path/to/file.py' results in the __file__ attribute of the main module being the relative path, and a possibly unnormalized full path is os.curdir + __file__. I believe that this is the only situation in which __file__ is not absolute. After os.chdir(new cwd), relative __file__ becomes useless unless the original curdir is saved or __file__ is made absolute first. The startup part of pyshell has this vulnerable line. icondir = os.path.join(os.path.dirname(__file__), 'Icons') But with curdir left alone when starting from a command line, there will be no problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 17:19:16 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2019 21:19:16 +0000 Subject: [issue27452] IDLE: Cleanup config code In-Reply-To: <1467662991.07.0.187758431637.issue27452@psf.upfronthosting.co.za> Message-ID: <1563311956.33.0.350257154915.issue27452@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 178f09f8b7d25348d46751a774666dd4ec32f3e6 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-27452: IDLE: Cleanup config.py code (GH-14577) (GH-14802) https://github.com/python/cpython/commit/178f09f8b7d25348d46751a774666dd4ec32f3e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 17:31:50 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2019 21:31:50 +0000 Subject: [issue27452] IDLE: Cleanup config code In-Reply-To: <1467662991.07.0.187758431637.issue27452@psf.upfronthosting.co.za> Message-ID: <1563312710.62.0.871389893142.issue27452@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset efd23a199b1415a9850a914d525a1e5711fdd6d8 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-27452: IDLE: Cleanup config.py code (GH-14577) (GH-14803) https://github.com/python/cpython/commit/efd23a199b1415a9850a914d525a1e5711fdd6d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 17:32:42 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Jul 2019 21:32:42 +0000 Subject: [issue27452] IDLE: Cleanup config code In-Reply-To: <1467662991.07.0.187758431637.issue27452@psf.upfronthosting.co.za> Message-ID: <1563312762.0.0.527132125306.issue27452@roundup.psfhosted.org> Terry J. Reedy added the comment: Thanks for preparing the PR. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 19:50:07 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 16 Jul 2019 23:50:07 +0000 Subject: [issue24231] os.makedirs('/', exist_ok=True) fails on Darwin In-Reply-To: <1431969821.39.0.237201791785.issue24231@psf.upfronthosting.co.za> Message-ID: <1563321007.59.0.473227535129.issue24231@roundup.psfhosted.org> Jeffrey Kintscher added the comment: This issue appears to have been fixed: Python 3.7.3 (default, May 1 2019, 00:00:47) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.makedirs('/', exist_ok=True) >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 20:11:44 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Jul 2019 00:11:44 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1563322304.49.0.0483629975127.issue37521@roundup.psfhosted.org> Brett Cannon added the comment: Nope, loader.exec_module() doesn't either: https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.exec_module, https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap_external.py#L776. So unfortunately I'm still not sure what you're talking about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 23:11:46 2019 From: report at bugs.python.org (Ethan Furman) Date: Wed, 17 Jul 2019 03:11:46 +0000 Subject: [issue34443] enum repr should use __qualname__ In-Reply-To: <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za> Message-ID: <1563333106.28.0.818489497731.issue34443@roundup.psfhosted.org> Ethan Furman added the comment: If someone would like to make a PR for using __qualname__ in error messages that would be great. :) ---------- stage: test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 04:00:28 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 17 Jul 2019 08:00:28 +0000 Subject: [issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs In-Reply-To: <1487007412.2.0.380189857134.issue29548@psf.upfronthosting.co.za> Message-ID: <1563350428.23.0.837977091087.issue29548@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +14600 pull_request: https://github.com/python/cpython/pull/14804 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 04:15:59 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 17 Jul 2019 08:15:59 +0000 Subject: [issue37530] IDLE: simplify, optimize, and clean up code context In-Reply-To: <1562694287.35.0.507911055212.issue37530@roundup.psfhosted.org> Message-ID: <1563351359.36.0.658611652062.issue37530@roundup.psfhosted.org> Tal Einat added the comment: New changeset 7036e1de3a87d36c7ef41b8a2b44ed6fc4d34be2 by Tal Einat in branch 'master': bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675) https://github.com/python/cpython/commit/7036e1de3a87d36c7ef41b8a2b44ed6fc4d34be2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 04:16:05 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 08:16:05 +0000 Subject: [issue37530] IDLE: simplify, optimize, and clean up code context In-Reply-To: <1562694287.35.0.507911055212.issue37530@roundup.psfhosted.org> Message-ID: <1563351365.76.0.0939409717097.issue37530@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14601 pull_request: https://github.com/python/cpython/pull/14807 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 04:16:12 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 08:16:12 +0000 Subject: [issue37530] IDLE: simplify, optimize, and clean up code context In-Reply-To: <1562694287.35.0.507911055212.issue37530@roundup.psfhosted.org> Message-ID: <1563351372.67.0.598937068798.issue37530@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14602 pull_request: https://github.com/python/cpython/pull/14808 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 04:17:50 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 17 Jul 2019 08:17:50 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <1563040436.19.0.276806879722.issue37588@roundup.psfhosted.org> Message-ID: <1563351470.78.0.290234886928.issue37588@roundup.psfhosted.org> Jeroen Demeyer added the comment: One possible solution would be to have a macro to suppress the tp_print field in the first place. Something like #ifndef PY_NO_TP_PRINT /* bpo-37250: kept for backwards compatibility in CPython 3.8 only */ Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int); #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 04:44:29 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 08:44:29 +0000 Subject: [issue37530] IDLE: simplify, optimize, and clean up code context In-Reply-To: <1562694287.35.0.507911055212.issue37530@roundup.psfhosted.org> Message-ID: <1563353069.52.0.299378688566.issue37530@roundup.psfhosted.org> miss-islington added the comment: New changeset bb79ab84c258566bcba89a87eb549fbc8643f882 by Miss Islington (bot) in branch '3.7': bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675) https://github.com/python/cpython/commit/bb79ab84c258566bcba89a87eb549fbc8643f882 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 04:44:58 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 08:44:58 +0000 Subject: [issue37530] IDLE: simplify, optimize, and clean up code context In-Reply-To: <1562694287.35.0.507911055212.issue37530@roundup.psfhosted.org> Message-ID: <1563353098.62.0.147412343704.issue37530@roundup.psfhosted.org> miss-islington added the comment: New changeset 6cf7c45cb5691b75d9a774c904df02a4f8bfcd04 by Miss Islington (bot) in branch '3.8': bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675) https://github.com/python/cpython/commit/6cf7c45cb5691b75d9a774c904df02a4f8bfcd04 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 04:58:59 2019 From: report at bugs.python.org (myungsekyo) Date: Wed, 17 Jul 2019 08:58:59 +0000 Subject: [issue37578] Change Glob: Allow Recursion for Hidden Files In-Reply-To: <1562984633.23.0.0355519865943.issue37578@roundup.psfhosted.org> Message-ID: <1563353939.17.0.591653772477.issue37578@roundup.psfhosted.org> Change by myungsekyo : ---------- nosy: +myungsekyo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 04:59:43 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 17 Jul 2019 08:59:43 +0000 Subject: [issue37530] IDLE: simplify, optimize, and clean up code context In-Reply-To: <1562694287.35.0.507911055212.issue37530@roundup.psfhosted.org> Message-ID: <1563353983.14.0.765815117046.issue37530@roundup.psfhosted.org> Change by Tal Einat : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 06:23:16 2019 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Wed, 17 Jul 2019 10:23:16 +0000 Subject: [issue34443] enum repr should use __qualname__ In-Reply-To: <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za> Message-ID: <1563358996.42.0.17267745534.issue34443@roundup.psfhosted.org> Change by Walter D?rwald : ---------- pull_requests: +14603 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14809 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 06:23:49 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Wed, 17 Jul 2019 10:23:49 +0000 Subject: [issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation Message-ID: <1563359029.55.0.364710956162.issue37608@roundup.psfhosted.org> New submission from ?? : In https://docs.python.org/3/whatsnew/3.0.html#library-changes Documentation, it said "Cleanup of the thread module: acquire_lock() and release_lock() are gone; use acquire() and release() instead." But in 3.7, I can still find {"acquire_lock", (PyCFunction)(void(*)(void))lock_PyThread_acquire_lock, METH_VARARGS | METH_KEYWORDS, acquire_doc}, in _threadmodule.c line 217, which defined this function. And in my code ,these functions work, without any warning or error. So maybe the Documentation should be changed, or the support of these functions should be removed, or at least add a warning. It has no effect on code, but truly confusing and waste me an hour to search for why. ---------- assignee: docs at python components: Documentation messages: 348053 nosy: docs at python, shiyuchong priority: normal severity: normal status: open title: _thread: acquire_lock,release_lock still in use while declared to be "gone" in Documentation versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 06:24:06 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 17 Jul 2019 10:24:06 +0000 Subject: [issue24231] os.makedirs('/', exist_ok=True) fails on Darwin In-Reply-To: <1431969821.39.0.237201791785.issue24231@psf.upfronthosting.co.za> Message-ID: <1563359046.24.0.32213378585.issue24231@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 07:26:34 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 17 Jul 2019 11:26:34 +0000 Subject: [issue37609] support "UNC" device paths in ntpath.splitdrive Message-ID: <1563362794.09.0.456380769613.issue37609@roundup.psfhosted.org> New submission from Eryk Sun : Windows Python includes UNC shares such as "//server/spam" in its definition of a drive. This is natural because Windows supports setting a UNC path as the working directory and handles the share component as the working drive when resolving rooted paths such as "/eggs". For the sake of generality when working with \\?\ extended paths, Python should expand its definition of a UNC drive to include "UNC" device paths. A practical example is calling glob.glob with a "//?/UNC" device path. >>> import os, sys, glob >>> sys.addaudithook(lambda s,a: print('#', a[0]) if s == 'glob.glob' else None) regular UNC path: >>> glob.glob('//localhost/C$/Sys*') # //localhost/C$/Sys* ['//localhost/C$/System Volume Information'] "UNC" device path: >>> glob.glob('//?/UNC/localhost/C$/Sys*') # //?/UNC/localhost/C$/Sys* # //?/UNC/localhost/C$ # //?/UNC/localhost # //?/UNC/ [] Since the magic character "?" is in the path (IMO, the drive should be excluded from this check, but that's a separate issue), the internal function glob._iglob calls itself recursively until it reaches the base case of dirname == pathname, where dirname is from os.path.split(pathname). The problem here is that ntpath.split doesn't stop at the proper base case of "//?/UNC/localhost/C$". This is due to ntpath.splitdrive. For example: >>> os.path.splitdrive('//?/UNC/localhost/C$/Sys*') ('//?/UNC', '/localhost/C$/Sys*') >>> os.path.splitdrive('//./UNC/localhost/C$/Sys*') ('//./UNC', '/localhost/C$/Sys*') The results should be "//?/UNC/localhost/C$" and "//./UNC/localhost/C$". In other cases, returning a device as the drive is fine, if not exactly meaningful (e.g. "//./NUL"). I don't think this needs to change. ---------- components: Library (Lib), Windows messages: 348055 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: support "UNC" device paths in ntpath.splitdrive type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 07:50:46 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 17 Jul 2019 11:50:46 +0000 Subject: [issue28569] mock.attach_mock should work with any return value of patch() In-Reply-To: <1477935134.31.0.733482108189.issue28569@psf.upfronthosting.co.za> Message-ID: <1563364246.76.0.484532866122.issue28569@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Is this similar to issue21478? Michael, can you please confirm this behavior and the change proposed in issue21478? I tried out the below program as per initial report # foo.py from unittest.mock import patch, Mock p = patch('requests.get', autospec=True) manager = Mock() manager.attach_mock(p.start(), 'requests_get') import requests requests.get('https://google.com') print(manager.mock_calls) p.stop() print(manager.mock_calls) # Without patch $ python.exe foo.py [] [] # With PR 14688 in issue21478 $ python.exe foo.py [call.requests_get('https://google.com')] [call.requests_get('https://google.com')] ---------- nosy: +cjw296, mariocj89, xtreak versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 08:24:04 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Jul 2019 12:24:04 +0000 Subject: [issue37543] Optimize pymalloc for non PGO build In-Reply-To: <1562756394.12.0.431999649056.issue37543@roundup.psfhosted.org> Message-ID: <1563366244.5.0.811758628433.issue37543@roundup.psfhosted.org> Inada Naoki added the comment: New changeset fb26504d14a08fcd61bb92bb989b6d2b12188535 by Inada Naoki in branch 'master': bpo-37543: optimize pymalloc (#14674) https://github.com/python/cpython/commit/fb26504d14a08fcd61bb92bb989b6d2b12188535 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 08:24:34 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Jul 2019 12:24:34 +0000 Subject: [issue37543] Optimize pymalloc for non PGO build In-Reply-To: <1562756394.12.0.431999649056.issue37543@roundup.psfhosted.org> Message-ID: <1563366274.18.0.0860149550047.issue37543@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 08:32:13 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 17 Jul 2019 12:32:13 +0000 Subject: [issue37597] audit event table breaks PDF sphinx build In-Reply-To: <1563208463.4.0.49055543405.issue37597@roundup.psfhosted.org> Message-ID: <1563366733.75.0.990399765936.issue37597@roundup.psfhosted.org> Julien Palard added the comment: Looks like a failure during library.pdf, from why we try to link to c-api. In the sphinx latex builder: if docname not in self.docnames: raise NoUri in self.docnames during the library build, we're only having library/* links. So c-api/code is obviously not in it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 09:44:58 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Jul 2019 13:44:58 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563371098.41.0.678482065866.issue36390@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 82494aa6d947c4a320c09c58fe0f100cdcf7af0b by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-36390: IDLE: Combine region formatting methods. (GH-12481) https://github.com/python/cpython/commit/82494aa6d947c4a320c09c58fe0f100cdcf7af0b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 09:45:00 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 13:45:00 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563371100.12.0.440694498278.issue36390@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14605 pull_request: https://github.com/python/cpython/pull/14811 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 09:45:10 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 13:45:10 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563371110.45.0.642992725864.issue36390@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14606 pull_request: https://github.com/python/cpython/pull/14812 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 09:58:03 2019 From: report at bugs.python.org (Abhilash Raj) Date: Wed, 17 Jul 2019 13:58:03 +0000 Subject: [issue37491] IndexError in get_bare_quoted_string In-Reply-To: <1562141971.16.0.876863205208.issue37491@roundup.psfhosted.org> Message-ID: <1563371883.44.0.778313738731.issue37491@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +14607 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14813 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 10:00:29 2019 From: report at bugs.python.org (Abhilash Raj) Date: Wed, 17 Jul 2019 14:00:29 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563372029.91.0.757735006451.issue37461@roundup.psfhosted.org> Abhilash Raj added the comment: I have proposed a PR for this: https://github.com/python/cpython/pull/14794 Reviews are welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 10:42:32 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 17 Jul 2019 14:42:32 +0000 Subject: [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1563374552.64.0.410918982609.issue37602@roundup.psfhosted.org> Josh Rosenberg added the comment: I suspect these fixers were left out simply because no one expected anyone to call the dunder names directly; the whole point of the dunder names is that they're not used directly, being invoked by syntax/context (__nonzero__ being the first thing tried for implicit boolean testing or calls to bool/operator.truth) or by top-level functions (__oct__/__hex__ being called by oct/hex). The only legitimate use case I can think of off-hand would be in class hierarchies, where a child dunder method is implemented in terms of a super() call to invoke the parent. Do you have any examples of code bases that rely on this? I've never seen one personally, but I'm not about to claim exhaustive knowledge of all Python code in the world. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 10:45:34 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Jul 2019 14:45:34 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563374734.33.0.608518741983.issue36390@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 1fc43a3fafd22eb20832459654fd125f12aa3738 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-36390: IDLE: Combine region formatting methods. (GH-12481) (GH-14811) https://github.com/python/cpython/commit/1fc43a3fafd22eb20832459654fd125f12aa3738 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 10:46:19 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Jul 2019 14:46:19 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563374779.2.0.0780361181199.issue36390@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 093e9b1268f21624a09777818903f1088c674689 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-36390: IDLE: Combine region formatting methods. (GH-12481) (GH-14812) https://github.com/python/cpython/commit/093e9b1268f21624a09777818903f1088c674689 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 11:02:40 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 17 Jul 2019 15:02:40 +0000 Subject: [issue37337] Add _PyObject_VectorcallMethod() function In-Reply-To: <1560936931.61.0.893195452608.issue37337@roundup.psfhosted.org> Message-ID: <1563375760.75.0.985746929472.issue37337@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +14608 pull_request: https://github.com/python/cpython/pull/14814 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 11:04:05 2019 From: report at bugs.python.org (Guido Vranken) Date: Wed, 17 Jul 2019 15:04:05 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563375845.67.0.839143560624.issue37461@roundup.psfhosted.org> Guido Vranken added the comment: I used fuzzing to find this bug. After applying your patch, the infinite loop is gone and it cannot find any other bugs of this nature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 11:04:30 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 17 Jul 2019 15:04:30 +0000 Subject: [issue37337] Add _PyObject_VectorcallMethod() function In-Reply-To: <1560936931.61.0.893195452608.issue37337@roundup.psfhosted.org> Message-ID: <1563375870.93.0.561384844463.issue37337@roundup.psfhosted.org> Zackery Spytz added the comment: Commit b1263d5a60d3f7ab02dd28409fff59b3815a3f67 causes GCC 9.1.0 to give a warning in Objects/descrobject.c. Objects/descrobject.c:1050:19: warning: cast between incompatible function types from ?PyObject * (*)(mappingproxyobject *, PyObject * const*, Py_ssize_t)? {aka ?struct _object * (*)(struct *, struct _object * const*, long int)?} to ?PyObject * (*)(PyObject *, PyObject *)? {aka ?struct _object * (*)(struct _object *, struct _object *)?} [-Wcast-function-type] 1050 | {"get", (PyCFunction)mappingproxy_get, METH_FASTCALL, | ^ PR 14814 fixes this. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 11:08:17 2019 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 17 Jul 2019 15:08:17 +0000 Subject: [issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s) In-Reply-To: <1545492162.72.0.0770528567349.issue35561@roundup.psfhosted.org> Message-ID: <1563376097.03.0.253971371639.issue35561@roundup.psfhosted.org> Nikolaus Rath added the comment: Is there a good reason to not explicitly initialize them nevertheless? Valgrind is a common tool, and this false positive will affect everyone attempting to run it on a Python extension module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 11:08:52 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 17 Jul 2019 15:08:52 +0000 Subject: [issue31546] PyOS_InputHook is not called when waiting for input() in Windows In-Reply-To: <1506010382.42.0.274746719926.issue31546@psf.upfronthosting.co.za> Message-ID: <1563376132.7.0.908240002036.issue31546@roundup.psfhosted.org> Zackery Spytz added the comment: Can this issue be closed? PR 7978 was merged and backported. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 11:48:46 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Wed, 17 Jul 2019 15:48:46 +0000 Subject: [issue37560] with cgi.FieldStorage(...) fails on cleanup with AttributeError, missing try/except in __exit__ In-Reply-To: <1562839334.01.0.637880829238.issue37560@roundup.psfhosted.org> Message-ID: <1563378526.46.0.224968557119.issue37560@roundup.psfhosted.org> Change by Ngalim Siregar : ---------- keywords: +patch pull_requests: +14609 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14815 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 11:50:53 2019 From: report at bugs.python.org (Elizabeth Uselton) Date: Wed, 17 Jul 2019 15:50:53 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1563378653.55.0.188131474234.issue37555@roundup.psfhosted.org> Elizabeth Uselton added the comment: I feel like I agree with Paul here, unsurprising behavior from ANY is it matching anything, with no expectation that third party objects have to correctly have a return path for NotImplemented on their __eq__ method. ANY doesn't currently do that. I've added a commit with couple other failing tests showing how using assertEqual is currently order sensitive when used with _Call or _CallList objects. I've got a work in progress fixing all three tests that just needs a little clean up, but think I might be able to lessen the complexity of it by adding Paul's idea of just special casing ANY directly, which may be smaller than the fix I have. Thank you all for providing such great feedback so far, this is really interesting stuff to me, and a great first time submitting to Python experience so far. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:08:52 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 17 Jul 2019 16:08:52 +0000 Subject: [issue36793] Do not define unneeded __str__ equal to __repr__ In-Reply-To: <1556975423.86.0.374987997006.issue36793@roundup.psfhosted.org> Message-ID: <1563379732.91.0.623218185283.issue36793@roundup.psfhosted.org> Josh Rosenberg added the comment: Serhiy: Did you plan to do any further work, or can this issue be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:44:41 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 17 Jul 2019 16:44:41 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563381881.72.0.710737711457.issue37461@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset a4a994bd3e619cbaff97610a1cee8ffa87c672f5 by Barry Warsaw (Abhilash Raj) in branch 'master': bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794) https://github.com/python/cpython/commit/a4a994bd3e619cbaff97610a1cee8ffa87c672f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:44:48 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 16:44:48 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563381888.11.0.798141481944.issue37461@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14610 pull_request: https://github.com/python/cpython/pull/14816 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:44:55 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 16:44:55 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563381895.57.0.344933070238.issue37461@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14611 pull_request: https://github.com/python/cpython/pull/14817 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:45:28 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 16:45:28 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563381928.36.0.810530349112.issue37461@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14612 pull_request: https://github.com/python/cpython/pull/14818 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:51:03 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 16:51:03 +0000 Subject: [issue37491] IndexError in get_bare_quoted_string In-Reply-To: <1562141971.16.0.876863205208.issue37491@roundup.psfhosted.org> Message-ID: <1563382263.01.0.457163762897.issue37491@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14613 pull_request: https://github.com/python/cpython/pull/14820 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 12:51:51 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 16:51:51 +0000 Subject: [issue37491] IndexError in get_bare_quoted_string In-Reply-To: <1562141971.16.0.876863205208.issue37491@roundup.psfhosted.org> Message-ID: <1563382311.47.0.0704399670998.issue37491@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14614 pull_request: https://github.com/python/cpython/pull/14819 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:02:11 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 17:02:11 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563382931.87.0.742272537809.issue37461@roundup.psfhosted.org> miss-islington added the comment: New changeset 391511ccaaf0050970dfbe95bf2df1bcf6c33440 by Miss Islington (bot) in branch '3.7': bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794) https://github.com/python/cpython/commit/391511ccaaf0050970dfbe95bf2df1bcf6c33440 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:14:11 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 17:14:11 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1563383651.09.0.885413929205.issue37461@roundup.psfhosted.org> miss-islington added the comment: New changeset 6816ca30af7705db691343100e696ea3d8f447d5 by Miss Islington (bot) in branch '3.8': bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794) https://github.com/python/cpython/commit/6816ca30af7705db691343100e696ea3d8f447d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:25:12 2019 From: report at bugs.python.org (Ethan Furman) Date: Wed, 17 Jul 2019 17:25:12 +0000 Subject: [issue33976] Enums don't support nested classes In-Reply-To: <1530072050.24.0.56676864532.issue33976@psf.upfronthosting.co.za> Message-ID: <1563384312.84.0.548823077384.issue33976@roundup.psfhosted.org> Ethan Furman added the comment: Edward, I'm inclined to agree with you. It will take a couple versions for deprecation, etc., to push this through (assuming nobody comes up with a good counter-argument). In the mean-time, this change has landed in aenum [1] so you can use it now. [1] https://pypi.org/project/aenum/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:26:10 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 17 Jul 2019 17:26:10 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE Message-ID: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> New submission from Mariatta : The Python Usage and Setup documentation lists how to use Python in different environments: 1. command line 2. Unix 3. Windows 4. MacOS Under "Unix" environment there is a section for Editors and IDE, which actually links to external links like https://wiki.python.org/moin/PythonEditors that has more comprehensive list of editors across various platforms. It would be great if the Editors & IDE section is not tied to the "Unix environment" section, which might got skipped if the reader is a Windows or Mac user. There are IDEs and Editors for those platforms too! ---------- assignee: docs at python components: Documentation messages: 348074 nosy: Mariatta, docs at python priority: normal severity: normal stage: needs patch status: open title: Improve "Python Usage and Setup" documentation re: Editors & IDE type: enhancement versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:27:49 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 17 Jul 2019 17:27:49 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563384469.62.0.735408636718.issue37610@roundup.psfhosted.org> Mariatta added the comment: Should have included the link, but I can't edit issue. Here's the page which I think could be improved. https://docs.python.org/3/using/index.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:41:27 2019 From: report at bugs.python.org (Benjamin Mintz) Date: Wed, 17 Jul 2019 17:41:27 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1563385287.78.0.794880134226.issue37521@roundup.psfhosted.org> Benjamin Mintz added the comment: ``` name = 'testext' spec = importlib.util.find_spec(name) print(name in sys.modules) module = importlib.util.module_from_spec(spec) print(name in sys.modules) spec.loader.exec_module(module) print(name in sys.modules) ``` This prints False, False, True though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:42:36 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 17 Jul 2019 17:42:36 +0000 Subject: [issue37611] Improve the "Dealing with Bugs" documentation, include guidelines on how to report bugs Message-ID: <1563385356.62.0.425073313065.issue37611@roundup.psfhosted.org> New submission from Mariatta : On the left of docs.python.org, is a link to "Report a Bug", which takes you to "Dealing with Bugs" section (https://docs.python.org/3/bugs.html) One of the first few paragraphs of the page is telling people that documentation bugs can be reported at the bug tracker, or if they're short on time, it can be emailed to docs at python.org. The next section is talking about "using issue tracker", and at the very bottom are two links to external resources about how to report bugs effectively and bug reporting guidelines. 1. It would be great if the guidelines are at the top, instead of the bottom. 2. It would be great if we provide our own set of guidelines, instead of linking to external resources. I think the guidelines are especially important for people who opted to write an email instead of creating an issue in bpo. In bpo, user is kinda restricted/reminded to select a specific type/component, but writing email can be more freeform. The better email they write, the easier it is for us to respond to them. ---------- assignee: docs at python components: Documentation messages: 348077 nosy: Mariatta, docs at python priority: normal severity: normal stage: needs patch status: open title: Improve the "Dealing with Bugs" documentation, include guidelines on how to report bugs type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 14:46:51 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 17 Jul 2019 18:46:51 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563389211.73.0.137324448411.issue33610@roundup.psfhosted.org> Change by Tal Einat : ---------- keywords: +patch pull_requests: +14615 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14821 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 14:47:55 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 17 Jul 2019 18:47:55 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563389275.97.0.725932481213.issue33610@roundup.psfhosted.org> Tal Einat added the comment: Terry, on latest master (with the aforementioned PR merged), the context is updated quickly after the code-context is shown. This happens after a delay of up to 100ms due to the update loop. I've created PR GH-14821 with a fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 15:12:21 2019 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Jul 2019 19:12:21 +0000 Subject: [issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu' In-Reply-To: <1562982731.24.0.816575023926.issue37577@roundup.psfhosted.org> Message-ID: <1563390741.82.0.976619720136.issue37577@roundup.psfhosted.org> Matthias Klose added the comment: Luis, I'm still trying to figure out why you are seeing that. Please could you report the package versions which are installed on the system? dpkg -l python3.7 python3.8 python3-distutils ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 15:18:11 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 17 Jul 2019 19:18:11 +0000 Subject: [issue33408] Enable AF_UNIX support in Windows In-Reply-To: <1525257332.06.0.682650639539.issue33408@psf.upfronthosting.co.za> Message-ID: <1563391091.32.0.51557049835.issue33408@roundup.psfhosted.org> Paul Monson added the comment: I don't know if datagram support is coming to AF_UNIX on Windows. The changes will only add the flag on Windows, and will enable stream sockets to use AF_UNIX on Windows. In mind this isn't breaking datagram support. It is true that it's a subset of what appears to be supported on Linux/Unix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 15:30:22 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 17 Jul 2019 19:30:22 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563391822.63.0.297751265389.issue33610@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +14616 pull_request: https://github.com/python/cpython/pull/14822 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 15:31:55 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 17 Jul 2019 19:31:55 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563391915.95.0.270803999277.issue33610@roundup.psfhosted.org> Tal Einat added the comment: Regarding validating integer inputs in the configuration dialog (E3), see my new PR GH-14822. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 15:32:21 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 17 Jul 2019 19:32:21 +0000 Subject: [issue33408] Enable AF_UNIX support in Windows In-Reply-To: <1525257332.06.0.682650639539.issue33408@psf.upfronthosting.co.za> Message-ID: <1563391941.43.0.9213752167.issue33408@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +14617 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14823 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 17:54:31 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 21:54:31 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1563400471.67.0.124332010822.issue34155@roundup.psfhosted.org> miss-islington added the comment: New changeset 8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9 by Miss Islington (bot) (jpic) in branch 'master': bpo-34155: Dont parse domains containing @ (GH-13079) https://github.com/python/cpython/commit/8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 17:54:41 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 21:54:41 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1563400481.32.0.698789192115.issue34155@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14618 pull_request: https://github.com/python/cpython/pull/14824 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 17:54:48 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 21:54:48 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1563400488.52.0.488542909641.issue34155@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14619 pull_request: https://github.com/python/cpython/pull/14825 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 17:54:55 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Jul 2019 21:54:55 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1563400495.64.0.614797874209.issue34155@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14620 pull_request: https://github.com/python/cpython/pull/14826 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 18:14:01 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Jul 2019 22:14:01 +0000 Subject: [issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation In-Reply-To: <1563359029.55.0.364710956162.issue37608@roundup.psfhosted.org> Message-ID: <1563401641.44.0.986536152404.issue37608@roundup.psfhosted.org> Brett Cannon added the comment: The documentation is correct by not documenting the methods as they are not meant to be used. A warning could be added, but it requires new code to wrap the C function with a DeprecationWarning since that code is currently shared between thread.LockType.acquire() and acquire_lock(). ---------- components: +Library (Lib) -Documentation nosy: +brett.cannon type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 18:20:59 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Jul 2019 22:20:59 +0000 Subject: [issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed In-Reply-To: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org> Message-ID: <1563402059.28.0.322091127891.issue37521@roundup.psfhosted.org> Brett Cannon added the comment: If you're using your example code for 'testext' that you uploaded then that's expected because the import in your package causes a normal import which means the import machinery is adding things to sys.modules. Try it with a plain module that's empty so you don't have any other imports as a side-effect of imports and you will see the module isn't added to sys.modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 18:53:01 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Jul 2019 22:53:01 +0000 Subject: [issue36390] IDLE: Refactor formatting methods from editor In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563403981.34.0.337101103779.issue36390@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14621 pull_request: https://github.com/python/cpython/pull/14827 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 19:03:52 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Jul 2019 23:03:52 +0000 Subject: [issue36390] IDLE: Move formatting functions into new format module. In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563404632.55.0.155362160181.issue36390@roundup.psfhosted.org> Terry J. Reedy added the comment: The new PR moves the remaining Format functions to format.py. I only edited enough to make things work. I did not add tests for the 2 indent methods. They only change future indents, leaving existing indents as it. They need change, possibly elimination, in light of 3.x's prohibition mixed tab and space indents. They make violation way too easy. This PR will finish this issue. ---------- title: IDLE: Refactor formatting methods from editor -> IDLE: Move formatting functions into new format module. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 19:04:55 2019 From: report at bugs.python.org (Jo Henke) Date: Wed, 17 Jul 2019 23:04:55 +0000 Subject: [issue37612] os.link(..., follow_symlinks=True) broken on Linux Message-ID: <1563404695.9.0.284402565462.issue37612@roundup.psfhosted.org> New submission from Jo Henke : Regarding link() POSIX states (https://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html): "If path1 names a symbolic link, it is implementation-defined whether link() follows the symbolic link, or creates a new link to the symbolic link itself." In Linux, link() does _not_ follow symlinks (http://man7.org/linux/man-pages/man2/link.2.html): "By default, linkat(), does not dereference oldpath if it is a symbolic link (like link())." But Python 3 assumes the opposite to be always the case: https://github.com/python/cpython/blob/8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9/Modules/posixmodule.c#L3517 ...which suits e.g. NetBSD (https://netbsd.gw.com/cgi-bin/man-cgi?link+2): "When operating on a symlink, link() resolves the symlink and creates a hard link on the target." Therefore, I recommend to always call linkat(), if the platform provides it. That's the modern superset of link() with clearly defined behavior. Here are some commands to reproduce the issue on Linux (should hard link 'file' -> 'link', but tries '/tmp/symlink' -> 'link'): ~$ : >file ~$ ln -s "$PWD/file" /tmp/symlink ~$ strace -e link,linkat python -c 'import os; os.link("/tmp/symlink", "link", follow_symlinks=True)' link("/tmp/symlink", "link") = -1 EXDEV (Cross-device link) Traceback (most recent call last): File "", line 1, in OSError: [Errno 18] Cross-device link: '/tmp/symlink' -> 'link' +++ exited with 1 +++ For comparison, calling linkat() without AT_SYMLINK_FOLLOW results in the same error: ~$ strace -e link,linkat python -c 'import os; os.link("/tmp/symlink", "link", follow_symlinks=False)' linkat(AT_FDCWD, "/tmp/symlink", AT_FDCWD, "link", 0) = -1 EXDEV (Cross-device link) Traceback (most recent call last): File "", line 1, in OSError: [Errno 18] Cross-device link: '/tmp/symlink' -> 'link' +++ exited with 1 +++ Currently, the only way to call linkat() with AT_SYMLINK_FOLLOW from Python, is to provide a directory file descriptor != AT_FDCWD: ~$ strace -e link,linkat python -c 'import os; d=os.open(".", 0); os.link("/tmp/symlink", "link", dst_dir_fd=d, follow_symlinks=True)' linkat(AT_FDCWD, "/tmp/symlink", 3, "link", AT_SYMLINK_FOLLOW) = 0 +++ exited with 0 +++ ---------- components: Library (Lib) messages: 348086 nosy: jo-he priority: normal severity: normal status: open title: os.link(..., follow_symlinks=True) broken on Linux 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 Wed Jul 17 19:38:54 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Wed, 17 Jul 2019 23:38:54 +0000 Subject: [issue37613] Fix broken "Back to top" link in www.python.org (mobile) Message-ID: <1563406734.28.0.0957616376882.issue37613@roundup.psfhosted.org> New submission from Giovanni Cappellotto : The mobile version of https://www.python.org/ has a "Back to top" link at the bottom of every page that should scroll the page back to the top, but it doesn't work in Chrome for Android. Note: it works with Safari on iOS. ---------- assignee: docs at python components: Documentation messages: 348087 nosy: docs at python, potomak priority: normal severity: normal status: open title: Fix broken "Back to top" link in www.python.org (mobile) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 19:39:12 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Wed, 17 Jul 2019 23:39:12 +0000 Subject: [issue37613] Broken "Back to top" link in www.python.org (mobile) In-Reply-To: <1563406734.28.0.0957616376882.issue37613@roundup.psfhosted.org> Message-ID: <1563406752.37.0.576098499959.issue37613@roundup.psfhosted.org> Change by Giovanni Cappellotto : ---------- title: Fix broken "Back to top" link in www.python.org (mobile) -> Broken "Back to top" link in www.python.org (mobile) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 19:41:10 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Wed, 17 Jul 2019 23:41:10 +0000 Subject: [issue37613] Broken "Back to top" link in www.python.org (mobile) In-Reply-To: <1563406734.28.0.0957616376882.issue37613@roundup.psfhosted.org> Message-ID: <1563406870.42.0.350639219932.issue37613@roundup.psfhosted.org> Giovanni Cappellotto added the comment: I can reproduce the error in Chrome for MacOS when I emulate the resolution of a generic mobile device. I think I have a quick fix for the issue, I will publish a PR soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 19:44:30 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 17 Jul 2019 23:44:30 +0000 Subject: [issue37613] Broken "Back to top" link in www.python.org (mobile) In-Reply-To: <1563406734.28.0.0957616376882.issue37613@roundup.psfhosted.org> Message-ID: <1563407070.25.0.402478450963.issue37613@roundup.psfhosted.org> Mariatta added the comment: Thanks for the report. The issue tracker for python.org website is at https://github.com/python/pythondotorg/issues PR should be proposed there instead of python/cpython. ---------- assignee: docs at python -> nosy: +Mariatta resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 20:48:39 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Jul 2019 00:48:39 +0000 Subject: [issue36390] IDLE: Move formatting functions into new format module. In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563410919.54.0.809535340351.issue36390@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 1b3892243433da7eae7f5f3a4f98f13d309c8926 by Terry Jan Reedy in branch 'master': bpo-36390: Gather IDLE Format menu functions into format.py (#14827) https://github.com/python/cpython/commit/1b3892243433da7eae7f5f3a4f98f13d309c8926 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 20:48:48 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Jul 2019 00:48:48 +0000 Subject: [issue36390] IDLE: Move formatting functions into new format module. In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563410928.18.0.290653303933.issue36390@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14622 pull_request: https://github.com/python/cpython/pull/14829 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 20:48:54 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Jul 2019 00:48:54 +0000 Subject: [issue36390] IDLE: Move formatting functions into new format module. In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563410934.07.0.737052106286.issue36390@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14623 pull_request: https://github.com/python/cpython/pull/14830 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 20:53:39 2019 From: report at bugs.python.org (Jack Wong) Date: Thu, 18 Jul 2019 00:53:39 +0000 Subject: [issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag) In-Reply-To: <1410207529.54.0.778133775349.issue22367@psf.upfronthosting.co.za> Message-ID: <1563411219.7.0.675268134483.issue22367@roundup.psfhosted.org> Change by Jack Wong : ---------- nosy: +iforapsy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 21:21:11 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Jul 2019 01:21:11 +0000 Subject: [issue36390] IDLE: Move formatting functions into new format module. In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563412871.95.0.795264019494.issue36390@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 028f1d2479a9a508e1f0bfcff42c20c348244549 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-36390: Gather IDLE Format menu functions into format.py (GH-14827) (GH-14829) https://github.com/python/cpython/commit/028f1d2479a9a508e1f0bfcff42c20c348244549 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 21:22:28 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Jul 2019 01:22:28 +0000 Subject: [issue36390] IDLE: Move formatting functions into new format module. In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563412948.56.0.0193131764487.issue36390@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 5eb19fddd2d6c70ded14a91cf083681d750d593b by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-36390: Gather IDLE Format menu functions into format.py (GH-14827) (GH-14830) https://github.com/python/cpython/commit/5eb19fddd2d6c70ded14a91cf083681d750d593b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 21:23:21 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Jul 2019 01:23:21 +0000 Subject: [issue36390] IDLE: Move formatting functions into new format module. In-Reply-To: <1553171660.93.0.476861789874.issue36390@roundup.psfhosted.org> Message-ID: <1563413001.05.0.509599616537.issue36390@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:13:12 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Thu, 18 Jul 2019 02:13:12 +0000 Subject: [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1563415992.61.0.699025803286.issue37602@roundup.psfhosted.org> ?? added the comment: Got it. I am just testing all changes in Python 3.X (in preparation for a project porting to 3.7 before I have permission to view the source code), and call __nonzero__() directly for testing. So maybe I cannot provide an example. I did not realize that it should not be called directly. Still, I recommend a documentation change to explain this fact, telling readers the fixer will not change the usage of __nonzero__(). Thanks for your reply. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:18:54 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Thu, 18 Jul 2019 02:18:54 +0000 Subject: [issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation In-Reply-To: <1563359029.55.0.364710956162.issue37608@roundup.psfhosted.org> Message-ID: <1563416334.16.0.23810705734.issue37608@roundup.psfhosted.org> ?? added the comment: I got it that it is just my misunderstanding. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 00:40:49 2019 From: report at bugs.python.org (Colby Reeves) Date: Thu, 18 Jul 2019 04:40:49 +0000 Subject: =?utf-8?q?=5Bissue37614=5D_Pasteing_=F0=9F=8C=B9into_idle_makes_it_crash?= Message-ID: <1563424849.97.0.321788763811.issue37614@roundup.psfhosted.org> New submission from Colby Reeves : Like the title says pasting ? (or U+1F339) into IDLE makes IDLE instantaneously crash. ---------- assignee: terry.reedy components: IDLE messages: 348095 nosy: Colby Reeves, terry.reedy priority: normal severity: normal status: open title: Pasteing ?into idle makes it crash type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 00:43:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 18 Jul 2019 04:43:02 +0000 Subject: =?utf-8?q?=5Bissue37614=5D_Pasteing_=F0=9F=8C=B9into_idle_makes_it_crash?= In-Reply-To: <1563424849.97.0.321788763811.issue37614@roundup.psfhosted.org> Message-ID: <1563424982.04.0.85370258862.issue37614@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Can you please add your operating system and environment information? It seems similar to issue37286 and issue13153 in Windows. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 01:03:15 2019 From: report at bugs.python.org (Varun Agrawal) Date: Thu, 18 Jul 2019 05:03:15 +0000 Subject: [issue37615] json - make load and dump work with filenames and path-like objects Message-ID: <1563426195.91.0.749324402695.issue37615@roundup.psfhosted.org> New submission from Varun Agrawal : Currently, json.load and json.dump take file pointers, aka file-like objects which have support for `.write()` and `.read()`. This necessitates the following pattern of code on a regular basis: ``` with open(filename) as f: o = json.load(f) ... with open(filename, 'w') as f: json.dump(o, f) ``` While this is a fair pattern to live by, it would be nice for programmers to pass in the filename directly and let the functions handle opening and closing the file. The way to do this would be to have a simple check if `fp` is a path-like object or a file-like object, and set up a context manager accordingly (using contextlib). The original `load()` and `dump()` code definition can then be placed inside the context manager, which should make testing painless. There might be an argument for this not being in alignment with duck-typing, but the overall benefits of this approach along with the ease afforded to programmers should make for a strong argument. ---------- components: Library (Lib) messages: 348097 nosy: varunagrawal priority: normal severity: normal status: open title: json - make load and dump work with filenames and path-like objects type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 01:08:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 18 Jul 2019 05:08:57 +0000 Subject: [issue37615] json - make load and dump work with filenames and path-like objects In-Reply-To: <1563426195.91.0.749324402695.issue37615@roundup.psfhosted.org> Message-ID: <1563426537.14.0.274419740091.issue37615@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This looks similar to issue36378 which was rejected and has a link to previous mailing list discussion. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 02:18:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Jul 2019 06:18:56 +0000 Subject: [issue37615] json - make load and dump work with filenames and path-like objects In-Reply-To: <1563426195.91.0.749324402695.issue37615@roundup.psfhosted.org> Message-ID: <1563430736.83.0.933233979256.issue37615@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add support to load from paths to json.load _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 02:26:06 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Jul 2019 06:26:06 +0000 Subject: [issue37609] support "UNC" device paths in ntpath.splitdrive In-Reply-To: <1563362794.09.0.456380769613.issue37609@roundup.psfhosted.org> Message-ID: <1563431166.36.0.105730354679.issue37609@roundup.psfhosted.org> Serhiy Storchaka added the comment: Do you want to create a PR Eryk? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 02:26:30 2019 From: report at bugs.python.org (Varun Agrawal) Date: Thu, 18 Jul 2019 06:26:30 +0000 Subject: [issue37615] json - make load and dump work with filenames and path-like objects In-Reply-To: <1563426195.91.0.749324402695.issue37615@roundup.psfhosted.org> Message-ID: <1563431190.15.0.98646121468.issue37615@roundup.psfhosted.org> Change by Varun Agrawal : ---------- pull_requests: +14624 pull_request: https://github.com/python/cpython/pull/14832 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 02:40:35 2019 From: report at bugs.python.org (Anthony Sottile) Date: Thu, 18 Jul 2019 06:40:35 +0000 Subject: [issue37616] [3.10 prep] zip path incorrect Message-ID: <1563432035.85.0.841643784863.issue37616@roundup.psfhosted.org> New submission from Anthony Sottile : In an effort to try and fix some of the ecosystem before python3.10 (or 4.0) is a thing, I figured I'd set up a build where the version is bumped and see what's broken. If you're interested in reproducing my findings, I've included a build that's installable in ubuntu in this PPA: https://launchpad.net/~asottile/+archive/ubuntu/python3.10 It's mostly based on this patch: https://github.com/asottile/python3.10/blob/ubuntu/bionic/debian/patches/0029-pretend-3.10.patch while tracking down why pip doesn't work, I've encountered the following from doing this: $ python3.10 -c 'import sys; print(sys.path)' ['', '/usr/lib/python31.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/usr/lib/python3/dist-packages'] notably, the second `sys.path` entry appears incorrect and should probably be `/usr/lib/python310.zip` this should be an easy fix: https://github.com/python/cpython/blob/1b3892243433da7eae7f5f3a4f98f13d309c8926/Modules/getpath.c#L1019-L1028 ---------- messages: 348100 nosy: Anthony Sottile priority: normal severity: normal status: open title: [3.10 prep] zip path incorrect versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 02:41:34 2019 From: report at bugs.python.org (Anthony Sottile) Date: Thu, 18 Jul 2019 06:41:34 +0000 Subject: [issue37617] [3.10 prep] site.py uses `sys.version[:3]` Message-ID: <1563432094.73.0.116899779699.issue37617@roundup.psfhosted.org> New submission from Anthony Sottile : In an effort to try and fix some of the ecosystem before python3.10 (or 4.0) is a thing, I figured I'd set up a build where the version is bumped and see what's broken. If you're interested in reproducing my findings, I've included a build that's installable in ubuntu in this PPA: https://launchpad.net/~asottile/+archive/ubuntu/python3.10 It's mostly based on this patch: https://github.com/asottile/python3.10/blob/ubuntu/bionic/debian/patches/0029-pretend-3.10.patch while tracking down why pip doesn't work, I've encountered the following from doing this: $ python3.10 -c 'import sys; print(sys.path)' ['', '/usr/lib/python31.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/usr/lib/python3/dist-packages'] this notably is missing the versioned site-packages / dist-packages directory ---------- messages: 348101 nosy: Anthony Sottile priority: normal severity: normal status: open title: [3.10 prep] site.py uses `sys.version[:3]` versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 02:42:33 2019 From: report at bugs.python.org (Anthony Sottile) Date: Thu, 18 Jul 2019 06:42:33 +0000 Subject: [issue37617] [3.10 prep] site.py uses `sys.version[:3]` In-Reply-To: <1563432094.73.0.116899779699.issue37617@roundup.psfhosted.org> Message-ID: <1563432153.56.0.863212262419.issue37617@roundup.psfhosted.org> Anthony Sottile added the comment: disregard, this appears to be due to debian's patching ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 03:10:03 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Jul 2019 07:10:03 +0000 Subject: [issue37612] os.link(..., follow_symlinks=True) broken on Linux In-Reply-To: <1563404695.9.0.284402565462.issue37612@roundup.psfhosted.org> Message-ID: <1563433803.26.0.55943035657.issue37612@roundup.psfhosted.org> Serhiy Storchaka added the comment: Not always linkat() can be used instead of link(). But on Windows (where there is no linkat()) os.link() creates a new link to the symbolic link itself. This is yet one argument for making follow_symlinks=False by default and changing the default behavior of os.link() on NetBSD. ---------- nosy: +eryksun, larry, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 03:26:29 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 18 Jul 2019 07:26:29 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1563434789.81.0.0133294357119.issue37555@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +cjw296, mariocj89, michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 03:42:29 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 18 Jul 2019 07:42:29 +0000 Subject: [issue37618] Docs: Code example locations in stdtypes Message-ID: <1563435749.25.0.657684993159.issue37618@roundup.psfhosted.org> New submission from Kyle Stanley : In the docs for the module stdtypes, the code example for several commonly used functions are in the bytearray section instead of the str section, where new users are far more likely to look. The new users are much more likely to benefit from seeing examples of these functions. A few examples of this include: islower(), isupper(), and istitle(). Since the functionality is very similar for functions such as str.islower() and bytearray.islower(), it doesn't seem necessary to include separate examples for each. With that in mind, here's a couple of potential solutions: 1) Move the location of the code examples to the str equivalent. This would require only removing the 'b' notation proceeding the strings. A link to the str equivalent could be potentially provided. 2) Provide a reference link to equivalent bytearray function in the str function's summary. This would be a bit easier since the code examples would not have to me modified or moved. However, for reasons stated above, it seems to make a bit more sense to have the examples be in the str functions rather than in the bytearray functions. I can start working on a PR to address this, but I'll wait on some feedback first. ---------- assignee: docs at python components: Documentation messages: 348104 nosy: aeros167, docs at python priority: normal severity: normal status: open title: Docs: Code example locations in stdtypes versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 03:42:49 2019 From: report at bugs.python.org (Elizabeth Uselton) Date: Thu, 18 Jul 2019 07:42:49 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1563435769.37.0.0814746020122.issue37555@roundup.psfhosted.org> Elizabeth Uselton added the comment: Just added a fix for the tests I added in the last commit showing the order sensitivity in assertEqual when dealing with ANY and _Call or _CallList objects. _Call and _CallList currently depend on ordering to correctly process that an object being compared to ANY with __eq__ should return True. I put more notes in the commit message. A note on the two newer tests: I want to be sensitive to the idea that I might be pushing back against desired behavior here. I think there is a case to be made that one should expect mock.assertEqual(a, b) to implement a == b, and not care about b == a, in which case maybe order sensitivity in assertEqual makes sense. That said, today I showed a few of my most Python experience heavy colleagues the tests showing that assertEqual was order sensitive when passed _Call or _CallList objects, and based on anecdotal evidence the existing behavior definitely violates the principle of least astonishment. Additionally, the test Karthikeyan kindly linked me https://github.com/python/cpython/blob/master/Lib/unittest/test/testmock/testhelpers.py#L46 seems to imply that an order agnostic assertEqual is the desired behavior. A note on the fix: This fix feels like it's not as small as it could be. I am still musing over whether it'd be better if instead of the or statements and swapping the comparison order in _CallList's __contains__ method, I made a wrapper that would swap that comparison order in the case that one of the arguments is a BoundArgument, since that was the original problem. That fix would probably not affect the order sensitivity of assertEqual, so it's partially about what we want there. I'll play around with it and see what I can discover. I'll also see if I can do anything to more explicitly to check for ANY, as Paul suggested. I'm very curious what you all think about whether the assertEqual behavior is a feature or a bug, and if the other fix idea seems better than this one. If neither of these ideas seem like a good fix, I'd love some guidance on what concerns are and what might be a good approach to try next. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 03:44:40 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 18 Jul 2019 07:44:40 +0000 Subject: [issue37618] Docs: Code example locations in stdtypes In-Reply-To: <1563435749.25.0.657684993159.issue37618@roundup.psfhosted.org> Message-ID: <1563435880.64.0.576117434825.issue37618@roundup.psfhosted.org> Kyle Stanley added the comment: Clarification on option 1: The last sentence should be "A link to the bytearray equivalent..." Clarification on option 2: As a part of this option, a link to the str equivalent could optionally be provided. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 04:20:41 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 18 Jul 2019 08:20:41 +0000 Subject: [issue34621] uuid.UUID objects can't be unpickled in older Python versions (<3.7) In-Reply-To: <1536581817.86.0.56676864532.issue34621@psf.upfronthosting.co.za> Message-ID: <1563438041.08.0.439138675902.issue34621@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +14625 pull_request: https://github.com/python/cpython/pull/14834 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 04:34:06 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 18 Jul 2019 08:34:06 +0000 Subject: [issue13272] 2to3 fix_renames doesn't rename string.lowercase/uppercase/letters In-Reply-To: <1319700425.9.0.635731429373.issue13272@psf.upfronthosting.co.za> Message-ID: <1563438846.78.0.316624651334.issue13272@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- pull_requests: +14626 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/14835 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 04:42:25 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 18 Jul 2019 08:42:25 +0000 Subject: [issue13272] 2to3 fix_renames doesn't rename string.lowercase/uppercase/letters In-Reply-To: <1319700425.9.0.635731429373.issue13272@psf.upfronthosting.co.za> Message-ID: <1563439345.2.0.525284877909.issue13272@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: * there were many small issues with the patch, improved as good as possible the FixString to catch ```import as```, ```from string import *``` and ```import string``` * did not include the FixStringImports as it's not a necessity to work in Python3 * indeed, some uses of the constant names that are user-defined will also rename, only when it's in a ```import string```. Added a ```Caution``` in the documentation. Still, when all are changed, it should not affect the Python3 version, will just work with the renamed variable name. ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 05:04:18 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 18 Jul 2019 09:04:18 +0000 Subject: [issue37619] update_one_slot() should not ignore wrapper descriptors for wrong type Message-ID: <1563440658.46.0.882912152625.issue37619@roundup.psfhosted.org> New submission from Jeroen Demeyer : >>> class S(str): ... __eq__ = int.__eq__ >>> S() == S() True The expectation is that this raises an exception because int.__eq__() is called on S instances. ---------- components: Interpreter Core messages: 348108 nosy: jdemeyer priority: normal severity: normal status: open title: update_one_slot() should not ignore wrapper descriptors for wrong type 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 Jul 18 05:40:18 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 18 Jul 2019 09:40:18 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1563442818.2.0.196848467554.issue33944@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 05:54:27 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 18 Jul 2019 09:54:27 +0000 Subject: [issue37619] update_one_slot() should not ignore wrapper descriptors for wrong type In-Reply-To: <1563440658.46.0.882912152625.issue37619@roundup.psfhosted.org> Message-ID: <1563443667.24.0.420825240282.issue37619@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +14627 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14836 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 06:26:14 2019 From: report at bugs.python.org (Paul Hege) Date: Thu, 18 Jul 2019 10:26:14 +0000 Subject: [issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX In-Reply-To: <1507266884.06.0.213398074469.issue31710@psf.upfronthosting.co.za> Message-ID: <1563445574.33.0.209051498559.issue31710@roundup.psfhosted.org> Paul Hege added the comment: I had also received the same warnings when running make: "INFO: Could not locate ffi libs and/or headers" and "Failed to build these modules: _ctypes". Although Python could still be installed, the pip command was not installed, and installing it using get_pip.py just led to an error indicating that the module "_ctypes" was not found. I can confirm that setting CPPFLAGS and LDFLAGS as well as PKG_CONFIG_PATH, as suggested my Mr. Levchenko, allowed me to build and install python 3.7.1 locally without root privileges with ctypes and pip included and working, using a libffi also compiled from source. ---------- nosy: +Paul Hege _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 07:18:03 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 18 Jul 2019 11:18:03 +0000 Subject: [issue37612] os.link(..., follow_symlinks=True) broken on Linux In-Reply-To: <1563404695.9.0.284402565462.issue37612@roundup.psfhosted.org> Message-ID: <1563448683.95.0.779748912209.issue37612@roundup.psfhosted.org> Eryk Sun added the comment: > on Windows (where there is no linkat()) os.link() creates a new link > to the symbolic link itself. Yes, CreateHardLinkW opens the source file by calling NtOpenFile with the option FILE_OPEN_REPARSE_POINT. So the behavior is follow_symlinks=False. Note, however, that Windows has distinct file and directory reparse points, so we can't hardlink to a directory symlink, or any other type of directory reparse point such as a junction mountpoint. In Unix, follow_symlinks=False (if implemented) allows creating a hardlink to a symlink that targets a directory. Also, I noticed that I can pass follow_symlinks=False in Windows, but this should raise NotImplementedError. It's supposed to be checked via follow_symlinks_specified(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 07:23:07 2019 From: report at bugs.python.org (Jo Henke) Date: Thu, 18 Jul 2019 11:23:07 +0000 Subject: [issue37612] os.link(..., follow_symlinks=True) broken on Linux In-Reply-To: <1563404695.9.0.284402565462.issue37612@roundup.psfhosted.org> Message-ID: <1563448987.66.0.398587734496.issue37612@roundup.psfhosted.org> Jo Henke added the comment: The problem that POSIX does not define the behavior of link() regarding symlinks (and that Unix implementations differ indeed), is independent from Python's os.link() defaults. Since it makes no sense to call link(), when linkat() is available, I propose this change: --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -3512,15 +3512,11 @@ os_link_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd, #else Py_BEGIN_ALLOW_THREADS #ifdef HAVE_LINKAT - if ((src_dir_fd != DEFAULT_DIR_FD) || - (dst_dir_fd != DEFAULT_DIR_FD) || - (!follow_symlinks)) - result = linkat(src_dir_fd, src->narrow, - dst_dir_fd, dst->narrow, - follow_symlinks ? AT_SYMLINK_FOLLOW : 0); - else + result = linkat(src_dir_fd, src->narrow, dst_dir_fd, dst->narrow, + follow_symlinks ? AT_SYMLINK_FOLLOW : 0); +#else + result = link(src->narrow, dst->narrow); #endif /* HAVE_LINKAT */ - result = link(src->narrow, dst->narrow); Py_END_ALLOW_THREADS if (result) This fix also simplifies the code, and should be safe for back-porting. Whether Python's defaults should be changed regarding Windows and those (mostly obsolete) Unix platforms that do not provide linkat(), is another question. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 08:22:04 2019 From: report at bugs.python.org (hai shi) Date: Thu, 18 Jul 2019 12:22:04 +0000 Subject: [issue34697] ctypes: Crash if manually-created CField instance is used In-Reply-To: <1537031593.26.0.956365154283.issue34697@psf.upfronthosting.co.za> Message-ID: <1563452524.93.0.0742536468445.issue34697@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14628 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14837 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 08:24:34 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 18 Jul 2019 12:24:34 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1563452674.82.0.509468117776.issue37587@roundup.psfhosted.org> Inada Naoki added the comment: > 1. remove the mov entirely. It is not needed inside the loop and it is only needed later, outside the loop to access the variable How can we lazy "mov DWORD PTR [rsp+0x44],eax"? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 08:33:55 2019 From: report at bugs.python.org (hai shi) Date: Thu, 18 Jul 2019 12:33:55 +0000 Subject: [issue34697] ctypes: Crash if manually-created CField instance is used In-Reply-To: <1537031593.26.0.956365154283.issue34697@psf.upfronthosting.co.za> Message-ID: <1563453235.71.0.00597222486969.issue34697@roundup.psfhosted.org> hai shi added the comment: I have try to cancel this PyCField_new function, but i am not sure I haven't break the code structure. ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 09:25:51 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 18 Jul 2019 13:25:51 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1563456351.26.0.497105656367.issue37587@roundup.psfhosted.org> Inada Naoki added the comment: Some compilers produce inefficient code for PR-14752. I wrote another patch which is friendly to more compilers. $ perf record ./python -m pyperf timeit -s "import json; x = json.dumps({'k': '1' * 2 ** 20})" "json.loads(x)" # PR-14752 gcc-7 (Ubuntu 7.4.0-8ubuntu1) 7.4.0 Mean +- std dev: 1.11 ms +- 0.01 ms ``` ? scanstring_unicode(): ? c = PyUnicode_READ(kind, buf, next); 11.92 ?270: movzbl (%r15,%r8,1),%eax ? if (c == '"' || c == '\\') { 27.97 ? cmp $0x22,%eax ? c = PyUnicode_READ(kind, buf, next); 29.22 ? mov %eax,0x34(%rsp) ? if (c == '"' || c == '\\') { 0.46 ? ? je ef 0.02 ? cmp $0x5c,%eax ? ? je ef ? if (c <= 0x1f && invalid < 0) { ? cmp $0x1f,%eax 0.00 ? ? ja 297 ? test %rdx,%rdx ? cmovs %r8,%rdx ? for (next = end; next < len; next++) { 29.49 ?297: add $0x1,%r8 ? cmp %r8,%r12 0.92 ? ? jne 270 ``` gcc-8 (Ubuntu 8.3.0-6ubuntu1) 8.3.0 Mean +- std dev: 712 us +- 1 us ``` ? c = PyUnicode_READ(kind, buf, next); ?188: movzbl 0x0(%rbp,%rbx,1),%eax ? mov %eax,0x34(%rsp) ? if (c == '"' || c == '\\') { ? cmp $0x22,%eax ? ? je 1d0 ? nop 0.00 ?1a0: cmp $0x5c,%eax ? ? je 1d0 ? if (c <= 0x1f && invalid < 0) { ? cmp $0x1f,%eax 49.84 ? ? ja 1b1 ? test %rdx,%rdx ? cmovs %rbx,%rdx ? for (next = end; next < len; next++) { ?1b1: add $0x1,%rbx 0.00 ? cmp %rbx,%r15 ? ? je ff ? c = PyUnicode_READ(kind, buf, next); 0.61 ? movzbl 0x0(%rbp,%rbx,1),%eax 49.53 ? mov %eax,0x34(%rsp) ? if (c == '"' || c == '\\') { 0.01 ? cmp $0x22,%eax ? ? jne 1a0 0.00 ? nop ``` clang version 7.0.1-8 (tags/RELEASE_701/final) Mean +- std dev: 951 us +- 1 us ``` ? c = PyUnicode_READ(kind, buf, next); 9.76 ?110: movzbl (%r12,%r13,1),%eax 9.47 ? mov %eax,0xc(%rsp) 8.85 ? cmp $0x22,%eax ? if (c == '"' || c == '\\') { ? ? je 170 8.78 ? cmp $0x5c,%al ? ? je 170 ? if (c <= 0x1f && invalid < 0) { 9.16 ? cmp $0x20,%al 9.09 ? mov %rdx,%rcx 9.16 ? cmovb %r13,%rcx 9.00 ? test %rdx,%rdx 8.78 ? cmovs %rcx,%rdx ? for (next = end; next < len; next++) { 9.09 ? add $0x1,%r13 ? cmp %r15,%r13 8.86 ? ? jl 110 ? ? jmp 170 ? nop ``` clang version 8.0.0-3 (tags/RELEASE_800/final) Mean +- std dev: 953 us +- 0 us ``` ? c = PyUnicode_READ(kind, buf, next); 10.04 ?100: movzbl (%r15,%r14,1),%eax 9.27 ? mov %eax,0x4(%rsp) 8.87 ? cmp $0x22,%eax ? if (c == '"' || c == '\\') { ? ? je 160 8.78 ? cmp $0x5c,%al ? ? je 160 ? if (c <= 0x1f && invalid < 0) { 8.97 ? cmp $0x20,%al 8.97 ? mov %rdx,%rcx 8.89 ? cmovb %r14,%rcx 8.81 ? test %rdx,%rdx 9.14 ? cmovs %rcx,%rdx ? for (next = end; next < len; next++) { 9.25 ? add $0x1,%r14 ? cmp %rdi,%r14 8.99 ? ? jl 100 ? ? jmp 160 ? nop ``` # modified ``` /* Find the end of the string or the next escape */ Py_UCS4 c; { Py_UCS4 d = 0; for (next = end; next < len; next++) { d = PyUnicode_READ(kind, buf, next); if (d == '"' || d == '\\') { break; } if (d <= 0x1f && strict) { raise_errmsg("Invalid control character at", pystr, next); goto bail; } } c = d; } ``` gcc-7 (Ubuntu 7.4.0-8ubuntu1) 7.4.0 Mean +- std dev: 708 us +- 1 us ``` ? for (next = end; next < len; next++) { 20.29 ?170: add $0x1,%rbx 0.31 ? cmp %rbx,%r12 ? ? je 1b0 ? d = PyUnicode_READ(kind, buf, next); 44.48 ?179: movzbl 0x0(%rbp,%rbx,1),%eax ? if (d == '"' || d == '\\') { 5.38 ? cmp $0x22,%eax ? ? je 2c0 23.82 ? cmp $0x5c,%eax ? ? je 2c0 ? if (d <= 0x1f && strict) { ? cmp $0x1f,%eax 5.68 ? ? ja 170 ? test %r13d,%r13d ? ? jne ed ``` gcc-8 (Ubuntu 8.3.0-6ubuntu1) 8.3.0 Mean +- std dev: 708 us +- 1 us ``` ? for (next = end; next < len; next++) { 6.54 ?170: add $0x1,%rbx 19.25 ? cmp %rbx,%r12 ? ? jle 341 ? d = PyUnicode_READ(kind, buf, next); 13.89 ?17d: movzbl 0x0(%rbp,%rbx,1),%eax ? if (d == '"' || d == '\\') { 34.26 ? cmp $0x22,%eax ? ? je 1e8 6.88 ? cmp $0x5c,%eax ? ? je 1e8 ? if (d <= 0x1f && strict) { ? cmp $0x1f,%eax 19.17 ? ? ja 170 ? test %r14d,%r14d ? ? je 170 ? ? jmpq ed ``` clang version 7.0.1-8 (tags/RELEASE_701/final) Mean +- std dev: 722 us +- 10 us ``` ? d = PyUnicode_READ(kind, buf, next); 11.62 ? c0:???movzbl (%r12,%r13,1),%eax 11.99 ? ? cmp $0x22,%eax ? ? if (d == '"' || d == '\\') { ? ?? je 1f0 9.61 ? ? cmp $0x5c,%al 22.56 ? ?? je 1f0 ? ? break; ? ? } ? ? if (d <= 0x1f && strict) { 8.94 ? ? cmp $0x20,%al ? ?? jb b4a ? ? for (next = end; next < len; next++) { 12.53 ? ? add $0x1,%r13 ? ???cmp %r15,%r13 22.72 ? ???jl c0 ? ? jmpq 1f0 ``` clang version 8.0.0-3 (tags/RELEASE_800/final) Mean +- std dev: 707 us +- 1 us ``` ? d = PyUnicode_READ(kind, buf, next); 0.01 ? b0: movzbl (%r12,%r13,1),%eax 23.84 ? cmp $0x22,%eax ? if (d == '"' || d == '\\') { 0.00 ? ? je 1c0 0.01 ? cmp $0x5c,%al ? ? je 1c0 ? break; ? } ? if (d <= 0x1f && strict) { 26.23 ? cmp $0x20,%al ? ? jb b1e ? for (next = end; next < len; next++) { ? add $0x1,%r13 ? cmp %r15,%r13 49.91 ? ? jl b0 ? ? jmpq 1c0 ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 09:57:23 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Jul 2019 13:57:23 +0000 Subject: [issue37552] [Windows] strptime/strftime return invalid results with UCRT version 17763.615 In-Reply-To: <1562790207.54.0.930380586709.issue37552@roundup.psfhosted.org> Message-ID: <1563458243.46.0.297681345892.issue37552@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14629 pull_request: https://github.com/python/cpython/pull/14839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 09:57:24 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 18 Jul 2019 13:57:24 +0000 Subject: [issue37552] [Windows] strptime/strftime return invalid results with UCRT version 17763.615 In-Reply-To: <1562790207.54.0.930380586709.issue37552@roundup.psfhosted.org> Message-ID: <1563458244.0.0.462267854393.issue37552@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset 9cd39b16e2655f748f7aa8d20bca4812da00ba70 by Paul Ganssle (Paul Monson) in branch 'master': bpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (#14460) https://github.com/python/cpython/commit/9cd39b16e2655f748f7aa8d20bca4812da00ba70 ---------- message_count: 1.0 -> 2.0 nosy: +p-ganssle nosy_count: 5.0 -> 6.0 pull_requests: +14629 pull_request: https://github.com/python/cpython/pull/14839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 09:59:00 2019 From: report at bugs.python.org (Harry Coin) Date: Thu, 18 Jul 2019 13:59:00 +0000 Subject: [issue37620] str.split(sep=None, maxsplit=-1,any=False) Message-ID: <1563458340.3.0.354346385459.issue37620@roundup.psfhosted.org> New submission from Harry Coin : When first I read the str.split documentation I parsed it to mean 'ab\t cd ef'.split(sep=' \t') --> ['ab','cd','ef'] Especially as the given example in the docs with the <> would have led to the given result read the way I read it. I suggest adding a parameter 'any=False' which by default gives the current behavior. But when True treats each character in the sep string as a delimiter and eliminates any combination of them from the resulting list. The use cases are many, for example parsing the /etc/hosts file where we see an address, some white space that could be any combination of \t and ' ' followed by more text. One could imagine 'abc \tdef, hgi,jlk'.split(', \t',any=True) -> ['abc','def','hgi','jlk'] being used quite often. ---------- components: Library (Lib) messages: 348116 nosy: hcoin priority: normal severity: normal status: open title: str.split(sep=None, maxsplit=-1,any=False) type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 10:13:50 2019 From: report at bugs.python.org (=?utf-8?q?Dominik_Miedzi=C5=84ski?=) Date: Thu, 18 Jul 2019 14:13:50 +0000 Subject: [issue37621] Line continuation of blank line emits NEWLINE Message-ID: <1563459230.52.0.916101188848.issue37621@roundup.psfhosted.org> New submission from Dominik Miedzi?ski : Both C and Python tokenizers emit NEWLINE tokens on continued blank lines. Because of this it is possible to emit repeated NEWLINEs, which some tools don't expect to happen. I've attached example source file which is tokenized into 3 NEWLINE tokens in a row. ---------- components: Interpreter Core files: linecont.py messages: 348117 nosy: miedzinski priority: normal severity: normal status: open title: Line continuation of blank line emits NEWLINE type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file48488/linecont.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 10:18:06 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Jul 2019 14:18:06 +0000 Subject: [issue37552] [Windows] strptime/strftime return invalid results with UCRT version 17763.615 In-Reply-To: <1562790207.54.0.930380586709.issue37552@roundup.psfhosted.org> Message-ID: <1563459486.77.0.865535901062.issue37552@roundup.psfhosted.org> miss-islington added the comment: New changeset 652b667b13fc6176a565538b35ec11174cc9dacf by Miss Islington (bot) in branch '3.8': bpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (GH-14460) https://github.com/python/cpython/commit/652b667b13fc6176a565538b35ec11174cc9dacf ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 10:27:38 2019 From: report at bugs.python.org (=?utf-8?q?Dominik_Miedzi=C5=84ski?=) Date: Thu, 18 Jul 2019 14:27:38 +0000 Subject: [issue37621] Line continuation of blank line emits NEWLINE In-Reply-To: <1563459230.52.0.916101188848.issue37621@roundup.psfhosted.org> Message-ID: <1563460058.61.0.491903456542.issue37621@roundup.psfhosted.org> Change by Dominik Miedzi?ski : ---------- keywords: +patch pull_requests: +14630 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14840 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 10:37:15 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Thu, 18 Jul 2019 14:37:15 +0000 Subject: [issue37609] support "UNC" device paths in ntpath.splitdrive In-Reply-To: <1563362794.09.0.456380769613.issue37609@roundup.psfhosted.org> Message-ID: <1563460635.78.0.698514117979.issue37609@roundup.psfhosted.org> Change by Ngalim Siregar : ---------- keywords: +patch pull_requests: +14632 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14841 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 10:41:10 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 18 Jul 2019 14:41:10 +0000 Subject: [issue36833] Add tests for Datetime C API Macros In-Reply-To: <1557238651.7.0.774867491617.issue36833@roundup.psfhosted.org> Message-ID: <1563460870.09.0.673424859682.issue36833@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 10:44:19 2019 From: report at bugs.python.org (Dodain) Date: Thu, 18 Jul 2019 14:44:19 +0000 Subject: [issue37622] Signature of SHA256 HMAC digest not matching with the signature of jwt library Message-ID: <1563461059.89.0.239374018192.issue37622@roundup.psfhosted.org> New submission from Dodain : The signature (SHA256 of HMAC Digest) calculated using hmac library doesn't match the signature calculated using jwt library. The singature calculated using JWT is the right signature. The signature with JWT library is VXG8L0SEY3wo5hdAznbvxWXDbhNtuOd7PaZOhzZn_HQ Whereas the signature with hmac library is SHR3SSe+8+X8eBw/H+CUc6f5KyXmuONfprdttjeQrwQ= Since only one file can bu attached so I am inlining the code for finding jwt signature with jwt library. The code for HMAC library is attached. import jwt public = "1234" print (public) print jwt.encode({"login":"admin"}, key=public, algorithm='HS256') ---------- components: Library (Lib) files: sign_with_hmac_library.py messages: 348119 nosy: dodain priority: normal severity: normal status: open title: Signature of SHA256 HMAC digest not matching with the signature of jwt library type: behavior versions: Python 2.7 Added file: https://bugs.python.org/file48489/sign_with_hmac_library.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 10:50:11 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 18 Jul 2019 14:50:11 +0000 Subject: [issue36833] Add tests for Datetime C API Macros In-Reply-To: <1557238651.7.0.774867491617.issue36833@roundup.psfhosted.org> Message-ID: <1563461411.14.0.220133892982.issue36833@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- keywords: +patch pull_requests: +14633 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14842 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 10:53:36 2019 From: report at bugs.python.org (Jo Henke) Date: Thu, 18 Jul 2019 14:53:36 +0000 Subject: [issue37612] os.link(..., follow_symlinks=True) broken on Linux In-Reply-To: <1563404695.9.0.284402565462.issue37612@roundup.psfhosted.org> Message-ID: <1563461616.44.0.418579678485.issue37612@roundup.psfhosted.org> Change by Jo Henke : ---------- keywords: +patch pull_requests: +14634 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14843 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 12:38:12 2019 From: report at bugs.python.org (sushma) Date: Thu, 18 Jul 2019 16:38:12 +0000 Subject: [issue16970] argparse: bad nargs value raises misleading message In-Reply-To: <1358251791.34.0.358251606196.issue16970@psf.upfronthosting.co.za> Message-ID: <1563467892.94.0.397693651638.issue16970@roundup.psfhosted.org> sushma added the comment: Hello! I added the patch and submitted the PR and ran the test, could you please take a look? Also, I see this 3.6 Thanks ---------- message_count: 8.0 -> 9.0 nosy: +syadlapalli nosy_count: 4.0 -> 5.0 pull_requests: +14635 stage: needs patch -> patch review versions: +Python 3.6 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 pull_request: https://github.com/python/cpython/pull/14844 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 13:13:45 2019 From: report at bugs.python.org (Elizabeth Uselton) Date: Thu, 18 Jul 2019 17:13:45 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1563470025.86.0.737215237076.issue37555@roundup.psfhosted.org> Elizabeth Uselton added the comment: Giving this a reread with fresh eyes this morning, I realized I wasn't explicit enough in saying that I see that this fix is about the same as the one you mentioned, Karthikeyan, but said you were concerned might cause more subtle bugs. I hear that, and will try some more specific fixes, I was just trying to gather whether the tests showing self.assertEqual(call(ANY).call_list(), mock.mock_calls) self.assertEqual(mock.mock_calls, call(ANY).call_list()) results in one passing and the other not (and the same for calls) changed the math on how brittle the current logic is, so just leaving it seemed like less of an option. I'll keep working on some other ideas though, whether we can check for ANY directly, or just wrap the BoundArguments that are causing problems when the mock has spec set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 13:47:39 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 18 Jul 2019 17:47:39 +0000 Subject: [issue13819] _warnings settings are process-wide In-Reply-To: <1326919817.29.0.252163037725.issue13819@psf.upfronthosting.co.za> Message-ID: <1563472059.18.0.701448418584.issue13819@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 13:54:40 2019 From: report at bugs.python.org (Jake Tesler) Date: Thu, 18 Jul 2019 17:54:40 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1563472480.43.0.197460802372.issue36084@roundup.psfhosted.org> Change by Jake Tesler : ---------- pull_requests: +14636 pull_request: https://github.com/python/cpython/pull/14845 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 13:58:26 2019 From: report at bugs.python.org (Tim Froehlich) Date: Thu, 18 Jul 2019 17:58:26 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1563472706.62.0.15001374759.issue35621@roundup.psfhosted.org> Tim Froehlich added the comment: Is it possible to amend the documentation (https://docs.python.org/3.5/library/asyncio-subprocess.html, etc) to include a note that the loop parameter doesn't work? I'm impacted by this bug and lost a few hours to it. ---------- nosy: +Tim Froehlich _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 14:12:21 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 18 Jul 2019 18:12:21 +0000 Subject: [issue37616] [3.10 prep] zip path incorrect In-Reply-To: <1563432035.85.0.841643784863.issue37616@roundup.psfhosted.org> Message-ID: <1563473541.21.0.311528437576.issue37616@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 14:13:37 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 18 Jul 2019 18:13:37 +0000 Subject: [issue37617] [3.10 prep] site.py uses `sys.version[:3]` In-Reply-To: <1563432094.73.0.116899779699.issue37617@roundup.psfhosted.org> Message-ID: <1563473617.84.0.329783322057.issue37617@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> third party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 14:37:17 2019 From: report at bugs.python.org (Ethan Furman) Date: Thu, 18 Jul 2019 18:37:17 +0000 Subject: [issue34443] enum repr should use __qualname__ In-Reply-To: <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za> Message-ID: <1563475037.23.0.762409248725.issue34443@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 323842c2792a81e87917790506ec3457832c84b3 by Ethan Furman (Walter D?rwald) in branch 'master': bpo-34443: Use __qualname__ instead of __name__ in enum exception messages. (GH-14809) https://github.com/python/cpython/commit/323842c2792a81e87917790506ec3457832c84b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 15:07:23 2019 From: report at bugs.python.org (Andrew Yurisich) Date: Thu, 18 Jul 2019 19:07:23 +0000 Subject: [issue37623] namedtuple integration for importlib.abc.Loader Message-ID: <1563476843.29.0.0326918684988.issue37623@roundup.psfhosted.org> New submission from Andrew Yurisich : I wanted to return a namedtuple from a concrete implementation of an importlib.abc.Loader base class, and wasn't able to provide a __spec__ property on the underlying class behind the namedtuple. All return values from importlib.abc.Loader#create_module need to have a __spec__ property set. Similar to the namedtuple optional argument 'module', I'd like to be able to pass in a 'spec', and add this value to result.__spec__ before returning the final result. ---------- components: Library (Lib) messages: 348124 nosy: Andrew Yurisich priority: normal severity: normal status: open title: namedtuple integration for importlib.abc.Loader type: enhancement 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 Jul 18 16:03:24 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Jul 2019 20:03:24 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563480204.17.0.185612193255.issue33610@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset e0a1f8fb5c60886dbddf1a3ccb5d47576bdd43e2 by Terry Jan Reedy (Tal Einat) in branch 'master': bpo-33610: IDLE's code-context always shows current context immediately (GH-14821) https://github.com/python/cpython/commit/e0a1f8fb5c60886dbddf1a3ccb5d47576bdd43e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:03:34 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Jul 2019 20:03:34 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563480214.08.0.343316234019.issue33610@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14637 pull_request: https://github.com/python/cpython/pull/14846 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:03:43 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Jul 2019 20:03:43 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563480223.06.0.698906564581.issue33610@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14638 pull_request: https://github.com/python/cpython/pull/14847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:13:12 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Jul 2019 20:13:12 +0000 Subject: [issue37623] namedtuple integration for importlib.abc.Loader In-Reply-To: <1563476843.29.0.0326918684988.issue37623@roundup.psfhosted.org> Message-ID: <1563480792.12.0.0273697266726.issue37623@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14639 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14848 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:46:40 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Jul 2019 20:46:40 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563482800.18.0.799592991868.issue33610@roundup.psfhosted.org> miss-islington added the comment: New changeset db2957c8ebbe1c4609b3fc730c6e682cb8ccfeb0 by Miss Islington (bot) in branch '3.7': bpo-33610: IDLE's code-context always shows current context immediately (GH-14821) https://github.com/python/cpython/commit/db2957c8ebbe1c4609b3fc730c6e682cb8ccfeb0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:47:29 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Jul 2019 20:47:29 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563482849.89.0.954960455966.issue33610@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 86eb5daaf31860da479e034d69e9a6d4f47a8eb6 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-33610: IDLE's code-context always shows current context immediately (GH-14821) (#14846) https://github.com/python/cpython/commit/86eb5daaf31860da479e034d69e9a6d4f47a8eb6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 16:51:27 2019 From: report at bugs.python.org (Ted Whalen) Date: Thu, 18 Jul 2019 20:51:27 +0000 Subject: [issue37624] random.choices has unexpected behavior with negative weights Message-ID: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> New submission from Ted Whalen : The behavior of random.choices when negative weights are provided is unexpected. While giving a negative weight for one value is probably bad, it's really unfortunate that providing a negative weight for one value affects the probability of selecting an adjacent value. Throwing a ValueError exception when there was a use of negative weights was considered in #31689, but at that time, there wasn't an example provided that failed silently. Note below that providing a weight of -1 for 'c' causes both 'c' and 'd' to drop out of the results. Python 3.7.2 (default, Jan 13 2019, 12:50:01) [Clang 10.0.0 (clang-1000.11.45.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from collections import Counter >>> from random import choices >>> Counter(choices("abcdefg", weights=(1,1,-1,1,1,1,1), k=10000)) Counter({'f': 2040, 'a': 2019, 'e': 2017, 'g': 2009, 'b': 1915}) ---------- components: Library (Lib) messages: 348128 nosy: Ted Whalen priority: normal severity: normal status: open title: random.choices has unexpected behavior with negative weights type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:03:41 2019 From: report at bugs.python.org (Michael Blahay) Date: Thu, 18 Jul 2019 21:03:41 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1563483821.2.0.931888866634.issue35495@roundup.psfhosted.org> Michael Blahay added the comment: Ryan, I like option A as well, but it is a breaking change. Unlike in a compiled language where we could output a warning, making the proposed change could bring some software to a grinding halt. For now I'm going to make the documentation change and this issue can stay open for if there is a major version change that would allow such a breaking change. ---------- versions: +Python 3.9 -Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:31:26 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 18 Jul 2019 21:31:26 +0000 Subject: [issue37623] namedtuple integration for importlib.abc.Loader In-Reply-To: <1563476843.29.0.0326918684988.issue37623@roundup.psfhosted.org> Message-ID: <1563485486.72.0.736302827472.issue37623@roundup.psfhosted.org> Change by Eric V. Smith : ---------- assignee: -> rhettinger nosy: +eric.smith, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 17:55:14 2019 From: report at bugs.python.org (Daniel) Date: Thu, 18 Jul 2019 21:55:14 +0000 Subject: [issue37625] Class variable is still accessible after class instance has been overwritten out Message-ID: <1563486914.84.0.86753245558.issue37625@roundup.psfhosted.org> New submission from Daniel : Not sure if this is the desired behavior but wanted to bring it up anyways. When you have a class and have a variable in like: class TestClass(object): variable = [] then you run it through a loop like: for num in range(10): test = TestClass() test.variable.append(num) even if you assign another variable to it or none like: test = "blah" test = None then reassign the class: test = TestClass() print(test.variable) will return all the numbers in the list. also doesn't seem to matter if garbage collection was manually ran. Attached is a small example code. This was found on Macos and tested with both python 3.7 and 2.7 Subsequently same on ubuntu with python 3.5 and python 2.7 ---------- components: Interpreter Core files: variabletest.py messages: 348130 nosy: moird priority: normal severity: normal status: open title: Class variable is still accessible after class instance has been overwritten out type: behavior versions: Python 2.7, Python 3.5, Python 3.7 Added file: https://bugs.python.org/file48490/variabletest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 18:32:13 2019 From: report at bugs.python.org (=?utf-8?q?Dominik_Miedzi=C5=84ski?=) Date: Thu, 18 Jul 2019 22:32:13 +0000 Subject: [issue37625] Class variable is still accessible after class instance has been overwritten out In-Reply-To: <1563486914.84.0.86753245558.issue37625@roundup.psfhosted.org> Message-ID: <1563489133.16.0.181913854979.issue37625@roundup.psfhosted.org> Dominik Miedzi?ski added the comment: This is expected, because list is created during class definition, not initialization. You should initialize `variable` in __init__. class TestClass(object): def __init__(self): self.variable = [] for num in range(10): test = TestClass() test.variable.append(num) ---------- nosy: +miedzinski _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:04:45 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 19 Jul 2019 01:04:45 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563498285.51.0.637688905215.issue37610@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- keywords: +patch pull_requests: +14640 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14849 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:12:26 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 19 Jul 2019 01:12:26 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563498746.61.0.78983932113.issue37610@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- pull_requests: +14641 pull_request: https://github.com/python/cpython/pull/14850 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:13:00 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 19 Jul 2019 01:13:00 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563498780.79.0.59219878905.issue37610@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:21:02 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 19 Jul 2019 01:21:02 +0000 Subject: [issue37625] Class variable is still accessible after class instance has been overwritten out In-Reply-To: <1563486914.84.0.86753245558.issue37625@roundup.psfhosted.org> Message-ID: <1563499262.01.0.789576577972.issue37625@roundup.psfhosted.org> Eric V. Smith added the comment: Because variable belongs to the class, and not any instance of the class, you can duplicate this behavior without creating any instances at all: >>> class TestClass(object): ... variable = [] ... >>> TestClass.variable.append(1) >>> TestClass.variable [1] And then when you create an instance t, t.variable still refers to the class: >>> t = TestClass() >>> t.variable [1] >>> This is expected behavior. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:23:23 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 01:23:23 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499403.42.0.659557381706.issue37610@roundup.psfhosted.org> miss-islington added the comment: New changeset 8f040b7a9f442e7c2605ef1cad9c6b5eb7dd7af7 by Miss Islington (bot) (aldwinaldwin) in branch 'master': bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850) https://github.com/python/cpython/commit/8f040b7a9f442e7c2605ef1cad9c6b5eb7dd7af7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:23:34 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 01:23:34 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499414.2.0.0161239285615.issue37610@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14642 pull_request: https://github.com/python/cpython/pull/14851 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:25:06 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 01:25:06 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499506.49.0.473947245236.issue37610@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14643 pull_request: https://github.com/python/cpython/pull/14852 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:27:03 2019 From: report at bugs.python.org (Mariatta) Date: Fri, 19 Jul 2019 01:27:03 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499623.49.0.700583169853.issue37610@roundup.psfhosted.org> Mariatta added the comment: Thanks for the PR! There's conflict to the 2.7 branch, but I'm not motivated enough to fix it there. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:28:52 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 01:28:52 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499732.72.0.838468946845.issue37610@roundup.psfhosted.org> miss-islington added the comment: New changeset 87b6078fb90f11dc67ad8f31e98cbc40f74fcb81 by Miss Islington (bot) in branch '3.7': bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850) https://github.com/python/cpython/commit/87b6078fb90f11dc67ad8f31e98cbc40f74fcb81 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:29:34 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 19 Jul 2019 01:29:34 +0000 Subject: [issue37625] Class variable is still accessible after class instance has been overwritten out In-Reply-To: <1563486914.84.0.86753245558.issue37625@roundup.psfhosted.org> Message-ID: <1563499774.07.0.510413096958.issue37625@roundup.psfhosted.org> Eric V. Smith added the comment: Also, you might want to search for "python class and instance variables". This one looks decent, although I didn't read it exhaustively: https://howchoo.com/g/nzy0mthhyzl/understanding-class-vs-instance-variables-in-python-3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:31:44 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 01:31:44 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499904.34.0.645114250079.issue37610@roundup.psfhosted.org> miss-islington added the comment: New changeset 840352455dfbb6acb3b69ea88a19c01b7358e801 by Miss Islington (bot) in branch '3.8': bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850) https://github.com/python/cpython/commit/840352455dfbb6acb3b69ea88a19c01b7358e801 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:47:14 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 19 Jul 2019 01:47:14 +0000 Subject: [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563500834.66.0.900716737417.issue37610@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: just guessing ... in 2.7 unix.rst has '\ No newline at end of file' it's your enhancement/call, but indeed no need to put energy in 2.7 doc anymore. case closed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 22:37:48 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Fri, 19 Jul 2019 02:37:48 +0000 Subject: [issue37496] Support annotations in signature strings. In-Reply-To: <1562197526.36.0.0415942737779.issue37496@roundup.psfhosted.org> Message-ID: <1563503868.6.0.836210720561.issue37496@roundup.psfhosted.org> Giovanni Cappellotto added the comment: I'd like to work on this, but I'm kind of new to the codebase. Do you think I should leave this task to someone more expert on the matter? I took a look at the function you mentioned and I was able to support simple annotations, for instance `x: int`, by evaluating `node.annotation.id`. This method doesn't work with more complex annotations thought. For instance a simple type alias (`Foo = int`, `x: Foo`) breaks this naive implementation. Another error happens if the annotation is not a simple `id`, but a subscript function application, for instance `x: List[int]`. Do you have any suggestion for how to continue working on this task? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:18:54 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 19 Jul 2019 03:18:54 +0000 Subject: [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563506334.46.0.580636473317.issue37624@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: This is what happens with your weights: >>> list(itertools.accumulate(weights)) [1, 2, 1, 2, 3, 3, 4] using bisect.bisect certain amount of times, will distribute on this: a<1 _______________________________________ From report at bugs.python.org Thu Jul 18 23:19:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 19 Jul 2019 03:19:23 +0000 Subject: [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563506363.59.0.297764542114.issue37624@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:36:12 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 19 Jul 2019 03:36:12 +0000 Subject: [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563507372.49.0.935836782055.issue37624@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- keywords: +patch pull_requests: +14644 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14854 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:39:04 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Fri, 19 Jul 2019 03:39:04 +0000 Subject: =?utf-8?q?=5Bissue37626=5D_Documentation=EF=BC=9Aconflict_between_docs?= Message-ID: <1563507544.78.0.459809991855.issue37626@roundup.psfhosted.org> Change by ?? : ---------- assignee: docs at python components: Documentation nosy: docs at python, shiyuchong priority: normal severity: normal status: open title: Documentation?conflict between docs versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:43:42 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Fri, 19 Jul 2019 03:43:42 +0000 Subject: =?utf-8?q?=5Bissue37626=5D_Documentation=EF=BC=9Aconflict_between_docs?= Message-ID: <1563507822.25.0.227141722177.issue37626@roundup.psfhosted.org> New submission from ?? : In https://docs.python.org/3/whatsnew/3.4.html#api-and-feature-removals,It is said "inspect.Signature: positional-only parameters are now required to have a valid name." But in https://docs.python.org/3/library/inspect.html?highlight=3.4#inspect.Signature, the actual change happened in inspect.Parameter, " Changed in version 3.4: In Python 3.3 Parameter objects were allowed to have name set to None if their kind was set to POSITIONAL_ONLY. This is no longer permitted." So I wonder is it a mistake? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:46:53 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 19 Jul 2019 05:46:53 +0000 Subject: =?utf-8?q?=5Bissue37626=5D_Documentation=EF=BC=9Aconflict_between_docs?= In-Reply-To: <1563507822.25.0.227141722177.issue37626@roundup.psfhosted.org> Message-ID: <1563515213.69.0.844940606005.issue37626@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:47:56 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 19 Jul 2019 05:47:56 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1563515276.94.0.0267768413027.issue37587@roundup.psfhosted.org> Change by Inada Naoki : ---------- versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:59:47 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 19 Jul 2019 05:59:47 +0000 Subject: =?utf-8?q?=5Bissue37626=5D_Documentation=EF=BC=9Aconflict_between_docs?= In-Reply-To: <1563507822.25.0.227141722177.issue37626@roundup.psfhosted.org> Message-ID: <1563515987.45.0.797358317197.issue37626@roundup.psfhosted.org> Inada Naoki added the comment: https://docs.python.org/3/library/inspect.html#inspect.Parameter.replace """ Changed in version 3.4: In Python 3.3 Parameter objects were allowed to have name set to None if their kind was set to POSITIONAL_ONLY. This is no longer permitted. """ ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 02:07:24 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 19 Jul 2019 06:07:24 +0000 Subject: [issue37547] Add _PyObject_CallMethodOneArg() In-Reply-To: <1562760379.8.0.22654038416.issue37547@roundup.psfhosted.org> Message-ID: <1563516444.48.0.625754854561.issue37547@roundup.psfhosted.org> Inada Naoki added the comment: New changeset d3952096537d9d2706e10af0c0596daeee6a58c9 by Inada Naoki (Zackery Spytz) in branch 'master': bpo-37547: Fix a compiler warning in winconsoleio.c (GH-14785) https://github.com/python/cpython/commit/d3952096537d9d2706e10af0c0596daeee6a58c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 02:51:49 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 06:51:49 +0000 Subject: [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563519109.05.0.598764855663.issue37624@roundup.psfhosted.org> Raymond Hettinger added the comment: We can add a note the the docs that weights are assumed to be non-negative, but I don't want to add an extra O(n) step to check for unusual inputs with undefined meaning -- that would just impair the normal use cases for near zero benefit. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 02:59:20 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 19 Jul 2019 06:59:20 +0000 Subject: [issue31689] random.choices does not work with negative weights In-Reply-To: <1507121599.13.0.213398074469.issue31689@psf.upfronthosting.co.za> Message-ID: <1563519560.16.0.272441789821.issue31689@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: issue37624: not adding an extra O(n) step to check for unusual inputs with undefined meaning -- that would just impair the normal use cases for near zero benefit. ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 03:04:47 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 07:04:47 +0000 Subject: [issue37623] namedtuple integration for importlib.abc.Loader In-Reply-To: <1563476843.29.0.0326918684988.issue37623@roundup.psfhosted.org> Message-ID: <1563519887.95.0.34574469243.issue37623@roundup.psfhosted.org> Raymond Hettinger added the comment: Brett, do you have any thoughts on this? My initial take is that __spec__ is primarily about import logic and that it likely shouldn't creep into exec'd code like dataclasses and named tuples. Also, I'm reluctant to expand the API for something that looks like a one time use, especially when other alternatives are possible. ---------- nosy: +brett.cannon versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 03:18:58 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 07:18:58 +0000 Subject: [issue37620] str.split(sep=None, maxsplit=-1,any=False) In-Reply-To: <1563458340.3.0.354346385459.issue37620@roundup.psfhosted.org> Message-ID: <1563520738.15.0.916009121509.issue37620@roundup.psfhosted.org> Raymond Hettinger added the comment: This API is already overloaded with two distinct algorithms -- see https://stackoverflow.com/questions/16645083 . If new functionality is truly needed, it should be in a separate method rather than feature creeping in additional variants. Also, the OP's post seems to be grounded in an initial misreading of the docs rather than in compelling use cases for a new option. So, there may be room for improving the documentation, especially the examples. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, rhettinger versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 03:20:29 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Jul 2019 07:20:29 +0000 Subject: =?utf-8?q?=5Bissue37614=5D_Pasteing_=F0=9F=8C=B9into_idle_makes_it_crash?= In-Reply-To: <1563424849.97.0.321788763811.issue37614@roundup.psfhosted.org> Message-ID: <1563520829.27.0.855502491495.issue37614@roundup.psfhosted.org> Terry J. Reedy added the comment: As said multiple times on #13153, IDLE exits with a traceback that is visible when it is started from a command line (python -m idlelib). It usually ends with File "F:\dev\3x\lib\tkinter\__init__.py", line 1420, in mainloop self.tk.mainloop(n) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 3: invalid continuation byte ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE 3.x on Windows crashes when pasting non-BMP unicode type: crash -> behavior versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 03:26:51 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 07:26:51 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" Message-ID: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> New submission from Raymond Hettinger : Today, I did some user testing for the 3.8 beta when teaching the argparse module. The new "Run Customized" option needs two usability tweaks. 1) Move the menu option up by one so that the regular F5 "run" is last -- learners we having a hard time finding and mouse targeting the more commonly used regular "run" option. 2) The text input widget should be pre-populated with the most recently run command-line. This makes it easier to test variants of the same command rather retyping it on every invocation. Even more desirable would be to have a multi-command history, but in the absence of that an editable single command history would suffice. ---------- assignee: terry.reedy components: IDLE messages: 348149 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: Minor improvements to IDLE's "Run Customized" versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 03:32:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 07:32:32 +0000 Subject: [issue37628] IDLE Font Sample distracting and too large Message-ID: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> New submission from Raymond Hettinger : The "font sample" bar on the General tab in Preferences is problematio. With some font sizes, it grows so large that there is no way to mouse downward to click "accept". Making the window smaller and perhaps only showing one or two samples would be a big win. Also consider having the window off by default and having a button to turn make it visible. I've need seen a single user benefit from this garish display. ---------- assignee: terry.reedy components: IDLE messages: 348150 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: IDLE Font Sample distracting and too large versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 03:33:49 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 19 Jul 2019 07:33:49 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1563521629.06.0.290344045953.issue36044@roundup.psfhosted.org> Inada Naoki added the comment: > ./configure [...] --with-profile-task='-m test --pgo-extended' I think this is abusing of `--with` options. `--with-*` is for external software [1]. But `--with-lto` option abuses it already. How about `./configure PROFILE_TASKS="-m test --pgo-extend"`? [1]: https://www.gnu.org/software/autoconf/manual/autoconf-2.66/html_node/External-Software.html#External-Software ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 03:47:33 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 07:47:33 +0000 Subject: [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563522453.26.0.123745176107.issue37624@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +14645 pull_request: https://github.com/python/cpython/pull/14855 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 04:05:35 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 19 Jul 2019 08:05:35 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <1563040436.19.0.276806879722.issue37588@roundup.psfhosted.org> Message-ID: <1563523535.26.0.461898313994.issue37588@roundup.psfhosted.org> Inada Naoki added the comment: I think it's bad idea that suppressing deprecation warning to suppress the warning for deprecated member. It is highly recommended to "not" touching tp_print. Why you want to suppress deprecation warning, not missing field initialisers? You can suppress the warninb by `-Wno-missing-field-initializers` compiler option or `#pragma GCC diagnostic ignored "-Wmissing-field-initializers"`. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 04:29:49 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 19 Jul 2019 08:29:49 +0000 Subject: [issue37399] XML text behaviour change if there are comments In-Reply-To: <1561452502.97.0.0666051157633.issue37399@roundup.psfhosted.org> Message-ID: <1563524989.97.0.127279128585.issue37399@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch pull_requests: +14646 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14856 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 04:38:26 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 08:38:26 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1563525506.31.0.833833274834.issue36546@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +14647 pull_request: https://github.com/python/cpython/pull/14857 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 04:52:13 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Jul 2019 08:52:13 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1563526333.01.0.800117719677.issue13153@roundup.psfhosted.org> Terry J. Reedy added the comment: Closed #37614 in favor of this. We now have only Python with FSR and mostly only tcl 8.6 to worry about. But I presume the Windows clipboard still uses uft-16le. Experimenting with pasting ? or '?', I usually get the 'ed' message as before, but with the quoted astral, IDLE somethings hangs. If I wait before trying to close, I get a message from Windows about waiting or closing. Currently, an attempt to print an astral char, as opposed to paste, results in >>> print('\U00011111') Traceback (most recent call last): File "", line 1, in print('\U00011111') UnicodeEncodeError: 'UCS-2' codec can't encode character '\U00011111' in position 0: Non-BMP character not supported in Tk Improving this is a separate issue, as is editing a .py file with an astral char in the name or test. ---------- title: IDLE 3.x on Windows crashes when pasting non-BMP unicode -> IDLE 3.x on Windows exits when pasting non-BMP unicode versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 04:56:56 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 08:56:56 +0000 Subject: [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563526616.92.0.165498070448.issue37624@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 8dbe563aa6bd18b8c581951537dfb406d36e8063 by Raymond Hettinger in branch 'master': bpo-37624: Document weight assumptions for random.choices() (GH-14855) https://github.com/python/cpython/commit/8dbe563aa6bd18b8c581951537dfb406d36e8063 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 04:57:01 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 08:57:01 +0000 Subject: [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563526621.18.0.690368243597.issue37624@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14648 pull_request: https://github.com/python/cpython/pull/14858 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 04:57:25 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 08:57:25 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1563526645.7.0.72173049147.issue36546@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset eed5e9a9562d4dcd137e9f0fc7157bc3373c98cc by Raymond Hettinger in branch 'master': bpo-36546: Clean-up comments (GH-14857) https://github.com/python/cpython/commit/eed5e9a9562d4dcd137e9f0fc7157bc3373c98cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 04:57:33 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 08:57:33 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1563526653.22.0.511047004766.issue36546@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14649 pull_request: https://github.com/python/cpython/pull/14859 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 05:17:39 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 09:17:39 +0000 Subject: [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563527859.0.0.403397075635.issue37624@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset a50a6225a06e5a83ce2a880a7eb4496043fdbb55 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37624: Document weight assumptions for random.choices() (GH-14855) (GH-14858) https://github.com/python/cpython/commit/a50a6225a06e5a83ce2a880a7eb4496043fdbb55 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 05:17:58 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 09:17:58 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1563527878.59.0.154961383086.issue36546@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset e5bfd1ce9da51b64d157392e0a831637f7335ff5 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-36546: Clean-up comments (GH-14857) (#14859) https://github.com/python/cpython/commit/e5bfd1ce9da51b64d157392e0a831637f7335ff5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 05:27:50 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 09:27:50 +0000 Subject: [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563528470.16.0.554070001393.issue37624@roundup.psfhosted.org> Raymond Hettinger added the comment: Misc side notes: * There is no expected behavior for negative a negative weight. Arguably, the only reasonable interpretation is what it already does (reduce the cumulative total). * Running simulations is a primary use case for choices(). Generally, running time there is important. * During the design phase, none of the other implementations studied had incorporated a scan of the inputs for negative weights. * bisect() does not check to make sure its inputs are sorted. The results for unsorted data are undefined. It is a documented precondition. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 05:33:29 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 09:33:29 +0000 Subject: [issue37623] namedtuple integration for importlib.abc.Loader In-Reply-To: <1563476843.29.0.0326918684988.issue37623@roundup.psfhosted.org> Message-ID: <1563528809.41.0.534037425101.issue37623@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 05:35:50 2019 From: report at bugs.python.org (Phil Thompson) Date: Fri, 19 Jul 2019 09:35:50 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <1563040436.19.0.276806879722.issue37588@roundup.psfhosted.org> Message-ID: <1563528950.21.0.935923980841.issue37588@roundup.psfhosted.org> Phil Thompson added the comment: I am not "touching" tp_print. I am simply defining it as 0 to avoid the missing initialiser warning. My point is that it should be possible to write code that doesn't trigger warnings (whether or not you suppress them). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 05:49:37 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 19 Jul 2019 09:49:37 +0000 Subject: [issue37623] namedtuple integration for importlib.abc.Loader In-Reply-To: <1563476843.29.0.0326918684988.issue37623@roundup.psfhosted.org> Message-ID: <1563529777.68.0.372054517083.issue37623@roundup.psfhosted.org> Eric V. Smith added the comment: I think using a dataclass here would be easier, since you can control class variables. Is there some reason that your loader must be a namedtuple? Something like: from typing import ClassVar from dataclasses import dataclass @dataclass class MyLoader: __spec__: ClassVar["Any"] = None name: str l = MyLoader('test') I'm not sure of the actual type of __spec__, I'm just using "Any" as a convenient placeholder. I'm also not sure if your intention is to inherit from importlib.abc.Loader, but that's easy enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 05:50:28 2019 From: report at bugs.python.org (Pierre Chopin) Date: Fri, 19 Jul 2019 09:50:28 +0000 Subject: [issue37629] Imghdr doesnt recognise some jpeg Message-ID: <1563529828.49.0.547849955653.issue37629@roundup.psfhosted.org> New submission from Pierre Chopin : the imghdr library only checks for the presence of (b'JFIF', b'Exif') in the header, which is excluding some valid JPEG file. This is an example of not recognised ile ---------- files: e2006bd7-51d7-4554-9738-ea13207fd104.jpg messages: 348161 nosy: pchopin priority: normal severity: normal status: open title: Imghdr doesnt recognise some jpeg versions: Python 3.7 Added file: https://bugs.python.org/file48491/e2006bd7-51d7-4554-9738-ea13207fd104.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 05:50:40 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 19 Jul 2019 09:50:40 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <1563040436.19.0.276806879722.issue37588@roundup.psfhosted.org> Message-ID: <1563529840.96.0.422101757725.issue37588@roundup.psfhosted.org> Inada Naoki added the comment: > I am not "touching" tp_print. I am simply defining it as 0 to avoid the missing initialiser warning. I meant it. `tp_print = 0` touches the deprecated `tp_print` field. It is not forward compatible. Note that we need to re-add tp_print only for C code which does `tp_print = 0`. > My point is that it should be possible to write code that doesn't trigger warnings (whether or not you suppress them). There is a simple solution: don't use `-Wextra`. We have some reserved/deprecated/unused fields. Setting 0 to them makes forward incompatible code. It bothers us to remove or reuse these fields. There are some other solutions, suppress the missing initializer warning as I wrote above, or use PyType_FromSpec instead of static type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 06:37:32 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 19 Jul 2019 10:37:32 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <1563040436.19.0.276806879722.issue37588@roundup.psfhosted.org> Message-ID: <1563532652.24.0.531159105825.issue37588@roundup.psfhosted.org> Jeroen Demeyer added the comment: > We have some reserved/deprecated/unused fields. Setting 0 to them makes forward incompatible code. Good point. tp_print is removed in 3.9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 06:56:03 2019 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 19 Jul 2019 10:56:03 +0000 Subject: [issue36182] Path.write_text() docs do not include the case that a file exists In-Reply-To: <1551703881.69.0.0731434428442.issue36182@roundup.psfhosted.org> Message-ID: <1563533763.0.0.0130433214259.issue36182@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Pinging for review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 07:30:56 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Jul 2019 11:30:56 +0000 Subject: [issue37630] Investigate replacing SHA3 code with OpenSSL Message-ID: <1563535856.49.0.726904541971.issue37630@roundup.psfhosted.org> New submission from Christian Heimes : Recent OpenSSL comes with SHA3. Now that Python is going to drop support for old OpenSSL, we can consider to use OpenSSL's SHA3 and drop the reference implementation from Python. For variable length SHAKE API, OpenSSL added EVP_MD_CTRL_XOF_LEN and EVP_DigestFinalXOF(). ---------- assignee: christian.heimes components: Extension Modules messages: 348165 nosy: christian.heimes, gregory.p.smith priority: normal severity: normal status: open title: Investigate replacing SHA3 code with OpenSSL type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 07:47:12 2019 From: report at bugs.python.org (Phil Thompson) Date: Fri, 19 Jul 2019 11:47:12 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <1563532652.24.0.531159105825.issue37588@roundup.psfhosted.org> Message-ID: <7506aaac11f4c047495da8ed6d682a32@riverbankcomputing.com> Phil Thompson added the comment: On 19/07/2019 11:37, Jeroen Demeyer wrote: > Jeroen Demeyer added the comment: > >> We have some reserved/deprecated/unused fields. Setting 0 to them >> makes forward incompatible code. > > Good point. tp_print is removed in 3.9 Which is why I protect the initialisation with #if PY_VERSION_HEX < 0x03090000 As far as I can see this is the "right thing" to do. However doing the "right thing" means I cannot avoid warnings without resorting to compiler-specific build system changes. With the change I am asking for I can suppress the warning (because I have explicitly dealt with the issue) in the code itself without affecting the rest of the system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 07:49:09 2019 From: report at bugs.python.org (Ben Brown) Date: Fri, 19 Jul 2019 11:49:09 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1563536949.46.0.249799453933.issue37226@roundup.psfhosted.org> Ben Brown added the comment: With some more research it looks like the issue is flow related, I experimented with the StreamWriter in a simple server and using that plus drain() appears to have worked an I no longer get the error. I have added my new server to the gist I posted above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 07:49:12 2019 From: report at bugs.python.org (Marcel Plch) Date: Fri, 19 Jul 2019 11:49:12 +0000 Subject: [issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST Message-ID: <1563536952.58.0.764226132067.issue37631@roundup.psfhosted.org> New submission from Marcel Plch : Problem: If you want to override CFLAGS by setting EXTRA_CFLAGS, they may have no effect if there are contrary flags in the CFLAGS_NODIST variable. How to reproduce: make CFLAGS_NODIST="-O2" EXTRA_CFLAGS="-Og" If you look at GCC arguments, there is -O2 present *after* the -Og flag. This means -Og gets ignored. ---------- components: Build messages: 348168 nosy: Dormouse759 priority: normal severity: normal status: open title: EXTRA_CFLAGS get overrided by CFLAGS_NODIST type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 07:51:39 2019 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Jul 2019 11:51:39 +0000 Subject: [issue36167] DOC: Incorrect capitalization in Programming FAQ In-Reply-To: <1551529099.5.0.835675772758.issue36167@roundup.psfhosted.org> Message-ID: <1563537099.37.0.394667240564.issue36167@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +14650 pull_request: https://github.com/python/cpython/pull/14860 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 07:59:50 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 19 Jul 2019 11:59:50 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <1563040436.19.0.276806879722.issue37588@roundup.psfhosted.org> Message-ID: <1563537590.23.0.383324932966.issue37588@roundup.psfhosted.org> Jeroen Demeyer added the comment: I support the patch proposed in https://bugs.python.org/file48478/pyport.h.diff but it's not up to me to make that decision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 08:07:57 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 19 Jul 2019 12:07:57 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <1563040436.19.0.276806879722.issue37588@roundup.psfhosted.org> Message-ID: <1563538077.43.0.569626767772.issue37588@roundup.psfhosted.org> Inada Naoki added the comment: > Which is why I protect the initialisation with #if PY_VERSION_HEX < 0x03090000 It is your specific case. We can not assume people do it, or even you never forget it. So this is not the "right thing" we can recommend to all users. Once you or other people suppress the deprecation warning and forget the protect, compatibility issue happen again. Why such dangerous option is needed? Note that we don't use `-Wextra` or `-Wmissing-field-initializers`. The missing initializer warning is specific to you. You manually enabled the warning. So why should we provide the way to suppress the warning we never recommend to enable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 08:19:02 2019 From: report at bugs.python.org (Krishna Oza) Date: Fri, 19 Jul 2019 12:19:02 +0000 Subject: [issue37629] Imghdr doesnt recognise some jpeg In-Reply-To: <1563529828.49.0.547849955653.issue37629@roundup.psfhosted.org> Message-ID: <1563538742.44.0.46529939089.issue37629@roundup.psfhosted.org> Krishna Oza added the comment: The documentation at https://docs.python.org/3/library/imghdr.html?highlight=imghdr#module-imghdr says that JPEG files with JPEG data in JFIF or Exif formats are only supported as of now. Pierre Chopin could help with what format of jpeg you have uploaded. ---------- nosy: +Krishna Oza _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 08:47:19 2019 From: report at bugs.python.org (Krishna Oza) Date: Fri, 19 Jul 2019 12:47:19 +0000 Subject: [issue37629] Imghdr doesnt recognise some jpeg In-Reply-To: <1563529828.49.0.547849955653.issue37629@roundup.psfhosted.org> Message-ID: <1563540439.71.0.157718481966.issue37629@roundup.psfhosted.org> Change by Krishna Oza : ---------- components: +Library (Lib) type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 09:00:02 2019 From: report at bugs.python.org (Phil Thompson) Date: Fri, 19 Jul 2019 13:00:02 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <1563538077.43.0.569626767772.issue37588@roundup.psfhosted.org> Message-ID: <577fb6cd41516c19a2b2480560dd068d@riverbankcomputing.com> Phil Thompson added the comment: >> Which is why I protect the initialisation with #if PY_VERSION_HEX < > 0x03090000 > > It is your specific case. We can not assume people do it, or even you > never forget it. So this is not the "right thing" we can recommend to > all users. > > Once you or other people suppress the deprecation warning and forget > the protect, compatibility issue happen again. Why such dangerous > option is needed? If I fail to protect against using a feature when it is no longer present then it's a bug in my code and it won't compile. Providing a deprecation warning gives me some notice that my code needs to be changed. That is helpful but not strictly necessary as I will soon find out when testing against the new version. There is nothing "dangerous" here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 09:04:46 2019 From: report at bugs.python.org (Krishna Oza) Date: Fri, 19 Jul 2019 13:04:46 +0000 Subject: [issue37629] Imghdr doesnt recognise some jpeg In-Reply-To: <1563529828.49.0.547849955653.issue37629@roundup.psfhosted.org> Message-ID: <1563541486.94.0.76941202978.issue37629@roundup.psfhosted.org> Krishna Oza added the comment: Victor I have debugged the issue and found that the jpg file shared doesnt have the information in its header to identify the file format of this file. The imghdr module needs file format information in first 32 bytes when the jpg file is read in binary mode. However for the file "e2006bd7-51d7-4554-9738-ea13207fd104.jpg" there is no such information present and hence I would like to suggest that the issue be closed appropriately. P.S. Attaching the dump of file "e2006bd7-51d7-4554-9738-ea13207fd104.jpg" when read in binary mode. ---------- nosy: +vstinner Added file: https://bugs.python.org/file48492/cpython_imghdr_issue.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 09:26:04 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 19 Jul 2019 13:26:04 +0000 Subject: [issue37588] Py_DEPRECATED and unavoidable warnings In-Reply-To: <577fb6cd41516c19a2b2480560dd068d@riverbankcomputing.com> Message-ID: Inada Naoki added the comment: 2019?7?19?(?) 22:00 Phil Thompson : > > If I fail to protect against using a feature when it is no longer > present then it's a bug in my code and it won't compile. Providing a > deprecation warning gives me some notice that my code needs to be > changed. That is helpful but not strictly necessary as I will soon find > out when testing against the new version. There is nothing "dangerous" > here. > You are proposing to change Python, so it's not only your option. It may be safe for you, but may be not safe for all authors who creating extension and share it on PyPI. If it's only your problem, you can manually suppress the warning, like you manually enabled missing initializer warning. No need to add an option to CPython. > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 09:31:24 2019 From: report at bugs.python.org (Krishna Oza) Date: Fri, 19 Jul 2019 13:31:24 +0000 Subject: [issue37618] Docs: Code example locations in stdtypes In-Reply-To: <1563435749.25.0.657684993159.issue37618@roundup.psfhosted.org> Message-ID: <1563543084.85.0.00339561195905.issue37618@roundup.psfhosted.org> Krishna Oza added the comment: Kyle In my opinion the current documentation is correctly formed since the bytearray and str are two different classes in Python they could have different set of functions supported and hence the grouping of functions like islower() to be kept separated for different object types. ---------- nosy: +Krishna Oza, Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 09:48:50 2019 From: report at bugs.python.org (Krishna Oza) Date: Fri, 19 Jul 2019 13:48:50 +0000 Subject: [issue37611] Improve the "Dealing with Bugs" documentation, include guidelines on how to report bugs In-Reply-To: <1563385356.62.0.425073313065.issue37611@roundup.psfhosted.org> Message-ID: <1563544130.89.0.790594652033.issue37611@roundup.psfhosted.org> Krishna Oza added the comment: Mariatta, Would it be okay for now just to move the existing bug filing guidelines to be moved up. ---------- nosy: +Krishna Oza _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 09:56:00 2019 From: report at bugs.python.org (Flavian Hautbois) Date: Fri, 19 Jul 2019 13:56:00 +0000 Subject: [issue27873] multiprocessing.pool.Pool.map should take more than one iterable In-Reply-To: <1472253350.37.0.404019702525.issue27873@psf.upfronthosting.co.za> Message-ID: <1563544560.92.0.777878379562.issue27873@roundup.psfhosted.org> Flavian Hautbois added the comment: Are you going to open a PR for this patch? I think that would be a nice addition ---------- nosy: +flavianhautbois _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 10:05:54 2019 From: report at bugs.python.org (Daniel) Date: Fri, 19 Jul 2019 14:05:54 +0000 Subject: [issue37625] Class variable is still accessible after class instance has been overwritten out In-Reply-To: <1563486914.84.0.86753245558.issue37625@roundup.psfhosted.org> Message-ID: <1563545154.5.0.345894981618.issue37625@roundup.psfhosted.org> Daniel added the comment: Thanks, just didn't expect that behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 10:21:41 2019 From: report at bugs.python.org (Pierre Chopin) Date: Fri, 19 Jul 2019 14:21:41 +0000 Subject: [issue37629] Imghdr doesnt recognise some jpeg In-Reply-To: <1563529828.49.0.547849955653.issue37629@roundup.psfhosted.org> Message-ID: <1563546101.65.0.445575764296.issue37629@roundup.psfhosted.org> Pierre Chopin added the comment: This is actually a duplicate of bpo-16512, i am closing this. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 10:24:34 2019 From: report at bugs.python.org (Pierre Chopin) Date: Fri, 19 Jul 2019 14:24:34 +0000 Subject: [issue16512] imghdr doesn't recognize variant jpeg formats In-Reply-To: <1353406880.2.0.236043197389.issue16512@psf.upfronthosting.co.za> Message-ID: <1563546274.38.0.363060071018.issue16512@roundup.psfhosted.org> Change by Pierre Chopin : ---------- pull_requests: +14651 pull_request: https://github.com/python/cpython/pull/14862 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 11:25:23 2019 From: report at bugs.python.org (Mariatta) Date: Fri, 19 Jul 2019 15:25:23 +0000 Subject: [issue37611] Improve the "Dealing with Bugs" documentation, include guidelines on how to report bugs In-Reply-To: <1563385356.62.0.425073313065.issue37611@roundup.psfhosted.org> Message-ID: <1563549923.7.0.364461622597.issue37611@roundup.psfhosted.org> Mariatta added the comment: Sure, moving it up is a good start. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 11:28:48 2019 From: report at bugs.python.org (=?utf-8?q?=C3=81kos_Tompos?=) Date: Fri, 19 Jul 2019 15:28:48 +0000 Subject: [issue37632] generator expression doesn't find subclass Message-ID: <1563550128.64.0.536864236908.issue37632@roundup.psfhosted.org> New submission from ?kos Tompos : The following code does work on python 2.7 but fails on python 3.7. The code seems correct. class A: class B: def __init__(self, param): self.param = param l = [B(i) for i in range(10)] The result on: 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] Traceback (most recent call last): File "test.py", line 6, in class A: File "test.py", line 11, in A l = [B(i) for i in range(10)] File "test.py", line 11, in l = [B(i) for i in range(10)] NameError: name 'B' is not defined B can be accessed if not inside a generator expression ---------- messages: 348181 nosy: ?kos Tompos priority: normal severity: normal status: open title: generator expression doesn't find subclass versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 11:54:49 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 19 Jul 2019 15:54:49 +0000 Subject: [issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty In-Reply-To: <1534189001.92.0.56676864532.issue34396@psf.upfronthosting.co.za> Message-ID: <1563551689.17.0.394329354157.issue34396@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +14652 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14863 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 11:59:23 2019 From: report at bugs.python.org (Flavian Hautbois) Date: Fri, 19 Jul 2019 15:59:23 +0000 Subject: [issue29446] Improve tkinter 'import *' situation In-Reply-To: <1486243465.34.0.0929989866435.issue29446@psf.upfronthosting.co.za> Message-ID: <1563551963.77.0.138700780242.issue29446@roundup.psfhosted.org> Change by Flavian Hautbois : ---------- keywords: +patch pull_requests: +14653 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14864 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 12:01:19 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 19 Jul 2019 16:01:19 +0000 Subject: [issue37496] Support annotations in signature strings. In-Reply-To: <1562197526.36.0.0415942737779.issue37496@roundup.psfhosted.org> Message-ID: <1563552079.6.0.882817335375.issue37496@roundup.psfhosted.org> Ivan Levkivskyi added the comment: You might want to look into how PEP 563 is implemented, it has a utility to turn an AST back into a string (I assume this is what you want). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 12:46:40 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Fri, 19 Jul 2019 16:46:40 +0000 Subject: [issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST In-Reply-To: <1563536952.58.0.764226132067.issue37631@roundup.psfhosted.org> Message-ID: <1563554800.35.0.401779837699.issue37631@roundup.psfhosted.org> Charalampos Stratakis added the comment: Could you provide more info, e.g. comparison between the proper and the erroneous output, as well as what it affects (test_gdb if I recall correctly)? ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 12:52:59 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 19 Jul 2019 16:52:59 +0000 Subject: [issue37632] generator expression doesn't find subclass In-Reply-To: <1563550128.64.0.536864236908.issue37632@roundup.psfhosted.org> Message-ID: <1563555179.43.0.0598132116382.issue37632@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I think it's about a class being defined inside another class and not about subclass. This seems to be similar to https://bugs.python.org/issue3692 that discusses about class attribute scope for comprehension. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 13:00:35 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 17:00:35 +0000 Subject: [issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty In-Reply-To: <1534189001.92.0.56676864532.issue34396@psf.upfronthosting.co.za> Message-ID: <1563555635.36.0.0765590393681.issue34396@roundup.psfhosted.org> Raymond Hettinger added the comment: Some thoughs: * Lib/sets.py benefitted significantly from itertools and METH_COEXIST. * The dunder methods are part of the public API. Serhiy's persona tastes aside, there is no reason not to use them like any other method. * Given a performance trade-off between classes and subclasses, almost universally we give preference to the parent class. * The folks who use itertools with __getitem__ and __contains__ almost always do so because they care about speed and have a preference for a functional style. Removing the current optimization would directly hit those folks and their style of coding, resulting in code that used to be fast and elegant becoming slow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 13:06:07 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Fri, 19 Jul 2019 17:06:07 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1563555967.64.0.520796997802.issue9216@roundup.psfhosted.org> Charalampos Stratakis added the comment: Providing a simple keyword as a workaround for bypassing the FIPS restrictions, could potentially violate the standard, as there is no way from the python side to verify if the code in question is used for security purposes or not. Thus I would close this issue as wontfix. Application distributors who would like their code to work under FIPS should preferably use the FIPS approved ciphers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 13:14:36 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 19 Jul 2019 17:14:36 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1563556476.88.0.351151395809.issue36044@roundup.psfhosted.org> Neil Schemenauer added the comment: I changed configure.in to use AC_ARG_VAR instead. So, you can override it as you suggest: ./configure [..] PROFILE_TASK="-m test --pgo-extended" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 14:08:33 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jul 2019 18:08:33 +0000 Subject: [issue29446] Improve tkinter 'import *' situation In-Reply-To: <1486243465.34.0.0929989866435.issue29446@psf.upfronthosting.co.za> Message-ID: <1563559713.0.0.177978828045.issue29446@roundup.psfhosted.org> Serhiy Storchaka added the comment: I prefer Eric's approach. It excludes tkinter submodules (like tkinter.ttk). Currently the result of the star import depends on what submodules were imported before. I think it would be better to make it more stable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 14:34:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jul 2019 18:34:56 +0000 Subject: [issue37620] str.split(sep=None, maxsplit=-1,any=False) In-Reply-To: <1563458340.3.0.354346385459.issue37620@roundup.psfhosted.org> Message-ID: <1563561296.43.0.155310350105.issue37620@roundup.psfhosted.org> Serhiy Storchaka added the comment: An alternative is to use regular expressions. >>> re.split('[\t ]+', 'ab\t cd ef') ['ab', 'cd', 'ef'] . ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 14:37:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jul 2019 18:37:02 +0000 Subject: [issue37632] generator expression doesn't find subclass In-Reply-To: <1563550128.64.0.536864236908.issue37632@roundup.psfhosted.org> Message-ID: <1563561422.39.0.86304272392.issue37632@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is a duplicate of issue3692. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> improper scope in list comprehension, when used in class declaration _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 14:39:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jul 2019 18:39:56 +0000 Subject: [issue26951] Unintuitive error when using generator expression in class property In-Reply-To: <1462372473.02.0.946073615941.issue26951@psf.upfronthosting.co.za> Message-ID: <1563561596.37.0.275193315391.issue26951@roundup.psfhosted.org> Serhiy Storchaka added the comment: See also issue3692. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 14:58:27 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 19 Jul 2019 18:58:27 +0000 Subject: [issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag) In-Reply-To: <1410207529.54.0.778133775349.issue22367@psf.upfronthosting.co.za> Message-ID: <1563562707.79.0.938268492538.issue22367@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 14:59:56 2019 From: report at bugs.python.org (Harry Coin) Date: Fri, 19 Jul 2019 18:59:56 +0000 Subject: [issue37620] str.split(sep=None, maxsplit=-1,any=False) In-Reply-To: <1563561296.43.0.155310350105.issue37620@roundup.psfhosted.org> Message-ID: <48772bb7-deb3-038c-fb70-554637f8e6bb@gmail.com> Harry Coin added the comment: I suspect the number of times the str.split builtin was examined for use and rejected in favor of the much more complex and 'heavy' re module far, far exceeds the number of times it found use with more than one character in the split string. The str.split documentation 'feels like' the python equivalent of the linux 'tr' utility that treats the separator characters as a set instead of a sequence.?? Notice the default and the help(str.split) documentation tends to encourage that intuition as no sep= has a very different behavior:? no argument 'removes any whitespace and discards empty strings from the result'.? That leads one to suspect each character in a string would do the same. Mostly it's a use-case driven obviousness, you'd think python would naturally do that in str.split. So very many cases seek to resolve a string into a list of the interesting bits without regard to any mix of separators? (tabs, spaces, etc to increase the readability of the file). I think it would be a heavily used enhancement to add the 'any=True' parameter. Or,? in the alternative, allow the argument to sep to be an iterable so that: 'ab, cd'.split(sep=' ,') -->? ['ab, cd'] but 'ab, cd'.split(sep=[' ',',']) -> ['ab', 'cd'] On 7/19/19 1:34 PM, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > > An alternative is to use regular expressions. > >>>> re.split('[\t ]+', 'ab\t cd ef') > ['ab', 'cd', 'ef'] > . > > ---------- > nosy: +serhiy.storchaka > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 15:00:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jul 2019 19:00:22 +0000 Subject: [issue35625] Comprehension doc doesn't mention buggy class scope behavior In-Reply-To: <1546253280.49.0.920078772343.issue35625@roundup.psfhosted.org> Message-ID: <1563562822.27.0.320261182772.issue35625@roundup.psfhosted.org> Serhiy Storchaka added the comment: As a documentation issue this is a duplicate of issue26951. ---------- stage: -> resolved status: open -> closed superseder: -> Unintuitive error when using generator expression in class property _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 15:08:45 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jul 2019 19:08:45 +0000 Subject: [issue37623] namedtuple integration for importlib.abc.Loader In-Reply-To: <1563476843.29.0.0326918684988.issue37623@roundup.psfhosted.org> Message-ID: <1563563325.76.0.126138759632.issue37623@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is not hard to set __spec__ (as well as any other attributes) after creating a namedtuple class. A = namedtuple(...) A.__spec__ = ... or class A(namedtuple(...)): __spec__ = ... __spec__ do not have anything to namedtuple. It is not like __module__ or __doc__ setting which would benefit almost every public namedtuple class. It is not even special for types. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 15:37:30 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 19 Jul 2019 19:37:30 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1563565050.2.0.159532462732.issue34160@roundup.psfhosted.org> Change by Stefan Behnel : ---------- pull_requests: +14654 pull_request: https://github.com/python/cpython/pull/14867 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 15:40:39 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 19 Jul 2019 19:40:39 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1563565239.41.0.430116911767.issue34160@roundup.psfhosted.org> Stefan Behnel added the comment: I created a PR that adds a couple of paragraphs to the documentation. Comments welcome. ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 16:22:33 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 19 Jul 2019 20:22:33 +0000 Subject: [issue37618] Docs: Code example locations in stdtypes In-Reply-To: <1563435749.25.0.657684993159.issue37618@roundup.psfhosted.org> Message-ID: <1563567753.48.0.156133003397.issue37618@roundup.psfhosted.org> Kyle Stanley added the comment: >In my opinion the current documentation is correctly formed since the bytearray and str are two different classes in Python they could have different set of functions supported and hence the grouping of functions like islower() to be kept separated for different object types. This could justify the grouping of the functions themselves, but doesn't explain why the code examples are contained in bytearray instead of str. New users of the language are far more likely to check the docs for the string functions, and thus benefit significantly more from seeing the code examples. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 16:25:38 2019 From: report at bugs.python.org (Andrew Yurisich) Date: Fri, 19 Jul 2019 20:25:38 +0000 Subject: [issue37623] namedtuple integration for importlib.abc.Loader In-Reply-To: <1563563325.76.0.126138759632.issue37623@roundup.psfhosted.org> Message-ID: Andrew Yurisich added the comment: You're right, I was invoking the namedtuple on the same line that I was defining it, freezing it in the process. I split it to into two statements, and snuck the __spec__ attribute between the definition and the instantiation. I'll update the examples on my GitHub issue in the morning, and probably close the issue out unless I find something else that is blocking me. Thanks for the input ? On Fri, Jul 19, 2019, 22:08 Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > It is not hard to set __spec__ (as well as any other attributes) after > creating a namedtuple class. > > A = namedtuple(...) > A.__spec__ = ... > > or > > class A(namedtuple(...)): > __spec__ = ... > > __spec__ do not have anything to namedtuple. It is not like __module__ or > __doc__ setting which would benefit almost every public namedtuple class. > It is not even special for types. > > ---------- > nosy: +serhiy.storchaka > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 16:36:46 2019 From: report at bugs.python.org (PyScripter) Date: Fri, 19 Jul 2019 20:36:46 +0000 Subject: [issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll Message-ID: <1563568606.34.0.923231546212.issue37633@roundup.psfhosted.org> New submission from PyScripter : Py_CompileString and PyParser_SimpleParseString and possibly other related functions are not exported in Python 3.8 b2 DLL. This is unintentional, not documented and unnecessarily breaks backward compatibility. Issue 37189 was similar and related to PyRun_String. This was fixed in Python 3.8b2. Please provide fixes to the above two functions as well. To confirm the error: >>> import ctypes >>> api = ctypes.pythonapi >>> hasattr(api, "PyParser_SimpleParseString") False >>> hasattr(api2, "Py_CompileString") False ---------- components: Windows messages: 348198 nosy: paul.moore, pyscripter, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: Py_CompileString and PyParser_SimpleParseString not exported in python38.dll versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 17:26:25 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Jul 2019 21:26:25 +0000 Subject: [issue29446] Improve tkinter 'import *' situation In-Reply-To: <1486243465.34.0.0929989866435.issue29446@psf.upfronthosting.co.za> Message-ID: <1563571585.35.0.652084894278.issue29446@roundup.psfhosted.org> Terry J. Reedy added the comment: I agree that for python x.y, the names imported by 'import *' should be fixed and *not* depend on other imports. ---------- versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 17:49:52 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 19 Jul 2019 21:49:52 +0000 Subject: [issue35476] _imp_create_dynamic_impl() does not clear error. In-Reply-To: <1544642479.77.0.788709270274.issue35476@psf.upfronthosting.co.za> Message-ID: <1563572992.83.0.252070783854.issue35476@roundup.psfhosted.org> Brett Cannon added the comment: Why would was want to swallow an exception? I think it would be better to let the exception propagate. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 19:02:26 2019 From: report at bugs.python.org (daniel hahler) Date: Fri, 19 Jul 2019 23:02:26 +0000 Subject: [issue37634] doc: "module" of a warning might be its filename Message-ID: <1563577346.06.0.11337043317.issue37634@roundup.psfhosted.org> New submission from daniel hahler : With e.g. DeprecationWarnings for "invalid escape sequence" the "module" part is the file name (with ".py" removed), because it calls PyErr_WarnExplicitObject directly: https://github.com/python/cpython/blob/3cba3d3c55f230a59174a0dfcafb1d4685269e60/Python/ast.c#L4668-L4692 While this properly cannot be fixed to have the module name (yet), it should at least be documented then. With `warnings.warn` the module is set via `setup_context` (https://github.com/python/cpython/blob/3cba3d3c55f230a59174a0dfcafb1d4685269e60/Python/_warnings.c#L932-L933). This conflicts with https://github.com/python/cpython/pull/9358 (issue34624), which enables the documented behavior to not escape the pattern there. ---------- components: Library (Lib) messages: 348201 nosy: blueyed priority: normal severity: normal status: open title: doc: "module" of a warning might be its filename type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 19:03:49 2019 From: report at bugs.python.org (daniel hahler) Date: Fri, 19 Jul 2019 23:03:49 +0000 Subject: [issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes In-Reply-To: <1536622594.77.0.0269046726804.issue34624@psf.upfronthosting.co.za> Message-ID: <1563577429.07.0.0701480362771.issue34624@roundup.psfhosted.org> daniel hahler added the comment: Note that "module" might also be the filename (with ".py" removed). I've just created issue37634 - might be worth including in your PR if it makes sense to only document this. ---------- nosy: +blueyed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 19:40:54 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 23:40:54 +0000 Subject: [issue37620] str.split(sep=None, maxsplit=-1,any=False) In-Reply-To: <1563458340.3.0.354346385459.issue37620@roundup.psfhosted.org> Message-ID: <1563579654.65.0.475483968893.issue37620@roundup.psfhosted.org> Raymond Hettinger added the comment: Harry, thanks for the suggestion but we're going to pass for now. For the most part, str.split() has stood the test of time and we use regexes for more customized or complicated variants. In general, adding API options increases complexity for users, making the basic methods harder to learn and remember. Fewer choices tends to make for easier programming. Guido has repeatedly given guidance to prefer separate functions and methods over putting multiple algorithmic flags in a single function or method. If you want to pursue this further, consider posting to the python-ideas list. You'll find more traction if you're able to find real-world code that would benefit from the new API. One other thought: the API for the strip/lstrip/rstrip methods has the equivalent of the *any* option when *chars* are specified. That has not worked out well -- people get surprised when the methods strip more than the exact string specified: 'there'.rstrip('re') --> 'th'. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 20:58:47 2019 From: report at bugs.python.org (Antonio Gutierrez) Date: Sat, 20 Jul 2019 00:58:47 +0000 Subject: [issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname) In-Reply-To: <1551475826.18.0.295115684796.issue36161@roundup.psfhosted.org> Message-ID: <1563584327.49.0.525021129396.issue36161@roundup.psfhosted.org> Change by Antonio Gutierrez : ---------- keywords: +patch pull_requests: +14655 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14868 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 21:14:29 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2019 01:14:29 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1563585269.45.0.00544266407577.issue32912@roundup.psfhosted.org> Raymond Hettinger added the comment: > In other words, it seems to me that getting in the way of > this broken end-user strategy is a *good* thing, since it > warns of possible mistakes. Here's an example from the current version of Bottle (0.12.17): /Users/raymond/Dropbox/Public/sj205/notes2/bottle.py:3433: SyntaxWarning: invalid escape sequence \[ _re_tok += '|([\[\{\(])' /Users/raymond/Dropbox/Public/sj205/notes2/bottle.py:3434: SyntaxWarning: invalid escape sequence \] _re_tok += '|([\]\}\)]) These warnings would spew out during a recent Python course where we used 3.8b2. It mae it difficult to teach building templates in an iterative style. We had to abandon 3.8 and go back to 3.7 to proceed with the templating lesson. IMO, spewing out these warnings for things users can't do anything about is a usability travesty. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 21:23:47 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Sat, 20 Jul 2019 01:23:47 +0000 Subject: [issue37609] support "UNC" device paths in ntpath.splitdrive In-Reply-To: <1563362794.09.0.456380769613.issue37609@roundup.psfhosted.org> Message-ID: <1563585827.79.0.233416592709.issue37609@roundup.psfhosted.org> Ngalim Siregar added the comment: I was unsure about implementation in the patch, do you have UNC format specification? ---------- nosy: +nsiregar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 00:00:23 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 20 Jul 2019 04:00:23 +0000 Subject: [issue37635] Using constant for whence arg in seek() Message-ID: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> New submission from Kyle Stanley : In Python 3.1, three constants were added to the IO module to be used for the whence argument of seek(): SEEK_SET or 0 ? start of the stream SEEK_CUR or 1 ? current stream position SEEK_END or 2 ? end of the stream However, there are at least 102 occurrences across CPython where the integer values are used instead. This only includes instances when a value for the whence arg is explicitly specified. All of the occurrences can be easily found with the usage of git grep: git grep -E "seek\(-?[0-9]+, [0-2]\)" This doesn't affect functionality in any way, but it would result in significant readability improvement if these were all replaced with constants. The only requirement would be importing IO or manually specifying the value of constants. For simplicity, I would probably start with anything that directly involves IO. The largest number of occurrences are in Lib/test/test_io, so that probably would be the best place to begin. Also, this module already imports io anyways, so it would be a straightforward find and replace. It would also be quite useful to make this change in the documentation, in Doc/tutorial/inputoutput there are 4 occurrences. If anything, anyone less familiar with the IO module in general would be the most likely to benefit from this change so modifying the tutorial would likely be the most useful change for the majority of users. As a single example of what I'm talking about, here's line 334 of Lib/test/test_io: self.assertEqual(f.seek(-1, 1), 5) I would propose changing it to: self.assertEqual(f.seek(-1, io.SEEK_CUR), 5) ---------- components: IO messages: 348207 nosy: aeros167, benjamin.peterson, stutzbach priority: normal severity: normal status: open title: Using constant for whence arg in seek() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 00:02:28 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 20 Jul 2019 04:02:28 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563595348.47.0.207966055784.issue37635@roundup.psfhosted.org> Change by Kyle Stanley : ---------- assignee: -> docs at python components: +Documentation, Tests nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 00:41:23 2019 From: report at bugs.python.org (Girts Folkmanis) Date: Sat, 20 Jul 2019 04:41:23 +0000 Subject: [issue30618] readlink for pathlib paths In-Reply-To: <1497052559.7.0.422106710991.issue30618@psf.upfronthosting.co.za> Message-ID: <1563597683.93.0.522164993047.issue30618@roundup.psfhosted.org> Change by Girts Folkmanis : ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 01:54:30 2019 From: report at bugs.python.org (Andrew Yurisich) Date: Sat, 20 Jul 2019 05:54:30 +0000 Subject: [issue37623] namedtuple integration for importlib.abc.Loader In-Reply-To: <1563476843.29.0.0326918684988.issue37623@roundup.psfhosted.org> Message-ID: <1563602070.21.0.386172468187.issue37623@roundup.psfhosted.org> Andrew Yurisich added the comment: This issue was raised due to a misunderstanding of the namedtuple creation process. After creating the fields, but before assigning them, __spec__ is trivially added to namedtuple class' definition as a property. Thanks again @serhiy.storchaka ---------- resolution: -> works for me stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 03:56:37 2019 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 20 Jul 2019 07:56:37 +0000 Subject: [issue37476] Adding a unit test of unicode in test_unicode.py In-Reply-To: <1562005792.78.0.882905794815.issue37476@roundup.psfhosted.org> Message-ID: <1563609397.74.0.200113081764.issue37476@roundup.psfhosted.org> Xiang Zhang added the comment: New changeset 5623ac87bbe5de481957eca5eeae06347612fbeb by Xiang Zhang (Hai Shi) in branch 'master': bpo-37476: Adding tests for asutf8 and asutf8andsize (GH-14531) https://github.com/python/cpython/commit/5623ac87bbe5de481957eca5eeae06347612fbeb ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 03:58:41 2019 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 20 Jul 2019 07:58:41 +0000 Subject: [issue37476] Adding tests for PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize In-Reply-To: <1562005792.78.0.882905794815.issue37476@roundup.psfhosted.org> Message-ID: <1563609521.79.0.0771867478736.issue37476@roundup.psfhosted.org> Change by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: Adding a unit test of unicode in test_unicode.py -> Adding tests for PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 04:04:28 2019 From: report at bugs.python.org (Alejandro Gonzalez) Date: Sat, 20 Jul 2019 08:04:28 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1563609868.57.0.989539287313.issue28869@roundup.psfhosted.org> Alejandro Gonzalez added the comment: Hello, Could anyone take a look at the PR 14126 submitted? Sorry for the trouble and thank you in advance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 05:35:46 2019 From: report at bugs.python.org (PyScripter) Date: Sat, 20 Jul 2019 09:35:46 +0000 Subject: [issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll In-Reply-To: <1563568606.34.0.923231546212.issue37633@roundup.psfhosted.org> Message-ID: <1563615346.27.0.75056488693.issue37633@roundup.psfhosted.org> PyScripter added the comment: Py_CompileStringFlags is not exported either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 06:02:27 2019 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 20 Jul 2019 10:02:27 +0000 Subject: [issue37451] Remove redudant test code in _testcapimodule.c In-Reply-To: <1561885945.76.0.438111061422.issue37451@roundup.psfhosted.org> Message-ID: <1563616947.46.0.148752189346.issue37451@roundup.psfhosted.org> Change by Xiang Zhang : ---------- components: +Tests resolution: -> rejected stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 07:06:09 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 20 Jul 2019 11:06:09 +0000 Subject: [issue35476] _imp_create_dynamic_impl() does not clear error. In-Reply-To: <1544642479.77.0.788709270274.issue35476@psf.upfronthosting.co.za> Message-ID: <1563620769.67.0.589952229312.issue35476@roundup.psfhosted.org> Nick Coghlan added the comment: Agreed, raising the exception properly would be the way to go. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 08:45:55 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 20 Jul 2019 12:45:55 +0000 Subject: [issue37636] Deprecate slicing and ordering operations on sys.version Message-ID: <1563626755.13.0.11799518747.issue37636@roundup.psfhosted.org> New submission from Nick Coghlan : At the core dev sprints in 2017 (IIRC), Ezio and I were talking about some of the potential issues with 3.10, and one of them was folks attempting to manipulate sys.version with string operations rather than using the already decomposed sys.version info. Anthony Sottile has recently been experimenting with a Python build patched to report itself as 3.10 to see what breaks, and indicated that many of the failures were due to that kind of problem (in particular: writing "sys.version[:3]" instead of "'{}.{}'.format(sys.version_info[:2])") One possible remedy that Ezio and I discussed was the idea of an "OpaqueString" type that presented as a string, but raised an error if you tried any operations that assumed it could be meaningfully decomposed character-by-character. This would probably need to be a string subclass for compatibility, and would need a transitional variant that only emitted deprecation warnings rather than failing outright. ---------- messages: 348213 nosy: ezio.melotti, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Deprecate slicing and ordering operations on sys.version type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 10:06:26 2019 From: report at bugs.python.org (Anthony Sottile) Date: Sat, 20 Jul 2019 14:06:26 +0000 Subject: [issue37636] Deprecate slicing and ordering operations on sys.version In-Reply-To: <1563626755.13.0.11799518747.issue37636@roundup.psfhosted.org> Message-ID: <1563631586.24.0.400120180922.issue37636@roundup.psfhosted.org> Change by Anthony Sottile : ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 10:39:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jul 2019 14:39:27 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1563633567.29.0.537008839792.issue37555@roundup.psfhosted.org> Serhiy Storchaka added the comment: This issue is a part of more general issue. I have opened a thread on Python-Dev for discussing it: https://mail.python.org/archives/list/python-dev at python.org/thread/VSV4K4AOKM4CBQMOELPFV5VMYALPH464/. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 11:36:00 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Sat, 20 Jul 2019 15:36:00 +0000 Subject: [issue37444] Differing exception between builtins and importlib when importing beyond top-level package In-Reply-To: <1561749733.32.0.955430999512.issue37444@roundup.psfhosted.org> Message-ID: <1563636960.12.0.826850310099.issue37444@roundup.psfhosted.org> Change by Ngalim Siregar : ---------- keywords: +patch pull_requests: +14657 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14869 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 12:23:28 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2019 16:23:28 +0000 Subject: [issue37444] Differing exception between builtins and importlib when importing beyond top-level package In-Reply-To: <1561749733.32.0.955430999512.issue37444@roundup.psfhosted.org> Message-ID: <1563639808.97.0.734106903856.issue37444@roundup.psfhosted.org> Raymond Hettinger added the comment: > I think this should be an ImportError I also think ImportError is what people would expect when an import fails. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 12:30:01 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2019 16:30:01 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563640201.91.0.896294602921.issue37635@roundup.psfhosted.org> Raymond Hettinger added the comment: I think it's okay to leave these as 0, 1, 2 because they have a long and well known tradition across multiple languages. The named versions are just alternatives available for end-users. The numbered forms also let us avoid a bunch of otherwise unnecessary imports (which affect start-up time and occasionally create load order bootstrapping issues). Antoine, what do you think? ---------- nosy: +pitrou, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 12:35:34 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Sat, 20 Jul 2019 16:35:34 +0000 Subject: [issue3726] Allow ', ' delimiters in logging.config.fileConfig() In-Reply-To: <1220017483.8.0.409780209991.issue3726@psf.upfronthosting.co.za> Message-ID: <1563640534.36.0.770774669609.issue3726@roundup.psfhosted.org> Change by Ngalim Siregar : ---------- pull_requests: +14658 pull_request: https://github.com/python/cpython/pull/14870 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 12:40:54 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Sat, 20 Jul 2019 16:40:54 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563640854.48.0.961454291744.issue37627@roundup.psfhosted.org> Change by Ngalim Siregar : ---------- keywords: +patch pull_requests: +14659 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14870 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 12:43:08 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Jul 2019 16:43:08 +0000 Subject: [issue3726] Allow ', ' delimiters in logging.config.fileConfig() In-Reply-To: <1220017483.8.0.409780209991.issue3726@psf.upfronthosting.co.za> Message-ID: <1563640988.22.0.622088709559.issue3726@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -14658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 13:02:14 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2019 17:02:14 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1563642134.57.0.319722403483.issue36324@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +14660 pull_request: https://github.com/python/cpython/pull/14871 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 13:09:33 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2019 17:09:33 +0000 Subject: [issue37636] Deprecate slicing and ordering operations on sys.version In-Reply-To: <1563626755.13.0.11799518747.issue37636@roundup.psfhosted.org> Message-ID: <1563642573.22.0.571250915165.issue37636@roundup.psfhosted.org> Raymond Hettinger added the comment: Have we considered just rolling our next version to 4.0 instead of 3.10? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 14:11:38 2019 From: report at bugs.python.org (Benedikt Bieringer) Date: Sat, 20 Jul 2019 18:11:38 +0000 Subject: [issue37637] multiprocessing numpy.ndarray not transmitted properly Message-ID: <1563646298.52.0.224679939244.issue37637@roundup.psfhosted.org> New submission from Benedikt Bieringer <2xB.coding at wwu.de>: The following code demonstrates the issue: import numpy as np from multiprocessing import Pipe p1, p2 = Pipe() arr = np.zeros((3, 5, 6), dtype=np.uint8) p2.send_bytes(arr) pm = p1.recv_bytes() print(pm) Only 3 bytes are transmitted for this array which obviously consists of more than 3 bytes. ---------- components: Library (Lib) messages: 348218 nosy: 2xB priority: normal severity: normal status: open title: multiprocessing numpy.ndarray not transmitted properly type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 15:16:36 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 20 Jul 2019 19:16:36 +0000 Subject: [issue37636] Deprecate slicing and ordering operations on sys.version In-Reply-To: <1563626755.13.0.11799518747.issue37636@roundup.psfhosted.org> Message-ID: <1563650196.05.0.651759073838.issue37636@roundup.psfhosted.org> Josh Rosenberg added the comment: Rolling to 4.0 implies backward incompatible changes; doing just to avoid 3.10 is breaking semantic versioning rules. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 16:26:45 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2019 20:26:45 +0000 Subject: [issue37636] Deprecate slicing and ordering operations on sys.version In-Reply-To: <1563626755.13.0.11799518747.issue37636@roundup.psfhosted.org> Message-ID: <1563654405.14.0.249324123982.issue37636@roundup.psfhosted.org> Raymond Hettinger added the comment: > Rolling to 4.0 implies backward incompatible changes It might or it might not depending on how we communicate it. See Python 2.0 for a precedent. That was not a backward incompatible release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 17:08:26 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Jul 2019 21:08:26 +0000 Subject: [issue37636] Deprecate slicing and ordering operations on sys.version In-Reply-To: <1563626755.13.0.11799518747.issue37636@roundup.psfhosted.org> Message-ID: <1563656906.46.0.0189763320077.issue37636@roundup.psfhosted.org> Serhiy Storchaka added the comment: Changing the major version number itself is a breaking change. For example, there is a code that checks sys.version_info[0] == 3 or even sys.version[0] == "3". ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 17:14:09 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 20 Jul 2019 21:14:09 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563657249.02.0.281282574451.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: >The named versions are just alternatives available for end-users While it is true that the usage of 0,1,2 is more commonly used across the repository, the constants are used several times across Lib/_compression.py and Lib/_pyio.py. From my perspective, it looks like the locations which already used the integer values were just not updated rather than it being an intentional design decision. However, if it is primarily targeted at the end-users, I would still recommend at least updating the tutorial and perhaps other IO documentation to use the constants. To any user unfamiliar with the integers, the constants convey their purpose far more explicitly, and I don't think anyone familiar with the integers would be confused by the constants. >The numbered forms also let us avoid a bunch of otherwise unnecessary imports (which affect >start-up time and occasionally create load order bootstrapping issues). I can definitely understand this argument for anything that doesn't already import IO. It probably wouldn't be worthwhile to increase start times and introduce load order bugs. But for anything that already imports IO anyways, this seems like it would only serve to be a readability improvement without causing any change in functionality. This might not make a difference at all to developers who are used to using 0,1,2, but their purpose is not inherently obvious to anyone that isn't. This change would be in alignment with "Explicit is better than implicit". The purpose of the integers is defined only by implication based on tradition, whereas the constants explicitly define the purpose of the argument. A major advantage of Python over many existing languages is the emphasis on providing maximum readability. Sometimes functionality should be prioritized, such as in places where IO is not already imported. But in cases where there is no functionality cost, readability should be the priority. Even for non-public sections such as the tests, improved readability leads to easier maintenance and incorporation of new Python developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 19:10:35 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2019 23:10:35 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563664235.83.0.868258989499.issue37635@roundup.psfhosted.org> Raymond Hettinger added the comment: This is Antoine's call. I believe he made the original decision not to sweep through the standard library, changing it everywhere it occurred. Perhaps this was performance reasons, perhaps the existing code was already clear enough, perhaps the value-add was too low. For me personally, it is easier to remember 0 than the name of the constant. ---------- assignee: docs at python -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 21:25:10 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 21 Jul 2019 01:25:10 +0000 Subject: [issue37622] Signature of SHA256 HMAC digest not matching with the signature of jwt library In-Reply-To: <1563461059.89.0.239374018192.issue37622@roundup.psfhosted.org> Message-ID: <1563672310.89.0.842695115383.issue37622@roundup.psfhosted.org> Benjamin Peterson added the comment: Please describe which function of the stdlib you believe is broken. It's very likely that your framing code is incorrect. ---------- nosy: +benjamin.peterson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 21:55:19 2019 From: report at bugs.python.org (Tianming Zhuang) Date: Sun, 21 Jul 2019 01:55:19 +0000 Subject: [issue37638] Having issues following build instructions Message-ID: <1563674119.01.0.389894987814.issue37638@roundup.psfhosted.org> New submission from Tianming Zhuang : Hi there. This is my first time trying to build python from source. I am following in structions here: https://devguide.python.org/setup/#setup I notice that after I build, I don't get a success message like the example shown: https://gist.github.com/tmzhuang/aacc6bf798f28ed8b673af1be009a49f (ie. I don't see "Python build finished successfully!") The actual python binary is built. Running "./python -m test" runs until "test_socket" which repeated for around 3 hours (after which I killed it with ^C). "uname -a": Linux jupiter-arch 5.2.1-arch1-1-ARCH #1 SMP PREEMPT Sun Jul 14 14:52:52 UTC 2019 x86_64 GNU/Linux ---------- components: Build messages: 348225 nosy: Tianming Zhuang priority: normal severity: normal status: open title: Having issues following build instructions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 21:55:34 2019 From: report at bugs.python.org (Tianming Zhuang) Date: Sun, 21 Jul 2019 01:55:34 +0000 Subject: [issue37638] Having issues following build instructions In-Reply-To: <1563674119.01.0.389894987814.issue37638@roundup.psfhosted.org> Message-ID: <1563674134.6.0.35620910305.issue37638@roundup.psfhosted.org> Change by Tianming Zhuang : ---------- type: -> behavior versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 00:14:09 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Sun, 21 Jul 2019 04:14:09 +0000 Subject: [issue37616] [3.10 prep] zip path incorrect In-Reply-To: <1563432035.85.0.841643784863.issue37616@roundup.psfhosted.org> Message-ID: <1563682449.7.0.800691504302.issue37616@roundup.psfhosted.org> Change by Ngalim Siregar : ---------- keywords: +patch pull_requests: +14661 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14874 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 01:31:22 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Jul 2019 05:31:22 +0000 Subject: [issue37637] multiprocessing numpy.ndarray not transmitted properly In-Reply-To: <1563646298.52.0.224679939244.issue37637@roundup.psfhosted.org> Message-ID: <1563687082.06.0.171213116364.issue37637@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 02:28:22 2019 From: report at bugs.python.org (Aymeric Augustin) Date: Sun, 21 Jul 2019 06:28:22 +0000 Subject: [issue37639] What happened to StreamReaderProtocol? Message-ID: <1563690502.8.0.178021194251.issue37639@roundup.psfhosted.org> New submission from Aymeric Augustin : `StreamReaderProtocol` was a public API from Python 3.4 to 3.6: - https://docs.python.org/3.4/library/asyncio-stream.html?highlight=streamreaderprotocol#streamreaderprotocol - https://docs.python.org/3.5/library/asyncio-stream.html?highlight=streamreaderprotocol#streamreaderprotocol - https://docs.python.org/3.6/library/asyncio-stream.html?highlight=streamreaderprotocol#streamreaderprotocol In Python 3.7, it vanished from the documentation. I couldn't find which commit made that change and why. - https://docs.python.org/3.7/search.html?q=streamreaderprotocol&check_keywords=yes&area=default Apparently it's deprecated in Python 3.8 as a side effect of https://bugs.python.org/issue36889. Unfortunately, that ticket says nothing about `StreamReaderProtocol` and how to replace it. The documentation added when fixing that ticket doesn't say anything about `StreamReaderProtocol` either. It would be less difficult to swallow the rate of API churn in asyncio if there were at least a few words about why it's happening and what concrete benefits it brings to users. I can understand the need to change APIs, even public APIs. However, when there's zero information in tickets, commit messages and documentations, I don't know why change is happening and how I'm supposed to adapt my code. That's stressful. If what I'm doing is deprecated, probably it's a bad idea, but I can't know why? I'm sure you aren't trying to convince me to avoid stream utilities in asyncio and write my own buffering. However, that's the result you're getting :-/ Providing a quick explanation of deprecations / removals of public APIs would help. (Somewhat related: https://bugs.python.org/issue24885) ---------- components: asyncio messages: 348226 nosy: asvetlov, aymeric.augustin, yselivanov priority: normal severity: normal status: open title: What happened to StreamReaderProtocol? versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 03:07:41 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 21 Jul 2019 07:07:41 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563692861.81.0.217702770008.issue30550@roundup.psfhosted.org> Kyle Stanley added the comment: >Thus, if a user gives an OrderedDict (or a dict with a known order, in Python 3.7+), it is useful that >he know that the order of its elements will not be changed upon transformation into JSON. I would agree that it could be helpful to document that if a user passes an OrderedDict, the order of the elements will not changed, I was just pointing out that a default dictionary implementation would not normally retain the order. However, after looking through the 3.7 changes and reading the discussions, it looks like dictionaries retaining insertion order was decided to be made an official part of the language. If the order matters though, it would make sense to recommend users to use OrderedDict. The order in the default dictionary implementation can end up becoming sorted if pprint is used. Discussions: https://mail.python.org/pipermail/python-dev/2017-December/151283.html and https://mail.python.org/pipermail/python-dev/2017-December/151376.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 03:34:57 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Jul 2019 07:34:57 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1563694497.57.0.0373496588178.issue36324@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 02c91f59b6f6e720a9e89635e00c55bcf7f932a8 by Raymond Hettinger in branch 'master': bpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871) https://github.com/python/cpython/commit/02c91f59b6f6e720a9e89635e00c55bcf7f932a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 03:35:03 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 07:35:03 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1563694503.78.0.58739145515.issue36324@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14662 pull_request: https://github.com/python/cpython/pull/14875 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 03:48:19 2019 From: report at bugs.python.org (Andreas Jung) Date: Sun, 21 Jul 2019 07:48:19 +0000 Subject: [issue34224] python 3.7 inside venv tries to write back to read-only installation directory (Grammar3.7.0.final.0.pickle) In-Reply-To: <1532528725.67.0.56676864532.issue34224@psf.upfronthosting.co.za> Message-ID: <1563695299.69.0.361920472595.issue34224@roundup.psfhosted.org> Andreas Jung added the comment: This issue is still true for 3.8.0b1, Ubuntu 19.04, umask is 0077, Python 3.8 is installed using "sudo make install". !bin/python bin/python setup.py develop running develop running egg_info writing fs.webdavfs.egg-info/PKG-INFO writing dependency_links to fs.webdavfs.egg-info/dependency_links.txt writing entry points to fs.webdavfs.egg-info/entry_points.txt writing requirements to fs.webdavfs.egg-info/requires.txt writing top-level names to fs.webdavfs.egg-info/top_level.txt error: [Errno 13] Permission denied: '/opt/python-3.8.0b1/lib/python3.8/lib2to3/Grammar3.8.0.beta.1.pickle' So "python3 -m venv" should setup a virtualenv properly without the need writing anything to the Python installation directory. Or it is up to "make install" to generate the related files properly during installation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 03:55:23 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Jul 2019 07:55:23 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1563695723.5.0.640144349879.issue36324@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset c613c3319ed9bdc8cd74c730ad946169c0776c8a by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871) (GH-14875) https://github.com/python/cpython/commit/c613c3319ed9bdc8cd74c730ad946169c0776c8a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 04:07:31 2019 From: report at bugs.python.org (Emanuel Zephir) Date: Sun, 21 Jul 2019 08:07:31 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1563696451.37.0.517660463823.issue37380@roundup.psfhosted.org> Emanuel Zephir added the comment: I believe this to be a bug in the standard library instead of solely being the result of an application error. When a Popen instance is finalized by the garbage collector, the internal handle is also finalized and closed despite the instance being put on the active list. This results in _cleanup throwing because the handle can no longer be used. I've attached a small reproduction. ---------- nosy: +emanuel Added file: https://bugs.python.org/file48493/invalid_handle.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 04:52:49 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 21 Jul 2019 08:52:49 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563699169.58.0.710826241279.issue30550@roundup.psfhosted.org> Inada Naoki added the comment: OrderedDict is not recommended to preserve order any more. Note that mention about `object_pairs_hook=OrderedDict` is removed intentionally. https://github.com/python/cpython/pull/5001 Please forget about OrderedDict unless you need additional feature OrderedDict provides. It is far inefficient than regular dict. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 05:17:08 2019 From: report at bugs.python.org (hoang nguyen) Date: Sun, 21 Jul 2019 09:17:08 +0000 Subject: [issue37640] telnetlib crash in Python3 while receiving un-printable characters from server Message-ID: <1563700628.04.0.824275375582.issue37640@roundup.psfhosted.org> New submission from hoang nguyen : ``` Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.7/site-packages/Pwn/Pwn.py", line 209, in io self.con.interact() File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/telnetlib.py", line 553, in interact sys.stdout.write(text.decode('ascii')) UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 41: ordinal not in range(128) ``` crash detail set up a netcat server: ``` cat /dev/urandom | nc -l 127.0.0.1 8888 ``` test.py ``` import telnetlib tn = telnetlib.Telnet('127.0.0.1', 8888) tn.interact() ``` ---------- components: Library (Lib) files: test.py messages: 348233 nosy: hoang nguyen priority: normal severity: normal status: open title: telnetlib crash in Python3 while receiving un-printable characters from server type: crash versions: Python 3.6 Added file: https://bugs.python.org/file48494/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 05:22:39 2019 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Jul 2019 09:22:39 +0000 Subject: [issue37640] telnetlib crash in Python3 while receiving un-printable characters from server In-Reply-To: <1563700628.04.0.824275375582.issue37640@roundup.psfhosted.org> Message-ID: <1563700959.41.0.107040096047.issue37640@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14663 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14877 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 05:44:03 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 21 Jul 2019 09:44:03 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1563702243.46.0.485708737224.issue28869@roundup.psfhosted.org> Ivan Levkivskyi added the comment: FWIW I like Serhiy's approach more. I have never seen a single metaclass overriding type.__call__, while overriding type.__new__ is a common practice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 06:32:08 2019 From: report at bugs.python.org (Sebastian Bank) Date: Sun, 21 Jul 2019 10:32:08 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1563705128.5.0.139723823774.issue37549@roundup.psfhosted.org> Change by Sebastian Bank : ---------- nosy: +xflr6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 07:07:21 2019 From: report at bugs.python.org (Bill Collins) Date: Sun, 21 Jul 2019 11:07:21 +0000 Subject: [issue37641] Embeddable distribution pyc filenames show build machine location Message-ID: <1563707241.42.0.696780467352.issue37641@roundup.psfhosted.org> New submission from Bill Collins : pyc files within the embeddable zip are compiled with their filename as the temporary directory in which they are compiled. Thus, stack traces will appear as (e.g.) D:\obj\windows-release\37win32_Release\msi_python\zip_win32\image.py, which is a little surprising and not obvious that it's actually from email/mime/image.py. We currently work around this by updating the pyc files before shipping to be relative paths to Lib/; however, fixing this upstream would appear to be as simple as passing through the dest from _write_to_zip to _py_temp_compile (https://github.com/python/cpython/blob/21a92f8cda525d25a165b773fbe1bfffd303a000/PC/layout/main.py#L302) to be passed into _compile_one_py ---------- components: Build, Installation, Windows messages: 348235 nosy: Bill Collins, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Embeddable distribution pyc filenames show build machine location type: enhancement 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 Jul 21 07:11:51 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 21 Jul 2019 11:11:51 +0000 Subject: [issue37636] Deprecate slicing and ordering operations on sys.version In-Reply-To: <1563626755.13.0.11799518747.issue37636@roundup.psfhosted.org> Message-ID: <1563707511.19.0.374814861715.issue37636@roundup.psfhosted.org> Stefan Behnel added the comment: > Changing the major version number itself is a breaking change So is the proposed change, in a way. At some point, there will be a 4.0 release, which may or may not break the code in question. So, testing for "version_info[0] == 3" is already wrong, because that code almost certainly wants to know if it runs in Py2 and not if it runs in Py3. It's better fixed soon, before we get too close to Py4, and I think a deprecation notice could be helpful for that. Preferably for as many of the non-future-proof spellings as possible. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 07:41:24 2019 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rn_Heissler?=) Date: Sun, 21 Jul 2019 11:41:24 +0000 Subject: [issue37642] timezone allows no offset from range (23:59, 24:00) Message-ID: <1563709284.19.0.651842013894.issue37642@roundup.psfhosted.org> New submission from J?rn Heissler : https://bugs.python.org/issue5288 changed datetime.timezone to accept sub-minute offsets. The C implementation allows offsets from range (23:59, 24:00) while the python implementation does not: # C >>> timezone(timedelta(seconds=86399)) datetime.timezone(datetime.timedelta(seconds=86399)) # Python >>> timezone(timedelta(seconds=86399)) Traceback (most recent call last): File "", line 1, in File "cpython/Lib/datetime.py", line 2194, in __new__ raise ValueError("offset must be a timedelta " ValueError: offset must be a timedelta strictly between -timedelta(hours=24) and timedelta(hours=24). This is because _maxoffset is defined as timedelta(hours=23, minutes=59) Second issue: The (undocumented) "min" and "max" attributes (both C and python) show 23:59 even though the C implementation can get closer to 24:00. Should this be changed to timezone(timedelta(seconds=86399, microseconds=999999))? (Same applies to the minimums) ---------- components: Library (Lib) messages: 348237 nosy: joernheissler priority: normal severity: normal status: open title: timezone allows no offset from range (23:59, 24:00) type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 07:44:41 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 21 Jul 2019 11:44:41 +0000 Subject: [issue37642] timezone allows no offset from range (23:59, 24:00) In-Reply-To: <1563709284.19.0.651842013894.issue37642@roundup.psfhosted.org> Message-ID: <1563709481.0.0.874428620588.issue37642@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 08:07:04 2019 From: report at bugs.python.org (=?utf-8?b?0JDRgNGC0YPRgCDQk9GA0LjQs9C+0YDRjNC10LI=?=) Date: Sun, 21 Jul 2019 12:07:04 +0000 Subject: [issue37643] Except clause Message-ID: <1563710824.55.0.978874845715.issue37643@roundup.psfhosted.org> New submission from ????? ????????? : Is is possible to add to Python the following syntax (keyword 'except'): [1, 2, 3, 4, 5] except [2] >>> [1, 3, 4, 5] ---------- messages: 348238 nosy: ????? ????????? priority: normal severity: normal status: open title: Except clause type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 08:18:55 2019 From: report at bugs.python.org (Eric O. LEBIGOT) Date: Sun, 21 Jul 2019 12:18:55 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563711535.94.0.286498831322.issue30550@roundup.psfhosted.org> Eric O. LEBIGOT added the comment: The essence of the original post is simply to document any order-preserving properties of the Python to JSON and JSON to Python transformation for mappings. This way users can rely on it. This is for instance useful if a program modifies JSON created by a user and wants to preserve the user ordering. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 08:19:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Jul 2019 12:19:29 +0000 Subject: [issue37636] Deprecate slicing and ordering operations on sys.version In-Reply-To: <1563626755.13.0.11799518747.issue37636@roundup.psfhosted.org> Message-ID: <1563711569.04.0.708868927848.issue37636@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think it is better to left this on third-party linters. * It is easy to catch patterns like `sys.version_info[0] == 3` or `sys.version[:3]` in the linter than in the Python compiler or interpreter. Linters are designed for this. * Not always slicing sys.version is an error. For example, `sys.version[:sys.version.index(' ')]` is a valid code. Linters have options which allow to ignore some kind of warnings or warnings at the particular line. * Users that ignore linters usually do not check the version. They wrote their scripts for the default system Python and update them when they become broken after system upgrade. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 08:31:07 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sun, 21 Jul 2019 12:31:07 +0000 Subject: [issue37636] Deprecate slicing and ordering operations on sys.version In-Reply-To: <1563626755.13.0.11799518747.issue37636@roundup.psfhosted.org> Message-ID: <1563712267.46.0.533383272825.issue37636@roundup.psfhosted.org> Paul Ganssle added the comment: > So is the proposed change, in a way. At some point, there will be a 4.0 release, which may or may not break the code in question. I don't think it's a foregone conclusion that there will be a 4.0 release. It could be that we decide that a 4.0 release would be reserved for a very specific kind of major compatibility breakage and that we were never going to do that kind of breakage again. In any case, I think one part of what Serhiy was trying to say is that we can't just avoid this problem by releasing 4.0 instead of 3.10, because switching to 4.0 brings its own (not inconsiderable) host of problems. Presumably the symlink would be `python4` instead of `python3`, so a bunch of shebangs, documentation and guides would need to be updated. Basically, unless something changes, a bunch of stuff is going to break in the release after 3.9 no matter what we do. It's probably a good idea to try to mitigate the problems of *both* versioning approaches, to give us maximum freedom in our choice of versioning scheme int he future. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 08:37:07 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sun, 21 Jul 2019 12:37:07 +0000 Subject: [issue37642] timezone allows no offset from range (23:59, 24:00) In-Reply-To: <1563709284.19.0.651842013894.issue37642@roundup.psfhosted.org> Message-ID: <1563712627.39.0.569025945972.issue37642@roundup.psfhosted.org> Paul Ganssle added the comment: I agree that the C and Python behavior should be the same, and both of them should allow all offsets less than 24 hours. I'm actually quite surprised we don't have a test for this in `datetimetester.py`. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 09:06:37 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 21 Jul 2019 13:06:37 +0000 Subject: [issue37643] Except clause In-Reply-To: <1563710824.55.0.978874845715.issue37643@roundup.psfhosted.org> Message-ID: <1563714397.23.0.885727151432.issue37643@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I guess you are popping 2 from the list and using except for the same. New syntax and semantics needs to be discussed in python-ideas mailing list. Though this reads like English except is used for exception based semantics. I would propose closing this and reopen if it's agreed by core devs in the mailing list. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 09:34:40 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 21 Jul 2019 13:34:40 +0000 Subject: [issue37642] timezone allows no offset from range (23:59, 24:00) In-Reply-To: <1563709284.19.0.651842013894.issue37642@roundup.psfhosted.org> Message-ID: <1563716080.89.0.629583429706.issue37642@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 10:01:47 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2019 14:01:47 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1563717707.02.0.692191785487.issue36564@roundup.psfhosted.org> Ned Deily added the comment: New changeset 79a47e2b9cff6c9facdbc022a752177ab89dc533 by Ned Deily (Miss Islington (bot)) in branch '3.6': Fix infinite loop in email folding logic (GH-12732) (GH-14799) https://github.com/python/cpython/commit/79a47e2b9cff6c9facdbc022a752177ab89dc533 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 10:02:26 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Sun, 21 Jul 2019 14:02:26 +0000 Subject: [issue37642] timezone allows no offset from range (23:59, 24:00) In-Reply-To: <1563709284.19.0.651842013894.issue37642@roundup.psfhosted.org> Message-ID: <1563717746.04.0.979375685187.issue37642@roundup.psfhosted.org> Change by Ngalim Siregar : ---------- keywords: +patch pull_requests: +14664 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14878 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 10:03:58 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2019 14:03:58 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1563717838.1.0.654747322183.issue36564@roundup.psfhosted.org> Change by Ned Deily : ---------- keywords: +security_issue resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 10:10:07 2019 From: report at bugs.python.org (hai shi) Date: Sun, 21 Jul 2019 14:10:07 +0000 Subject: [issue19113] duplicate test names in Lib/ctypes/test/test_functions.py In-Reply-To: <1380385419.52.0.767012097586.issue19113@psf.upfronthosting.co.za> Message-ID: <1563718207.02.0.905729163785.issue19113@roundup.psfhosted.org> hai shi added the comment: en, in python 3.8.0a3, I got those other error info: $ /home/shihai/workspace/cpython/python test_functions.py ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File "/home/shihai/workspace/cpython/Lib/hashlib.py", line 244, in globals()[__func_name] = __get_hash(__func_name) File "/home/shihai/workspace/cpython/Lib/hashlib.py", line 113, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type md5 but in master branch, the test case is ok. ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 10:40:34 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2019 14:40:34 +0000 Subject: [issue37544] Multiple test failures during build In-Reply-To: <1562757478.69.0.905991720528.issue37544@roundup.psfhosted.org> Message-ID: <1563720034.61.0.00251735073181.issue37544@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the additional info. I see two issues here. One, you are building with OpenSSL 1.1.1, the initial release back in 2018-09. There have been a few releases since then (currently at 1.1.1c) which do fix problems. You should try to upgrade it. Second, and more importantly, is that "make run_profile_task" hangs because a test hangs up and the tests are being run sequentially (i.e. without regrtest -j options meaning tests all run in one process sequentially). These days nearly all our testing using -j because of the possibility of individual tests failures and residual effects between tests. And note that "make test", which runs in parallel, did complete. I see there is some discussion going on Issue36044 about changing the set of tests run_profile_task uses which would likely mitigate problems like this. I'm CCing gps here for his views. It also appears Issue33467 is a similar report. I'm going to close it as a duplicate of this one. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 10:44:18 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2019 14:44:18 +0000 Subject: [issue33467] Python 3.7: profile-opt build errors because a test seems to hang In-Reply-To: <1526062939.54.0.682650639539.issue33467@psf.upfronthosting.co.za> Message-ID: <1563720258.95.0.828834359366.issue33467@roundup.psfhosted.org> Ned Deily added the comment: Thanks for your report. I'm sorry we haven't replied to it before now. Similar behavior has been more recently reported in Issue37544 and there is discussion going on there. So I am going to close your issue as a duplicate of it; feel free to join in the discussion there. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Multiple test failures during build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 10:47:04 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2019 14:47:04 +0000 Subject: [issue37544] Test failures cause --enable-optimizations build to hang In-Reply-To: <1562757478.69.0.905991720528.issue37544@roundup.psfhosted.org> Message-ID: <1563720424.03.0.791024960465.issue37544@roundup.psfhosted.org> Change by Ned Deily : ---------- title: Multiple test failures during build -> Test failures cause --enable-optimizations build to hang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 10:55:21 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 21 Jul 2019 14:55:21 +0000 Subject: [issue37643] Except clause In-Reply-To: <1563710824.55.0.978874845715.issue37643@roundup.psfhosted.org> Message-ID: <1563720921.46.0.79740211758.issue37643@roundup.psfhosted.org> Eric V. Smith added the comment: Yes, this should be discussed on python-ideas first, so I'm closing it here. But to be honest with you, there's really no chance this would get accepted. It's just too easy to do it with existing list comprehension syntax, which is much more general purpose. >>> [v for v in [1, 2, 3, 4, 5] if not v in [2]] [1, 3, 4, 5] ---------- nosy: +eric.smith resolution: -> postponed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:07:32 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2019 15:07:32 +0000 Subject: [issue37605] CI should not depend on gmane response In-Reply-To: <1563292175.7.0.185090199306.issue37605@roundup.psfhosted.org> Message-ID: <1563721652.41.0.0364741107544.issue37605@roundup.psfhosted.org> Terry J. Reedy added the comment: gmane was down awhile yesterday, so another merge (temporarily) blocked because of this. If either of you knows how to fix this, please do so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:26:04 2019 From: report at bugs.python.org (Tim B) Date: Sun, 21 Jul 2019 15:26:04 +0000 Subject: [issue1346874] httplib simply ignores CONTINUE Message-ID: <1563722764.42.0.946157815105.issue1346874@roundup.psfhosted.org> Change by Tim B : ---------- pull_requests: +14665 pull_request: https://github.com/python/cpython/pull/14880 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:36:27 2019 From: report at bugs.python.org (Tim B) Date: Sun, 21 Jul 2019 15:36:27 +0000 Subject: [issue1346874] httplib simply ignores CONTINUE Message-ID: <1563723387.31.0.862364583902.issue1346874@roundup.psfhosted.org> Tim B added the comment: I've created a PR to potentially implement this in 3.9. Please take a look and review/test, if this issue is still relevant to you. ---------- nosy: +tbartlett0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:36:57 2019 From: report at bugs.python.org (Tim B) Date: Sun, 21 Jul 2019 15:36:57 +0000 Subject: [issue1346874] httplib simply ignores CONTINUE Message-ID: <1563723417.89.0.82202953155.issue1346874@roundup.psfhosted.org> Change by Tim B : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:37:40 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2019 15:37:40 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563723460.64.0.393682265675.issue37627@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 35b87e6001bd991f625abe305951c77ddeb9a9c5 by Terry Jan Reedy (Ngalim Siregar) in branch 'master': bpo-37627: Initialize IDLE Custom Run dialog with previous entries (#14870) https://github.com/python/cpython/commit/35b87e6001bd991f625abe305951c77ddeb9a9c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:37:42 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 15:37:42 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563723462.79.0.414071359413.issue37627@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14666 pull_request: https://github.com/python/cpython/pull/14881 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:37:49 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 15:37:49 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563723469.04.0.609070044772.issue37627@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14667 pull_request: https://github.com/python/cpython/pull/14882 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 12:00:15 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2019 16:00:15 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563724815.03.0.941896745525.issue37627@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14668 pull_request: https://github.com/python/cpython/pull/14883 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 12:05:29 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2019 16:05:29 +0000 Subject: [issue1346874] httplib simply ignores CONTINUE Message-ID: <1563725129.73.0.898523393424.issue1346874@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -terry.reedy versions: -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 12:09:23 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 16:09:23 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563725363.53.0.472787001551.issue37627@roundup.psfhosted.org> miss-islington added the comment: New changeset d9086f2324264e93155dd81f4484975215e38f00 by Miss Islington (bot) in branch '3.7': bpo-37627: Initialize IDLE Custom Run dialog with previous entries (GH-14870) https://github.com/python/cpython/commit/d9086f2324264e93155dd81f4484975215e38f00 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 12:48:55 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2019 16:48:55 +0000 Subject: [issue37644] Sphinx (Travis doc build) is blocking merging Message-ID: <1563727735.93.0.97467728141.issue37644@roundup.psfhosted.org> New submission from Terry J. Reedy : One of the required CI tests is a Travis doc build, even if a PR does not touch any doc file. The following failure appears to be deterministic on master and 3.8. A 3.7 backport passed. It has happened multiple times on multiple PRs today. Example: https://travis-ci.org/python/cpython/jobs/561700698 The failure is ''' Warning, treated as error: [distutils/examples:267] "`" found in "This is the description of the ``foobar`` package." ''' I have no idea why this is seen as suspicious. I have 4 PRs blocked by this. https://github.com/python/cpython/pull/14872 https://github.com/python/cpython/pull/14879 https://github.com/python/cpython/pull/14883 https://github.com/python/cpython/pull/14881 The last one is the 3.8 backport of a PR that passed CI maybe 12 hours ago. Its 3.7 backport passed and is merged. If nothing else, can warnings not be treated as errors? ---------- components: Tests keywords: 3.8regression messages: 348253 nosy: mdk, terry.reedy, vstinner, zach.ware priority: critical severity: normal stage: needs patch status: open title: Sphinx (Travis doc build) is blocking merging type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:14:38 2019 From: report at bugs.python.org (Ammar Askar) Date: Sun, 21 Jul 2019 17:14:38 +0000 Subject: [issue37644] Sphinx (Travis doc build) is blocking merging In-Reply-To: <1563727735.93.0.97467728141.issue37644@roundup.psfhosted.org> Message-ID: <1563729278.44.0.0542311717834.issue37644@roundup.psfhosted.org> Ammar Askar added the comment: This particular error used to be covered here: https://github.com/python/cpython/blob/master/Doc/tools/susp-ignored.csv but looks like a line number change has broken it. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:45:47 2019 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Jul 2019 17:45:47 +0000 Subject: [issue37641] Embeddable distribution pyc filenames show build machine location In-Reply-To: <1563707241.42.0.696780467352.issue37641@roundup.psfhosted.org> Message-ID: <1563731147.1.0.0123994769196.issue37641@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14669 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14884 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:46:15 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 21 Jul 2019 17:46:15 +0000 Subject: [issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc Message-ID: <1563731175.2.0.136240000148.issue37645@roundup.psfhosted.org> New submission from Jeroen Demeyer : PyEval_GetFuncName is bad API because 1. It hardcodes a limited number of function classes (which doesn't even include all function classes in the core interpreter) instead of supporting duck-typing. 2. In case of a "function" object, it relies on a borrowed reference to the function. 3. It is returning a C string instead of a Python string, so we cannot return a new reference even if we wanted to. Since PyEval_GetFuncName and PyEval_GetFuncDesc are always used together, we might as well replace them by a single function with a proper API. ---------- components: Interpreter Core messages: 348255 nosy: jdemeyer, vstinner priority: normal severity: normal status: open title: Replace PyEval_GetFuncName/PyEval_GetFuncDesc versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 13:56:00 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2019 17:56:00 +0000 Subject: [issue37644] Sphinx (Travis doc build) is blocking merging In-Reply-To: <1563727735.93.0.97467728141.issue37644@roundup.psfhosted.org> Message-ID: <1563731760.23.0.762162332812.issue37644@roundup.psfhosted.org> Change by Ned Deily : ---------- keywords: +patch pull_requests: +14670 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14885 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 14:01:59 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2019 18:01:59 +0000 Subject: [issue37644] Sphinx (Travis doc build) is blocking merging In-Reply-To: <1563727735.93.0.97467728141.issue37644@roundup.psfhosted.org> Message-ID: <1563732119.52.0.213137823018.issue37644@roundup.psfhosted.org> Ned Deily added the comment: New changeset 22f0483d44b13140f6ea9927f0cf088c493e875a by Ned Deily in branch 'master': Bpo-37644: update suspicious.csv for distutils/examples (GH-14885) https://github.com/python/cpython/commit/22f0483d44b13140f6ea9927f0cf088c493e875a ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 14:02:07 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 21 Jul 2019 18:02:07 +0000 Subject: [issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc In-Reply-To: <1563731175.2.0.136240000148.issue37645@roundup.psfhosted.org> Message-ID: <1563732127.39.0.429904141531.issue37645@roundup.psfhosted.org> Jeroen Demeyer added the comment: 4. It uses the __name__ instead of the __qualname__ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 14:02:17 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 18:02:17 +0000 Subject: [issue37644] Sphinx (Travis doc build) is blocking merging In-Reply-To: <1563727735.93.0.97467728141.issue37644@roundup.psfhosted.org> Message-ID: <1563732137.81.0.140297263876.issue37644@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14671 pull_request: https://github.com/python/cpython/pull/14886 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 14:09:00 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 18:09:00 +0000 Subject: [issue37644] Sphinx (Travis doc build) is blocking merging In-Reply-To: <1563727735.93.0.97467728141.issue37644@roundup.psfhosted.org> Message-ID: <1563732540.6.0.0353402123062.issue37644@roundup.psfhosted.org> miss-islington added the comment: New changeset 8f501647ca1fba32204c0c1a705e06b4e43c69b1 by Miss Islington (bot) in branch '3.8': Bpo-37644: update suspicious.csv for distutils/examples (GH-14885) https://github.com/python/cpython/commit/8f501647ca1fba32204c0c1a705e06b4e43c69b1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 14:12:31 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Jul 2019 18:12:31 +0000 Subject: [issue37644] Sphinx (Travis doc build) is blocking merging In-Reply-To: <1563727735.93.0.97467728141.issue37644@roundup.psfhosted.org> Message-ID: <1563732751.97.0.580316181862.issue37644@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 14:17:11 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 21 Jul 2019 18:17:11 +0000 Subject: [issue37544] Test hang causes --enable-optimizations build to hang In-Reply-To: <1562757478.69.0.905991720528.issue37544@roundup.psfhosted.org> Message-ID: <1563733031.36.0.545741489247.issue37544@roundup.psfhosted.org> Gregory P. Smith added the comment: While test hangs shouldn't happen, I recommend working around such odd situations you are finding on your system by supplying your own modified PROFILE_TASK setting at make time that avoids whatever test(s) are causing you problems. The linked to issue36044 contains some suggested PROFILE_TASK settings. ---------- title: Test failures cause --enable-optimizations build to hang -> Test hang causes --enable-optimizations build to hang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 14:24:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2019 18:24:04 +0000 Subject: [issue37644] Sphinx (Travis doc build) is blocking merging In-Reply-To: <1563727735.93.0.97467728141.issue37644@roundup.psfhosted.org> Message-ID: <1563733444.67.0.00794584392361.issue37644@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14672 pull_request: https://github.com/python/cpython/pull/14887 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 14:39:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2019 18:39:04 +0000 Subject: [issue37644] Sphinx (Travis doc build) is blocking merging In-Reply-To: <1563727735.93.0.97467728141.issue37644@roundup.psfhosted.org> Message-ID: <1563734344.31.0.37030459278.issue37644@roundup.psfhosted.org> Terry J. Reedy added the comment: Although the error message says line 267, the suspicious line is on 273 for the copies in my repository on windows. If 267 does not work, I will revise and merge my overlapping PR that removes the number. Most of the entries in susp-ignored.csv do not have line numbers, which seems less fragile. I don't think that this entry needs one either. The prefix "This is the description of the" does not appear elsewhere in the file, is unlikely to, and if the sentence were repeated, it would likely not be an issue anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 15:15:17 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 21 Jul 2019 19:15:17 +0000 Subject: [issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc In-Reply-To: <1563731175.2.0.136240000148.issue37645@roundup.psfhosted.org> Message-ID: <1563736517.92.0.612259921375.issue37645@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +14673 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14890 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 15:34:21 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 19:34:21 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563737661.54.0.230105168595.issue37627@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14674 pull_request: https://github.com/python/cpython/pull/14893 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:25:46 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 20:25:46 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563740746.74.0.403306911246.issue37627@roundup.psfhosted.org> miss-islington added the comment: New changeset 9325f4091b66f3a9cc85681435367671d335e3e7 by Miss Islington (bot) in branch '3.8': bpo-37627: Initialize IDLE Custom Run dialog with previous entries (GH-14870) https://github.com/python/cpython/commit/9325f4091b66f3a9cc85681435367671d335e3e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:26:27 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2019 20:26:27 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563740787.57.0.0508817099657.issue37627@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 4214f1ec3b3c73badd639229eff81eb5e57b82ec by Terry Jan Reedy in branch 'master': bpo-37627: Add acknowledgment (#14883) https://github.com/python/cpython/commit/4214f1ec3b3c73badd639229eff81eb5e57b82ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:26:40 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 20:26:40 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563740800.26.0.255013055918.issue37627@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14675 pull_request: https://github.com/python/cpython/pull/14894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:28:31 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 20:28:31 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563740911.82.0.748433712506.issue37627@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14676 pull_request: https://github.com/python/cpython/pull/14895 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:38:05 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 20:38:05 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563741485.13.0.734935789413.issue37627@roundup.psfhosted.org> miss-islington added the comment: New changeset 849a37a2b640af14cfb004cdbced01983b0d9d2b by Miss Islington (bot) in branch '3.7': bpo-37627: Add acknowledgment (GH-14883) https://github.com/python/cpython/commit/849a37a2b640af14cfb004cdbced01983b0d9d2b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:38:12 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 20:38:12 +0000 Subject: [issue37627] Minor improvements to IDLE's "Run Customized" In-Reply-To: <1563521211.07.0.510212499932.issue37627@roundup.psfhosted.org> Message-ID: <1563741492.94.0.121736914969.issue37627@roundup.psfhosted.org> miss-islington added the comment: New changeset 52ee929957871da3d2622ab16887a1a03e6e08bf by Miss Islington (bot) in branch '3.8': bpo-37627: Add acknowledgment (GH-14883) https://github.com/python/cpython/commit/52ee929957871da3d2622ab16887a1a03e6e08bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:51:38 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 21 Jul 2019 20:51:38 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563742298.26.0.117290296064.issue30550@roundup.psfhosted.org> Kyle Stanley added the comment: > OrderedDict is not recommended to preserve order any more. > Please forget about OrderedDict unless you need additional feature OrderedDict provides. It is far inefficient than regular dict. Thanks for the clarification. Should this recommendation be briefly mentioned in the documentation (https://docs.python.org/3.9/library/collections.html#ordereddict-objects)? Currently, the docs reference that as of 3.7, the order-preserving behavior of standard dictionaries is guaranteed, but there is no mention of the significant differences in efficiency. Based on the current description, a user might end up using OrderedDictionary on the basis that they *might* have a need for reordering elements. If the difference in performance is significant enough, it would be worth noting in the docs so that users can take it into consideration when deciding which data structure to use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 17:19:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2019 21:19:04 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1563743944.91.0.12622154822.issue17535@roundup.psfhosted.org> Terry J. Reedy added the comment: Tal's 2 issues above have been resolved. 1. Line numbers are initially off by default but this can be reversed on the Settings General tab. 2. Line numbers can be shown and hidden for a window on the Option menu. The only bug I know of that must be fixed before merging is that font changes do not always get propagated to the numbers. I recently added 1 pixel of padding to line up line numbers and text. How is is on other machines? Especially Mac, if anyone has one? (Tal's just broke.) Easy test: open a new file; type multiple 2s and 7s on lines 2 and 7. Eyeball, then, use paper to see if low and high horizontal lines on 2s and 7s are lined up properly. ---------- title: IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. -> IDLE editor line numbers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 17:47:15 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2019 21:47:15 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1563745635.68.0.343756929679.issue17535@roundup.psfhosted.org> Terry J. Reedy added the comment: Ned, about window menus and Mac's single menu: tk and macOS work together to switch the menu to the menu of a window that becomes active. I opened two editor windows and clicked 'Show Code Context' in just one of them. The menu then said 'Hide Code Context'. I clicked the other window and then Option and it said 'Show...'. More experiments clicking windows and toggling CC went well. Show/Hide Line Numbers is intended to work the same way. Since Tal cannot now test, verification would be nice, as well as the line-up check described above ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 18:35:59 2019 From: report at bugs.python.org (jpic) Date: Sun, 21 Jul 2019 22:35:59 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1563748559.75.0.984376579532.issue36338@roundup.psfhosted.org> Change by jpic : ---------- pull_requests: +14677 pull_request: https://github.com/python/cpython/pull/14896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 18:49:54 2019 From: report at bugs.python.org (Glenn Johnson) Date: Sun, 21 Jul 2019 22:49:54 +0000 Subject: [issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t In-Reply-To: <1561563167.55.0.111630694926.issue37415@roundup.psfhosted.org> Message-ID: <1563749394.45.0.962073422311.issue37415@roundup.psfhosted.org> Change by Glenn Johnson : ---------- nosy: +Glenn Johnson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 19:05:43 2019 From: report at bugs.python.org (Stefan Krah) Date: Sun, 21 Jul 2019 23:05:43 +0000 Subject: [issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t In-Reply-To: <1561563167.55.0.111630694926.issue37415@roundup.psfhosted.org> Message-ID: <1563750343.73.0.932198027278.issue37415@roundup.psfhosted.org> Stefan Krah added the comment: Is it available with -std=c11? It is a bit strange that we use -std=c99. I thought that header is C11: https://en.cppreference.com/w/c/atomic ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 19:13:37 2019 From: report at bugs.python.org (jpic) Date: Sun, 21 Jul 2019 23:13:37 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1563750817.64.0.25984221433.issue36338@roundup.psfhosted.org> Change by jpic : ---------- nosy: +jpic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 19:15:26 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Jul 2019 23:15:26 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1563750926.82.0.887536222025.issue32912@roundup.psfhosted.org> Raymond Hettinger added the comment: Here's another example from the current build of the docs using Sphinx: (venv) ~/npython/Doc $ make html mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees -D latex_elements.papersize= -W . build/html Running Sphinx v2.1.0 /Users/raymond/npython/venv/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2978: SyntaxWarning: invalid escape sequence \l self.out.append('}] \leavevmode ') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 19:15:59 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Jul 2019 23:15:59 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1563750959.98.0.0533371218978.issue32912@roundup.psfhosted.org> Raymond Hettinger added the comment: I think it is poor form to bombard end-users with warnings about things they can't fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 19:20:40 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Jul 2019 23:20:40 +0000 Subject: [issue36018] Add a Normal Distribution class to the statistics module In-Reply-To: <1550448059.37.0.914986932061.issue36018@roundup.psfhosted.org> Message-ID: <1563751240.11.0.147366509025.issue36018@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +14678 pull_request: https://github.com/python/cpython/pull/14898 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 19:24:25 2019 From: report at bugs.python.org (=?utf-8?q?Grzegorz_Kraso=C5=84?=) Date: Sun, 21 Jul 2019 23:24:25 +0000 Subject: [issue37646] eval() in a list comprehension Message-ID: <1563751465.46.0.439346831661.issue37646@roundup.psfhosted.org> New submission from Grzegorz Kraso? : eval() works in a global scope when invoked in a list comprehension. ---------- components: Interpreter Core files: demo.py messages: 348271 nosy: Grzegorz Kraso? priority: normal severity: normal status: open title: eval() in a list comprehension type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48495/demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 19:35:46 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Jul 2019 23:35:46 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1563752146.13.0.288255673856.issue36546@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14679 pull_request: https://github.com/python/cpython/pull/14899 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 20:15:41 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 22 Jul 2019 00:15:41 +0000 Subject: [issue37646] eval() in a list comprehension In-Reply-To: <1563751465.46.0.439346831661.issue37646@roundup.psfhosted.org> Message-ID: <1563754541.44.0.772894325995.issue37646@roundup.psfhosted.org> Steven D'Aprano added the comment: What leads you to believe that eval *shouldn't* work in the global scope in a comprehension? If not the global scope, which scope should it be, local or nonlocal? Is the behaviour documented differently? For reference, the current docs for eval are here: https://docs.python.org/3.5/library/functions.html#eval ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 20:23:43 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 22 Jul 2019 00:23:43 +0000 Subject: [issue36018] Add a Normal Distribution class to the statistics module In-Reply-To: <1550448059.37.0.914986932061.issue36018@roundup.psfhosted.org> Message-ID: <1563755023.72.0.382033903138.issue36018@roundup.psfhosted.org> Steven D'Aprano added the comment: I have a query about the documentation: The default *method* is "exclusive" and is used for data sampled from a population that can have more extreme values than found in the samples. ... Setting the *method* to "inclusive" is used for describing population data or for samples that include the extreme points. In all my reading about quantile calculation methods, this is the first time I've come across this recommendation. Do you have a source for it or a justification? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 20:25:59 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Jul 2019 00:25:59 +0000 Subject: [issue37646] eval() in a list comprehension In-Reply-To: <1563751465.46.0.439346831661.issue37646@roundup.psfhosted.org> Message-ID: <1563755159.49.0.903780227831.issue37646@roundup.psfhosted.org> Raymond Hettinger added the comment: This used to work as you expected in Python 2. In Python 3, list comprehensions create their own inner scope just like generator expressions. Per the eval() docs, "if both dictionaries are omitted, the expression is executed in the environment where eval() is called." In your code example, the inner scope doesn't have a local variable "x", so the global variable "x" is retrieved. That said, I would have expected the inner "x" to be found as a non-local. So yes, this does seem odd an it isn't really true that "the expression is executed in the environment where eval() is called." Instead, it uses the globals() and locals() of the environment where it is called but not the nested scope. Perhaps this should be clarified in the docs if it is in fact the intended behavior. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 20:26:44 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Jul 2019 00:26:44 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563755204.2.0.701724392746.issue30550@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 21:09:34 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Jul 2019 01:09:34 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563757774.74.0.746842300023.issue30550@roundup.psfhosted.org> Raymond Hettinger added the comment: Kyle, the link you gave already discusses performance to the extent that it matters. Please keep focused on the OP's thought that the JSON docs should explicitly promised that key/value pairs are added in the order that they are encountered. The existing JSON docs imply this pretty strongly, but it can be made more explicit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 21:10:11 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Jul 2019 01:10:11 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563757811.7.0.367752833125.issue30550@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- priority: normal -> low versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 22:06:39 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 22 Jul 2019 02:06:39 +0000 Subject: [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563761199.69.0.544671592978.issue30550@roundup.psfhosted.org> Kyle Stanley added the comment: > Please keep focused on the OP's thought that the JSON docs should explicitly promised that > key/value pairs are added in the order that they are encountered. The existing JSON docs imply > this pretty strongly, but it can be made more explicit. I agree that the behavior could be more explicitly stated in the docs, as that could be potentially useful information for users to be aware of. Apologies for derailing the topic, I became too focused on the OrderedDict vs Dict topic, which was only a small part of the issue. Any further discussion on that topic or updating the OrderedDict docs should probably be moved into it's own issue, if at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 00:30:20 2019 From: report at bugs.python.org (Bruno P. Kinoshita) Date: Mon, 22 Jul 2019 04:30:20 +0000 Subject: [issue37647] Wrong lineno in traceback when formatting strings with % and multilines Message-ID: <1563769820.35.0.117931851308.issue37647@roundup.psfhosted.org> New submission from Bruno P. Kinoshita : Hi, Tested on Python 3.7 on Ubuntu LTS. But I believe this affects previous versions too, as found it from an issue posted in Jinja2 in 2013: https://github.com/pallets/jinja/issues/276 This code simulates the issue where the traceback has the wrong line number (without using any Jinja2 code): ``` class Z(object): def __str__(self): raise ValueError('Z error') def raise_generator(): yield 'three values are: %s %s %s' % ( 'primeiro', Z(), # traceback must point to this lineno 9 'terceiro' # but points to this lineno 10 (__str__ only, __eq__ is OK) ) print(list(raise_generator())) ``` The output: ``` Traceback (most recent call last): File "/home/kinow/Development/python/workspace/cylc-flow/cylc/flow/tests/Z.py", line 14, in print(list(raise_generator())) File "/home/kinow/Development/python/workspace/cylc-flow/cylc/flow/tests/Z.py", line 10, in raise_generator 'terceiro' # but points to this lineno 10 (__str__ only, __eq__ is OK) File "/home/kinow/Development/python/workspace/cylc-flow/cylc/flow/tests/Z.py", line 3, in __str__ raise ValueError('Z error') ValueError: Z error ``` Jinja uses something similar to the class Z to raise errors when the template has undefined variables. The curious part is that if instead of simply formatting the string with "%s" % (Z()) you use "%s" % (str(Z())) or if you callZ().__str__(), then the traceback reports the correct line number. Not sure if intentional, but would be nice if the traceback reported the correct line number, and I think other applications could end up having the same issue. This is my first issue, so I apologize if I did not include enough information, or if there is anything missing in this ticket. Let me know if I need to update it with more information or formatting the code. Would be happy to work on this if this is considered an easy-to-fix issue. Thanks all for your work on Python, Bruno P. Kinoshita ---------- components: Interpreter Core messages: 348277 nosy: kinow priority: normal severity: normal status: open title: Wrong lineno in traceback when formatting strings with % and multilines type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 01:33:08 2019 From: report at bugs.python.org (Elizabeth Uselton) Date: Mon, 22 Jul 2019 05:33:08 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1563773588.04.0.137314386797.issue37555@roundup.psfhosted.org> Elizabeth Uselton added the comment: Serhiy, thanks for pointing that out. I generally agree with everything in that thread, and learned some new things (I had no idea count(), index() and remove() used needle on the left side!) However, I'm not trying to spearhead a rewrite of everything. I think what I'm advocating for on the two assertEqual order tests is that as Guido mentioned "people should fix their __eq__ implementation to properly return NotImplemented". _Call's __eq__ currently has no path to NotImplemented, and if it did, those tests would pass. Perhaps I should change it from the or statement to make it more clear that's what's effectively happening. I'd like to talk more about what a good solution would be for the _Call __eq__ issue, since people (including myself!) have concerns, but I think it would be best to open another bug for that, and not scope creep myself. I've reverted all the commits having to do with that part so hopefully the issue with _call_matcher can get sorted separately, and then we can talk about this as it's own issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 02:25:11 2019 From: report at bugs.python.org (Ammar Askar) Date: Mon, 22 Jul 2019 06:25:11 +0000 Subject: [issue37647] Wrong lineno in traceback when formatting strings with % and multilines In-Reply-To: <1563769820.35.0.117931851308.issue37647@roundup.psfhosted.org> Message-ID: <1563776711.38.0.834616884177.issue37647@roundup.psfhosted.org> Ammar Askar added the comment: Please try this on the latest version of Python, there was a behavior change implemented in issue12458 that might make this a non-issue. ---------- nosy: +ammar2, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 02:45:26 2019 From: report at bugs.python.org (Bruno P. Kinoshita) Date: Mon, 22 Jul 2019 06:45:26 +0000 Subject: [issue37647] Wrong lineno in traceback when formatting strings with % and multilines In-Reply-To: <1563769820.35.0.117931851308.issue37647@roundup.psfhosted.org> Message-ID: <1563777926.0.0.881189372733.issue37647@roundup.psfhosted.org> Bruno P. Kinoshita added the comment: Hi Ammar, thanks for the quick reply and for the suggestion. Tried on the latest version on master, and looks like it's indeed different, though still looks like it is displaying the wrong line number. ``` kinow at localhost:~/Development/python/workspace/cpython$ python Python 3.9.0a0 (heads/master:b530a4460b, Jul 22 2019, 18:38:44) [GCC 7.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> kinow at localhost:~/Development/python/workspace/cpython$ python z.py Traceback (most recent call last): File "/home/kinow/Development/python/workspace/cpython/z.py", line 14, in print(list(raise_generator())) File "/home/kinow/Development/python/workspace/cpython/z.py", line 7, in raise_generator yield 'three values are: %s %s %s' % ( File "/home/kinow/Development/python/workspace/cpython/z.py", line 3, in __str__ raise ValueError('Z error') ValueError: Z error ``` It is now displaying the line number 7, where the yield statement begins, instead of where it actually happened (line 9). And once again, if I replace `Z()` by `Z().__str__()`, then it displays the right line number. ``` kinow at localhost:~/Development/python/workspace/cpython$ python z.py Traceback (most recent call last): File "/home/kinow/Development/python/workspace/cpython/z.py", line 14, in print(list(raise_generator())) File "/home/kinow/Development/python/workspace/cpython/z.py", line 9, in raise_generator Z().__str__(), # traceback must point to this lineno 9 File "/home/kinow/Development/python/workspace/cpython/z.py", line 3, in __str__ raise ValueError('Z error') ValueError: Z error ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:07:52 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2019 07:07:52 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1563779272.36.0.0971333160319.issue32912@roundup.psfhosted.org> Serhiy Storchaka added the comment: The warning in docutils was fixed in https://sourceforge.net/p/docutils/code/8255/ 1.5 months ago. It was an outliner, all other occurrences of \leavevmode were either with the double backslash or in raw string literals. The Bottle code was written 5 years age (https://github.com/bottlepy/bottle/commit/8a5bfe2f70a4a5d22b93e909b207584324817760), it was a part of the raw string. But a bug was introduced when it it was backported to the 0.12 version (https://github.com/bottlepy/bottle/commit/1f6fda636a4ea88adfa4292f3c843e71b1a685d8). ---------- nosy: +Eric Wieser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:18:46 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Jul 2019 07:18:46 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563779926.17.0.162812005916.issue37635@roundup.psfhosted.org> Antoine Pitrou added the comment: I would agree with changing the tutorial. The rest doesn't need to be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:22:11 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2019 07:22:11 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563780131.48.0.597301732575.issue37635@roundup.psfhosted.org> Serhiy Storchaka added the comment: AFAIK there is an open PR which sweeps through the standard library, changing seek() everywhere to use named constants. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:28:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2019 07:28:56 +0000 Subject: [issue37647] Wrong lineno in traceback when formatting strings with % and multilines In-Reply-To: <1563769820.35.0.117931851308.issue37647@roundup.psfhosted.org> Message-ID: <1563780536.03.0.245913962637.issue37647@roundup.psfhosted.org> Serhiy Storchaka added the comment: Line 9 is not where the error actually happened. The exception is raised not when you call Z(), but when you implicitly call Z.__str__() when evaluate the % operator. In Python 3.8 the traceback points to the start of the subexpression that raises an exception. So this issue has been fixed in 3.8. The fix was not backported to 3.7 because it is a large change which affects other code that traces execution or analyses tracebacks (e.g. coverage.py). ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:38:39 2019 From: report at bugs.python.org (Chris Withers) Date: Mon, 22 Jul 2019 07:38:39 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1563781119.36.0.551604858676.issue21478@roundup.psfhosted.org> Chris Withers added the comment: New changeset 7397cda99795a4a8d96193d710105e77a07b7411 by Chris Withers (Xtreak) in branch 'master': bpo-21478: Record calls to parent when autospecced objects are used as child with attach_mock (GH 14688) https://github.com/python/cpython/commit/7397cda99795a4a8d96193d710105e77a07b7411 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:38:59 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jul 2019 07:38:59 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1563781139.45.0.377080814774.issue21478@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14680 pull_request: https://github.com/python/cpython/pull/14902 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:39:06 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jul 2019 07:39:06 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1563781146.96.0.148346424336.issue21478@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14681 pull_request: https://github.com/python/cpython/pull/14903 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:53:17 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 22 Jul 2019 07:53:17 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563781997.77.0.0778377315632.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: > I would agree with changing the tutorial. The rest doesn't need to be changed. Fair enough, that's understandable. I'll look into creating a PR for the tutorial to attach to this issue. Thanks for the feedback Antoine and Raymond. >AFAIK there is an open PR which sweeps through the standard library, changing seek() >everywhere to use named constants. Even I would disagree with doing it through all of stdlib, especially with the current feedback. I was primarily advocating for using the constants in places where the io module was already being imported, since in that case, it wouldn't result in any additional overhead. Replacing it everywhere would require a significant number of additional io imports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:58:57 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2019 07:58:57 +0000 Subject: [issue37648] Fix minor inconsistency in the order of == operands Message-ID: <1563782337.34.0.926786223428.issue37648@roundup.psfhosted.org> New submission from Serhiy Storchaka : There is two ways to write the comparison when we search an item equal to the needle: item == needle and needle == item In most cases they get the same result. But if __eq__ of the item or the needle is not correctly implemented (returns False instead of NotImplemented for unsupported types) the order can matter. We want the behavior be consistent in all cases. The majority of the code uses needle on the right side of the == operator. But there are few outliners: * tuple.__contains__ and list.__contains__. They code is different from the code used in methods count(), index(), remove() where needle is on the right. * The general implementation of the "in" operator for iterators (see PySequence_Contains). * dictitems.__contains__. * The copy of list_contains in _ssl.c. * The C implementation of _asyncio.Future.remove_done_callback. It differs from the Python implementation. In all other code (many tens of occurrences) needle is on the right. I think it is worth to fix the minor inconsistency in these few places. See also the discussion on Python-Dev: https://mail.python.org/archives/list/python-dev at python.org/thread/VSV4K4AOKM4CBQMOELPFV5VMYALPH464/. ---------- components: Interpreter Core messages: 348287 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Fix minor inconsistency in the order of == operands versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:59:14 2019 From: report at bugs.python.org (Chris Withers) Date: Mon, 22 Jul 2019 07:59:14 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1563782354.19.0.595298800605.issue21478@roundup.psfhosted.org> Chris Withers added the comment: New changeset 22fd679dc363bfcbda336775da16aff4d6fcb33f by Chris Withers (Miss Islington (bot)) in branch '3.8': bpo-21478: Record calls to parent when autospecced objects are used as child with attach_mock (GH 14688) (GH-14902) https://github.com/python/cpython/commit/22fd679dc363bfcbda336775da16aff4d6fcb33f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:04:13 2019 From: report at bugs.python.org (Chris Withers) Date: Mon, 22 Jul 2019 08:04:13 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1563782653.13.0.248581054866.issue21478@roundup.psfhosted.org> Chris Withers added the comment: New changeset e9b187a2bfbb0586fc5d554ce745b7fe04e0b9a8 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-21478: Record calls to parent when autospecced objects are used as child with attach_mock (GH 14688) (GH-14903) https://github.com/python/cpython/commit/e9b187a2bfbb0586fc5d554ce745b7fe04e0b9a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:13:34 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2019 08:13:34 +0000 Subject: [issue37648] Fix minor inconsistency in the order of == operands In-Reply-To: <1563782337.34.0.926786223428.issue37648@roundup.psfhosted.org> Message-ID: <1563783214.68.0.567278115494.issue37648@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +14682 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14904 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:14:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2019 08:14:08 +0000 Subject: [issue37648] Fix minor inconsistency in the order of == operands In-Reply-To: <1563782337.34.0.926786223428.issue37648@roundup.psfhosted.org> Message-ID: <1563783248.72.0.576751919883.issue37648@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:24:05 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 22 Jul 2019 08:24:05 +0000 Subject: [issue37648] Fix minor inconsistency in the order of == operands In-Reply-To: <1563782337.34.0.926786223428.issue37648@roundup.psfhosted.org> Message-ID: <1563783845.61.0.797118334646.issue37648@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:24:40 2019 From: report at bugs.python.org (Bruno P. Kinoshita) Date: Mon, 22 Jul 2019 08:24:40 +0000 Subject: [issue37647] Wrong lineno in traceback when formatting strings with % and multilines In-Reply-To: <1563769820.35.0.117931851308.issue37647@roundup.psfhosted.org> Message-ID: <1563783880.95.0.205802335845.issue37647@roundup.psfhosted.org> Bruno P. Kinoshita added the comment: Hi, Thanks for the explanation. Could you elaborate a bit on this one: >In Python 3.8 the traceback points to the start of the subexpression that raises an exception. Just wanted to understand why I get the desired line number when I call Z().__str__(), but when I call simply Z() is returns - as you clarified - the start of the subexpression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 04:40:25 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 22 Jul 2019 08:40:25 +0000 Subject: [issue21478] mock calls don't propagate to parent (autospec) In-Reply-To: <1399899394.81.0.714942512868.issue21478@psf.upfronthosting.co.za> Message-ID: <1563784825.29.0.658501770856.issue21478@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks Jack for the report. Thanks Mario and Chris for reviews. I am closing this as resolved. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 06:21:54 2019 From: report at bugs.python.org (Orivej Desh) Date: Mon, 22 Jul 2019 10:21:54 +0000 Subject: [issue37649] calculate_init fails to check that EXEC_PREFIX was decoded Message-ID: <1563790914.65.0.328698742549.issue37649@roundup.psfhosted.org> New submission from Orivej Desh : See https://github.com/python/cpython/pull/14897 The bug was introduced in https://github.com/python/cpython/commit/0327bde9da203bb256b58218d012ca76ad0db4e4#diff-fa81ddea06129e7a2ef6b5a1c6a0af4dR925 ---------- components: Interpreter Core messages: 348292 nosy: orivej priority: normal pull_requests: 14683 severity: normal status: open title: calculate_init fails to check that EXEC_PREFIX was decoded versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 06:22:13 2019 From: report at bugs.python.org (=?utf-8?q?Grzegorz_Kraso=C5=84?=) Date: Mon, 22 Jul 2019 10:22:13 +0000 Subject: [issue37646] eval() in a list comprehension In-Reply-To: <1563751465.46.0.439346831661.issue37646@roundup.psfhosted.org> Message-ID: <1563790933.03.0.637783378951.issue37646@roundup.psfhosted.org> Grzegorz Kraso? added the comment: Steven, I believed that any `` replaced by `eval('')` will not change behaviour of the code. Now I understand that my assumption was incorrect. Raymond, thanks for helping me understand this. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 06:53:53 2019 From: report at bugs.python.org (Ben Brown) Date: Mon, 22 Jul 2019 10:53:53 +0000 Subject: [issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range In-Reply-To: <1560242699.55.0.804750809475.issue37226@roundup.psfhosted.org> Message-ID: <1563792833.19.0.983448615099.issue37226@roundup.psfhosted.org> Ben Brown added the comment: I can fully confirm the issue is due to flow control or lack of in my code the system runs out of resources and this is when it errors, I have implemented flow control in my protocol and it now works without errors. One thing I did find is that the documentation on flow control was lacking but luckily I found this post which makes implementation clearer https://medium.com/@pgjones/an-asyncio-socket-tutorial-5e6f3308b8b0 I am not sure if you would still classify this as a bug the error could be clearer but it could be expected behaviour when you run out of resources, I think this can now be closed I am just unsure of the etiquette as to who closes it and what resolution should be selected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 08:00:23 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 22 Jul 2019 12:00:23 +0000 Subject: [issue37630] Investigate replacing SHA3 code with OpenSSL In-Reply-To: <1563535856.49.0.726904541971.issue37630@roundup.psfhosted.org> Message-ID: <1563796823.47.0.321533774122.issue37630@roundup.psfhosted.org> Change by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 08:10:54 2019 From: report at bugs.python.org (Ryan Gonzalez) Date: Mon, 22 Jul 2019 12:10:54 +0000 Subject: [issue37650] TemporaryDirectory objects should LOCK_SH to avoid being deleted by systemd-tmpfiles Message-ID: <1563797454.09.0.560576153517.issue37650@roundup.psfhosted.org> New submission from Ryan Gonzalez : If e.g. a tar archive is extracted that has dates from several months ago, if systemd-tmpfiles runs to clean up data, then it may delete that data while the directory is still being used. This can be avoided by holding a LOCK_SH on the directory while it's being used. ---------- components: Library (Lib) messages: 348295 nosy: refi64 priority: normal severity: normal status: open title: TemporaryDirectory objects should LOCK_SH to avoid being deleted by systemd-tmpfiles type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 08:28:47 2019 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Jul 2019 12:28:47 +0000 Subject: [issue37650] TemporaryDirectory objects should LOCK_SH to avoid being deleted by systemd-tmpfiles In-Reply-To: <1563797454.09.0.560576153517.issue37650@roundup.psfhosted.org> Message-ID: <1563798527.17.0.594170593747.issue37650@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14684 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14908 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 08:43:48 2019 From: report at bugs.python.org (Marcel Plch) Date: Mon, 22 Jul 2019 12:43:48 +0000 Subject: [issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST In-Reply-To: <1563536952.58.0.764226132067.issue37631@roundup.psfhosted.org> Message-ID: <1563799428.37.0.30556803632.issue37631@roundup.psfhosted.org> Marcel Plch added the comment: I believe you mean this downstream issue: https://bugzilla.redhat.com/show_bug.cgi?id=1712977 That issue is but only a consequence of a bad flag handling. The bad flag handling affects not only test_gdb on that specific architecture, but the entire optimization level on all architectures, hence causing inconveniences in debugging in general on all architectures. It's a pure chance that one test caught this specific case. It might also cause inconveniences with other use-cases for EXTRA_CFLAGS, as they might get overridden by CFLAGS_NODIST. You can get the erroneous output by running the reproducer. That is: $./configure ... $ make CFLAGS_NODIST="-O2" EXTRA_CFLAGS="-Og" gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Og -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -O2 -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c -Og from EXTRA_CFLAGS gets overridden by -O2 from CFLAGS_NODIST. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 09:36:22 2019 From: report at bugs.python.org (Gary van der Merwe) Date: Mon, 22 Jul 2019 13:36:22 +0000 Subject: [issue37651] Change of inheritance of asyncio.CancelledError needs documentation Message-ID: <1563802582.63.0.387759445278.issue37651@roundup.psfhosted.org> New submission from Gary van der Merwe : asyncio.CancelledError inheritance was changed in 3.8. https://bugs.python.org/issue32528 https://github.com/python/cpython/commit/431b540bf79f0982559b1b0e420b1b085f667bb7 The documentation still instructs the user to perform a pattern needed before this change. The documentation should probably change to inform them of the change, and to let them know that pattern is only necessary prior to 3.8. ---------- assignee: docs at python components: Documentation messages: 348297 nosy: docs at python, garyvdm priority: normal severity: normal status: open title: Change of inheritance of asyncio.CancelledError needs documentation versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 09:41:36 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 22 Jul 2019 13:41:36 +0000 Subject: [issue37648] Fix minor inconsistency in the order of == operands In-Reply-To: <1563782337.34.0.926786223428.issue37648@roundup.psfhosted.org> Message-ID: <1563802896.81.0.979949345707.issue37648@roundup.psfhosted.org> Change by Josh Rosenberg : ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 10:01:30 2019 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 22 Jul 2019 14:01:30 +0000 Subject: [issue37642] timezone allows no offset from range (23:59, 24:00) In-Reply-To: <1563709284.19.0.651842013894.issue37642@roundup.psfhosted.org> Message-ID: <1563804090.81.0.299217227223.issue37642@roundup.psfhosted.org> Paul Ganssle added the comment: I have been thinking about this more and I think the two issues (`min` and `max` vs. the incompatibility between C and Python) should be considered two separate issues. My reasoning is that a change of the value of `timezone.min` and `timezone.max` is not something I'd be comfortable backporting to 3.7, because it has the potential to cause failures in some test suites (for example, `datetime.now(tz=datetime.timezone.max).isoformat()` will start returning a string that does not conform to ISO 8601, which has no support for sub-minute offsets). However, differences between the C and Python implementations are a violation of at least the spirit of PEP 399 and I think it should be backported to 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 11:13:18 2019 From: report at bugs.python.org (Ben) Date: Mon, 22 Jul 2019 15:13:18 +0000 Subject: [issue37652] Multiprocessing shared_memory ValueError on race with ShareableList Message-ID: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org> New submission from Ben : When running the attached on 3.8 and 3.9 (master) I get the following: Process Process-3: Traceback (most recent call last): File "/home/bjs/.pyenv/versions/3.9-dev/lib/python3.9/multiprocessing/process.py", line 313, in _bootstrap self.run() File "/home/bjs/.pyenv/versions/3.9-dev/lib/python3.9/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/home/bjs/Downloads/e4671450a50df5a0648c6dda0c7b642a-3db67c29d8d9e6a6d629c2c016f5853ec22000ed/test.py", line 14, in g X[0] File "/home/bjs/.pyenv/versions/3.9-dev/lib/python3.9/multiprocessing/shared_memory.py", line 413, in __getitem__ (v,) = struct.unpack_from( ValueError: not enough values to unpack (expected 1, got 0) (Tested on Windows and Linux) Either this is a documentation error, and the docs for shared_memory should state that the ShareableList does not have atomic operations and so this is unsafe, or this is a suspicious behaviour. I'm not sure which. I could also just be using the library totally incorrectly. ---------- files: test.py messages: 348299 nosy: bjs priority: normal severity: normal status: open title: Multiprocessing shared_memory ValueError on race with ShareableList type: behavior versions: Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48496/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 11:14:26 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 22 Jul 2019 15:14:26 +0000 Subject: [issue37652] Multiprocessing shared_memory ValueError on race with ShareableList In-Reply-To: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org> Message-ID: <1563808466.97.0.633971332513.issue37652@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 11:15:14 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 22 Jul 2019 15:15:14 +0000 Subject: [issue37496] Support annotations in signature strings. In-Reply-To: <1562197526.36.0.0415942737779.issue37496@roundup.psfhosted.org> Message-ID: <1563808514.45.0.964304795764.issue37496@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 11:33:56 2019 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 22 Jul 2019 15:33:56 +0000 Subject: [issue37653] make install fails Message-ID: <1563809636.35.0.686043283541.issue37653@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Make install is broken in subtarget libinstall. This was introduced with commit e8692818afd731c1b7e925c626ac8200b1f1c31e. Fix in attached patch. ---------- components: Build files: fix.patch keywords: patch messages: 348300 nosy: Erlend Egeberg Aasland priority: normal severity: normal status: open title: make install fails type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file48497/fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 11:56:41 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 22 Jul 2019 15:56:41 +0000 Subject: [issue37653] make install fails In-Reply-To: <1563809636.35.0.686043283541.issue37653@roundup.psfhosted.org> Message-ID: <1563811001.62.0.152289409286.issue37653@roundup.psfhosted.org> Change by SilentGhost : ---------- keywords: +3.8regression nosy: +vstinner stage: -> patch review versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 11:59:51 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 22 Jul 2019 15:59:51 +0000 Subject: [issue37653] make install fails In-Reply-To: <1563809636.35.0.686043283541.issue37653@roundup.psfhosted.org> Message-ID: <1563811191.76.0.460973579001.issue37653@roundup.psfhosted.org> Change by SilentGhost : ---------- keywords: -3.8regression versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 14:03:12 2019 From: report at bugs.python.org (Petter S) Date: Mon, 22 Jul 2019 18:03:12 +0000 Subject: [issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1563818592.53.0.7572271961.issue27682@roundup.psfhosted.org> Petter S added the comment: The following message can still appear in the log when running the Django development server: ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 50713) Traceback (most recent call last): File "d:\python37\Lib\socketserver.py", line 650, in process_request_thread self.finish_request(request, client_address) File "d:\python37\Lib\socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "d:\python37\Lib\socketserver.py", line 720, in __init__ self.handle() File "D:\Virtualenvs\***\lib\site-packages\django\core\servers\basehttp.py", line 171, in handle self.handle_one_request() File "D:\Virtualenvs\***\lib\site-packages\django\core\servers\basehttp.py", line 179, in handle_one_request self.raw_requestline = self.rfile.readline(65537) File "d:\python37\Lib\socket.py", line 589, in readinto return self._sock.recv_into(b) ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine ---------------------------------------- This is much better than before but even this message is completely uninteresting as web browsers disconnect from servers all the time. However, this could be better to fix in Django. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 14:12:23 2019 From: report at bugs.python.org (Petter S) Date: Mon, 22 Jul 2019 18:12:23 +0000 Subject: [issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1563819143.97.0.625233737495.issue27682@roundup.psfhosted.org> Petter S added the comment: Could potentially already be fixed in Django: https://github.com/django/django/commit/7785e03ba89aafbd949191f126361fb9103cb980#diff-f6d1c75ec606389da5af6558bf57f171L51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 14:17:19 2019 From: report at bugs.python.org (Petter S) Date: Mon, 22 Jul 2019 18:17:19 +0000 Subject: [issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1563819439.51.0.871854693606.issue27682@roundup.psfhosted.org> Petter S added the comment: No it is not fixed in Django, but I verified that adding ConnectionAbortedError on this line https://github.com/django/django/blob/c6581a40be3bb4c1e13861f0adbb3fe01f09107f/django/core/servers/basehttp.py#L55 fixes the error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 15:17:59 2019 From: report at bugs.python.org (Bill Collins) Date: Mon, 22 Jul 2019 19:17:59 +0000 Subject: [issue37654] 2to3 no-ops on embeddable distribution Message-ID: <1563823079.34.0.179597137003.issue37654@roundup.psfhosted.org> New submission from Bill Collins : Firstly, I'd acknowledge that expecting 2to3 to work on the embeddable distribution might be the problem, but the mode of failure is silent and delayed. The problem is that 2to3 loads fix names by searching for files in a package that end in '.py' (https://github.com/python/cpython/blame/master/Lib/lib2to3/refactor.py#L30) which isn't much use on the embeddable distribution where everything is pre-comipled. So, installing an sdist package that relies on 2to3 will succeed, but any attempt to then actually use the installed package will fail. I'm not sure whether the correct behavior here might be to 1. Fix 2to3 to load from pyc files (explicitly enabling 2to3 based installation on embeddable) 2. Fix 2to3 to fail when no converters are found (or similar; explicitly *disabling* 2to3 based installation on embeddable). Or something else entirely. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 348304 nosy: Bill Collins priority: normal severity: normal status: open title: 2to3 no-ops on embeddable distribution 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 Mon Jul 22 15:54:31 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 22 Jul 2019 19:54:31 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1563825271.27.0.514861170167.issue36044@roundup.psfhosted.org> Neil Schemenauer added the comment: New changeset 4e16a4a3112161a5c6981c0588142d4a4673a934 by Neil Schemenauer in branch 'master': bpo-36044: Reduce number of unit tests run for PGO build (GH-14702) https://github.com/python/cpython/commit/4e16a4a3112161a5c6981c0588142d4a4673a934 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 15:54:48 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jul 2019 19:54:48 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1563825288.76.0.694210804686.issue36044@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14685 pull_request: https://github.com/python/cpython/pull/14910 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 16:17:27 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Jul 2019 20:17:27 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1563826647.12.0.702141774687.issue36044@roundup.psfhosted.org> miss-islington added the comment: New changeset 2406672984e4c1b18629e615edad52928a72ffcc by Miss Islington (bot) in branch '3.8': bpo-36044: Reduce number of unit tests run for PGO build (GH-14702) https://github.com/python/cpython/commit/2406672984e4c1b18629e615edad52928a72ffcc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 17:33:30 2019 From: report at bugs.python.org (Frank B) Date: Mon, 22 Jul 2019 21:33:30 +0000 Subject: [issue37655] Set subset operator docs Message-ID: <1563831210.27.0.699744646514.issue37655@roundup.psfhosted.org> New submission from Frank B : The docs say "Test whether the set is a proper subset of other" for both set < other and set > other built-in functions. Is that a misprint? How could it be both? For the <= and >= operators it properly reverses the order so one says: Test whether every element in the set is in other. and the other: Test whether every element in other is in the set. ---------- assignee: docs at python components: Documentation files: 2019-07-22 1728 Screenshot.png messages: 348307 nosy: Frank B2, docs at python priority: normal severity: normal status: open title: Set subset operator docs versions: Python 2.7, Python 3.7 Added file: https://bugs.python.org/file48498/2019-07-22 1728 Screenshot.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:24:32 2019 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 22 Jul 2019 22:24:32 +0000 Subject: [issue37653] make install fails In-Reply-To: <1563809636.35.0.686043283541.issue37653@roundup.psfhosted.org> Message-ID: <1563834272.39.0.923274216682.issue37653@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +14686 pull_request: https://github.com/python/cpython/pull/14911 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:47:13 2019 From: report at bugs.python.org (Peter Farrell) Date: Mon, 22 Jul 2019 22:47:13 +0000 Subject: [issue37656] Can't pip install because of bisect_left Message-ID: <1563835633.66.0.295027730985.issue37656@roundup.psfhosted.org> New submission from Peter Farrell : Not able to start up Anaconda because of an error including "cannot import bisect_left" whatever that means. I uninstalled and tried to reinstall. No luck. Finally uninstalled and can't pip install anything because of this exact error. Here's my screenshot. ---------- files: pip_error.png messages: 348308 nosy: Peter Farrell priority: normal severity: normal status: open title: Can't pip install because of bisect_left Added file: https://bugs.python.org/file48499/pip_error.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 18:47:48 2019 From: report at bugs.python.org (Peter Farrell) Date: Mon, 22 Jul 2019 22:47:48 +0000 Subject: [issue37656] Can't pip install because of bisect_left In-Reply-To: <1563835633.66.0.295027730985.issue37656@roundup.psfhosted.org> Message-ID: <1563835668.76.0.234472139032.issue37656@roundup.psfhosted.org> Change by Peter Farrell : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 19:27:06 2019 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 22 Jul 2019 23:27:06 +0000 Subject: [issue26695] pickle and _pickle accelerator have different behavior when unpickling an object with falsy __getstate__ return In-Reply-To: <1459868506.3.0.857595967516.issue26695@psf.upfronthosting.co.za> Message-ID: <1563838026.7.0.982077853488.issue26695@roundup.psfhosted.org> Zackery Spytz added the comment: Josh, would you consider creating a pull request for this issue? ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 19:31:42 2019 From: report at bugs.python.org (Henry Harutyunyan) Date: Mon, 22 Jul 2019 23:31:42 +0000 Subject: [issue37534] In minidom module ability to add Standalone Document Declaraion is missing while generating XML documents In-Reply-To: <1562714811.12.0.95150258791.issue37534@roundup.psfhosted.org> Message-ID: <1563838302.28.0.646581244166.issue37534@roundup.psfhosted.org> Change by Henry Harutyunyan : ---------- keywords: +patch pull_requests: +14687 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14912 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 19:33:37 2019 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 22 Jul 2019 23:33:37 +0000 Subject: [issue22491] Support Unicode line boundaries in regular expression In-Reply-To: <1411628187.04.0.177569242065.issue22491@psf.upfronthosting.co.za> Message-ID: <1563838417.06.0.398254413844.issue22491@roundup.psfhosted.org> Zackery Spytz added the comment: > To meet Unicode standard requirement RL1.6 [1] all Unicode line separators should be supported: It seems that large portions of Modules/_sre.c would have to be rewritten in order to do this. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 19:40:05 2019 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 22 Jul 2019 23:40:05 +0000 Subject: [issue30864] Compile failure for linux socket CAN support In-Reply-To: <1499330165.39.0.665036659676.issue30864@psf.upfronthosting.co.za> Message-ID: <1563838805.97.0.779917238054.issue30864@roundup.psfhosted.org> Zackery Spytz added the comment: It seems that the AF_CAN issue was fixed in bpo-31927 / d3187158c09cf899e9849f335bdff10594209167. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 20:54:41 2019 From: report at bugs.python.org (Alejandro Gonzalez) Date: Tue, 23 Jul 2019 00:54:41 +0000 Subject: [issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call In-Reply-To: <1480885774.84.0.670239959771.issue28869@psf.upfronthosting.co.za> Message-ID: <1563843281.28.0.972792210663.issue28869@roundup.psfhosted.org> Alejandro Gonzalez added the comment: I see, that?s an interesting point. In that case, Serhiy?s approach is indeed better. PR 14166 seems stalled. I?d like to help if there?s anything left to do, if possible :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 21:25:24 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 23 Jul 2019 01:25:24 +0000 Subject: [issue37646] eval() in a list comprehension In-Reply-To: <1563790933.03.0.637783378951.issue37646@roundup.psfhosted.org> Message-ID: <20190723012517.GA10875@ando.pearwood.info> Steven D'Aprano added the comment: I'm not sure we should be so quick to close this. At the very least, I think the documentation could be improved. It does seem desirable to have the invariant: `expression` == `eval("expression")` apply in any environment. Was the change in behaviour between 2 and 3 intentional, or just a side-effect of the change in implementation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 21:51:53 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 23 Jul 2019 01:51:53 +0000 Subject: [issue37655] Set subset operator docs In-Reply-To: <1563831210.27.0.699744646514.issue37655@roundup.psfhosted.org> Message-ID: <1563846713.87.0.767871768571.issue37655@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 22:39:36 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Tue, 23 Jul 2019 02:39:36 +0000 Subject: [issue37655] Set subset operator docs In-Reply-To: <1563831210.27.0.699744646514.issue37655@roundup.psfhosted.org> Message-ID: <1563849576.91.0.125500651581.issue37655@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: For 'set < other' it says sub-set ... for 'set > other' is says super-set. Subset vs superset. So I think it's correct in the documentation. ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:25:03 2019 From: report at bugs.python.org (Farhaan Bukhsh) Date: Tue, 23 Jul 2019 04:25:03 +0000 Subject: [issue36595] IDLE: Add search to Squeezed Output text viewer. In-Reply-To: <1554941521.08.0.779423976753.issue36595@roundup.psfhosted.org> Message-ID: <1563855903.66.0.479376720044.issue36595@roundup.psfhosted.org> Farhaan Bukhsh added the comment: Hey, this looks like an interesting feature. I want to take a stab at it. Terry can you help me understand the requirement better and may be mentor me to write it. ---------- nosy: +fhackdroid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:43:46 2019 From: report at bugs.python.org (Dima Tisnek) Date: Tue, 23 Jul 2019 04:43:46 +0000 Subject: [issue37657] ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed. Message-ID: <1563857026.02.0.43954136156.issue37657@roundup.psfhosted.org> New submission from Dima Tisnek : I have Python-3.7.2 installed. I've just installed Python3.8.0b2 on macOS, and ran "Install Certificates.command". The terminal output contained: ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed. (certifi-2019.6.16 got installed correctly) (Re-running the command again doesn't produce same output, because certifi is up to date) ---------- components: Installation messages: 348316 nosy: Dima.Tisnek priority: normal severity: normal status: open title: ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:54:44 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 23 Jul 2019 04:54:44 +0000 Subject: [issue36595] IDLE: Add search to textview.ViewWindow In-Reply-To: <1554941521.08.0.779423976753.issue36595@roundup.psfhosted.org> Message-ID: <1563857684.68.0.148484711621.issue36595@roundup.psfhosted.org> Terry J. Reedy added the comment: If a ViewWindow has more that 24 lines, then it has a button bar at the bottom that currently has one button -- [Close]. 1. Make the bar permanent, regardless of size. The next steps are to adapt the editor code for Find. 2. Add another button [Search] or [Find] whose command generates a pseudoevent. 3. Bind the find keys to , as in the editor. 4 I believe is already bound to the find_event function, but do so if needed. This is more or less the same as in the editor, except that the button replaces the menu item. ---------- title: IDLE: Add search to Squeezed Output text viewer. -> IDLE: Add search to textview.ViewWindow versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:57:02 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Jul 2019 04:57:02 +0000 Subject: [issue37656] Can't pip install because of bisect_left In-Reply-To: <1563835633.66.0.295027730985.issue37656@roundup.psfhosted.org> Message-ID: <1563857822.35.0.00180621649957.issue37656@roundup.psfhosted.org> Raymond Hettinger added the comment: Try deleting bisect.py from the Python37-32 directory. I suspect there is a spurious bisect file there that in shadowing the intended standard library version which would be in Python37-32/lib. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:58:44 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Jul 2019 04:58:44 +0000 Subject: [issue37655] Set subset operator docs In-Reply-To: <1563831210.27.0.699744646514.issue37655@roundup.psfhosted.org> Message-ID: <1563857924.42.0.846874142103.issue37655@roundup.psfhosted.org> Raymond Hettinger added the comment: The docs look fine to me as well. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 01:27:17 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 23 Jul 2019 05:27:17 +0000 Subject: [issue37657] ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed. In-Reply-To: <1563857026.02.0.43954136156.issue37657@roundup.psfhosted.org> Message-ID: <1563859637.9.0.213514499495.issue37657@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: grip and docopt are not a part of standard library. I assume this issue is related to Mac OS installer and tagging it as Mac OS issue for confirmation to close it as third party issue. ---------- components: +macOS nosy: +ned.deily, ronaldoussoren, xtreak type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 01:52:38 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 23 Jul 2019 05:52:38 +0000 Subject: [issue36568] Typo in socket.CAN_RAW_FD_FRAMES library documentation In-Reply-To: <1554776259.35.0.774393301329.issue36568@roundup.psfhosted.org> Message-ID: <1563861158.95.0.388404610832.issue36568@roundup.psfhosted.org> Zackery Spytz added the comment: It seems that this was fixed in 1b05aa219041eb1c9dbcb4ec6c1fa5b20f060bf5. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 01:54:16 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 23 Jul 2019 05:54:16 +0000 Subject: [issue30237] Access violation due to CancelSynchronousIo of console read In-Reply-To: <1493747167.63.0.66545140377.issue30237@psf.upfronthosting.co.za> Message-ID: <1563861256.36.0.595402543763.issue30237@roundup.psfhosted.org> Zackery Spytz added the comment: PR 7911 was merged and backported. Should this issue be closed? ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 04:52:33 2019 From: report at bugs.python.org (Jarek Zgoda) Date: Tue, 23 Jul 2019 08:52:33 +0000 Subject: [issue37544] Test hang causes --enable-optimizations build to hang In-Reply-To: <1562757478.69.0.905991720528.issue37544@roundup.psfhosted.org> Message-ID: <1563871953.52.0.959029622467.issue37544@roundup.psfhosted.org> Jarek Zgoda added the comment: Thank you for the information. The build system is standard Ubuntu 18.04.2 and openssl is system provided. I will try to build Python against other openssl versions, as well against libressl. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 06:02:22 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 23 Jul 2019 10:02:22 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563876142.98.0.547452721209.issue33610@roundup.psfhosted.org> Tal Einat added the comment: New changeset 1ebee37dde5c2aabc8e2d2c7bbe2a69b293133bb by Tal Einat in branch 'master': bpo-33610: validate non-negative integer inputs in IDLE's config (GH-14822) https://github.com/python/cpython/commit/1ebee37dde5c2aabc8e2d2c7bbe2a69b293133bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 06:02:35 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jul 2019 10:02:35 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563876155.91.0.321179506248.issue33610@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14689 pull_request: https://github.com/python/cpython/pull/14913 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 06:02:46 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jul 2019 10:02:46 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563876166.09.0.373853217069.issue33610@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14690 pull_request: https://github.com/python/cpython/pull/14914 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 06:18:47 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jul 2019 10:18:47 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563877127.49.0.239498263508.issue33610@roundup.psfhosted.org> miss-islington added the comment: New changeset 5dab5e7d24c790d54b8d1eca0568e798bfda2c68 by Miss Islington (bot) in branch '3.8': bpo-33610: validate non-negative integer inputs in IDLE's config (GH-14822) https://github.com/python/cpython/commit/5dab5e7d24c790d54b8d1eca0568e798bfda2c68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 06:21:55 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jul 2019 10:21:55 +0000 Subject: [issue33610] IDLE: Make multiple improvements to CodeContext In-Reply-To: <1527052692.02.0.682650639539.issue33610@psf.upfronthosting.co.za> Message-ID: <1563877315.66.0.920742954506.issue33610@roundup.psfhosted.org> miss-islington added the comment: New changeset 28815e0e2c904644660d29995cdfbb65f67e4a1d by Miss Islington (bot) in branch '3.7': bpo-33610: validate non-negative integer inputs in IDLE's config (GH-14822) https://github.com/python/cpython/commit/28815e0e2c904644660d29995cdfbb65f67e4a1d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 06:29:34 2019 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Tue, 23 Jul 2019 10:29:34 +0000 Subject: [issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English In-Reply-To: <1373113143.69.0.513997485887.issue18378@psf.upfronthosting.co.za> Message-ID: <1563877774.72.0.751033887209.issue18378@roundup.psfhosted.org> Change by Micka?l Schoentgen : ---------- nosy: +Tiger-222 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 06:39:55 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 23 Jul 2019 10:39:55 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1563878395.89.0.433854754911.issue36974@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset bf8e82f976b37856c7d35cdf88a238cb6f57fe65 by ?ukasz Langa (Jeroen Demeyer) in branch '3.8': [3.8] bpo-36974: separate vectorcall functions for each calling convention (GH-13781) (#14782) https://github.com/python/cpython/commit/bf8e82f976b37856c7d35cdf88a238cb6f57fe65 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 08:16:17 2019 From: report at bugs.python.org (Nikita Ilyasov) Date: Tue, 23 Jul 2019 12:16:17 +0000 Subject: [issue37658] In some cases asyncio.wait_for can lead to socket leak. Message-ID: <1563884177.4.0.19779936427.issue37658@roundup.psfhosted.org> New submission from Nikita Ilyasov : In some cases `asyncio.wait_for` can lead to socket leak. Condensed example: ```python async def _create_connection(timeout=60, ssl_obj): loop = asyncio.get_event_loop() connector = loop.create_connection(MyEchoClientProtocol, '127.0.0.1', 5000, ssl=ssl_obj) connector = asyncio.ensure_future(connector) tr, pr = await asyncio.wait_for(connector, timeout=timeout, loop=loop) return tr, pr async def main(): ... res = await asyncio.wait_for(_acquire_impl(), timeout=timeout, loop=loop) ``` If my understanding is correct `wait_for` should work in exactly 2 ways 1. the inner task is completed and the outer task will receive the result ? transport and protocol in this case 2. The inner task is cancelled and no connection was established I provided source code for client and server so the problem can be easily reproduced on your system. certificate and key can be easily generated with `minica` I found out that if I catch `CancelledError` and add a `done_callback` to the inner task, like so: ```python try: tr, pr = await asyncio.wait_for(connector, timeout=timeout, loop=loop) return tr, pr except asyncio.CancelledError as e: connector.add_done_callback(_done_callback) raise e ``` then inside of `_done_callback` I can access the transport and protocol object and close the transport manually to prevent leaking. I run `netstat -a | grep 5000 | grep ESTAB | awk '{ print $5 }' | sort | uniq -c | grep 5000` after the script is done and there are many unclosed connections. The output depends on your hardware so you might need to tweak the timeout parameter ---------- components: asyncio files: example.py messages: 348328 nosy: Nikita Ilyasov, asvetlov, yselivanov priority: normal severity: normal status: open title: In some cases asyncio.wait_for can lead to socket leak. type: resource usage versions: Python 3.6, Python 3.7 Added file: https://bugs.python.org/file48500/example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 08:19:39 2019 From: report at bugs.python.org (Nikita Ilyasov) Date: Tue, 23 Jul 2019 12:19:39 +0000 Subject: [issue37658] In some cases asyncio.wait_for can lead to socket leak. In-Reply-To: <1563884177.4.0.19779936427.issue37658@roundup.psfhosted.org> Message-ID: <1563884379.83.0.730881000096.issue37658@roundup.psfhosted.org> Nikita Ilyasov added the comment: server example: https://gist.github.com/hexrain/bc92aa70eebc229365f0ce4bcccf7fc4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 08:21:15 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 23 Jul 2019 12:21:15 +0000 Subject: [issue37639] What happened to StreamReaderProtocol? In-Reply-To: <1563690502.8.0.178021194251.issue37639@roundup.psfhosted.org> Message-ID: <1563884475.83.0.396712411119.issue37639@roundup.psfhosted.org> Andrew Svetlov added the comment: Hi. StreamReaderProtocol was leaked implementation detail, not a public reusable class. The protocol has too many "gray zones" where its implementation is not well defined or even wrong. This situation prevents us from stream API improvements which require changing these implementation details. Keeping full backward compatibility literally means doubling source code, it makes no sense for "private" API but adds a huge maintenance burden. We are striving to remove it from public API step by step: documentation-deprecation-removal. If you really need the class -- please copy-paste the source lines into your project and use the copy on your own. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 08:22:28 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 23 Jul 2019 12:22:28 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1563884548.69.0.388421143601.issue17535@roundup.psfhosted.org> Tal Einat added the comment: New changeset 7123ea009b0b004062d91f69859bddf422c34ab4 by Tal Einat in branch 'master': bpo-17535: IDLE editor line numbers (GH-14030) https://github.com/python/cpython/commit/7123ea009b0b004062d91f69859bddf422c34ab4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 08:23:09 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jul 2019 12:23:09 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1563884589.81.0.416372142231.issue17535@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14691 pull_request: https://github.com/python/cpython/pull/14916 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 09:04:31 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jul 2019 13:04:31 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1563887071.81.0.754079331298.issue17535@roundup.psfhosted.org> miss-islington added the comment: New changeset 1da6a313ddaa269dddce303cb03ca95fe57d0c85 by Miss Islington (bot) in branch '3.8': bpo-17535: IDLE editor line numbers (GH-14030) https://github.com/python/cpython/commit/1da6a313ddaa269dddce303cb03ca95fe57d0c85 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 09:07:01 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 23 Jul 2019 13:07:01 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1563887221.73.0.870256486554.issue17535@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +14692 pull_request: https://github.com/python/cpython/pull/14917 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 09:27:21 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 23 Jul 2019 13:27:21 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1563888441.95.0.55386031846.issue17535@roundup.psfhosted.org> Tal Einat added the comment: New changeset e9ec1663d8fa0b3829add14e784107482af8dacb by Tal Einat in branch '3.7': [3.7] bpo-17535: IDLE editor line numbers (GH-14030) https://github.com/python/cpython/commit/e9ec1663d8fa0b3829add14e784107482af8dacb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 09:35:22 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 23 Jul 2019 13:35:22 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1563888922.76.0.343627291325.issue17535@roundup.psfhosted.org> Tal Einat added the comment: PR Merged! This will be in 3.8.0 and 3.7.5. Thanks to everyone who worked on this and took part in the discussion! Special thanks to Saimadhav for preparing a patch and iterating on it several times; I picked up the work from where he left off, and it was a great starting point. Special thanks also to Terry for stewarding the development of IDLE in general, and for working with me actively on the PR for this over the past month and a half. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 10:46:04 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 23 Jul 2019 14:46:04 +0000 Subject: [issue37657] ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed. In-Reply-To: <1563857026.02.0.43954136156.issue37657@roundup.psfhosted.org> Message-ID: <1563893164.23.0.945731952115.issue37657@roundup.psfhosted.org> Ned Deily added the comment: Sorry, I have no idea why you saw those messages. Neither grip nor docopt are used directly by the python.org macOS installer and, after a quick glance, I didn't see anywhere where the certifi package used them. Did you have an earlier alpha or beta version of 3.8.0 installed along with third-party packages (via python3.8 -m pip install, for example)? Unless you can show how to reproduce this behavior, there is little we can do about it. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 11:41:12 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jul 2019 15:41:12 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1563896472.64.0.270593766586.issue37587@roundup.psfhosted.org> Steve Dower added the comment: Marco has a newer patch with better performance that we came up with at the sprints, but apparently it hasn't been pushed yet. Hopefully he'll get that up soon and we can review it instead - the current PR wasn't as reliably good as initial testing suggested. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 11:42:40 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jul 2019 15:42:40 +0000 Subject: [issue30237] Access violation due to CancelSynchronousIo of console read In-Reply-To: <1493747167.63.0.66545140377.issue30237@psf.upfronthosting.co.za> Message-ID: <1563896560.22.0.677148202309.issue30237@roundup.psfhosted.org> Steve Dower added the comment: Yep, thanks for the ping! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 11:44:37 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jul 2019 15:44:37 +0000 Subject: [issue31546] PyOS_InputHook is not called when waiting for input() in Windows In-Reply-To: <1506010382.42.0.274746719926.issue31546@psf.upfronthosting.co.za> Message-ID: <1563896677.55.0.464606089241.issue31546@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 12:01:04 2019 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 23 Jul 2019 16:01:04 +0000 Subject: [issue37653] make install fails In-Reply-To: <1563809636.35.0.686043283541.issue37653@roundup.psfhosted.org> Message-ID: <1563897664.9.0.64355430708.issue37653@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 12:12:14 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 23 Jul 2019 16:12:14 +0000 Subject: [issue37653] make install fails In-Reply-To: <1563809636.35.0.686043283541.issue37653@roundup.psfhosted.org> Message-ID: <1563898334.37.0.144966818759.issue37653@roundup.psfhosted.org> Ned Deily added the comment: New changeset 387c3c5a04bc62cfa7c9dabe206ba2c582a71c05 by Ned Deily (Erlend Egeberg Aasland) in branch 'master': bpo-37653: Fix libinstall target in Makefile (GH-14911) https://github.com/python/cpython/commit/387c3c5a04bc62cfa7c9dabe206ba2c582a71c05 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 12:15:24 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 23 Jul 2019 16:15:24 +0000 Subject: [issue37653] make install fails In-Reply-To: <1563809636.35.0.686043283541.issue37653@roundup.psfhosted.org> Message-ID: <1563898524.12.0.724819894531.issue37653@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the PR! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 12:21:11 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 23 Jul 2019 16:21:11 +0000 Subject: [issue37468] Don't install wininst*.exe on non-Windows platforms In-Reply-To: <1561984669.65.0.392603753819.issue37468@roundup.psfhosted.org> Message-ID: <1563898871.49.0.00642301778936.issue37468@roundup.psfhosted.org> Ned Deily added the comment: The merged PR broke "make libinstall" and, hence, "make install" with at least some versions of make. See Issue37653. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 12:53:57 2019 From: report at bugs.python.org (Aymeric Augustin) Date: Tue, 23 Jul 2019 16:53:57 +0000 Subject: [issue37639] What happened to StreamReaderProtocol? In-Reply-To: <1563690502.8.0.178021194251.issue37639@roundup.psfhosted.org> Message-ID: <1563900837.69.0.370401861859.issue37639@roundup.psfhosted.org> Change by Aymeric Augustin : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 12:57:51 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 23 Jul 2019 16:57:51 +0000 Subject: [issue37656] Can't pip install because of bisect_left In-Reply-To: <1563835633.66.0.295027730985.issue37656@roundup.psfhosted.org> Message-ID: <1563901071.46.0.656685905204.issue37656@roundup.psfhosted.org> Brett Cannon added the comment: I'm going to close this as this is more likely an Anaconda or path problem than a CPython problem. But as Raymond said, chances are you have some other file named bisect on your sys.path. ---------- nosy: +brett.cannon resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 13:17:40 2019 From: report at bugs.python.org (James Xu) Date: Tue, 23 Jul 2019 17:17:40 +0000 Subject: [issue37659] subprocess.list2cmdline() should not escape wrapping single/double quotes Message-ID: <1563902260.7.0.339582644993.issue37659@roundup.psfhosted.org> New submission from James Xu : While working on our project, we have noticed that for `subprocess.Popen(command, ...)`, when `command` is a string that contains escaped double quote, for example, `command = '"path to executable" --flag arg'`, this works fine. However, when command is changed to `shlex.split(command, posix=False)`, the Popen command fails. Looking a bit into the source code, it seems that for the command above, ``` >>> shlex.split('"path to executable" --flag arg', posix=False) ['"path to executable"', '--flag', 'arg'] ``` and when this array of strings gets passed into `Popen`, the escaped double quote gets escaped again, since `subprocess.list2cmdline` does not check if a pair of double quote or single quote are wrapping the entire string `arg`. And this is the same behavior for both py2 and py3, https://github.com/python/cpython/blob/master/Lib/subprocess.py#L508. As a result, upon execution the command becomes, `'"\\"path to executable\\"" --flag arg'` example: ``` >>> sp.list2cmdline(['"do things"']) '"\\"do things\\""' >>> sp.list2cmdline(['do things']) '"do things"' > ``` ---------- components: Windows messages: 348342 nosy: kejxu, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: subprocess.list2cmdline() should not escape wrapping single/double quotes type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 14:22:23 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 23 Jul 2019 18:22:23 +0000 Subject: [issue37659] subprocess.list2cmdline() should not escape wrapping single/double quotes In-Reply-To: <1563902260.7.0.339582644993.issue37659@roundup.psfhosted.org> Message-ID: <1563906143.36.0.411811129903.issue37659@roundup.psfhosted.org> Eryk Sun added the comment: The behavior of list2cmdline with double quotes is intentional. It supports passing literal quote characters in the command line for applications that use VC++ argv parsing, WINAPI CommandLineToArgvW, or in general any application that adheres to these rules when parsing its command line [1]. (Not all do -- such as cmd.exe -- in which case we have to pass a custom command line instead of relying on listcmdline.) If we have a command line already, then generally the best thing to do in Windows is pass it as is. Don't split it and rebuild it via list2mdline. The problem I see is using shlex.split in Windows. posix=False doesn't mean it can handle Windows command lines properly. The shlex module is meant to tokenize a command line like a Unix shell. With posix=False, quote characters aren't stripped out, i.e. it preserves the double quotes in '"spam"'. But with posix=True it's just as wrong for Windows because it tokenizes "'spam & eggs'" as ['spam & eggs']. This is wrong because single quotes generally have no special meaning in Windows command lines (certainly not for CreateProcessW, CommandLineToArgvW, and VC++ argv handling). They should be retained as literal characters. Thus the proper result in Windows is "'spam & eggs'" -> ["'spam", '&', "eggs'"]. [1]: https://docs.microsoft.com/en-us/cpp/cpp/parsing-cpp-command-line-arguments ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 14:39:02 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 23 Jul 2019 18:39:02 +0000 Subject: [issue37660] Drop support for Aspen magic directories in venv's activate script Message-ID: <1563907142.04.0.0759083175795.issue37660@roundup.psfhosted.org> New submission from Brett Cannon : Or at least update the comment as the URL at https://github.com/python/cpython/blob/master/Lib/venv/scripts/common/activate#L62 is a 404 and the domain seems to be a news site in Asia now (http://www.zetadev.com/). ---------- components: Library (Lib) messages: 348344 nosy: brett.cannon priority: low severity: normal status: open title: Drop support for Aspen magic directories in venv's activate script type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 14:40:49 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 23 Jul 2019 18:40:49 +0000 Subject: [issue37660] Drop support for Aspen magic directories in venv's activate scripts In-Reply-To: <1563907142.04.0.0759083175795.issue37660@roundup.psfhosted.org> Message-ID: <1563907249.2.0.349943211272.issue37660@roundup.psfhosted.org> Brett Cannon added the comment: And this code and comment exists outside of just the bash activation script: https://github.com/python/cpython/blob/master/Lib/venv/scripts/posix/activate.fish#L62 ---------- title: Drop support for Aspen magic directories in venv's activate script -> Drop support for Aspen magic directories in venv's activate scripts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 15:17:07 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 23 Jul 2019 19:17:07 +0000 Subject: [issue37661] venv activation scripts erroneously check if __VENV_PROMPT__ is defined Message-ID: <1563909427.85.0.687567591149.issue37661@roundup.psfhosted.org> New submission from Brett Cannon : If you look at https://github.com/python/cpython/blob/master/Lib/venv/__init__.py#L112-L113 you will see that the prompt context for a virtual environment is always set. Then if you look at the string substitutions for the activation scripts you will also see that the string substitution for __VENV_PROMPT__ is thus always done. This is an issue as it means that for the fish and bash activation scripts they have erroneous checks for custom prompts. I.e. https://github.com/python/cpython/blob/master/Lib/venv/scripts/posix/activate.fish#L55 for fish and https://github.com/python/cpython/blob/master/Lib/venv/scripts/common/activate#L57 for bash will never fail, halting any other further checks unless one creates a custom EnvBuilder class which will make sure the prompt context stays empty all the way to string substitution. This impacts the colouring of the prompt in fish as that's only done if there is no default prompt (which is never true). ---------- components: Library (Lib) messages: 348346 nosy: brett.cannon, vinay.sajip priority: normal severity: normal status: open title: venv activation scripts erroneously check if __VENV_PROMPT__ is defined type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 15:17:26 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 23 Jul 2019 19:17:26 +0000 Subject: [issue37660] Drop support for Aspen magic directories in venv's activate scripts In-Reply-To: <1563907142.04.0.0759083175795.issue37660@roundup.psfhosted.org> Message-ID: <1563909446.85.0.215724606512.issue37660@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 15:42:18 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Jul 2019 19:42:18 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1563910938.86.0.817546845623.issue32912@roundup.psfhosted.org> Raymond Hettinger added the comment: I'm starting to see this error even for plain text strings in existing code: >>> dunder_methods = ''' d[k] d.__getitem__(k) -> value \--> d.__missing__(k) -> value \-----------> raise KeyError(k) d[k] = v d.__setitem__(k, v) -> None del d[k] d.__delitem__(k) -> None ''' SyntaxError: invalid escape sequence \- These not easily suppressed messages are really annoying. We don't have to inflict this on our users. IMO, this is the least user friendly change to Python 3.8 and as far as I can tell, it is entirely unnecessary (we've lived without it for 28+ years). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 15:46:52 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Jul 2019 19:46:52 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1563911212.27.0.0749385004828.issue32912@roundup.psfhosted.org> Raymond Hettinger added the comment: AFAICT, I'm currently one of the only people in the world using the 3.8 beta for my work on a daily basis. I've encountered these warnings multiple times in multiple contexts. If we think other people won't experience this recurring annoyance, we're in denial. The entire point of beta testing is to discover problems like this. However, the participants in this thread seem inclined to ignore the evidence and persist with the idea that inflicting this on users makes the language better. Respectfully, I disagree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 15:53:06 2019 From: report at bugs.python.org (Aaron Meurer) Date: Tue, 23 Jul 2019 19:53:06 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1563911586.34.0.360859511224.issue32912@roundup.psfhosted.org> Aaron Meurer added the comment: Raymond, are you in agreement that these warnings should at some point eventually become syntax errors? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:05:55 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 23 Jul 2019 20:05:55 +0000 Subject: [issue29446] Improve tkinter 'import *' situation In-Reply-To: <1486243465.34.0.0929989866435.issue29446@psf.upfronthosting.co.za> Message-ID: <1563912355.3.0.425869828611.issue29446@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14693 pull_request: https://github.com/python/cpython/pull/14919 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:15:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 23 Jul 2019 20:15:04 +0000 Subject: [issue29446] Improve tkinter 'import *' situation In-Reply-To: <1486243465.34.0.0929989866435.issue29446@psf.upfronthosting.co.za> Message-ID: <1563912904.29.0.485551842995.issue29446@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset c6fd6c83b70df76421d05a7628367e64a2f83589 by Terry Jan Reedy in branch 'master': bpo-29446: IDLE -- add explicit imports (GH-14919) https://github.com/python/cpython/commit/c6fd6c83b70df76421d05a7628367e64a2f83589 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:15:18 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jul 2019 20:15:18 +0000 Subject: [issue29446] Improve tkinter 'import *' situation In-Reply-To: <1486243465.34.0.0929989866435.issue29446@psf.upfronthosting.co.za> Message-ID: <1563912918.17.0.716524677283.issue29446@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14694 pull_request: https://github.com/python/cpython/pull/14920 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:15:25 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Jul 2019 20:15:25 +0000 Subject: [issue29446] Improve tkinter 'import *' situation In-Reply-To: <1486243465.34.0.0929989866435.issue29446@psf.upfronthosting.co.za> Message-ID: <1563912925.37.0.090688062674.issue29446@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14695 pull_request: https://github.com/python/cpython/pull/14921 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:23:47 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 23 Jul 2019 20:23:47 +0000 Subject: [issue29446] Improve tkinter 'import *' situation In-Reply-To: <1486243465.34.0.0929989866435.issue29446@psf.upfronthosting.co.za> Message-ID: <1563913427.05.0.527078173216.issue29446@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset fc63d5a361f7d20282019cad84336a242c124267 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-29446: IDLE -- add explicit imports (GH-14919) (GH-14920) https://github.com/python/cpython/commit/fc63d5a361f7d20282019cad84336a242c124267 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:25:25 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 23 Jul 2019 20:25:25 +0000 Subject: [issue37662] Document venv.EnvBuilder.upgrade_dependencies() Message-ID: <1563913525.16.0.930618817758.issue37662@roundup.psfhosted.org> New submission from Brett Cannon : The upgrade_deps parameter to EnvBuilder exists and venv.EnvBuilder.create() calls self.upgrade_dependencies(), but that method isn't documented anywhere. ---------- messages: 348352 nosy: brett.cannon, vinay.sajip priority: normal severity: normal status: open title: Document venv.EnvBuilder.upgrade_dependencies() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:37:03 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 23 Jul 2019 20:37:03 +0000 Subject: [issue29446] Improve tkinter 'import *' situation In-Reply-To: <1486243465.34.0.0929989866435.issue29446@psf.upfronthosting.co.za> Message-ID: <1563914223.12.0.105012997791.issue29446@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset aee260f1c4d32bf67edec209d949294d4dc403c1 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-29446: IDLE -- add explicit imports (GH-14919) (#14921) https://github.com/python/cpython/commit/aee260f1c4d32bf67edec209d949294d4dc403c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:40:18 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Jul 2019 20:40:18 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1563914418.76.0.418876368895.issue32912@roundup.psfhosted.org> Raymond Hettinger added the comment: > Raymond, are you in agreement that these warnings should > at some point eventually become syntax errors? I used to think so, but after experiencing the incessant warnings, I question the value. In inactive sessions (either with the regular REPL or the ipython REPL), they are a recurring annoyance that interferes with data exploration live demos. Perhaps, this should be left for a lint or code analysis tool. Why should we intentionally break code that is currently working fine. Another issue that I've encountered is that ASCII art becomes gets flagged. Switching to a raw string then kills the unicode escape sequences. This isn't really a "Raymond doesn't like this" concern. I think anyone who starts using 3.8 on a daily basis for non-toy examples will constantly run into this. Possibly, it catches a real error, but most often it will just be a recurring distractor, especially when teaching Python. All instructors and runners of live demos will need to memorize exactly which characters require an escape and which don't -- it creates a new burden that didn't exist before. And if the source of the problem is in an external library, the result is unactionable by the user, merely making their experience unpleasant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:41:06 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 23 Jul 2019 20:41:06 +0000 Subject: [issue37663] Making venv activation script prompts consistent Message-ID: <1563914466.51.0.723098783517.issue37663@roundup.psfhosted.org> New submission from Brett Cannon : There are five activation scripts and they are all do things differently when it comes to prompt manipulation. Standardizing on one set of semantics would probably be good for consistency and so people know what to expect regardless of their shell. Currently the various semantics are as follows (see subdirectories in https://github.com/python/cpython/tree/master/Lib/venv/scripts for the code): - PowerShell: use __VENV_PROMPT__, make it green - bash: use __VENV_PROMPT__ if defined (which is nearly true; bpo-37661), else if virtual env in a directory named "__" (for some defunked software named Aspen; bpo-37660) then use "[dir]", else "(dir)" - Command Prompt: use __VENV_PROMPT__ - csh: use __VENV_NAME__ if defined, else calculate name and use "[dir]" - fish: same as bash, except if not using __VENV_PROMPT__ then use white text on a blue background So the variances/questions are: 1. Always use __VENV_PROMPT__ and don't bother testing? (bpo-37661 suggests we should, or else come up with a new way to tell whether a custom prompt was provided) 2. Always use colour regardless of whether the prompt is custom? (I vote "yes"; don't care about what the colours happen to be) 3. Parentheses or square brackets? (Due to bpo-37661 I vote for parentheses since that's what people are used to) ---------- components: Library (Lib) messages: 348355 nosy: brett.cannon, vinay.sajip priority: normal severity: normal status: open title: Making venv activation script prompts consistent type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:41:20 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 23 Jul 2019 20:41:20 +0000 Subject: [issue37663] Making venv activation script prompts consistent In-Reply-To: <1563914466.51.0.723098783517.issue37663@roundup.psfhosted.org> Message-ID: <1563914480.82.0.187625140404.issue37663@roundup.psfhosted.org> Change by Brett Cannon : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 16:41:48 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 23 Jul 2019 20:41:48 +0000 Subject: [issue37663] Making venv activation script prompts consistent In-Reply-To: <1563914466.51.0.723098783517.issue37663@roundup.psfhosted.org> Message-ID: <1563914508.35.0.830889112463.issue37663@roundup.psfhosted.org> Change by Brett Cannon : ---------- dependencies: +Drop support for Aspen magic directories in venv's activate scripts, venv activation scripts erroneously check if __VENV_PROMPT__ is defined _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 17:51:27 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Jul 2019 21:51:27 +0000 Subject: [issue37664] Update bundled pip and setuptools Message-ID: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> New submission from Steve Dower : Can we have a newer bundled version of pip for 3.8/3.9? In particular, I'd really like to be able to use the new location for a pip.ini inside of sys.prefix, as it will fix the problems with "python3 -m pip" on Windows when obtained from the Store (and we want to default to --user). ---------- messages: 348356 nosy: Marcus.Smith, dstufft, ncoghlan, paul.moore, steve.dower priority: normal severity: normal status: open title: Update bundled pip and setuptools versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 19:40:53 2019 From: report at bugs.python.org (Aaron Meurer) Date: Tue, 23 Jul 2019 23:40:53 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1563925253.65.0.239468327291.issue32912@roundup.psfhosted.org> Aaron Meurer added the comment: Well paradoxically, the bugs that this prevents are the ones it doesn't warn about. If someone writes '\tan(x)' thinking it is a string representing a LaTeX formula for the tangent of x, they won't realize that they actually created a string with a tab plus "an(x)". So actually I would argue that the end goal *is* to make people aware of which escape characters exist, or at the very least, always make strings raw if there's even the remotest chance they will contain a backslash character. Is it the best way to go about this? I don't know. The whole thing sort of makes me think raw strings should have been the default, but it's obviously too late to change that. I personally don't feel strongly about the warnings being enabled by default or not. My big gripe is that if you actually want the warnings they are difficult to get in a reproducible way. I'm actually surprised they are so annoying for you. Once a py file is compiled into a pyc file the warnings completely disappear, even if you want them! The fact that you can't use a real escape sequence in a raw string is annoying but not the end of the world given that it's trivial to concatenate strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 19:42:44 2019 From: report at bugs.python.org (Arun Sharma) Date: Tue, 23 Jul 2019 23:42:44 +0000 Subject: [issue37665] threading.TIMEOUT_MAX integer overflow on 32-bit builds with threading.Thread.join Message-ID: <1563925364.59.0.529540614468.issue37665@roundup.psfhosted.org> New submission from Arun Sharma : threading's TIMEOUT_MAX constant causes overflows when used as the timeout for threading.Thread.join on a 32-bit platform, like a Raspberry PI running Raspbian (2019-07-10-raspbian-buster). The underlying code uses sem_timedwait. The timespec on this platform resolves seconds to a 32-bit integer, adding the current time to the timeout to get a deadline. ==== >>> import threading >>> threading.TIMEOUT_MAX 9223372036.0 ==== The deadline is larger than the int32 UNIX Epoch and results in an overflow. Just changing the threading.TIMEOUT_MAX to be based on the time left until the UNIX Epoch would require changing the timeout over the duration of the program and would not be very viable as the Epoch gets closer. ---------- files: timeout_max_32_bit.py messages: 348358 nosy: Arun Sharma priority: normal severity: normal status: open title: threading.TIMEOUT_MAX integer overflow on 32-bit builds with threading.Thread.join type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48501/timeout_max_32_bit.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 19:54:18 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 23 Jul 2019 23:54:18 +0000 Subject: [issue37666] urllib.requests.urlopen doesn't support cadata= Message-ID: <1563926058.03.0.180495297284.issue37666@roundup.psfhosted.org> New submission from Gregory P. Smith : The underlying https://docs.python.org/3/library/ssl.html#ssl.SSLContext.load_verify_locations API supports cafile, capath and cadata. urlopen() only offers up cafile and capath. It should also support cadata for completeness. This matters for applications that embed their root certificate pem as data. Requiring the user to write that to a file or ship that as a file just so the library can read it rather than passing it in as a string is gross. Lets add cadata support to urlopen(). ---------- assignee: christian.heimes components: Library (Lib), SSL messages: 348359 nosy: christian.heimes, gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: urllib.requests.urlopen doesn't support cadata= type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 20:21:26 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Jul 2019 00:21:26 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1563927685.98.0.233488925741.issue17535@roundup.psfhosted.org> Terry J. Reedy added the comment: A note on the first 3 comments in msg223086 of 2014-07-15. 1. Canvas versus Text: The prototype posted by Brian Oakley on SO had to use a Canvas because it was meant to work even with texts with multiple fonts and in-line widgets. IDLE's editor, intended mainly for .py files, does not allow either. As long as line numbers use the same font as the text, they have the same height and vertical spacing as the text. I checked that this remains true when non-latin character sets are mixed in. I pasted the config font sample into a numbered editor and it worked perfectly. At least on Windows, tk fonts are vertically monospaced at least for this sample, and I assume for all. To do this, either ascii/latin/etc lines are over-spaced or hanji/kanji/hangul lines are underspaced. Source Code Pro, which I normally use, does the former. Courier does the latter. 2. Call versus Event notification. IDLE's menu and hot keys generate pseudoevents handled by one event handler. Some tk widgets generate widget-specific pseudoevent that can be handled by any handler. IDLE's config dialog pushes font change notifications by calling text methods that amount to event handlers. It can do this because 'listed windows' are registered as listeners by being on the list of such instances. I suggested 5 years ago that we might switch font change notification to events. I don't think so now. The current system allows control of the order in which texts within a code frame respond to config changes. It works better if code contexts, when present, change before the main text. 3. Line number foreground and background. We made them configurable to user preference. Possibilities are: same as text; toned down version of text (for instance, black on white to dark gray on light gray), or contrasting with text. (I discussed 4. global versus local setting on 7/21.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 22:57:25 2019 From: report at bugs.python.org (Gordon Messmer) Date: Wed, 24 Jul 2019 02:57:25 +0000 Subject: [issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8 In-Reply-To: <1498409939.21.0.261757462715.issue30755@psf.upfronthosting.co.za> Message-ID: <1563937045.07.0.673770204842.issue30755@roundup.psfhosted.org> Change by Gordon Messmer : ---------- keywords: +patch pull_requests: +14696 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14925 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 23:19:40 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 24 Jul 2019 03:19:40 +0000 Subject: [issue37665] threading.TIMEOUT_MAX integer overflow on 32-bit builds with threading.Thread.join In-Reply-To: <1563925364.59.0.529540614468.issue37665@roundup.psfhosted.org> Message-ID: <1563938380.88.0.867888837183.issue37665@roundup.psfhosted.org> Zackery Spytz added the comment: See also bpo-33632. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 23:23:46 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Jul 2019 03:23:46 +0000 Subject: [issue37666] urllib.requests.urlopen doesn't support cadata= In-Reply-To: <1563926058.03.0.180495297284.issue37666@roundup.psfhosted.org> Message-ID: <1563938626.6.0.354275684007.issue37666@roundup.psfhosted.org> Gregory P. Smith added the comment: Probably nevermind on implementing this: ssl_context = ssl.create_default_context(cadata=...) urllib.request.urlopen(..., context=ssl_context) Works fine. It might be worth a note in the urlopen() docs if anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 23:49:54 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 24 Jul 2019 03:49:54 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1563940194.98.0.0428662268412.issue36044@roundup.psfhosted.org> Zackery Spytz added the comment: Travis only runs 40 tests after this change (https://travis-ci.org/python/cpython/jobs/562362678). ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 00:01:15 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 24 Jul 2019 04:01:15 +0000 Subject: [issue35771] IDLE: Fix tooltip Hovertiptest failure In-Reply-To: <1547794267.4.0.582455332849.issue35771@roundup.psfhosted.org> Message-ID: <1563940875.85.0.311492438071.issue35771@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +14697 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14926 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 00:04:02 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 24 Jul 2019 04:04:02 +0000 Subject: [issue35771] IDLE: Fix tooltip Hovertiptest failure In-Reply-To: <1547794267.4.0.582455332849.issue35771@roundup.psfhosted.org> Message-ID: <1563941042.78.0.403688855961.issue35771@roundup.psfhosted.org> Zackery Spytz added the comment: For what it's worth, I see this failure often when running the test suite. I have created a pull request to increase the delay. ---------- nosy: +ZackerySpytz versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 00:10:58 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Jul 2019 04:10:58 +0000 Subject: [issue37667] test.regrtest is now only running 40 tests Message-ID: <1563941458.91.0.702093018542.issue37667@roundup.psfhosted.org> New submission from Gregory P. Smith : After the PR for https://bugs.python.org/issue36044 when in, see the comment in the issue. test.regrtest is now only running 40 tests. that means all of our CI is failing to run most of the test suites. ---------- components: Tests messages: 348365 nosy: gregory.p.smith, lukasz.langa priority: release blocker severity: normal stage: needs patch status: open title: test.regrtest is now only running 40 tests type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 00:11:18 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Jul 2019 04:11:18 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1563941478.89.0.317099718201.issue36044@roundup.psfhosted.org> Gregory P. Smith added the comment: tracking that as a release blocker in https://bugs.python.org/issue37667 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 00:16:06 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Jul 2019 04:16:06 +0000 Subject: [issue37667] test.regrtest is now only running 40 tests In-Reply-To: <1563941458.91.0.702093018542.issue37667@roundup.psfhosted.org> Message-ID: <1563941766.93.0.994515341263.issue37667@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 00:17:34 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Jul 2019 04:17:34 +0000 Subject: [issue37667] test.regrtest is now only running 40 tests In-Reply-To: <1563941458.91.0.702093018542.issue37667@roundup.psfhosted.org> Message-ID: <1563941854.38.0.728779592483.issue37667@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +14698 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14927 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 00:24:56 2019 From: report at bugs.python.org (Gordon Messmer) Date: Wed, 24 Jul 2019 04:24:56 +0000 Subject: [issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8 In-Reply-To: <1498409939.21.0.261757462715.issue30755@psf.upfronthosting.co.za> Message-ID: <1563942296.23.0.479732198666.issue30755@roundup.psfhosted.org> Gordon Messmer added the comment: As an example, let's consider dnf's i18n setup: try: dnf.pycomp.setlocale(locale.LC_ALL, '') except locale.Error: # default to C.UTF-8 or C locale if we got a failure. try: dnf.pycomp.setlocale(locale.LC_ALL, 'C.UTF-8') os.environ['LC_ALL'] = 'C.UTF-8' except locale.Error: dnf.pycomp.setlocale(locale.LC_ALL, 'C') os.environ['LC_ALL'] = 'C' If setting the environment-specified locale fails, dnf will attempt to set the locale to C.UTF-8, and if that fails it will set the locale to C. This seems like an ideal process. If the expected locale is missing, dnf will attempt to at least use UTF-8, before falling back to the C locale. Unfortunately, because of the alias, this process will be unable to set the 'C.UTF-8' locale on systems which do not have the 'en_US' locale installed. This renders system support for 'C.UTF-8' unusable when no locales are installed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 00:35:34 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 04:35:34 +0000 Subject: [issue37667] test.regrtest is now only running 40 tests In-Reply-To: <1563941458.91.0.702093018542.issue37667@roundup.psfhosted.org> Message-ID: <1563942934.68.0.570567588036.issue37667@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14699 pull_request: https://github.com/python/cpython/pull/14928 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 00:38:03 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Jul 2019 04:38:03 +0000 Subject: [issue37667] test.regrtest is now only running 40 tests In-Reply-To: <1563941458.91.0.702093018542.issue37667@roundup.psfhosted.org> Message-ID: <1563943083.51.0.0518945701801.issue37667@roundup.psfhosted.org> Gregory P. Smith added the comment: fixed, but not marking closed until the 3.8 automerge happens. ---------- resolution: -> fixed stage: patch review -> commit review versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 01:11:13 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Jul 2019 05:11:13 +0000 Subject: [issue37667] test.regrtest is now only running 40 tests In-Reply-To: <1563941458.91.0.702093018542.issue37667@roundup.psfhosted.org> Message-ID: <1563945073.34.0.596258775814.issue37667@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +14700 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/14929 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 01:13:18 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Jul 2019 05:13:18 +0000 Subject: [issue37667] test.regrtest is now only running 40 tests In-Reply-To: <1563941458.91.0.702093018542.issue37667@roundup.psfhosted.org> Message-ID: <1563945198.5.0.134739856445.issue37667@roundup.psfhosted.org> Gregory P. Smith added the comment: A regression test for this type of situation is in the works in the open PR. ---------- stage: patch review -> commit review status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 01:28:54 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Jul 2019 05:28:54 +0000 Subject: [issue37667] test.regrtest is now only running 40 tests In-Reply-To: <1563941458.91.0.702093018542.issue37667@roundup.psfhosted.org> Message-ID: <1563946134.08.0.78724149626.issue37667@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset e95ac20103437d8099fb91cd4468ab030852f3b7 by Gregory P. Smith in branch 'master': bpo-37667: Add regression test for regrtest. (GH-14929) https://github.com/python/cpython/commit/e95ac20103437d8099fb91cd4468ab030852f3b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 01:28:59 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 05:28:59 +0000 Subject: [issue37667] test.regrtest is now only running 40 tests In-Reply-To: <1563941458.91.0.702093018542.issue37667@roundup.psfhosted.org> Message-ID: <1563946139.82.0.142217773434.issue37667@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14701 pull_request: https://github.com/python/cpython/pull/14930 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 02:12:57 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 06:12:57 +0000 Subject: [issue37667] test.regrtest is now only running 40 tests In-Reply-To: <1563941458.91.0.702093018542.issue37667@roundup.psfhosted.org> Message-ID: <1563948777.61.0.394282731527.issue37667@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14702 pull_request: https://github.com/python/cpython/pull/14931 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 02:30:49 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 06:30:49 +0000 Subject: [issue37667] test.regrtest is now only running 40 tests In-Reply-To: <1563941458.91.0.702093018542.issue37667@roundup.psfhosted.org> Message-ID: <1563949849.79.0.863134536996.issue37667@roundup.psfhosted.org> miss-islington added the comment: New changeset 9d54de16589b9d0f073093fb90a8c7040224335a by Miss Islington (bot) in branch '3.8': bpo-37667: Add regression test for regrtest. (GH-14929) https://github.com/python/cpython/commit/9d54de16589b9d0f073093fb90a8c7040224335a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 02:31:12 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Jul 2019 06:31:12 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1563949872.9.0.156636611992.issue17535@roundup.psfhosted.org> Terry J. Reedy added the comment: After-thought test 2: proportional fonts* work fine. Nearly all have monospaced digits, with extra space around '1' if there is no bottom bar. So those also have nicely aligned right-justified columns in the sidebar. And the one font I found with proportional digits, Miriam Libre, still had readable numbers. * Given the PEP 8 discouragement of the sort of vertical alignment, such as one = 1 eight = 8 ten = 10 nineteen = 19 which people, including me, have done with other languages, using a proportional font with python is not nearly as crazy as some people claim, and not to be totally disregarded. The main issue is line length and what happens when someone else views the same file with a fixed-pitch font. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 02:37:11 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Jul 2019 06:37:11 +0000 Subject: [issue37666] urllib.requests.urlopen doesn't support cadata= In-Reply-To: <1563926058.03.0.180495297284.issue37666@roundup.psfhosted.org> Message-ID: <1563950231.05.0.951500972231.issue37666@roundup.psfhosted.org> Christian Heimes added the comment: Yes, that's my favorite solution. Actually I would like to deprecate and remove all TLS/SSL related arguments in favor of a single context/ssl_context argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 02:37:49 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Jul 2019 06:37:49 +0000 Subject: [issue37666] urllib.requests.urlopen doesn't support cadata= In-Reply-To: <1563926058.03.0.180495297284.issue37666@roundup.psfhosted.org> Message-ID: <1563950269.24.0.934667187914.issue37666@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 03:15:42 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Jul 2019 07:15:42 +0000 Subject: [issue35771] IDLE: Fix tooltip Hovertiptest failure In-Reply-To: <1547794267.4.0.582455332849.issue35771@roundup.psfhosted.org> Message-ID: <1563952542.65.0.253428434701.issue35771@roundup.psfhosted.org> Terry J. Reedy added the comment: I had forgotten about this, but by coincidence, it occurred again today, on 'x86 Windows7 3.7' after PR-14919 was merged. This may be the same machine as I might have left '7' off 'Windows' in the original report. The 'windows timer' is used for time.sleep. From various web articles, I read that its resolution varies from 10 to 25, defaults to 15.8 milleseconds in Win7 (this is the figure I knew years ago), and defaults to 35 microseconds in Win 10. (Not exactly agreement.) time.sleep is hardly accurate for small fractions of a second delays, and delays may be much longer. I believe that root.after does better. Zachery, what OS and version do you have? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 03:56:05 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jul 2019 07:56:05 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1563954965.13.0.575963343739.issue32912@roundup.psfhosted.org> Serhiy Storchaka added the comment: > Another issue that I've encountered is that ASCII art becomes gets flagged. Switching to a raw string then kills the unicode escape sequences. If you already use escape sequences in your ASCII art, what is the problem of using them for backslashes? > I think anyone who starts using 3.8 on a daily basis for non-toy examples will constantly run into this. What is a better solution? The deprecation warning was emitted starting from 3.6. Deprecation warnings were silent by default in 3.6, but they become more visible in 3.7. This helped some projects (which give attention to warnings in they tests) to fix real bugs. But it was not enough, so other bugs are fixed only now, when the warnings become even more visible in 3.8. We see a value of warnings, they help to fix bugs. If we rollback this change, it will cause yet undiscovered bugs be hidden for more time. In Python 3.0 we make many abrupt breaking changes at once. People complained. Here is an opposite example of very gradual change: two releases with a DeprecationWarning, few more (at least two) releases with a SyntaxWarning, and finally perhaps a SyntaxError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 05:32:54 2019 From: report at bugs.python.org (mental) Date: Wed, 24 Jul 2019 09:32:54 +0000 Subject: [issue37661] venv activation scripts erroneously check if __VENV_PROMPT__ is defined In-Reply-To: <1563909427.85.0.687567591149.issue37661@roundup.psfhosted.org> Message-ID: <1563960774.04.0.902748149652.issue37661@roundup.psfhosted.org> mental added the comment: Brett, Vinay: mind if I handle this one? I'm looking for a good first issue to tackle. In terms of solutions I propose adding short circuiting logic to the checks for custom prompts to test against the default case `({context.env_name})` ---------- nosy: +mental _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 06:30:41 2019 From: report at bugs.python.org (Hasan Diwan) Date: Wed, 24 Jul 2019 10:30:41 +0000 Subject: [issue37668] Allow individual test to be specified by "#" or "." Message-ID: <1563964241.47.0.656426706164.issue37668@roundup.psfhosted.org> New submission from Hasan Diwan : The attached patch allows for individual tests to be specified using a #. Existing tests still pass: == Tests result: SUCCESS == All 40 tests OK. Total duration: 4 min 15 sec Tests result: SUCCESS ---------- components: Tests files: python.pat messages: 348377 nosy: Hasan Diwan priority: normal severity: normal status: open title: Allow individual test to be specified by "#" or "." type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48502/python.pat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 06:45:58 2019 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 24 Jul 2019 10:45:58 +0000 Subject: [issue37666] urllib.requests.urlopen doesn't support cadata= In-Reply-To: <1563926058.03.0.180495297284.issue37666@roundup.psfhosted.org> Message-ID: <1563965158.94.0.937082025876.issue37666@roundup.psfhosted.org> Senthil Kumaran added the comment: Suggesting the use of context and deprecating `cafile=None, capath=None, cadefault=False` sounds like a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 07:07:18 2019 From: report at bugs.python.org (mental) Date: Wed, 24 Jul 2019 11:07:18 +0000 Subject: [issue37661] venv activation scripts erroneously check if __VENV_PROMPT__ is defined In-Reply-To: <1563909427.85.0.687567591149.issue37661@roundup.psfhosted.org> Message-ID: <1563966438.84.0.409135121141.issue37661@roundup.psfhosted.org> Change by mental : ---------- keywords: +patch pull_requests: +14703 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14932 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 07:10:15 2019 From: report at bugs.python.org (mental) Date: Wed, 24 Jul 2019 11:10:15 +0000 Subject: [issue37661] venv activation scripts erroneously check if __VENV_PROMPT__ is defined In-Reply-To: <1563909427.85.0.687567591149.issue37661@roundup.psfhosted.org> Message-ID: <1563966615.69.0.0381820224527.issue37661@roundup.psfhosted.org> mental added the comment: I've added a PR (#1492) since it was a simple fix. Please feel free to reject if this issue is reserved or some other fatal issue with the solution is found. Otherwise I'd love a review and a double check (mainly paranoia from not wanting to mess up). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 07:18:16 2019 From: report at bugs.python.org (mental) Date: Wed, 24 Jul 2019 11:18:16 +0000 Subject: [issue37668] Allow individual test to be specified by "#" or "." In-Reply-To: <1563964241.47.0.656426706164.issue37668@roundup.psfhosted.org> Message-ID: <1563967096.31.0.898205330093.issue37668@roundup.psfhosted.org> Change by mental : ---------- nosy: +ezio.melotti, michael.foord, rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:03:00 2019 From: report at bugs.python.org (Piotr Karkut) Date: Wed, 24 Jul 2019 12:03:00 +0000 Subject: [issue36053] pkgutil.walk_packages jumps out from given path if there is package with the same name in sys.path In-Reply-To: <1550680627.64.0.854320242724.issue36053@roundup.psfhosted.org> Message-ID: <1563969780.56.0.0907401881181.issue36053@roundup.psfhosted.org> Piotr Karkut added the comment: bump ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:03:11 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 24 Jul 2019 12:03:11 +0000 Subject: [issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs In-Reply-To: <1487007412.2.0.380189857134.issue29548@psf.upfronthosting.co.za> Message-ID: <1563969791.17.0.91508282743.issue29548@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 151b91dfd21a100ecb1eba9e293c0a8695bf3bf5 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-29548: deprecate PyEval_Call* functions (GH-14804) https://github.com/python/cpython/commit/151b91dfd21a100ecb1eba9e293c0a8695bf3bf5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:18:58 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Wed, 24 Jul 2019 12:18:58 +0000 Subject: [issue37605] CI should not depend on gmane response In-Reply-To: <1563292175.7.0.185090199306.issue37605@roundup.psfhosted.org> Message-ID: <1563970738.09.0.906184538221.issue37605@roundup.psfhosted.org> Ngalim Siregar added the comment: is it allowed to mock news.gmane.org response? if it is okay i would like to help ---------- nosy: +nsiregar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:30:27 2019 From: report at bugs.python.org (Leonardo Santagada) Date: Wed, 24 Jul 2019 12:30:27 +0000 Subject: [issue19809] Doc: subprocess should warn uses on race conditions when multiple threads spawn child processes In-Reply-To: <1385544646.44.0.340337636792.issue19809@psf.upfronthosting.co.za> Message-ID: <1563971427.93.0.743102544084.issue19809@roundup.psfhosted.org> Leonardo Santagada added the comment: This is still the case on windows as the pipes created to talk to the process might be inherited by two or more simultaneous CreateProcess calls. I've found a suggested solution to this: https://devblogs.microsoft.com/oldnewthing/20111216-00/?p=8873 By only inheriting the stdout/err/in handles and them supporting close_fds for windows. Would more users be interested in a proper patch for this? For us now we have a lock around Popen.__init__ but that obviously doesn't suport subinterpreters and other calls to CreateProcess that might happen. ---------- nosy: +santagada versions: +Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:38:05 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Jul 2019 12:38:05 +0000 Subject: [issue37668] Allow individual test to be specified by "#" or "." In-Reply-To: <1563964241.47.0.656426706164.issue37668@roundup.psfhosted.org> Message-ID: <1563971885.1.0.521713431063.issue37668@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: If I understand the patch correctly this is is the behavior of the patch ./python.exe -m unittest test#test_keyword ....... ---------------------------------------------------------------------- Ran 7 tests in 0.001s OK Do you have a good use case over why # also needs to be supported? Using "." feels more readable and its more intuitive given import statements use it and almost used throughout the language. I am also not sure how "#" will behave in different shell environments since its a common character used as to denote comments. ---------- nosy: +xtreak versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:42:34 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Jul 2019 12:42:34 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1563972154.97.0.987665438665.issue37664@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pradyunsg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:46:58 2019 From: report at bugs.python.org (=?utf-8?q?Damien_Nad=C3=A9?=) Date: Wed, 24 Jul 2019 12:46:58 +0000 Subject: [issue37669] Make mock_open return per-file content Message-ID: <1563972418.64.0.300779941937.issue37669@roundup.psfhosted.org> New submission from Damien Nad? : Let's say I have a function that opens 2 files and compare them. mock_open would not allow me to test this case, as it would return the same data for both files (through its read_data argument). I want to be able to do this in a mocked-open context: ``` with open("file1") as file1: assert file1.read() == "data1" with open("file2") as file2: assert file2.read() == "data2" ``` ---------- components: Library (Lib) messages: 348386 nosy: Anvil priority: normal severity: normal status: open title: Make mock_open return per-file content type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:52:27 2019 From: report at bugs.python.org (=?utf-8?q?Damien_Nad=C3=A9?=) Date: Wed, 24 Jul 2019 12:52:27 +0000 Subject: [issue37669] Make mock_open return per-file content In-Reply-To: <1563972418.64.0.300779941937.issue37669@roundup.psfhosted.org> Message-ID: <1563972747.49.0.730938796377.issue37669@roundup.psfhosted.org> Change by Damien Nad? : ---------- keywords: +patch pull_requests: +14705 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14933 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 10:34:35 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 24 Jul 2019 14:34:35 +0000 Subject: [issue37605] CI should not depend on gmane response In-Reply-To: <1563292175.7.0.185090199306.issue37605@roundup.psfhosted.org> Message-ID: <1563978875.15.0.948623302546.issue37605@roundup.psfhosted.org> Zachary Ware added the comment: For doctests, I would prefer to just disable some or all of the doctests in Doc/library/nntplib.rst rather than go to the effort of trying to mock things. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 10:37:54 2019 From: report at bugs.python.org (Pradyun Gedam) Date: Wed, 24 Jul 2019 14:37:54 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1563979074.68.0.223246083726.issue37664@roundup.psfhosted.org> Pradyun Gedam added the comment: I might be doing another bugfix, for https://github.com/pypa/pip/issues/6775. I don't think we've decided how to go about that issue yet. If a week isn't too long a waiting time, I'd suggest we wait for a week and then vendor whatever is the latest at that point. I'll be happy to file a PR, if we want to go ahead with this. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 11:04:57 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jul 2019 15:04:57 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1563980697.83.0.543172615679.issue37664@roundup.psfhosted.org> Steve Dower added the comment: Oh that's a nasty issue... but it sounds like you're reaching some kind of agreement. 3.8b3 is scheduled for this week, so perhaps we can take the current release for now and then update it when you make the next release? (Also Pradyun, would you like to be added to https://devguide.python.org/experts/ for pip so that you get nosied with that category? I'm happy to do that for you) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 11:16:38 2019 From: report at bugs.python.org (Nir Soffer) Date: Wed, 24 Jul 2019 15:16:38 +0000 Subject: [issue10819] ValueError on repr(closed_socket_file) In-Reply-To: <1294098693.54.0.480300363848.issue10819@psf.upfronthosting.co.za> Message-ID: <1563981398.48.0.836946844582.issue10819@roundup.psfhosted.org> Nir Soffer added the comment: I find this new behavior a usability regression. Before this change, code (e.g python 2 code ported to python 3) could do: fd = sock.fileno() Without handling errors, since closed socket would raise (good). Now such code need to check the return value (bad): fd = sock.fileno() if fd == -1: fail... This is also not consistent with other objects: >>> f = open("Makefile") >>> f.fileno() 3 >>> f.close() >>> f.fileno() Traceback (most recent call last): File "", line 1, in ValueError: I/O operation on closed file >>> repr(f) "<_io.TextIOWrapper name='Makefile' mode='r' encoding='UTF-8'>" The issue with repr() on closed socket can be mitigated easily inside __repr__, handling closed sockets without affecting code using file descriptors. Can we return the old safe behavior? ---------- nosy: +nirs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 11:39:26 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Jul 2019 15:39:26 +0000 Subject: [issue37668] Allow individual test to be specified by "#" or "." In-Reply-To: <1563964241.47.0.656426706164.issue37668@roundup.psfhosted.org> Message-ID: <1563982766.6.0.439433607468.issue37668@roundup.psfhosted.org> Serhiy Storchaka added the comment: Why you can not use "."? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 13:11:42 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Jul 2019 17:11:42 +0000 Subject: [issue37669] Make mock_open return per-file content In-Reply-To: <1563972418.64.0.300779941937.issue37669@roundup.psfhosted.org> Message-ID: <1563988302.73.0.020752430277.issue37669@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +cjw296, mariocj89, michael.foord, xtreak versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 13:42:52 2019 From: report at bugs.python.org (Pradyun Gedam) Date: Wed, 24 Jul 2019 17:42:52 +0000 Subject: [issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls) In-Reply-To: <1555752054.75.0.256314796752.issue36674@roundup.psfhosted.org> Message-ID: <1563990172.41.0.0337426021163.issue36674@roundup.psfhosted.org> Change by Pradyun Gedam : ---------- pull_requests: +14706 pull_request: https://github.com/python/cpython/pull/14934 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 13:44:45 2019 From: report at bugs.python.org (Pradyun Gedam) Date: Wed, 24 Jul 2019 17:44:45 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1563990285.35.0.193102110925.issue37664@roundup.psfhosted.org> Pradyun Gedam added the comment: Alrighty! Filed gh-14934. (Sounds good to me. Filed a PR on devguide, adding me to the devguide: https://github.com/python/devguide/pull/513) ---------- keywords: +patch message_count: 3.0 -> 4.0 pull_requests: +14707 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14934 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:03:21 2019 From: report at bugs.python.org (Caleb Donovick) Date: Wed, 24 Jul 2019 18:03:21 +0000 Subject: [issue37670] Description of UserDict is misleading Message-ID: <1563991401.59.0.133528027971.issue37670@roundup.psfhosted.org> New submission from Caleb Donovick : The documentation for collections.UserDict states "In addition to supporting the methods and operations of mappings, UserDict instances provide the following attribute: ..." This however is misleading as it supports the operations of mutable mappings. Which is not stated anywhere. ---------- assignee: docs at python components: Documentation messages: 348393 nosy: docs at python, donovick priority: normal severity: normal status: open title: Description of UserDict is misleading _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:05:22 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Jul 2019 18:05:22 +0000 Subject: [issue37670] Description of UserDict is misleading In-Reply-To: <1563991401.59.0.133528027971.issue37670@roundup.psfhosted.org> Message-ID: <1563991522.85.0.778132012293.issue37670@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:08:07 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 24 Jul 2019 18:08:07 +0000 Subject: [issue37399] XML text behaviour change if there are comments In-Reply-To: <1561452502.97.0.0666051157633.issue37399@roundup.psfhosted.org> Message-ID: <1563991687.88.0.56945871824.issue37399@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset c6cb4cdd21c0c3a09b0617dbfaa7053d3bfa6def by Stefan Behnel in branch 'master': bpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856) https://github.com/python/cpython/commit/c6cb4cdd21c0c3a09b0617dbfaa7053d3bfa6def ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:18:17 2019 From: report at bugs.python.org (Antal Nemes) Date: Wed, 24 Jul 2019 18:18:17 +0000 Subject: [issue37671] itertools.combinations could be lazier Message-ID: <1563992297.11.0.886326187816.issue37671@roundup.psfhosted.org> New submission from Antal Nemes : Reproducible with current master (3.9, 151b91dfd21a100ecb1eba9e293c0a8695bf3bf5) I would expect itertools.combinations to be lazy in the sense that it should not exhaust the input iterator in constructor time. import itertools; itertools.combinations(itertools.count(),2) should return instantly. Instead it "hangs" until the process is killed. Similarly, one can reproduce with the following simple crafted generator: Python 3.9.0a0 (heads/master-dirty:151b91d, Jul 24 2019, 19:51:53) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> def mygenerator_with_exception(): yield 2 yield 2 yield 3 raise Exception("Should not be raised") ... ... ... ... ... >>> g = mygenerator_with_exception() >>> import itertools >>> itertools.combinations(g,2) Traceback (most recent call last): File "", line 1, in File "", line 5, in mygenerator_with_exception Exception: Should not be raised Could you please consider making itertools.combinations truely lazy? ---------- components: Interpreter Core messages: 348395 nosy: furiel priority: normal severity: normal status: open title: itertools.combinations could be lazier type: behavior versions: Python 3.5, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:19:31 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Jul 2019 18:19:31 +0000 Subject: [issue37671] itertools.combinations could be lazier In-Reply-To: <1563992297.11.0.886326187816.issue37671@roundup.psfhosted.org> Message-ID: <1563992371.62.0.160309332442.issue37671@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:22:56 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 24 Jul 2019 18:22:56 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1563992576.87.0.530119724693.issue34160@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset a3697db0102b9b6747fe36009e42f9b08f0c1ea8 by Stefan Behnel in branch 'master': bpo-34160: explain how to deal with attribute order in ElementTree (GH-14867) https://github.com/python/cpython/commit/a3697db0102b9b6747fe36009e42f9b08f0c1ea8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:23:47 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 18:23:47 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1563992627.63.0.716372150017.issue34160@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14708 pull_request: https://github.com/python/cpython/pull/14935 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:26:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Jul 2019 18:26:36 +0000 Subject: [issue37671] itertools.combinations could be lazier In-Reply-To: <1563992297.11.0.886326187816.issue37671@roundup.psfhosted.org> Message-ID: <1563992796.7.0.889541012063.issue37671@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also related discussion https://bugs.python.org/msg276855 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:28:10 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 24 Jul 2019 18:28:10 +0000 Subject: [issue37399] XML text behaviour change if there are comments In-Reply-To: <1561452502.97.0.0666051157633.issue37399@roundup.psfhosted.org> Message-ID: <1563992890.22.0.554605946736.issue37399@roundup.psfhosted.org> Change by Stefan Behnel : ---------- pull_requests: +14709 pull_request: https://github.com/python/cpython/pull/14936 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:33:05 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 24 Jul 2019 18:33:05 +0000 Subject: [issue34160] ElementTree not preserving attribute order In-Reply-To: <1532047327.92.0.56676864532.issue34160@psf.upfronthosting.co.za> Message-ID: <1563993185.92.0.292146076652.issue34160@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 63673916464bace8e2147357395fdf3497967ecb by Stefan Behnel (Miss Islington (bot)) in branch '3.8': [3.8] bpo-34160: explain how to deal with attribute order in ElementTree (GH-14867) (GH-14935) https://github.com/python/cpython/commit/63673916464bace8e2147357395fdf3497967ecb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:46:12 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 24 Jul 2019 18:46:12 +0000 Subject: [issue37399] XML text behaviour change if there are comments In-Reply-To: <1561452502.97.0.0666051157633.issue37399@roundup.psfhosted.org> Message-ID: <1563993972.14.0.971789556947.issue37399@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset bb697899aa65d90488af1950ac7cceeb3877d409 by Stefan Behnel in branch '3.8': [3.8] bpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856) (GH-14936) https://github.com/python/cpython/commit/bb697899aa65d90488af1950ac7cceeb3877d409 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:47:58 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jul 2019 18:47:58 +0000 Subject: [issue37659] subprocess.list2cmdline() should not escape wrapping single/double quotes In-Reply-To: <1563902260.7.0.339582644993.issue37659@roundup.psfhosted.org> Message-ID: <1563994078.69.0.362973901651.issue37659@roundup.psfhosted.org> Steve Dower added the comment: Maybe we need to finally make shlex.split() at least be consistent with list2cmdline() on Windows so it can round-trip, perhaps with a "windows=True" parameter. I don't think it's unreasonable to aim for round-tripability. That isn't near as hard as "correctly quoting arguments in the absence of a specification for how to quote arguments". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:49:04 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 24 Jul 2019 18:49:04 +0000 Subject: [issue37399] XML text behaviour change if there are comments In-Reply-To: <1561452502.97.0.0666051157633.issue37399@roundup.psfhosted.org> Message-ID: <1563994144.65.0.985651585549.issue37399@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:59:33 2019 From: report at bugs.python.org (Antal Nemes) Date: Wed, 24 Jul 2019 18:59:33 +0000 Subject: [issue37671] itertools.combinations could be lazier In-Reply-To: <1563992297.11.0.886326187816.issue37671@roundup.psfhosted.org> Message-ID: <1563994773.53.0.238008606888.issue37671@roundup.psfhosted.org> Antal Nemes added the comment: Thanks for sharing the discussion above. I did not know this was discussed earlier. Indeed, I do not come from a real world example. I ran into this problem while solving an online coding challenge that also measures performance. I got the right answer, just took too long time to calculate. In the crafted testcase the stop condition could have occurred within the first few elements of the input iterator, but the execution took longer because of exhausting all elements. I could pass the challenge by adding my own lazy_combination, that is basically a wrapper around itertools.combinations. I came up with this version, which is of course incomplete for production. Not too difficult, but it was not straightforward either. def lazy_combinations(g, n): try: known_elements = [] for i in range(n-1): known_elements.append(next(g)) while True: final_element = next(g) for i in itertools.combinations(known_elements, n-1): next_element = i+(final_element,) yield next_element known_elements.append(final_element) except StopIteration: pass What I would like to say is the demand for such behavior might be out there. I understand that such feature would induce complexity for the core. However, if this is not part of the core, the complexity does not disappear, just manifests elsewhere: users might need to spend some time with the debugging, and also write some nontrivial code as a workaround. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 15:06:01 2019 From: report at bugs.python.org (Thomas Knox) Date: Wed, 24 Jul 2019 19:06:01 +0000 Subject: [issue37595] Python 3.7.4 does not build on Raspbian Buster In-Reply-To: <1563155199.46.0.613653313897.issue37595@roundup.psfhosted.org> Message-ID: <1563995161.65.0.701544642551.issue37595@roundup.psfhosted.org> Thomas Knox added the comment: Any update on this? This is biting me too. I've tested on a Raspberry Pi 3B+, a 4B and a Zero W all running buster. All of them exhibit this same behavior. Also, this same error is preventing Python 2.7.16 from compiling on the same hardware. ---------- nosy: +DNSGeek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 15:08:06 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jul 2019 19:08:06 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1563995286.84.0.0391130321155.issue37664@roundup.psfhosted.org> Steve Dower added the comment: New changeset 5380def8269b24a8a3bc46396373a1dc91b1dd1a by Steve Dower (Pradyun Gedam) in branch 'master': bpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934) https://github.com/python/cpython/commit/5380def8269b24a8a3bc46396373a1dc91b1dd1a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 15:08:18 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 19:08:18 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1563995298.74.0.482972522364.issue37664@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14710 pull_request: https://github.com/python/cpython/pull/14937 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 15:28:16 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 19:28:16 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1563996496.19.0.355183253017.issue37664@roundup.psfhosted.org> miss-islington added the comment: New changeset 0cdb21d6eb3428abe50a55f9291ca0e9728654d9 by Miss Islington (bot) in branch '3.8': bpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934) https://github.com/python/cpython/commit/0cdb21d6eb3428abe50a55f9291ca0e9728654d9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:48:17 2019 From: report at bugs.python.org (=?utf-8?q?Grzegorz_Kraso=C5=84?=) Date: Wed, 24 Jul 2019 20:48:17 +0000 Subject: [issue37646] eval() in a list comprehension In-Reply-To: <1563751465.46.0.439346831661.issue37646@roundup.psfhosted.org> Message-ID: <1564001297.96.0.770027964085.issue37646@roundup.psfhosted.org> Change by Grzegorz Kraso? : ---------- resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:52:25 2019 From: report at bugs.python.org (=?utf-8?q?Grzegorz_Kraso=C5=84?=) Date: Wed, 24 Jul 2019 20:52:25 +0000 Subject: [issue37646] eval() in a list comprehension In-Reply-To: <1563751465.46.0.439346831661.issue37646@roundup.psfhosted.org> Message-ID: <1564001545.23.0.838478671889.issue37646@roundup.psfhosted.org> Grzegorz Kraso? added the comment: I re-opened the issue. Dear core developers, can we ask you to confirm if described behavior of eval() is expected? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:56:43 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 24 Jul 2019 20:56:43 +0000 Subject: [issue19809] Doc: subprocess should warn uses on race conditions when multiple threads spawn child processes In-Reply-To: <1385544646.44.0.340337636792.issue19809@psf.upfronthosting.co.za> Message-ID: <1564001803.32.0.659253313044.issue19809@roundup.psfhosted.org> Eryk Sun added the comment: > This is still the case on windows as the pipes created to talk to the > process might be inherited by two or more simultaneous CreateProcess > calls. subprocess already uses PROC_THREAD_ATTRIBUTE_HANDLE_LIST to address this problem, at least between its own subprocess.Popen calls. The handles in the list still have to be inheritable, so it does not solve the problem with os.system and os.spawn* calls that are concurrent with subprocess.Popen -- nor extension-module, ctypes, cffi, or PyWin32 code in the wild that inherits handles without PROC_THREAD_ATTRIBUTE_HANDLE_LIST. There's a warning about this in the docs: https://docs.python.org/3/library/subprocess.html#subprocess.STARTUPINFO.lpAttributeList It's why we can't use the handle list to implement pass_fds in Windows and why the general capability is buried in STARTUPINFO, instead of being exposed as a high-level Popen parameter. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:20:47 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jul 2019 21:20:47 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564003247.07.0.882867050556.issue37664@roundup.psfhosted.org> Steve Dower added the comment: Leaving this open until 3.8b4 in case we want to take another update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:30:32 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jul 2019 21:30:32 +0000 Subject: [issue37672] Switch Windows Store package to use pip.ini for user mode Message-ID: <1564003832.35.0.0864190527749.issue37672@roundup.psfhosted.org> New submission from Steve Dower : Currently we set PIP_USER environment variable in the pip.exe redirector, which is not ideal. Now that we have the latest release of pip, we can use a pip.ini file to set the option by default. ---------- assignee: steve.dower components: Windows messages: 348408 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Switch Windows Store package to use pip.ini for user mode versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:39:25 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jul 2019 21:39:25 +0000 Subject: [issue37672] Switch Windows Store package to use pip.ini for user mode In-Reply-To: <1564003832.35.0.0864190527749.issue37672@roundup.psfhosted.org> Message-ID: <1564004365.18.0.275440936034.issue37672@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +14711 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14939 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 17:39:36 2019 From: report at bugs.python.org (Lou Perazzoli) Date: Wed, 24 Jul 2019 21:39:36 +0000 Subject: [issue37673] Tkinter won't create 5000 check boxes, stops at 1309. Message-ID: <1564004376.63.0.730032701785.issue37673@roundup.psfhosted.org> New submission from Lou Perazzoli : Here's a short example. ---------- components: Tkinter files: tk-bug.py messages: 348409 nosy: Loupz priority: normal severity: normal status: open title: Tkinter won't create 5000 check boxes, stops at 1309. type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48503/tk-bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:13:35 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jul 2019 22:13:35 +0000 Subject: [issue37672] Switch Windows Store package to use pip.ini for user mode In-Reply-To: <1564003832.35.0.0864190527749.issue37672@roundup.psfhosted.org> Message-ID: <1564006415.66.0.523905191167.issue37672@roundup.psfhosted.org> Steve Dower added the comment: New changeset 123536fdab7b8def15c859aa70232bc55ec73096 by Steve Dower in branch 'master': bpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939) https://github.com/python/cpython/commit/123536fdab7b8def15c859aa70232bc55ec73096 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:13:36 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 22:13:36 +0000 Subject: [issue37672] Switch Windows Store package to use pip.ini for user mode In-Reply-To: <1564003832.35.0.0864190527749.issue37672@roundup.psfhosted.org> Message-ID: <1564006416.18.0.971463222979.issue37672@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14712 pull_request: https://github.com/python/cpython/pull/14940 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:15:42 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 24 Jul 2019 22:15:42 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? Message-ID: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> New submission from Mariatta : The doc https://docs.python.org/3.7/library/imp.html says "Deprecated since version 3.4: The imp package is pending deprecation in favor of importlib." Is it in "deprecated" state, or "pendingdeprecation" state? Should it just be removed in 3.9? Maybe I just don't understand the difference of "deprecated" and "pending deprecation" :( ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 348411 nosy: Mariatta, docs at python priority: normal severity: normal status: open title: Is imp module deprecated or pending deprecation? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:26:02 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 24 Jul 2019 22:26:02 +0000 Subject: [issue37663] Making venv activation script prompts consistent In-Reply-To: <1563914466.51.0.723098783517.issue37663@roundup.psfhosted.org> Message-ID: <1564007162.22.0.364781465094.issue37663@roundup.psfhosted.org> Change by Brett Cannon : ---------- keywords: +patch pull_requests: +14713 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14941 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:31:51 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 22:31:51 +0000 Subject: [issue37672] Switch Windows Store package to use pip.ini for user mode In-Reply-To: <1564003832.35.0.0864190527749.issue37672@roundup.psfhosted.org> Message-ID: <1564007511.24.0.677964681889.issue37672@roundup.psfhosted.org> miss-islington added the comment: New changeset 4b7ce105ff80467bf4d79c413d7adc256b824153 by Miss Islington (bot) in branch '3.8': bpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939) https://github.com/python/cpython/commit/4b7ce105ff80467bf4d79c413d7adc256b824153 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:38:16 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Jul 2019 22:38:16 +0000 Subject: [issue37672] Switch Windows Store package to use pip.ini for user mode In-Reply-To: <1564003832.35.0.0864190527749.issue37672@roundup.psfhosted.org> Message-ID: <1564007896.78.0.590298494623.issue37672@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:15:13 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 24 Jul 2019 23:15:13 +0000 Subject: [issue37675] 2to3 doesn't work when run from a zipfile Message-ID: <1564010113.05.0.275841737457.issue37675@roundup.psfhosted.org> New submission from Benjamin Peterson : get_all_fix_names does listdir() to find fixers. That breaks if the standard library is in a zipfile. It shouldn't be hard to replace this with pkgutil.iter_modules. ---------- assignee: benjamin.peterson components: 2to3 (2.x to 3.x conversion tool) messages: 348413 nosy: benjamin.peterson priority: normal severity: normal status: open title: 2to3 doesn't work when run from a zipfile versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:18:55 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 24 Jul 2019 23:18:55 +0000 Subject: [issue37675] 2to3 doesn't work when run from a zipfile In-Reply-To: <1564010113.05.0.275841737457.issue37675@roundup.psfhosted.org> Message-ID: <1564010335.62.0.393088572859.issue37675@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +14714 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14942 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:27:01 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 24 Jul 2019 23:27:01 +0000 Subject: [issue37668] Allow individual test to be specified by "#" or "." In-Reply-To: <1563964241.47.0.656426706164.issue37668@roundup.psfhosted.org> Message-ID: <1564010821.87.0.50058243102.issue37668@roundup.psfhosted.org> Zackery Spytz added the comment: I don't think this change should be made. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:30:33 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 24 Jul 2019 23:30:33 +0000 Subject: [issue30685] Multiprocessing Send to Manager Fails for Large Payload In-Reply-To: <1497629566.56.0.527992929641.issue30685@psf.upfronthosting.co.za> Message-ID: <1564011033.68.0.201136797025.issue30685@roundup.psfhosted.org> Zackery Spytz added the comment: It seems that this was fixed in bpo-17560. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:38:53 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 24 Jul 2019 23:38:53 +0000 Subject: [issue37675] 2to3 doesn't work when run from a zipfile In-Reply-To: <1564010113.05.0.275841737457.issue37675@roundup.psfhosted.org> Message-ID: <1564011533.36.0.730156964128.issue37675@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 93e8aa62cfd0a61efed4a61a2ffc2283ae986ef2 by Benjamin Peterson in branch 'master': closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than listdir. (14942) https://github.com/python/cpython/commit/93e8aa62cfd0a61efed4a61a2ffc2283ae986ef2 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:39:07 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 23:39:07 +0000 Subject: [issue37675] 2to3 doesn't work when run from a zipfile In-Reply-To: <1564010113.05.0.275841737457.issue37675@roundup.psfhosted.org> Message-ID: <1564011547.01.0.222985176949.issue37675@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14715 pull_request: https://github.com/python/cpython/pull/14943 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:39:16 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 23:39:16 +0000 Subject: [issue37675] 2to3 doesn't work when run from a zipfile In-Reply-To: <1564010113.05.0.275841737457.issue37675@roundup.psfhosted.org> Message-ID: <1564011556.74.0.0574697828072.issue37675@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14716 pull_request: https://github.com/python/cpython/pull/14944 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:39:40 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 23:39:40 +0000 Subject: [issue37675] 2to3 doesn't work when run from a zipfile In-Reply-To: <1564010113.05.0.275841737457.issue37675@roundup.psfhosted.org> Message-ID: <1564011580.29.0.461849336762.issue37675@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14717 pull_request: https://github.com/python/cpython/pull/14945 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:43:49 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 24 Jul 2019 23:43:49 +0000 Subject: [issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings In-Reply-To: <1552702047.72.0.770409871236.issue36310@roundup.psfhosted.org> Message-ID: <1564011829.43.0.279460469445.issue36310@roundup.psfhosted.org> Eric V. Smith added the comment: I've put some more thought in to this, and this is the best I can come up with, using today's Python. The basic idea is that you have a function _f(), which takes a normal (non-f) string. It does a lookup to find the translated string (again, a non-fstring), turns that into an f-string, then compiles it and returns the code object. Then the caller evals the returned code object to convert it to a string. The ugly part, of course, is the eval. You can't just say: _f("{val}") you have to say: eval(_f("{val}")) You can't reduce this to a single function call: the eval() has to take place right here. It is possible to play games with stack frames, but that doesn't always work (see PEP 498 for details, where it talks about locals() and globals(), which is part of the same problem). But I don't see much choice. Since a translated f-string can do anything (like f'{subprocess.run("script to rm all files")'), I'm not sure it's the eval that's the worst thing here. The translated text absolutely has to be trusted: that's the worst thing. Even an eval_fstring(), that only understood how to exec code objects that are f-strings, would still be exposed to arbitrary expressions and side effects in the translated strings. The advantage of compiling it and caching is that you get most of the performance advantages of f-strings, after the first time a string is used. The code generation still has to happen, though. It's just the parsing that's being saved. I can't say how significant that is. See the sample code in the attached file. ---------- Added file: https://bugs.python.org/file48504/f-string-gettext.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:46:27 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Jul 2019 23:46:27 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1564011987.72.0.012778151174.issue37674@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:57:42 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 23:57:42 +0000 Subject: [issue37675] 2to3 doesn't work when run from a zipfile In-Reply-To: <1564010113.05.0.275841737457.issue37675@roundup.psfhosted.org> Message-ID: <1564012662.39.0.356692155321.issue37675@roundup.psfhosted.org> miss-islington added the comment: New changeset 9194a20a5b0b933a2a43ce0e81becbf8f0356314 by Miss Islington (bot) in branch '3.7': closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than listdir. (14942) https://github.com/python/cpython/commit/9194a20a5b0b933a2a43ce0e81becbf8f0356314 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:59:34 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Jul 2019 23:59:34 +0000 Subject: [issue37675] 2to3 doesn't work when run from a zipfile In-Reply-To: <1564010113.05.0.275841737457.issue37675@roundup.psfhosted.org> Message-ID: <1564012774.92.0.463917970379.issue37675@roundup.psfhosted.org> miss-islington added the comment: New changeset 53639dd55a0d5b3b7b4ef6ae839a98008f22e2d3 by Miss Islington (bot) in branch '2.7': closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than listdir. (14942) https://github.com/python/cpython/commit/53639dd55a0d5b3b7b4ef6ae839a98008f22e2d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 20:00:42 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jul 2019 00:00:42 +0000 Subject: [issue37675] 2to3 doesn't work when run from a zipfile In-Reply-To: <1564010113.05.0.275841737457.issue37675@roundup.psfhosted.org> Message-ID: <1564012842.81.0.459961036561.issue37675@roundup.psfhosted.org> miss-islington added the comment: New changeset 69802f6163c9f18ca0e0b9c4c43a49365fc63e2d by Miss Islington (bot) in branch '3.8': closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than listdir. (14942) https://github.com/python/cpython/commit/69802f6163c9f18ca0e0b9c4c43a49365fc63e2d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 20:56:16 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Jul 2019 00:56:16 +0000 Subject: [issue37668] Allow individual test to be specified by "#" or "." In-Reply-To: <1563964241.47.0.656426706164.issue37668@roundup.psfhosted.org> Message-ID: <1564016176.24.0.800052440724.issue37668@roundup.psfhosted.org> Raymond Hettinger added the comment: > I don't think this change should be made. I recommend closing this request. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 20:58:37 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Jul 2019 00:58:37 +0000 Subject: [issue37671] itertools.combinations could be lazier In-Reply-To: <1563992297.11.0.886326187816.issue37671@roundup.psfhosted.org> Message-ID: <1564016317.96.0.783228103079.issue37671@roundup.psfhosted.org> Raymond Hettinger added the comment: Thank you for the suggestion, but I'm going to decline for the reasons articulated in the link. Consider posting you code to the Python package index where others can use if the need arises. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 21:02:17 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Jul 2019 01:02:17 +0000 Subject: [issue37670] Description of UserDict is misleading In-Reply-To: <1563991401.59.0.133528027971.issue37670@roundup.psfhosted.org> Message-ID: <1564016537.92.0.949715391177.issue37670@roundup.psfhosted.org> Raymond Hettinger added the comment: The term "mapping" is in lowercase and refers to the generic concept of a mapping as defined in the glossary. This is distinct from the capital letter classes "Mapping" and "MutableMapping" as provided in the collections.abc module. It is the former meaning that is intended. Thank you for the suggestion. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 22:39:51 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 25 Jul 2019 02:39:51 +0000 Subject: [issue37324] collections: remove deprecated aliases to ABC classes In-Reply-To: <1560803912.16.0.0813723259969.issue37324@roundup.psfhosted.org> Message-ID: <1564022391.27.0.809049780759.issue37324@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: In CPython commit 5380def8269b24a8a3bc46396373a1dc91b1dd1a, bundled pip is updated to 19.2.1, and since pip 19.2 an html5lib patch is backported [1] to "prefer importing from collections.abc instead of collections" [2]. I believe https://github.com/python/cpython/pull/10596 can be revisited now. [1] https://github.com/pypa/pip/commit/ef7ca1472c1fdd085cffb8183b7ce8abbe9e2800 [2] https://github.com/pypa/pip/commit/3d6bb3a29676f880e84014d98afcb5ac74a9844e ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 22:45:16 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 25 Jul 2019 02:45:16 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1564022716.72.0.614904412479.issue36953@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 23:02:41 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 25 Jul 2019 03:02:41 +0000 Subject: [issue37340] remove free_list for bound method objects In-Reply-To: <1560948861.51.0.564500331945.issue37340@roundup.psfhosted.org> Message-ID: <1564023761.39.0.485329969431.issue37340@roundup.psfhosted.org> Inada Naoki added the comment: Latest benchmark: ``` $ pyperf compare_to master.json no-freelist.json -G --min-speed=2 Slower (2): - unpickle_list: 4.19 us +- 0.02 us -> 4.28 us +- 0.03 us: 1.02x slower (+2%) - pathlib: 23.2 ms +- 0.2 ms -> 23.7 ms +- 0.3 ms: 1.02x slower (+2%) Faster (2): - nbody: 149 ms +- 2 ms -> 141 ms +- 2 ms: 1.06x faster (-6%) - logging_simple: 10.1 us +- 0.2 us -> 9.86 us +- 0.18 us: 1.02x faster (-2%) Benchmark hidden because not significant (56) ``` I decided to just remove the free_list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 02:22:48 2019 From: report at bugs.python.org (John Belmonte) Date: Thu, 25 Jul 2019 06:22:48 +0000 Subject: [issue37398] contextlib.ContextDecorator decorating async functions In-Reply-To: <1561445403.56.0.10750759042.issue37398@roundup.psfhosted.org> Message-ID: <1564035768.07.0.186833609684.issue37398@roundup.psfhosted.org> John Belmonte added the comment: I was caught by this again, indirectly via @contextmanager. If I define a non-async context manager using @contextmanager, I expect the decorator support to work on async functions. I.e. the following should be equivalent: ``` async def foo(): with non_async_cm: ... ``` ``` @non_async_cm async def foo(): ... ``` Not only does the 2nd case not work, but the decorator is (effectively) silently ignored :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 02:40:43 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 25 Jul 2019 06:40:43 +0000 Subject: [issue37398] contextlib.ContextDecorator decorating async functions In-Reply-To: <1561445403.56.0.10750759042.issue37398@roundup.psfhosted.org> Message-ID: <1564036843.36.0.274851809798.issue37398@roundup.psfhosted.org> Nathaniel Smith added the comment: There are two different axes of sync/async here, and it's important not to mix them up: the context manager could be sync or async, and the function that's being decorated could be sync or async. This issue is about the case where you have a sync context manager, and it's decorating an async function. The current behavior is definitely super confusing and not at all useful. In general, I'm also very skeptical about using iscoroutinefunction to automatically change semantics, because of the issue Andrew mentions about failing to handle complicated objects like functools.partial instances or sync functions that return awaitables. In this *specific* case though, I'm not sure... maybe it actually is OK? What's special about this case is that when you write: @sync_cm() async def foo(): ... ...the same person is writing both the @ line and the 'async def' line, and they're right next to each other in the source code. So the normal concern about some unexpected foreign object being passed in doesn't really apply. And in fact, if I did have an awaitable-returning-function: @sync_cm() def foo(): return some_async_fn() ...then I think most people would actually *expect* this to be equivalent to: def foo(): with sync_cm(): return some_async_fn() Not very useful, but not surprising either. So maybe this is the rare case where switching on iscoroutinefunction is actually OK? The only cases where it would fail is if someone invokes the decorator form directly, e.g. new_fn = sync_cm()(old_fn) This seems pretty rare, but probably someone does do it, so I dunno. If we think that's too magic, another option would be to make up some more explicit syntax, like: @sync_cm().wrap_async async def foo(): ... ...Oh, but I think this breaks the Guido's gut feeling rule (https://mail.python.org/pipermail/python-dev/2004-August/046711.html), so it would have to instead be: @sync_cm.wrap_async() async def foo(): ... And even if we decide not to automatically switch on iscoroutinefunction, we should probably add a warning or something at least, because right now @sync_cm() async def ... is definitely a mistake. (Adding Nick to nosy as the contextlib maintainer.) ---------- nosy: +ncoghlan, njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 02:41:14 2019 From: report at bugs.python.org (Hendrik) Date: Thu, 25 Jul 2019 06:41:14 +0000 Subject: [issue37676] cmath.phase array support Message-ID: <1564036874.95.0.313936205307.issue37676@roundup.psfhosted.org> New submission from Hendrik : It would be nice if cmath.phase supports arrays like this: ``` import cmath import numpy as np z=255*np.ones((3,3)) * np.exp(1j * np.pi*np.ones((3,3))) def get_k_amp_array(z): return abs(z) def get_k_ph_array(z): return np.array([[cmath.phase(z_row) for z_row in z_col] for z_col in z ]) amp_array= get_k_amp_array(z) ph_array= get_k_ph_array(z) print(amp_array) print(ph_array) ``` ---------- components: Library (Lib) messages: 348428 nosy: kolibril13 priority: normal severity: normal status: open title: cmath.phase array support type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 03:21:00 2019 From: report at bugs.python.org (=?utf-8?b?0KHQsNGI0LAg0KfQtdGA0L3Ri9GF?=) Date: Thu, 25 Jul 2019 07:21:00 +0000 Subject: [issue20088] locale.getlocale() fails if locale name doesn't include encoding In-Reply-To: <1388223842.98.0.521951916148.issue20088@psf.upfronthosting.co.za> Message-ID: <1564039260.57.0.85074644806.issue20088@roundup.psfhosted.org> Change by ???? ?????? : ---------- nosy: +nervov_fan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 04:07:01 2019 From: report at bugs.python.org (alvis) Date: Thu, 25 Jul 2019 08:07:01 +0000 Subject: [issue37677] Seg Fault on OSX when multiprocessing Message-ID: <1564042021.53.0.0155934240157.issue37677@roundup.psfhosted.org> New submission from alvis : Encountered a crash with the following logs. I have already added no_proxy=*, and it fixed the issue which i can replicate consistent. However, this crash does not happen every time, maybe once in a few week. Process: Python [66435] Path: /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 3.6.8 (3.6.8) Code Type: X86-64 (Native) Parent Process: Python [65077] Responsible: Python [66435] User ID: 501 Date/Time: 2019-07-24 21:45:29.722 +0800 OS Version: Mac OS X 10.14.2 (18C54) Report Version: 12 Bridge OS Version: 3.5 (16P5125) Anonymous UUID: 3F729BF3-2BB1-3830-B6FE-D22CA431DE5A Time Awake Since Boot: 1600000 seconds System Integrity Protection: enabled Crashed Thread: 2 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000109b23aa2 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [66435] VM Regions Near 0x109b23aa2: MALLOC_LARGE 0000000109aa3000-0000000109b23000 [ 512K] rw-/rwx SM=COW --> __TEXT 0000000109b27000-0000000109b3d000 [ 88K] r-x/rwx SM=COW /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/.dylibs/libgcc_s.1.dylib Application Specific Information: *** multi-threaded process forked *** crashed on child side of fork pre-exec Thread 2 Crashed: 0 libsystem_trace.dylib 0x00007fff7d6fdab3 _os_log_cmp_key + 4 1 libsystem_c.dylib 0x00007fff7d5aaa5e rb_tree_find_node + 53 2 libsystem_trace.dylib 0x00007fff7d6fbc81 os_log_create + 370 3 libnetwork.dylib 0x00007fff7c04058f nwlog_legacy_init_once + 47 4 libsystem_pthread.dylib 0x00007fff7d6e1ce4 __pthread_once_handler + 66 5 libsystem_platform.dylib 0x00007fff7d6d7acb _os_once_callout + 18 6 libsystem_pthread.dylib 0x00007fff7d6e1c7f pthread_once + 56 7 libnetwork.dylib 0x00007fff7c024ccd networkd_settings_init + 669 8 libnetwork.dylib 0x00007fff7c024982 networkd_settings_get_bool + 18 9 libnetwork.dylib 0x00007fff7c0244f0 -[NWConcrete_nw_parameters initWithStack:] + 160 10 libnetwork.dylib 0x00007fff7c023d97 nw_path_create_evaluator_for_endpoint + 487 11 libnetwork.dylib 0x00007fff7c2451bc nw_nat64_v4_address_requires_synthesis + 220 12 libsystem_info.dylib 0x00007fff7d609e83 _gai_nat64_v4_address_requires_synthesis + 67 13 libsystem_info.dylib 0x00007fff7d609210 _gai_nat64_second_pass + 512 14 libsystem_info.dylib 0x00007fff7d5e7b4a si_addrinfo + 1978 15 libsystem_info.dylib 0x00007fff7d5e7262 _getaddrinfo_internal + 242 16 libsystem_info.dylib 0x00007fff7d5e715d getaddrinfo + 61 17 _socket.cpython-36m-darwin.so 0x00000001092c24ed socket_getaddrinfo + 621 18 org.python.python 0x0000000106d63697 _PyCFunction_FastCallDict + 183 19 org.python.python 0x0000000106de5747 call_function + 439 20 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 21 org.python.python 0x0000000106de61af _PyEval_EvalCodeWithName + 2447 22 org.python.python 0x0000000106de6ae1 fast_function + 545 23 org.python.python 0x0000000106de5721 call_function + 401 24 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 25 org.python.python 0x0000000106de61af _PyEval_EvalCodeWithName + 2447 26 org.python.python 0x0000000106de6ae1 fast_function + 545 27 org.python.python 0x0000000106de5721 call_function + 401 28 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 29 org.python.python 0x0000000106de6a3d fast_function + 381 30 org.python.python 0x0000000106de5721 call_function + 401 31 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 32 org.python.python 0x0000000106de61af _PyEval_EvalCodeWithName + 2447 33 org.python.python 0x0000000106de6ae1 fast_function + 545 34 org.python.python 0x0000000106de5721 call_function + 401 35 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 36 org.python.python 0x0000000106de61af _PyEval_EvalCodeWithName + 2447 37 org.python.python 0x0000000106de6dfb _PyFunction_FastCallDict + 763 38 org.python.python 0x0000000106d1a6b7 _PyObject_FastCallDict + 247 39 org.python.python 0x0000000106d1a7d5 _PyObject_Call_Prepend + 149 40 org.python.python 0x0000000106d1a4f0 PyObject_Call + 96 41 org.python.python 0x0000000106d7badd slot_tp_init + 125 42 org.python.python 0x0000000106d77d09 type_call + 313 43 org.python.python 0x0000000106d1a685 _PyObject_FastCallDict + 197 44 org.python.python 0x0000000106de5648 call_function + 184 45 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 46 org.python.python 0x0000000106de6a3d fast_function + 381 47 org.python.python 0x0000000106de5721 call_function + 401 48 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 49 org.python.python 0x0000000106de6a3d fast_function + 381 50 org.python.python 0x0000000106de5721 call_function + 401 51 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 52 org.python.python 0x0000000106de6a3d fast_function + 381 53 org.python.python 0x0000000106de5721 call_function + 401 54 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 55 org.python.python 0x0000000106de6a3d fast_function + 381 56 org.python.python 0x0000000106de5721 call_function + 401 57 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 58 org.python.python 0x0000000106de6a3d fast_function + 381 59 org.python.python 0x0000000106de5721 call_function + 401 60 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 61 org.python.python 0x0000000106de6a3d fast_function + 381 62 org.python.python 0x0000000106de5721 call_function + 401 63 org.python.python 0x0000000106de1eb7 _PyEval_EvalFrameDefault + 27559 64 org.python.python 0x0000000106de6c5c _PyFunction_FastCallDict + 348 65 org.python.python 0x0000000106d1a6b7 _PyObject_FastCallDict + 247 66 org.python.python 0x0000000106d1a7d5 _PyObject_Call_Prepend + 149 67 org.python.python 0x0000000106d1a4f0 PyObject_Call + 96 68 org.python.python 0x0000000106e2d396 t_bootstrap + 70 69 org.python.python 0x0000000106e26be9 pythread_wrapper + 25 70 libsystem_pthread.dylib 0x00007fff7d6e3305 _pthread_body + 126 71 libsystem_pthread.dylib 0x00007fff7d6e626f _pthread_start + 70 72 libsystem_pthread.dylib 0x00007fff7d6e2415 thread_start + 13 ---------- messages: 348429 nosy: alvis priority: normal severity: normal status: open title: Seg Fault on OSX when multiprocessing type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 04:11:21 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Jul 2019 08:11:21 +0000 Subject: [issue37676] cmath.phase array support In-Reply-To: <1564036874.95.0.313936205307.issue37676@roundup.psfhosted.org> Message-ID: <1564042281.93.0.753565118208.issue37676@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +mark.dickinson versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 04:14:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Jul 2019 08:14:15 +0000 Subject: [issue37677] Seg Fault on OSX when multiprocessing In-Reply-To: <1564042021.53.0.0155934240157.issue37677@roundup.psfhosted.org> Message-ID: <1564042455.78.0.320875103042.issue37677@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. It would be helpful to have a standalone reproducer for this issue to try reproducing it in 3.6 and other versions. ---------- nosy: +davin, pitrou, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 05:49:26 2019 From: report at bugs.python.org (Sean Wang) Date: Thu, 25 Jul 2019 09:49:26 +0000 Subject: [issue37678] Incorrect behaviour for user@password URI pattern in urlparse Message-ID: <1564048166.67.0.214181978799.issue37678@roundup.psfhosted.org> New submission from Sean Wang : When an IPV4 URL with 'username:password' in it, and the password contains special characters like #[]?, urlparse would act as unexcepted. example: urlparse('http://user:pass#?[word at example.com:80/path') ---------- components: Library (Lib) messages: 348431 nosy: Sean.Wang priority: normal severity: normal status: open title: Incorrect behaviour for user at password URI pattern in urlparse type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 06:07:19 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Jul 2019 10:07:19 +0000 Subject: [issue37679] test_with_pip fails on FreeBSD 10 bot Message-ID: <1564049239.7.0.14830055581.issue37679@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : I guess the upgrade in issue37664 caused an issue with FreeBSD bot. The bot seems to fail after this change on master and 3.8. https://buildbot.python.org/all/#/builders/167/builds/1380 test_with_pip (test.test_venv.EnsurePipTest) ... FAIL ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test_venv.py", line 495, in test_with_pip self.do_test_with_pip(False) File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test_venv.py", line 478, in do_test_with_pip self.assertEqual(err.rstrip(), "") AssertionError: "WARNING: The directory '/.cache/pip/http[202 chars]lag." != '' - WARNING: The directory '/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. + ---------------------------------------------------------------------- ---------- components: Tests messages: 348432 nosy: pablogsal, vstinner, xtreak priority: normal severity: normal status: open title: test_with_pip fails on FreeBSD 10 bot type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 06:09:19 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Jul 2019 10:09:19 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564049359.49.0.730121071825.issue37664@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This change seems to have buildbot failure on FreeBSD 10 for master and 3.8 branch. I have opened issue37679 . I couldn't find any issues similar to this during previous upgrades. https://buildbot.python.org/all/#/builders/167/builds/1380 test_with_pip (test.test_venv.EnsurePipTest) ... FAIL ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test_venv.py", line 495, in test_with_pip self.do_test_with_pip(False) File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test_venv.py", line 478, in do_test_with_pip self.assertEqual(err.rstrip(), "") AssertionError: "WARNING: The directory '/.cache/pip/http[202 chars]lag." != '' - WARNING: The directory '/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. + ---------------------------------------------------------------------- ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 07:29:02 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Jul 2019 11:29:02 +0000 Subject: [issue37398] contextlib.ContextDecorator decorating async functions In-Reply-To: <1561445403.56.0.10750759042.issue37398@roundup.psfhosted.org> Message-ID: <1564054142.35.0.187042359567.issue37398@roundup.psfhosted.org> Andrew Svetlov added the comment: I still think that iscoroutinefunction should not be used for async/sync decoration type autodetection. A day ago stuck with a case when decorator used iscoroutinefunction() for separation but returned a regular function wrapper that returns awaitable in turn. As a result, the transparent decorator which should not modify a decorated function signature cannot be applied twice, e.g. @retry @retry async def fetch(): ... This is very confusing behavior, the obvious fix is providing `sync_retry` and `async_retry` decorators to never mix the behavior. Seems very close to the problem discussed here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 07:30:28 2019 From: report at bugs.python.org (Robert Pollak) Date: Thu, 25 Jul 2019 11:30:28 +0000 Subject: [issue35145] sqlite3: optionally autoconvert table_info's DATETIME fields In-Reply-To: <1541160984.12.0.788709270274.issue35145@psf.upfronthosting.co.za> Message-ID: <1564054228.06.0.29286884213.issue35145@roundup.psfhosted.org> Robert Pollak added the comment: Sorry for not providing a pull request yet. By the way, the "DB Browser for SQLite" (https://sqlitebrowser.org/) also interprets DATETIME fields correctly. (Could someone please change the "Stage" of this issue to "needs patch"?) ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 09:22:47 2019 From: report at bugs.python.org (Omer Ozarslan) Date: Thu, 25 Jul 2019 13:22:47 +0000 Subject: [issue37680] distutils appends LDFLAGS environment variable before object file names Message-ID: <1564060967.95.0.321651965491.issue37680@roundup.psfhosted.org> New submission from Omer Ozarslan : distutils honors some environment variables during extension build, however, LDFLAGS is appended before declaring object files. This causes undefined symbols during importing an extension built with some static libraries using this environment variable. This is not apparent in the case of dynamic linking, but it can be observed by adding "-Wl,--as-needed" flag, since this will link libraries only if they are required. Therefore, it will be necessary to add them after object files in case of dynamic linking as well in that case. I believe this part is the culprit as it appends LDFLAGS environment variable to executable name: https://github.com/python/cpython/blob/c994c8f/Lib/distutils/sysconfig.py#L211-L235 I attached a minimal example (it requires cython, which relies on distutils for compilation). It would be nice if LDFLAGS is appended after object files, or a new environment variable (e.g. LDLIBS) is introduced to distutils to be appended after object files. ---------- components: Distutils files: python-issue.tar.gz messages: 348436 nosy: dstufft, eric.araujo, ozars priority: normal severity: normal status: open title: distutils appends LDFLAGS environment variable before object file names Added file: https://bugs.python.org/file48505/python-issue.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 09:24:50 2019 From: report at bugs.python.org (hai shi) Date: Thu, 25 Jul 2019 13:24:50 +0000 Subject: [issue36692] Unexpected stderr output from test_sys_settrace In-Reply-To: <1555853588.91.0.708286420314.issue36692@roundup.psfhosted.org> Message-ID: <1564061090.56.0.687728681932.issue36692@roundup.psfhosted.org> hai shi added the comment: It looks like setstrace function trigger this codeline: https://github.com/python/cpython/blob/master/Modules/_asynciomodule.c#L2618 Looks we can use set_exception_handler() to catch this error, but i am not sure it is worth catching this error through adding a extended exception hander. so, Nick, what's your thought? REF: https://github.com/python/cpython/blob/master/Lib/asyncio/base_events.py#L1627 ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 09:34:29 2019 From: report at bugs.python.org (Omer Ozarslan) Date: Thu, 25 Jul 2019 13:34:29 +0000 Subject: [issue37680] distutils appends LDFLAGS environment variable before object file names In-Reply-To: <1564060967.95.0.321651965491.issue37680@roundup.psfhosted.org> Message-ID: <1564061669.07.0.753800536388.issue37680@roundup.psfhosted.org> Omer Ozarslan added the comment: Attached a better example. Run make (static_example|shared_example|working_shared_example). ---------- Added file: https://bugs.python.org/file48506/python-issue-2.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 11:12:15 2019 From: report at bugs.python.org (Batuhan) Date: Thu, 25 Jul 2019 15:12:15 +0000 Subject: [issue37680] distutils appends LDFLAGS environment variable before object file names In-Reply-To: <1564060967.95.0.321651965491.issue37680@roundup.psfhosted.org> Message-ID: <1564067535.69.0.891148496479.issue37680@roundup.psfhosted.org> Change by Batuhan : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 11:37:14 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Jul 2019 15:37:14 +0000 Subject: [issue30685] Multiprocessing Send to Manager Fails for Large Payload In-Reply-To: <1497629566.56.0.527992929641.issue30685@psf.upfronthosting.co.za> Message-ID: <1564069034.24.0.0159898278727.issue30685@roundup.psfhosted.org> Antoine Pitrou added the comment: That's right. Thanks Zackery! ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> problem using multiprocessing with really big objects? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 11:46:25 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Jul 2019 15:46:25 +0000 Subject: [issue37652] Multiprocessing shared_memory ValueError on race with ShareableList In-Reply-To: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org> Message-ID: <1564069585.56.0.98377246892.issue37652@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- nosy: +pierreglaser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 12:00:38 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Jul 2019 16:00:38 +0000 Subject: [issue37502] Fix default argument handling for buffers argument in pickle.loads In-Reply-To: <1562297595.0.0.947701314803.issue37502@roundup.psfhosted.org> Message-ID: <1564070438.03.0.980273764767.issue37502@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 898318b53d921298d1f1fcfa0f415844afbeb318 by Antoine Pitrou (Markus Mohrhard) in branch 'master': bpo-37502: handle default parameter for buffers argument of pickle.loads correctly (GH-14593) https://github.com/python/cpython/commit/898318b53d921298d1f1fcfa0f415844afbeb318 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 12:00:48 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jul 2019 16:00:48 +0000 Subject: [issue37502] Fix default argument handling for buffers argument in pickle.loads In-Reply-To: <1562297595.0.0.947701314803.issue37502@roundup.psfhosted.org> Message-ID: <1564070448.74.0.152225473551.issue37502@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14718 pull_request: https://github.com/python/cpython/pull/14948 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 12:02:38 2019 From: report at bugs.python.org (hai shi) Date: Thu, 25 Jul 2019 16:02:38 +0000 Subject: =?utf-8?q?=5Bissue37681=5D_warning=3A_=E2=80=98no=5Fsanitize=5Fthread?= =?utf-8?b?4oCZ?= Message-ID: <1564070558.89.0.656147417061.issue37681@roundup.psfhosted.org> New submission from hai shi : When I build cpython, I got this error: Objects/obmalloc.c:1414:1: warning: ?no_sanitize_thread? attribute directive ignored [-Wattributes] { ^ I removed the _Py_NO_SANITIZE_THREAD and build again, this warning dismissed. not sure ASAN?TSAN and MSAN have some inner relation? ---------- components: Build messages: 348441 nosy: shihai1991 priority: normal severity: normal status: open title: warning: ?no_sanitize_thread? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 12:18:23 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jul 2019 16:18:23 +0000 Subject: [issue37502] Fix default argument handling for buffers argument in pickle.loads In-Reply-To: <1562297595.0.0.947701314803.issue37502@roundup.psfhosted.org> Message-ID: <1564071503.89.0.506371682096.issue37502@roundup.psfhosted.org> miss-islington added the comment: New changeset 25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17 by Miss Islington (bot) in branch '3.8': bpo-37502: handle default parameter for buffers argument of pickle.loads correctly (GH-14593) https://github.com/python/cpython/commit/25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 12:19:06 2019 From: report at bugs.python.org (mental) Date: Thu, 25 Jul 2019 16:19:06 +0000 Subject: [issue37652] Multiprocessing shared_memory ValueError on race with ShareableList In-Reply-To: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org> Message-ID: <1564071546.21.0.0329686853149.issue37652@roundup.psfhosted.org> mental added the comment: I have been able to reproduce the issue. I'm currently investigating to see what exactly inside the source of ShareableList is causing what appears to be miss synchronization. Currently I think the issue is the documentation failing to mention that ShareableList does not perform atomic operations. But I'm curious if a patch that adds some internal sync primitive is out of the question here? ---------- nosy: +mental _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 12:20:52 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Jul 2019 16:20:52 +0000 Subject: [issue37502] Fix default argument handling for buffers argument in pickle.loads In-Reply-To: <1562297595.0.0.947701314803.issue37502@roundup.psfhosted.org> Message-ID: <1564071652.73.0.207504866603.issue37502@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 12:32:55 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Jul 2019 16:32:55 +0000 Subject: [issue37679] test_with_pip fails on FreeBSD 10 bot In-Reply-To: <1564049239.7.0.14830055581.issue37679@roundup.psfhosted.org> Message-ID: <1564072375.29.0.873347678814.issue37679@roundup.psfhosted.org> Steve Dower added the comment: Guessing this is a new warning in pip? Can we just disable the cache explicitly for these tests? Or should we reconfigure the buildbot to suppress the warning. ---------- nosy: +Marcus.Smith, dstufft, ncoghlan, paul.moore, pradyunsg, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 12:36:48 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Jul 2019 16:36:48 +0000 Subject: [issue37679] test_with_pip fails on FreeBSD 10 bot In-Reply-To: <1564049239.7.0.14830055581.issue37679@roundup.psfhosted.org> Message-ID: <1564072608.34.0.916038150374.issue37679@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 13:03:28 2019 From: report at bugs.python.org (Thomas Dybdahl Ahle) Date: Thu, 25 Jul 2019 17:03:28 +0000 Subject: [issue37682] random.sample should support iterators Message-ID: <1564074208.5.0.498175435162.issue37682@roundup.psfhosted.org> New submission from Thomas Dybdahl Ahle : Given a generator `f()` we can use `random.sample(list(f()), 10)` to get a uniform sample of the values generated. This is fine, and fast, as long as `list(f())` easily fits in memory. However, if it doesn't, one has to implement the reservoir sampling algorithm as a pure python function, which is much slower, and not so easy. It seems that having a fast reservoir sampling implementation in `random.sample` to use for iterators would be both useful and make the API more predictable. Currently when passing an iterator `random.sample` throws `TypeError: Population must be a sequence or set.`. This is inconsistent with most of the standard library which accepts lists and iterators transparently. I apologize if this enhancement has already been discussed. I wasn't able to find it. If wanted, I can write up a pull request. I believe questions like this: https://stackoverflow.com/questions/12581437/python-random-sample-with-a-generator-iterable-iterator makes it clear that such functionality is wanted and non-obvious. ---------- components: Library (Lib) messages: 348445 nosy: thomasahle priority: normal severity: normal status: open title: random.sample should support iterators 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 Thu Jul 25 13:14:47 2019 From: report at bugs.python.org (mental) Date: Thu, 25 Jul 2019 17:14:47 +0000 Subject: [issue37682] random.sample should support iterators In-Reply-To: <1564074208.5.0.498175435162.issue37682@roundup.psfhosted.org> Message-ID: <1564074887.5.0.212806133833.issue37682@roundup.psfhosted.org> Change by mental : ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 13:35:03 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jul 2019 17:35:03 +0000 Subject: [issue37682] random.sample should support iterators In-Reply-To: <1564074208.5.0.498175435162.issue37682@roundup.psfhosted.org> Message-ID: <1564076103.34.0.337118247648.issue37682@roundup.psfhosted.org> Serhiy Storchaka added the comment: FYI, random.sample() (as most of other functions in the random module) is implemented in pure Python. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 13:41:55 2019 From: report at bugs.python.org (Hong Xu) Date: Thu, 25 Jul 2019 17:41:55 +0000 Subject: [issue24935] LDSHARED is not set according when CC is set. In-Reply-To: <1440517644.33.0.785597906757.issue24935@psf.upfronthosting.co.za> Message-ID: <1564076515.17.0.662463875691.issue24935@roundup.psfhosted.org> Change by Hong Xu : ---------- pull_requests: +14719 pull_request: https://github.com/python/cpython/pull/14950 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 13:50:06 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jul 2019 17:50:06 +0000 Subject: [issue37682] random.sample should support iterators In-Reply-To: <1564074208.5.0.498175435162.issue37682@roundup.psfhosted.org> Message-ID: <1564077006.47.0.456295959046.issue37682@roundup.psfhosted.org> Serhiy Storchaka added the comment: Possible implementation: from itertools import islice as _islice def reservoir_sample(self, population, k): if k < 0: raise ValueError("Sample is negative") it = iter(population) result = list(_islice(it, k)) if len(result) < k: raise ValueError("Sample larger than population") self.shuffle(result) randbelow = self._randbelow for i, x in enumerate(it, k+1): j = randbelow(i) if j < k: result[j] = x return result ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 13:50:21 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Jul 2019 17:50:21 +0000 Subject: [issue37683] Use importlib.resources in venv Message-ID: <1564077021.19.0.886613759672.issue37683@roundup.psfhosted.org> New submission from Brett Cannon : Right now the venv module directly reads the file system to find the activation scripts and then copies them over. Moving over to importlib.resources would be a more portable solution. Unfortunately the venv API is specifically tied to the file system via EnvBuilder.install_scripts() (https://github.com/python/cpython/blob/master/Lib/venv/__init__.py#L341). I'm not sure how doable this idea would be due to this. ---------- components: Library (Lib) messages: 348448 nosy: barry, brett.cannon, vinay.sajip priority: low severity: normal status: open title: Use importlib.resources in venv type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 15:01:31 2019 From: report at bugs.python.org (mental) Date: Thu, 25 Jul 2019 19:01:31 +0000 Subject: [issue37652] Multiprocessing shared_memory ValueError on race with ShareableList In-Reply-To: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org> Message-ID: <1564081291.88.0.256150979002.issue37652@roundup.psfhosted.org> mental added the comment: Interestingly enough the race only seems to occur when the mutator resets the index with an identical value (try replacing the setitem value with: `not X[0]` or populate from `[b'hi']` and with the mutator code use `X[0][::1]`. I can't help but think to implement an internal cache that would store the hash of the last modified value, then when another set occurs compare the two hashes and have the operation be a no-op if they match (thoughts?). In the meantime I'll continue investigating to see what exactly causes this quirk :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 15:47:06 2019 From: report at bugs.python.org (wim glenn) Date: Thu, 25 Jul 2019 19:47:06 +0000 Subject: [issue37684] list.extend docs inaccurate Message-ID: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> New submission from wim glenn : >From https://docs.python.org/3/tutorial/datastructures.html#more-on-lists : list.extend(iterable) Extend the list by appending all the items from the iterable. Equivalent to a[len(a):] = iterable. The "equivalent" is not very good. Consider def gen(): yield 1 yield 2 raise Exception Using `a.extend(gen())` would mutate `a`. Using slice assignment would still consume the generator, but `a` would not be modified. I propose a different example to use to describe the behaviour of extend: for x in iterable: a.append(x) ---------- assignee: docs at python components: Documentation messages: 348450 nosy: docs at python, wim.glenn priority: normal severity: normal status: open title: list.extend docs inaccurate 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 Jul 25 15:56:34 2019 From: report at bugs.python.org (wim glenn) Date: Thu, 25 Jul 2019 19:56:34 +0000 Subject: [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564084594.79.0.0365961357771.issue37684@roundup.psfhosted.org> Change by wim glenn : ---------- keywords: +patch pull_requests: +14720 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14951 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 16:27:17 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Jul 2019 20:27:17 +0000 Subject: [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1564086437.22.0.826867406463.issue37674@roundup.psfhosted.org> Brett Cannon added the comment: It's deprecated: https://github.com/python/cpython/blob/master/Lib/imp.py#L31. The wording is from back when the module was soft-deprecated via documentation before it was hard-deprecated via code. Feel free to tweak it to say "The imp module is deprecated in favor of :mod:`importlib`." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 17:07:46 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jul 2019 21:07:46 +0000 Subject: [issue37685] Fix equality checks for some types Message-ID: <1564088866.66.0.720895226226.issue37685@roundup.psfhosted.org> New submission from Serhiy Storchaka : The __eq__ implementation should return NotImplemented instead of False or raising an exception (like AttributeError or TypeError) when it does not support comparison with the other operand's type. It is so for most of implementations in the stdlib, but there are several exceptions. The proposed patch fixes these cases. ---------- components: Library (Lib) messages: 348452 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Fix equality checks for some types type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 17:14:58 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jul 2019 21:14:58 +0000 Subject: [issue37685] Fix equality checks for some types In-Reply-To: <1564088866.66.0.720895226226.issue37685@roundup.psfhosted.org> Message-ID: <1564089298.88.0.352788065253.issue37685@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +14721 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14952 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 17:16:11 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jul 2019 21:16:11 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1564089371.58.0.967112732331.issue37555@roundup.psfhosted.org> Serhiy Storchaka added the comment: See issue37685. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 17:16:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Jul 2019 21:16:37 +0000 Subject: [issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time In-Reply-To: <1562995541.72.0.689612631399.issue37579@roundup.psfhosted.org> Message-ID: <1564089397.87.0.315031375933.issue37579@roundup.psfhosted.org> Serhiy Storchaka added the comment: See issue37685. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 17:37:03 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Jul 2019 21:37:03 +0000 Subject: [issue37641] Embeddable distribution pyc filenames show build machine location In-Reply-To: <1563707241.42.0.696780467352.issue37641@roundup.psfhosted.org> Message-ID: <1564090623.93.0.674572034157.issue37641@roundup.psfhosted.org> Steve Dower added the comment: New changeset c4cda4369f4b8f33082890d16dfc364a90658ef6 by Steve Dower (Bill Collins) in branch 'master': bpo-37641 preserve relative file location in embeddable zip (GH-14884) https://github.com/python/cpython/commit/c4cda4369f4b8f33082890d16dfc364a90658ef6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 17:37:16 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jul 2019 21:37:16 +0000 Subject: [issue37641] Embeddable distribution pyc filenames show build machine location In-Reply-To: <1563707241.42.0.696780467352.issue37641@roundup.psfhosted.org> Message-ID: <1564090636.8.0.248957999322.issue37641@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14722 pull_request: https://github.com/python/cpython/pull/14953 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 17:55:48 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Jul 2019 21:55:48 +0000 Subject: [issue37641] Embeddable distribution pyc filenames show build machine location In-Reply-To: <1563707241.42.0.696780467352.issue37641@roundup.psfhosted.org> Message-ID: <1564091748.27.0.673606583098.issue37641@roundup.psfhosted.org> miss-islington added the comment: New changeset 0f211979c29109dcffc3039a24a9d3ecdfd900c9 by Miss Islington (bot) in branch '3.8': bpo-37641 preserve relative file location in embeddable zip (GH-14884) https://github.com/python/cpython/commit/0f211979c29109dcffc3039a24a9d3ecdfd900c9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 18:08:27 2019 From: report at bugs.python.org (Bin Hu) Date: Thu, 25 Jul 2019 22:08:27 +0000 Subject: [issue37686] No error message in joining two root directories Message-ID: <1564092507.62.0.964588671803.issue37686@roundup.psfhosted.org> New submission from Bin Hu : Two root directories shall not be joined in the first place. But, when such a command is passed, os.path.join() module should give a warning message instead of just keeping the second argument being passed as the output. Python 3.7.3 (default, Mar 27 2019, 16:54:48) Type 'copyright', 'credits' or 'license' for more information IPython 7.4.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: from os import path In [2]: a = '/tmp' In [3]: b = '/data' In [4]: print(path.join(a, b)) /data In [5]: b = 'data' In [6]: print(path.join(a, b)) /tmp/data ---------- components: Extension Modules messages: 348457 nosy: Bin Hu priority: normal severity: normal status: open title: No error message in joining two root directories versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 18:34:42 2019 From: report at bugs.python.org (belegnar) Date: Thu, 25 Jul 2019 22:34:42 +0000 Subject: [issue37687] Invalid regexp should rise exception Message-ID: <1564094082.03.0.663017833645.issue37687@roundup.psfhosted.org> New submission from belegnar : `re.error` should be rised on `re.compile("string{data}")` because manual says only numbers are valid within `{}` ---------- components: Regular Expressions messages: 348458 nosy: belegnar, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Invalid regexp should rise exception versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 19:16:22 2019 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 25 Jul 2019 23:16:22 +0000 Subject: [issue37687] Invalid regexp should rise exception In-Reply-To: <1564094082.03.0.663017833645.issue37687@roundup.psfhosted.org> Message-ID: <1564096582.17.0.981714540823.issue37687@roundup.psfhosted.org> Matthew Barnett added the comment: For historical reasons, if it isn't valid as a repeat then it's a literal. This is true in other regex implementations, and is by no means unique to the re module. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 19:56:52 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 25 Jul 2019 23:56:52 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564099012.45.0.992302402957.issue37628@roundup.psfhosted.org> Terry J. Reedy added the comment: I consider it a bug for *IDLE* to place and size windows so that the bottom of the window is hidden. (If users, perhaps temporarily, move a window down so that the bottom is hidden, that is their business.) This is especially bad for the Settings dialog because the Enter and Escape keys are not bound to the Ok and Cancel handlers, as with at least most of the other dialogs. This should be easy to fix. The general problem in preventing over-sizing and misplacement is that, as far as Tal and I know, tk will only tell us the full size of a particular screen, not the current, usually reduced, view size. Until about a month ago, ZoomHeight used platform-specific expressions from long ago that do not, in general, work now. For issue #37039, Tal's solution was to 'calibrate' each screen the first time a window is zoomed on a screen in a session. The window is maximized, the pixel height is saved, and the window is narrowed to what is was. The saved height is used for subsequent zooms. Maximizing works because the OS + tk maximize to the current view size, depending on the current screen settings. I suggested then the possibility of IDLE opening with a maximized splash screen. Tal objected that this a) did not solve the problem of multiple screens, and b) would unnecessarily bother people who never zoom. But zoom height is not the only feature that needs this knowledge. On my machine with 45 line shell/editor windows, Shell is initially placed too low if I open IDLE one particular way. I'll leave that to another issue. For the config dialog, there is a geometry bug independent of the font sample content. Even if the box is cleared, the dialog expands with font size. Fixing this is also a priority. To completely solve geometry issues, we again need to know the screen's view height. If not available, we would have to momentarily maximize the dialog as now done with zoom height. The height of the Setting dialog is the maximum of the page sizes. For normal font sizes, the font page is the shortest of the first 4, meaning that is has the most extra space. The Highlight and General pages seem to be equally tallest. So adding settings to the latter will increase the minimum size. For 3.7.3, the dialog already fills the view height between menu line and icon bar on my Macbook Air. But it is opened a quarter of the way down, so that a quarter of the dialog is covered. This is another geometry bug. On this machine, the dialog should be opened flush up against the app menu. But hard-coding that for all machines would likely annoy most people who do not need that positioning. I am worried that the addition of two more items to the General page, for zoom height and line numbers, will make the dialog too tall for the available space. When 3.8.0a3 is released, I will check. I am thinking of moving indent size, revised, to the General page and moving Additional Help Sources, possibly flattened a bit, to the Font page. Perhaps we should try to make the pages wider rather than taller. ---------- nosy: +taleinat stage: -> needs patch title: IDLE Font Sample distracting and too large -> IDLE: Fix Font sample (config dialog) geometry type: -> behavior versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 21:30:42 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Jul 2019 01:30:42 +0000 Subject: [issue29446] Improve tkinter 'import *' situation In-Reply-To: <1486243465.34.0.0929989866435.issue29446@psf.upfronthosting.co.za> Message-ID: <1564104642.01.0.219528451498.issue29446@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 76b645124b3aaa34bc664eece43707c01ef1b382 by Terry Jan Reedy (Flavian Hautbois) in branch 'master': bpo-29446: tkinter 'import *' only imports what it should (GH-14864) https://github.com/python/cpython/commit/76b645124b3aaa34bc664eece43707c01ef1b382 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 21:36:33 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Jul 2019 01:36:33 +0000 Subject: [issue29446] Improve tkinter 'import *' situation In-Reply-To: <1486243465.34.0.0929989866435.issue29446@psf.upfronthosting.co.za> Message-ID: <1564104993.24.0.598602908583.issue29446@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 01:28:32 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 05:28:32 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1564118912.54.0.623522634588.issue37585@roundup.psfhosted.org> Change by Kyle Stanley : ---------- pull_requests: +14723 pull_request: https://github.com/python/cpython/pull/14954 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 01:31:33 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 05:31:33 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1564119093.32.0.54531012447.issue37585@roundup.psfhosted.org> Kyle Stanley added the comment: Based on the current status of the discussion in python-dev, the most agreed upon solution so far seems to be updating the documentation to mention this behavior, rather than modifying the existing behavior. I opened a PR which updates the documentation for dict.values() to mention this, feel free to leave any suggestions. python-dev discussion archive: https://mail.python.org/archives/list/python-dev at python.org/thread/R2MPDTTMJXAF54SICFSAWPPCCEWAJ7WF/#723CHZBH4ZBKQJOOPXFFX3HYSPDBPDPR ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 01:35:02 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 05:35:02 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1564119302.03.0.869356762995.issue37585@roundup.psfhosted.org> Kyle Stanley added the comment: Added Brett to the nosy list since he was the one who suggested a documentation change. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 01:50:13 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Jul 2019 05:50:13 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564120213.31.0.44960237972.issue37628@roundup.psfhosted.org> Tal Einat added the comment: Since it's a text widget, it would be simple and rather intuitive to make it scrollable. We could then make its size set according to the size of the config dialog window, rather than the other way around. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 02:05:58 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Jul 2019 06:05:58 +0000 Subject: [issue37340] remove free_list for bound method objects In-Reply-To: <1560948861.51.0.564500331945.issue37340@roundup.psfhosted.org> Message-ID: <1564121158.13.0.402216692732.issue37340@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 3e54b575313c64f541e98216ed079fafed01ff5d by Inada Naoki in branch 'master': bpo-37340: remove free_list for bound method objects (GH-14232) https://github.com/python/cpython/commit/3e54b575313c64f541e98216ed079fafed01ff5d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 02:09:21 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Jul 2019 06:09:21 +0000 Subject: [issue37682] random.sample should support iterators In-Reply-To: <1564074208.5.0.498175435162.issue37682@roundup.psfhosted.org> Message-ID: <1564121361.06.0.570868393467.issue37682@roundup.psfhosted.org> Raymond Hettinger added the comment: ISTM that if a generator produces so much data that it is infeasible to fit in memory, then it will also take a long time to loop over it and generate a random value for each entry. FWIW, every time we've looked at reservoir sampling it has been less performant than what we have now. The calls to randbelow() are the slowest part, so doing more calls makes the overall performance worse. Also, doing more calls eats more entropy. In general, it is okay for functions to accept only sequences if they exploit indexing in some way. For example, the current approach works great with sample(range(100_000_000_000), k=50). We really don't have to make everything accept all iterators. Besides, it is trivially easy to call list() if needed. Overall, I'm -1 on redesigning the sampling algorithm to accommodate non-sequence iterators. AFAICT, it isn't important at all and as Serhiy pointed out, writing your own reservoir sampling is easy do. Lastly, the standard library doesn't try to be all things to all people, it is okay to leave many things for external packages -- we mostly provide a baseline of tools that cover common use cases and defer the rest to the Python ecosystem. ---------- assignee: -> rhettinger versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 02:18:19 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Jul 2019 06:18:19 +0000 Subject: [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564121899.3.0.430187377915.issue37684@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the suggestion, but I'm going to reject this. The existing rough equivalent isn't exact but it does do a better job of communicating a bulk update rather than a series of appends. Also, it isn't far from how the C list_extend() is actually implemented ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 02:31:25 2019 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Jul 2019 06:31:25 +0000 Subject: [issue37686] No error message in joining two root directories In-Reply-To: <1564092507.62.0.964588671803.issue37686@roundup.psfhosted.org> Message-ID: <1564122685.84.0.869457598206.issue37686@roundup.psfhosted.org> Eryk Sun added the comment: The behavior in question is documented as follows: "If a component is an absolute path, all previous components are thrown away and joining continues from the absolute path component." In Windows, this is extended to support drives and the six file-path types: Absolute: DOS-Drive - C:\spam UNC - \\localhost\C$\spam Device - \\.\C:\spam - \\?\C:\spam Hybrid [1]: DOS-Drive - C:spam Rooted - \spam Relative - spam Python extends the notion of a drive to UNC shares and devices [2]. join() handles all components with a drive as absolute. A rooted component that lacks a drive is not absolute, so it replaces only the root path of previous components, not the drive. --- [1] os.path.isabs mistakenly classifies rooted paths as absolute, but they're relative to the working drive. pathlib.Path.is_absolute gets it right. [2] There are unresolved issues with device paths. For example, "\\?\C:" is mistakenly handled as a drive-relative path, and the semantics of the "UNC" device and "Global" link aren't implemented. ---------- components: +Library (Lib) -Extension Modules nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 02:55:04 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 06:55:04 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1564124104.72.0.456479032643.issue17535@roundup.psfhosted.org> Kyle Stanley added the comment: After testing it on Linux (through the latest dev version, launched with `./.python -m idlelib`), the line numbers seem to be working quite well across several different fonts and font sizes. My only suggestion for minor visual improvement would be to increase the margin between the right side of the number and the line. While moving through a number of different fonts and sizes, I noticed a separate issue involving the window scaling based on the size of the font previews. This isn't an issue for smaller fonts, but when attempting to use larger fonts (upper 20s or into the 30s depending on the font in question) the 4 buttons ("Ok", "Apply", "Cancel", and "Help") in the settings menu (options > configure IDLE) are moved past the lower end of the screen, making them no longer visible to the user. Either way, this change is pretty awesome. The only thing preventing me from using the IDLE more was the lack of line numbers, so I'll definitely be using it a lot more now. Thanks for the PR taleinat! ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:02:40 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 07:02:40 +0000 Subject: [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564124560.47.0.747410217947.issue37684@roundup.psfhosted.org> Kyle Stanley added the comment: Raymond, what were your thoughts on the alternative suggestion I posted on the GitHub PR? My suggestion might have been too different from the original PR, but personally I think it's a bit more appropriate for the tutorial than the existing example. Would it be worth opening a separate PR for it, or do you prefer the existing example? ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:03:45 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 07:03:45 +0000 Subject: [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564124625.42.0.365538613078.issue37684@roundup.psfhosted.org> Kyle Stanley added the comment: Clarification: Since I posted two potential suggestions, I'm referring to the one using the interpreter, not the one that changed it into two lines and added indentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:05:57 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Jul 2019 07:05:57 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1564124757.49.0.145742740676.issue17535@roundup.psfhosted.org> Tal Einat added the comment: Thanks for trying this and giving such useful feedback, Kyle! Interestingly, Terry just opened an issue about exactly what you mention regarding the font configuration window; see issue #37628. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:08:06 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Jul 2019 07:08:06 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1564124886.31.0.237013612771.issue17535@roundup.psfhosted.org> Tal Einat added the comment: Correction: Terry commented on that issue (#37628) earlier today; Raymond Hettinger originally reported it a about a week ago. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:12:05 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Jul 2019 07:12:05 +0000 Subject: [issue37340] remove free_list for bound method objects In-Reply-To: <1560948861.51.0.564500331945.issue37340@roundup.psfhosted.org> Message-ID: <1564125125.82.0.788276657357.issue37340@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:22:58 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Jul 2019 07:22:58 +0000 Subject: [issue37682] random.sample should support iterators In-Reply-To: <1564074208.5.0.498175435162.issue37682@roundup.psfhosted.org> Message-ID: <1564125778.39.0.257095861312.issue37682@roundup.psfhosted.org> Serhiy Storchaka added the comment: > ISTM that if a generator produces so much data that it is infeasible to fit in memory, then it will also take a long time to loop over it and generate a random value for each entry. Good point! $ ./python -m timeit -s 'from random import sample as s' 's(range(10**6), 50)' 10000 loops, best of 5: 25.6 usec per loop $ ./python -m timeit -s 'from random import sample as s' 's(list(range(10**6)), 50)' 10 loops, best of 5: 31.5 msec per loop $ ./python -m timeit -s 'from random import reservoir_sample as s' 's(range(10**6), 50)' 1 loop, best of 5: 328 msec per loop $ ./python -m timeit -s 'from random import sample as s' 's(range(10**8), 50)' 10000 loops, best of 5: 26.9 usec per loop $ ./python -m timeit -s 'from random import sample as s' 's(list(range(10**8)), 50)' 1 loop, best of 5: 3.41 sec per loop $ ./python -m timeit -s 'from random import reservoir_sample as s' 's(range(10**8), 50)' 1 loop, best of 5: 36.5 sec per loop It is possible that a generator produces not so much data, but every item takes much memory so the total size does not fit in memory. But I suppose that the generation time of larger items will be proportionally larger, so reservoir_sample() will be just as slow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:23:57 2019 From: report at bugs.python.org (Kirill Balunov) Date: Fri, 26 Jul 2019 07:23:57 +0000 Subject: [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. Message-ID: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> New submission from Kirill Balunov : In the documentation it is said that os.path.isdir(...) an Path(...).is_dir()are equivalent substitutes. https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module But they give different result for empty path strings: >>> import os >>> from pathlib import Path >>> dummy = "" >>> os.path.isdir(dummy) False Obviously it's not an equivalence, so either this should be noted in the documentation or corrected in the code. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 348475 nosy: docs at python, godaygo priority: normal severity: normal status: open title: The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:25:27 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Jul 2019 07:25:27 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564125927.84.0.442585314467.issue37628@roundup.psfhosted.org> Terry J. Reedy added the comment: And maybe a horizontal scroll. In any case, line wrap should be off. Feel free to whip up a minimal change PR that we can merge before Monday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:27:13 2019 From: report at bugs.python.org (Kirill Balunov) Date: Fri, 26 Jul 2019 07:27:13 +0000 Subject: [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564126033.12.0.630711034898.issue37688@roundup.psfhosted.org> Kirill Balunov added the comment: Forgot to write the result for Path variant: >>> Path(dummy).is_dir() True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:34:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Jul 2019 07:34:09 +0000 Subject: [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564126449.88.0.270704553082.issue37688@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is because Path() == Path('') == Path('.'). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:34:32 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Jul 2019 07:34:32 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1564126472.46.0.988502538333.issue17535@roundup.psfhosted.org> Terry J. Reedy added the comment: The current right margin is 1 pixel. Let's try making it 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:34:49 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 07:34:49 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1564126489.41.0.287735982967.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: Upon further consideration, I think that it would be best to leave the code examples as is in the "inputoutput" tutorial, but it still be worth mentioning that the constants exist as alternatives. This is due to adding the additional step of "import io" in order to be able to access the constants. The tutorial code examples should probably aim to not add additional extra lines that are not needed. While I was working on a PR for updating the tutorial, I noticed that the second argument's name for seek() was *from_what* instead of *whence*. Was this an older name for the argument that is now outdated or am I missing something? Doc/tutorial: https://github.com/python/cpython/blob/master/Doc/tutorial/inputoutput.rst#methods-of-file-objects Doc/library: https://docs.python.org/3/library/io.html#io.IOBase.seek ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:52:17 2019 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Jul 2019 07:52:17 +0000 Subject: [issue37676] cmath.phase array support In-Reply-To: <1564036874.95.0.313936205307.issue37676@roundup.psfhosted.org> Message-ID: <1564127537.77.0.753934035399.issue37676@roundup.psfhosted.org> Mark Dickinson added the comment: I think you want numpy.angle (https://docs.scipy.org/doc/numpy/reference/generated/numpy.angle.html). NumPy is a third-party library, so it doesn't make sense to have the math or cmath functions be aware of NumPy arrays; none of the other math or cmath functions work on arrays. Generally for this sort of thing you want to look for a solution in NumPy or SciPy. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 04:07:52 2019 From: report at bugs.python.org (Kirill Balunov) Date: Fri, 26 Jul 2019 08:07:52 +0000 Subject: [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564128472.85.0.382196540199.issue37688@roundup.psfhosted.org> Kirill Balunov added the comment: I understand the reasons, I only say that it does not correspond to my perception of their equivalence, because: os.path.isdir('') != os.path.isdir('.') while: Path('').is_dir() == Path('.').is_dir() and I can confirm that some libraries rely on os.path.isdir('') -> False behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 04:10:04 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Jul 2019 08:10:04 +0000 Subject: [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564128604.35.0.199018107994.issue37688@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 04:15:18 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Fri, 26 Jul 2019 08:15:18 +0000 Subject: [issue37679] test_with_pip fails on FreeBSD 10 bot In-Reply-To: <1564049239.7.0.14830055581.issue37679@roundup.psfhosted.org> Message-ID: <1564128918.95.0.0601988815256.issue37679@roundup.psfhosted.org> Kubilay Kocak added the comment: Since this is likely a regression from issue 37664, which is still open, and also contains the report, I'd close this issue in favour of the former. Having regression reports in separate issues for still open in new/separate issues tends to results in them not being addressed in a timely manner. If it turns out this is not related to the commits from issue 37664, this can be re-opened. Having said that, these bots have been stable and green for a substantial amount of time, so in almost all cases (upgrades to the bots not withstanding), new regressions/failures are almost certainly newly introduced ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 04:29:52 2019 From: report at bugs.python.org (Ben Lewis) Date: Fri, 26 Jul 2019 08:29:52 +0000 Subject: [issue37409] relative import without parent succeeds with builtins.__import__ In-Reply-To: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> Message-ID: <1564129792.87.0.0490758557756.issue37409@roundup.psfhosted.org> Change by Ben Lewis : ---------- pull_requests: +14724 pull_request: https://github.com/python/cpython/pull/14956 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 04:49:18 2019 From: report at bugs.python.org (David Wilson) Date: Fri, 26 Jul 2019 08:49:18 +0000 Subject: [issue36279] os.wait3() leaks some uninitialized stack when no processes exist In-Reply-To: <1552447660.04.0.72531550499.issue36279@roundup.psfhosted.org> Message-ID: <1564130958.93.0.663407367807.issue36279@roundup.psfhosted.org> David Wilson added the comment: The original diff is attached here (per the old process) so others can find it, and the PR+fork are closed, as carrying a fork in my GitHub for 4 months has non-zero cost. I'm presently more interested in having a clean GH account than carrying around the baggage of forgotten old patches ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed Added file: https://bugs.python.org/file48507/c805d2764e6a0ee4d22a338c5f4fef6154df8687.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 05:18:18 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Jul 2019 09:18:18 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1564132698.38.0.923425712328.issue37635@roundup.psfhosted.org> Antoine Pitrou added the comment: I don't know. "whence" is the official name of the argument in the POSIX API: https://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html Perhaps "from_what" is assumed to be more understandable by the average reader? Also, os.lseek() uses "how": https://docs.python.org/3/library/os.html#os.lseek ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 05:25:43 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Jul 2019 09:25:43 +0000 Subject: [issue37682] random.sample should support iterators In-Reply-To: <1564074208.5.0.498175435162.issue37682@roundup.psfhosted.org> Message-ID: <1564133143.17.0.348795694018.issue37682@roundup.psfhosted.org> Raymond Hettinger added the comment: Thomas, thank you for the suggestion but I think we should decline. The API for sample() is consistent with choice(), choices() and shuffle(). For the most part the sequence based API has worked out well. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 05:26:37 2019 From: report at bugs.python.org (Daniel Hillier) Date: Fri, 26 Jul 2019 09:26:37 +0000 Subject: [issue37538] Refactor zipfile to ease subclassing and enhancement In-Reply-To: <1562741910.34.0.615692848434.issue37538@roundup.psfhosted.org> Message-ID: <1564133197.57.0.467597403817.issue37538@roundup.psfhosted.org> Change by Daniel Hillier : ---------- keywords: +patch pull_requests: +14725 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 07:23:47 2019 From: report at bugs.python.org (Pierre Glaser) Date: Fri, 26 Jul 2019 11:23:47 +0000 Subject: [issue37652] Multiprocessing shared_memory ValueError on race with ShareableList In-Reply-To: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org> Message-ID: <1564140227.15.0.734284387477.issue37652@roundup.psfhosted.org> Pierre Glaser added the comment: The root of the error is that struct.pack_into starts by memsetting the underlying memory area with NULL bytes before filling the data with memcpy. If ShareableList._get_packing_format is called between the two operations (through a concurrent __getitem__ call from another process), struct.unpack_from will return an empty tuple which is the direct cause of the error you're seeing. In the general case though, memcpy is not atomic so even without the memset call before, results of struct.unpack_from may be invalid in a concurrent setting. shared_memory is a low level python module. Precautions should be made when handling concurrently the shared_memory objects using synchronization primitives for example. I'm not sure this should be done internally in the SharedMemory class -- especially, we don't want to slow down concurrent READ access. +1 For a documentation addition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 08:50:58 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Jul 2019 12:50:58 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564145458.49.0.916888562543.issue37628@roundup.psfhosted.org> Change by Tal Einat : ---------- keywords: +patch pull_requests: +14726 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14958 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 08:51:36 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Jul 2019 12:51:36 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564145496.05.0.729265996163.issue37628@roundup.psfhosted.org> Tal Einat added the comment: See proposed fix in PR GH-14958. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 09:11:05 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 13:11:05 +0000 Subject: [issue37679] test_with_pip fails on FreeBSD 10 bot In-Reply-To: <1564049239.7.0.14830055581.issue37679@roundup.psfhosted.org> Message-ID: <1564146665.04.0.877874619315.issue37679@roundup.psfhosted.org> Steve Dower added the comment: Could you please nosy yourself on the other issue and help us address it then? The only change was upgrading pip, and the error is just a new warning message, but unless someone knows how bad it is then we'll "fix" it by ignoring the warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 09:14:31 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Jul 2019 13:14:31 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1564146871.31.0.713865421797.issue17535@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +14727 pull_request: https://github.com/python/cpython/pull/14959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 09:14:44 2019 From: report at bugs.python.org (Kaeptm Blaubaer) Date: Fri, 26 Jul 2019 13:14:44 +0000 Subject: [issue31370] Remove support for threads-less builds In-Reply-To: <1504732249.83.0.180664230366.issue31370@psf.upfronthosting.co.za> Message-ID: <1564146884.73.0.21525717954.issue31370@roundup.psfhosted.org> Kaeptm Blaubaer added the comment: Unfortunately, this also leads to less good LTO if you use a single static executable, similar to what Tools/freeze produces but including libpython itself. I'm currently trying to make LLVM do that, but since I can't build without threads, it'd be extremely hard to tell it that it can remove all threading related things (like TLS) and inline them. This means I'll have to patch CPython on my own to remove thread support, but unfortunately this also means I can't guarantee that it continues to work, as well as that it makes it a lot more likely that my build won't support many third-party libraries. ---------- nosy: +kb1000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 09:17:20 2019 From: report at bugs.python.org (Tal Einat) Date: Fri, 26 Jul 2019 13:17:20 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1564147040.53.0.434309075202.issue17535@roundup.psfhosted.org> Tal Einat added the comment: > The current right margin is 1 pixel. Let's try making it 2. See PR GH-14959. I added 2 pixels of horizontal padding to the line numbers text widget, and it certainly does look much nicer. Thanks for the suggestion, Kyle! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 11:31:28 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 15:31:28 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564155088.55.0.654012195406.issue37664@roundup.psfhosted.org> Steve Dower added the comment: Actually, we're already ignoring this message, but now it includes "WARNING: " at the start and doesn't match the existing regex. So we can just continue to ignore it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 11:33:52 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 15:33:52 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564155232.96.0.646555800678.issue37664@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +14728 pull_request: https://github.com/python/cpython/pull/14960 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 11:36:56 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 26 Jul 2019 15:36:56 +0000 Subject: [issue35476] _imp_create_dynamic_impl() does not clear error. In-Reply-To: <1544642479.77.0.788709270274.issue35476@psf.upfronthosting.co.za> Message-ID: <1564155416.31.0.465979498253.issue35476@roundup.psfhosted.org> Eric Snow added the comment: Hmm, looks like this was already fixed by Serhiy (for bpo-35454) the day before I opened this issue. :) 3.8/master: GH-11077 8905fcc85a6fc3ac394bc89b0bbf40897e9497a6 3.7: GH-11105 62674f3a36ec55f86a5f20ee028a37fbd549bd6c 3.6: GH-11106 8855d9339858683c9b4fcd50b02a7bca526d4726 That's what I get for not keeping my local clone up-to-date. ---------- nosy: +serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 11:39:35 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 26 Jul 2019 15:39:35 +0000 Subject: [issue35476] _imp_create_dynamic_impl() does not clear error. In-Reply-To: <1544642479.77.0.788709270274.issue35476@psf.upfronthosting.co.za> Message-ID: <1564155575.15.0.747036696624.issue35476@roundup.psfhosted.org> Eric Snow added the comment: Sorry, @Batuhan. We appreciate your effort and would be glad to see more contributions from you. I hope you at least learned something positive while working on this. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 11:47:18 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Jul 2019 15:47:18 +0000 Subject: [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564156038.3.0.319897885969.issue37688@roundup.psfhosted.org> Brett Cannon added the comment: I think you're reading "equivalence" too strictly here to mean "exactly the same semantics". In this instance it means "for similar functionality, the equivalent method is ..." (admittedly this might be a quirk of the use of the word "equivalent" in North American English). But I can see why you would interpret it the way you do. Please feel free to propose a PR to clarify the phrasing. ---------- nosy: +brett.cannon type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 11:53:34 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Jul 2019 15:53:34 +0000 Subject: [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564156414.75.0.877874989904.issue37688@roundup.psfhosted.org> Antoine Pitrou added the comment: If "equivalent" is deceiving, perhaps replace it with "similary" or "roughly equivalent". Feel free to post a PR with your preferred wording. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 11:53:34 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 26 Jul 2019 15:53:34 +0000 Subject: [issue37496] Support annotations in signature strings. In-Reply-To: <1562197526.36.0.0415942737779.issue37496@roundup.psfhosted.org> Message-ID: <1564156414.59.0.755258837353.issue37496@roundup.psfhosted.org> Eric Snow added the comment: +1 on using a string for Parameter.annotation and Signature.return_annotation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 11:56:04 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Jul 2019 15:56:04 +0000 Subject: [issue37689] Add Path.is_relative_to() Message-ID: <1564156564.69.0.23140154802.issue37689@roundup.psfhosted.org> New submission from Antoine Pitrou : Right now, to know whether a Path is relative to another one, you have to call Path.relative_to(), catch ValueError, and act in consequence. It would be nice to have a Path.is_relative_to() that does the equivalent for you and returns True/False. This is probably a good easy issue for a beginner contributor. ---------- components: Library (Lib) keywords: easy messages: 348498 nosy: pitrou, vstinner priority: normal severity: normal stage: needs patch status: open title: Add Path.is_relative_to() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:06:29 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 16:06:29 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564157189.24.0.669382933192.issue37664@roundup.psfhosted.org> Steve Dower added the comment: New changeset b1eb20e68e30c8ab128f9d63d622f0a8b49dcf34 by Steve Dower in branch 'master': bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960) https://github.com/python/cpython/commit/b1eb20e68e30c8ab128f9d63d622f0a8b49dcf34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:06:30 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Jul 2019 16:06:30 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564157190.13.0.950124429237.issue37664@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14729 pull_request: https://github.com/python/cpython/pull/14961 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:09:31 2019 From: report at bugs.python.org (wim glenn) Date: Fri, 26 Jul 2019 16:09:31 +0000 Subject: [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564157371.38.0.645869938432.issue37684@roundup.psfhosted.org> wim glenn added the comment: Raymond, I understand that consecutive appends could potentially trigger multiple resizes behind the scenes, and so it's not really showing that extend is more like a bulk update as you mentioned. That's a good point! However I think it's a more important consideration to make sure the equivalent actually gives a correct *result*. Can you suggest an alternative code snippet to use which is correct, or perhaps soften the language claiming that the code is equivalent? For what it's worth, the stdtypes.html docs writes that extend is "for the most part the same as" the slice assignment: https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:24:46 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Jul 2019 16:24:46 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564158286.51.0.926270828629.issue37664@roundup.psfhosted.org> miss-islington added the comment: New changeset c5033901263d64a533ee47a84c6d286a223540c9 by Miss Islington (bot) in branch '3.8': bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960) https://github.com/python/cpython/commit/c5033901263d64a533ee47a84c6d286a223540c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:35:13 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 16:35:13 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564158913.74.0.617792196649.issue37664@roundup.psfhosted.org> Steve Dower added the comment: Hey Ned, would you like a bundled pip update for 3.7? We haven't gone that far back. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:35:48 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 16:35:48 +0000 Subject: [issue36529] Python from WindowsStore: can't install package using "-m pip" In-Reply-To: <1554407848.88.0.523569372633.issue36529@roundup.psfhosted.org> Message-ID: <1564158948.57.0.0192904150618.issue36529@roundup.psfhosted.org> Steve Dower added the comment: Resolved by issue37672 (because I didn't find this issue when I was looking for it, so I created a new one) ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Switch Windows Store package to use pip.ini for user mode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:36:59 2019 From: report at bugs.python.org (hai shi) Date: Fri, 26 Jul 2019 16:36:59 +0000 Subject: [issue37689] Add Path.is_relative_to() In-Reply-To: <1564156564.69.0.23140154802.issue37689@roundup.psfhosted.org> Message-ID: <1564159019.22.0.335599040967.issue37689@roundup.psfhosted.org> hai shi added the comment: antoine, let me try it;) ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:39:28 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 16:39:28 +0000 Subject: [issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage In-Reply-To: <1513938975.69.0.213398074469.issue32409@psf.upfronthosting.co.za> Message-ID: <1564159168.25.0.00592588042647.issue32409@roundup.psfhosted.org> Steve Dower added the comment: This appears to be completely resolved now, but if it's not, please ping with the details and we'll reopen. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:39:50 2019 From: report at bugs.python.org (Fabian Raab) Date: Fri, 26 Jul 2019 16:39:50 +0000 Subject: [issue37287] picke cannot dump Exception subclasses with different super() args In-Reply-To: <1560555045.5.0.822054090592.issue37287@roundup.psfhosted.org> Message-ID: <1564159190.81.0.416311161958.issue37287@roundup.psfhosted.org> Fabian Raab added the comment: It seems to that this problem is affecting __new__ methods independent of exceptions: >>> class NewBreaker: ... def __new__(cls, arg): ... return super().__new__(cls) ... >>> nb = NewBreaker(42) >>> import pickle >>> dumped = pickle.dumps(nb) >>> pickle.loads(dumped) Traceback (most recent call last): File "", line 1, in TypeError: __new__() missing 1 required positional argument: 'arg' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:40:38 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 16:40:38 +0000 Subject: [issue34011] Default preference not given to venv DLL's In-Reply-To: <1530353263.14.0.56676864532.issue34011@psf.upfronthosting.co.za> Message-ID: <1564159238.04.0.857117035938.issue34011@roundup.psfhosted.org> Change by Steve Dower : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:44:42 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 16:44:42 +0000 Subject: [issue12989] Consistently handle path separator in Py_GetPath on Windows In-Reply-To: <1316131696.55.0.834479609561.issue12989@psf.upfronthosting.co.za> Message-ID: <1564159482.13.0.7708326411.issue12989@roundup.psfhosted.org> Steve Dower added the comment: This code has been significantly rewritten since this bug, and I believe it's no longer an issue. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:50:18 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 26 Jul 2019 16:50:18 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564159818.9.0.773582987575.issue37664@roundup.psfhosted.org> Ned Deily added the comment: Yeah, we should update 3.7, too, so people don?t keep getting the upgrade warning. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:54:21 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Jul 2019 16:54:21 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564160061.0.0.366363958527.issue37664@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14730 pull_request: https://github.com/python/cpython/pull/14963 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:54:49 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Jul 2019 16:54:49 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564160089.52.0.861256996038.issue37664@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14731 pull_request: https://github.com/python/cpython/pull/14964 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:13:38 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Jul 2019 17:13:38 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564161218.59.0.071683963512.issue37664@roundup.psfhosted.org> miss-islington added the comment: New changeset 0225d58cc8b786caec12f45e9245f90497610a2d by Miss Islington (bot) in branch '3.7': bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960) https://github.com/python/cpython/commit/0225d58cc8b786caec12f45e9245f90497610a2d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:19:40 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Jul 2019 17:19:40 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564161580.77.0.328951269168.issue37664@roundup.psfhosted.org> miss-islington added the comment: New changeset ea0f7aa47c5d2e58dc99314508172f0523e144c6 by Miss Islington (bot) in branch '3.7': bpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934) https://github.com/python/cpython/commit/ea0f7aa47c5d2e58dc99314508172f0523e144c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:32:29 2019 From: report at bugs.python.org (Eric N. Vander Weele) Date: Fri, 26 Jul 2019 17:32:29 +0000 Subject: [issue37690] Simplify linking of shared libraries on the AIX OS Message-ID: <1564162349.26.0.0398435522922.issue37690@roundup.psfhosted.org> New submission from Eric N. Vander Weele : Have the approach of building shared libraries on the AIX operating system be similar to that of a System V system. The primary benefit of this change is the elimination of custom AIX paths and reducing the changes at `./configure` to affect just the `LDSHARED` environment variable. For background context, AIX sees shared libraries as fully linked and resolved, where symbol references are resolved at link-time and cannot be rebound at load-time. System V resolves all global symbols by the run-time linker. Thus, conventional shared libraries in AIX cannot have undefined symbols, while System V can. However, AIX does allow for run-time linking in allowing symbols to be undefined until load-time. Therefore, this change affects how linking of shared libraries are performed on AIX to behave similarly to that of System V. Given that symbols are now going to be allowed to be undefined for AIX, all the code paths for generating exported symbols and the related wrapper scripts go away. The real magic is in the `-G` flag for `LDSHARED`. Effectively, `-G` is equivalent to specifying the following: * -berok: Suppress errors even if there are unresolved symbols * -brtl: Enable run-time linking * -bnortllib: Do not include a reference to the run-time linker * -bnosymbolic: Assigns 'nosymbolic' attribute to most symbols (i.e., can be rebound) * -bnoautoexp: Prevent auto exportation of any symbols * -bM:SRE: Set the module type to reusable (i.e., require a private copy of the data area for each process). I have been using this patch for Python 3.7, 3.6, and 2.7 (with appropriate backporting adaptations) without issue for being able to build and use Python C/C++ extensions on AIX for about 6 months now. Given that we haven't had any issues, I felt it was appropriate to see if this would be accepted upstream. ---------- components: Build, Extension Modules files: aix-extension-simplify.patch keywords: patch messages: 348511 nosy: ericvw priority: normal severity: normal status: open title: Simplify linking of shared libraries on the AIX OS type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48508/aix-extension-simplify.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:34:00 2019 From: report at bugs.python.org (Eric N. Vander Weele) Date: Fri, 26 Jul 2019 17:34:00 +0000 Subject: [issue37690] Simplify linking of shared libraries on the AIX OS In-Reply-To: <1564162349.26.0.0398435522922.issue37690@roundup.psfhosted.org> Message-ID: <1564162440.09.0.525947540745.issue37690@roundup.psfhosted.org> Change by Eric N. Vander Weele : ---------- pull_requests: +14732 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14965 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:39:06 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Jul 2019 17:39:06 +0000 Subject: [issue37690] Simplify linking of shared libraries on the AIX OS In-Reply-To: <1564162349.26.0.0398435522922.issue37690@roundup.psfhosted.org> Message-ID: <1564162746.43.0.0312196192064.issue37690@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +Michael.Felt, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:44:20 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 26 Jul 2019 17:44:20 +0000 Subject: [issue37312] Remove deprecated _dummy_thread and dummy_threading modules In-Reply-To: <1560758555.75.0.0564764505885.issue37312@roundup.psfhosted.org> Message-ID: <1564163060.03.0.839926193981.issue37312@roundup.psfhosted.org> Eric Snow added the comment: FTR, Antoine originally removed in b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd and added back (but deprecated) a few days later in b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd. [1] That happened in September 2017 for Python 3.7. [1] https://bugs.python.org/issue31370#msg302476 ---------- nosy: +eric.snow, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:50:51 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 17:50:51 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564163451.86.0.990438237818.issue35524@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +14734 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14966 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:51:27 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 17:51:27 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564163487.72.0.661511602549.issue35524@roundup.psfhosted.org> Steve Dower added the comment: I made a fake 3.8.0 installer and made the screenshot, so we'll only backport it to 3.8. I think 3.7 is fine with what it has. ---------- versions: +Python 3.8, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:55:12 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 26 Jul 2019 17:55:12 +0000 Subject: [issue37685] Fix equality checks for some types In-Reply-To: <1564088866.66.0.720895226226.issue37685@roundup.psfhosted.org> Message-ID: <1564163712.43.0.670275414846.issue37685@roundup.psfhosted.org> Vedran ?a?i? added the comment: Wat?? Are we heading towards the world where 3.2 == 'something' is NotImplemented? I understand `__lt__`, of course, but in my opinion Python has always defined equality comparisons between different types. I think this is a huge regression. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 14:02:06 2019 From: report at bugs.python.org (Yhojann Aguilera) Date: Fri, 26 Jul 2019 18:02:06 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1564164126.22.0.501394982845.issue18748@roundup.psfhosted.org> Yhojann Aguilera added the comment: I hope that when an error occurs, python tells me what the problem is. The abort core error is a problem at a lower level than python because python is not able to recognize or handle the error. The main problem is that I exceeded the maximum number of process threads supported by the kernel. What I hope is that python throws an exception when it exceeds this limit or when it cannot access the pointer in memory of the process thread. The problem is not if the script is right or wrong, but that Python is not able to recognize and handle the problem. A generic message saying that an error occurred without indicating where and how it occurred is a python bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 14:10:22 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 26 Jul 2019 18:10:22 +0000 Subject: [issue37685] Fix equality checks for some types In-Reply-To: <1564088866.66.0.720895226226.issue37685@roundup.psfhosted.org> Message-ID: <1564164622.09.0.498980172517.issue37685@roundup.psfhosted.org> Paul Ganssle added the comment: @veky I can't be sure, but I think you may not understand what returning `NotImplemented` does - this makes comparisons *more* versatile, not less. The way it works is that when Python does, for example, x == y, it will first call x.__eq__(y) and check the return value of that. If that's True or False, it will return the value, but if it's NotImplemented, it will call y.__eq__(x) and return that value, unless the value is NotImplemented. If both comparisons return NotImplemented, it falls back on the default implementation for __eq__, which I think is "x is y". For __lt__ it's different fallback behavior, but the same general idea. Most of these changes are going from a situation where __lt__ or __eq__ was raising an exception or returning False for comparisons where the operation is not defined. This makes the distinction between "I don't know how to compare myself to that object" and "I know how to compare myself to that object and I am not equal to it". ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 14:10:45 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Jul 2019 18:10:45 +0000 Subject: [issue37690] Simplify linking of shared libraries on the AIX OS In-Reply-To: <1564162349.26.0.0398435522922.issue37690@roundup.psfhosted.org> Message-ID: <1564164645.35.0.0481856049049.issue37690@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 14:31:14 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 26 Jul 2019 18:31:14 +0000 Subject: [issue37685] Fix equality checks for some types In-Reply-To: <1564088866.66.0.720895226226.issue37685@roundup.psfhosted.org> Message-ID: <1564165874.56.0.00459526121698.issue37685@roundup.psfhosted.org> Josh Rosenberg added the comment: @p-ganssle: Yup. If both sides return NotImplemented, __eq__ and __ne__ return a result based on an identity comparison; all other rich comparisons raise TypeError in that case. Code is here: https://github.com/python/cpython/blob/3.7/Objects/object.c#L679 As you said, NotImplemented is never actually returned from syntax based comparisons; you only see it if you explicitly call __eq__ (and related __XX__ rich comparison methods) directly (usually because you're implementing one method in terms of another). AFAICT, about the only time you should ever be returning False rather than NotImplemented is when the other operand is an instance of the same class as you (or a subclass), allowing you to say with certainty that you know how to do the comparison (Python already handles the edge case of subclasses for you, by calling the comparison method on the subclass first, even if it's on the right hand side). In any other case, you return NotImplemented, and let the other side determine if they know how to do the comparison. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 14:52:27 2019 From: report at bugs.python.org (Derek Keeler) Date: Fri, 26 Jul 2019 18:52:27 +0000 Subject: [issue37354] Write PowerShell Activate.ps1 to be static so it can be signed In-Reply-To: <1561055369.2.0.393754678677.issue37354@roundup.psfhosted.org> Message-ID: <1564167147.7.0.658268680147.issue37354@roundup.psfhosted.org> Change by Derek Keeler : ---------- keywords: +patch pull_requests: +14735 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14967 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 14:56:56 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 26 Jul 2019 18:56:56 +0000 Subject: [issue37685] Fix equality checks for some types In-Reply-To: <1564088866.66.0.720895226226.issue37685@roundup.psfhosted.org> Message-ID: <1564167416.62.0.659273393209.issue37685@roundup.psfhosted.org> Josh Rosenberg added the comment: Serhiy: Is there a reason not to use the functools.total_ordering decorator on TimerHandle, so you can get rid of __le__/__ge__/__gt__ rather than fixing them individually? I notice at least one behavioral difference (total_ordering's le/ge methods use ==/!= for the fallback comparison, where TimerHandle explicitly calls __eq__) which this would eliminate, along with reducing the code to maintain. Specifically, the total_ordering fallbacks work if the provided operator (e.g. __lt__) works and either side provides a functional __eq__/__ne__, as appropriate (even if the other side *can't* provide the complementary inequality operator, e.g. __gt__). TimerHandle's behavior differs; it's all or nothing (so if __lt__ works, but __eq__ fails, then the success of __lt__ doesn't matter, the other side has to do everything). I'm not saying total_ordering is necessarily correct (it does seem a bit odd that A <= B can return True based on a mix of results, one from A.__lt__, one from B.__eq__), but constantly reimplementing these fallback operations has been a source of subtle bugs so often, that I'd rather depend on a single common implementation, and debate tweaks to it there, rather than having it reimplemented slightly differently in a million different places. I don't think import times for functools should be a problem; looks like at least four asyncio submodules import it, including asyncio.format_helpers (which asyncio.events takes a direct dependency on), so if you're using asyncio.events, you're already importing functools anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 15:03:13 2019 From: report at bugs.python.org (Derek Keeler) Date: Fri, 26 Jul 2019 19:03:13 +0000 Subject: [issue35667] activate for venv containing apostrophe doesn't work in powershell In-Reply-To: <1546724069.06.0.00436819935865.issue35667@roundup.psfhosted.org> Message-ID: <1564167793.99.0.00741618068231.issue35667@roundup.psfhosted.org> Change by Derek Keeler : ---------- keywords: +patch pull_requests: +14736 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14967 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 15:07:30 2019 From: report at bugs.python.org (Derek Keeler) Date: Fri, 26 Jul 2019 19:07:30 +0000 Subject: [issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used In-Reply-To: <1519299488.62.0.467229070634.issue32910@psf.upfronthosting.co.za> Message-ID: <1564168050.97.0.795959211506.issue32910@roundup.psfhosted.org> Change by Derek Keeler : ---------- keywords: +patch pull_requests: +14737 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14968 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 15:12:29 2019 From: report at bugs.python.org (David Edelsohn) Date: Fri, 26 Jul 2019 19:12:29 +0000 Subject: [issue37690] Simplify linking of shared libraries on the AIX OS In-Reply-To: <1564162349.26.0.0398435522922.issue37690@roundup.psfhosted.org> Message-ID: <1564168349.34.0.939149198848.issue37690@roundup.psfhosted.org> David Edelsohn added the comment: Absolutely, positively no. This is horrible and completely wrong. Applications on AIX should not be compiled to allow dynamic linking to make them operate more like SVR4/Linux. Python does not require dynamic linking. This simply is masking a symptom in a naive and incorrect manner. Use of runtime linking causes many internal changes to the behavior of AIX applications, severely affecting performance and potentially causing overflow of data structures. We currently are going through the process of removing this brain damage from CMake. I absolutely will not allow Python to go down this path and introduce this type of mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 15:33:38 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 19:33:38 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1564169618.35.0.791984234665.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: > I don't know. "whence" is the official name of the argument in the POSIX API > Perhaps "from_what" is assumed to be more understandable by the average reader? >From looking at the blame on GitHub, it looks like the use of the "from_what" argument in the tutorial has been there for more than 12 years, since the last commit was a massive move of the doc tree. The documentation for the IO module was added exactly 12 years (which included the usage of the *whence* argument rather than *from_what*) ago by birkenfield. Based on that information, I think the most likely answer is that the argument used to be *from_what* in a much older version of Python. To conform to the posix standard, it was changed to *whence*, but the tutorial was never updated. If it was simply never updated, I think that it would be better to change it to *whence*. The difference would be more likely to confuse new users of the language, if they were to start with the tutorial and later refer to the IO module documentation. Also the tutorial provides a fairly in-depth explanation of the purpose of the argument within seek(), so I don't think using "from_what" as the name makes its purpose any more clear to the users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 15:36:59 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 19:36:59 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1564169819.23.0.525674461933.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: Clarification: By "latest commit" should be "oldest commit" with regards to the oldest commit in GitHub's history of the section of the "inputouput" tutorial that used the *from_what* argument for seek(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 15:56:18 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 26 Jul 2019 19:56:18 +0000 Subject: [issue37685] Fix equality checks for some types In-Reply-To: <1564088866.66.0.720895226226.issue37685@roundup.psfhosted.org> Message-ID: <1564170978.85.0.946949625855.issue37685@roundup.psfhosted.org> Vedran ?a?i? added the comment: Thanks for the clarification. Yes, now I see how it really works, but I saw some comment about not wanting to backport it to 3.7, because it changes the semantics. Now that I understand the implementation, it seems to me that it really doesn't change the semantics, except in some weird cases like the objects "accidentally" having the sought attributes. But nevermind, I'm fine with that -- I'm just saying that's the reason I thought the change is much greater than it really is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:01:46 2019 From: report at bugs.python.org (Eric N. Vander Weele) Date: Fri, 26 Jul 2019 20:01:46 +0000 Subject: [issue37690] Simplify linking of shared libraries on the AIX OS In-Reply-To: <1564162349.26.0.0398435522922.issue37690@roundup.psfhosted.org> Message-ID: <1564171306.54.0.495465608383.issue37690@roundup.psfhosted.org> Eric N. Vander Weele added the comment: > This is horrible and completely wrong. I'm not an expert in AIX and xlc, by any means. I would greatly appreciate your help to better understand so I can see the problem in the way you are to figure the best approach I can take. My primary motivation was to simplify/homogenize the mechanism by which Python C/C++ extensions are built. For background, I have Python applications and libraries that need to run on Linux, Solaris, and AIX. One of the challenges we ran into was how and when symbol resolution occurs, which is fundamentally different in AIX. > Python does not require dynamic linking. I understand Python does not require dynamic linking. However, the problem I am running into is how this should work/behave for Python C/C++ extensions, which are imported (loaded) at runtime of a Python application. Maybe this is where I have a fundamental misunderstanding, but it led me to believe that in AIX this should behave similarly to SVR4/Linux. When scouring how Python interplays with AIX for building Python C/C++ extensions, this problem piqued my interest. When conducting my self-research, I came across http://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf, which helped me in understanding the differences between dynamic loading run-time linking. Thus, I went down the path of run-time linking with the '-G' flag, which appeared similar to what was done in Python for other operating systems. > This simply is masking a symptom in a naive and incorrect manner. This is leading up to my misunderstanding of what I was observing during my initial investigation of what was going on. I'll need to revisit the symptom being observed, but I vaguely recall missing symbols when building Python C/C++ extensions when the interpreter is configured with '--enable-shared'. Let me go back, undo the patch I have, and recreate the symptom/issue that was observed. > Use of runtime linking causes many internal changes to the behavior of AIX applications, severely affecting performance and potentially causing overflow of data structures. I'm really curious about this one. What internal changes, performance concerns, and overflow of data structures could occur? Luckily, I have observed nor experienced anything egregiously negative, thus far. Understanding these concerns will help bolster my understanding. > I absolutely will not allow Python to go down this path and introduce this type of mistake. No worries. I'm trying to solve a problem and appeared to have gone down an incorrect path. Being able to better understand what the desired expectation is for Python and associated C/C++ extensions, will help guide me to focus where the misunderstanding is and to redirect focus on where the problem is that needs to be addressed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:04:23 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 20:04:23 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564171463.51.0.424461781563.issue35524@roundup.psfhosted.org> Steve Dower added the comment: New changeset 9d9893a1c85e07f7369c848acb0aed3b8fe6c3af by Steve Dower in branch 'master': bpo-35524: Update Windows installer image in docs (GH-14966) https://github.com/python/cpython/commit/9d9893a1c85e07f7369c848acb0aed3b8fe6c3af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:05:33 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 20:05:33 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564171533.35.0.57077674248.issue35524@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +14738 pull_request: https://github.com/python/cpython/pull/14969 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:40:16 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 20:40:16 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564173616.29.0.396430041123.issue35524@roundup.psfhosted.org> Steve Dower added the comment: New changeset 886e66d111b6b865e582d8cc7974d5c0b398da99 by Steve Dower in branch '3.8': bpo-35524: Update Windows installer image in docs (GH-14966) https://github.com/python/cpython/commit/886e66d111b6b865e582d8cc7974d5c0b398da99 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:43:07 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 20:43:07 +0000 Subject: [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564173787.69.0.59052233741.issue35524@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:44:27 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 20:44:27 +0000 Subject: [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564173867.83.0.240681401836.issue37684@roundup.psfhosted.org> Kyle Stanley added the comment: Upon further consideration, I think the code example suggestion I made using the interpreter could be in a separate PR or issue and doesn't have to replace the the current "Equivalent to ..." portion. I'll open a separate PR for that (which isn't attached to this issue). Apologies if that at all derailed this conversation, as it might not be directly relevant (even if it's within the same section). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:49:25 2019 From: report at bugs.python.org (Flavian Hautbois) Date: Fri, 26 Jul 2019 20:49:25 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1564174165.2.0.914816666416.issue15987@roundup.psfhosted.org> Change by Flavian Hautbois : ---------- keywords: +patch pull_requests: +14739 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/14970 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 17:15:30 2019 From: report at bugs.python.org (Thomas Dybdahl Ahle) Date: Fri, 26 Jul 2019 21:15:30 +0000 Subject: [issue31652] make install fails: no module _ctypes In-Reply-To: <1506812661.87.0.213398074469.issue31652@psf.upfronthosting.co.za> Message-ID: <1564175730.57.0.465648368159.issue31652@roundup.psfhosted.org> Thomas Dybdahl Ahle added the comment: Installing libffi-dev worked for me. ---------- nosy: +thomasahle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 17:24:58 2019 From: report at bugs.python.org (Kirill Balunov) Date: Fri, 26 Jul 2019 21:24:58 +0000 Subject: [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564176298.86.0.697160535925.issue37688@roundup.psfhosted.org> Kirill Balunov added the comment: I am reading "equivalence" too strictly (like "as a substitute"), because this is part of the documentation :) and I agree that in ordinary speech I would use it rather in the sense of ?similar?. In order to make sure, that everyone agrees only on that this requires only a documentation change? Because as for me, I think that it will better for `os.path.isdir` to raise `ValueError` or `DeprecationWarning` - `False` on empty string is not well defined behavior. But I'm fine to be alone with the last one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 17:34:07 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 26 Jul 2019 21:34:07 +0000 Subject: [issue35712] Make NotImplemented unusable in boolean context In-Reply-To: <1547157306.18.0.725390794489.issue35712@roundup.psfhosted.org> Message-ID: <1564176847.67.0.683850775679.issue35712@roundup.psfhosted.org> Josh Rosenberg added the comment: Moving to 3.9 target, per Serhiy's request. PR has been rebased against master, including updating the What's New info to be in the 3.9 version, not 3.8. ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 17:50:34 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Jul 2019 21:50:34 +0000 Subject: [issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1564177834.2.0.471730598276.issue37130@roundup.psfhosted.org> Brett Cannon added the comment: Anyone up for doing a PR that makes Path('.').name == '.'? It would be good to see if that would break the stdlib as a proxy as to how many people might be relying on these semantics. My hope is nothing breaks in which case we can make the change in 3.9 and notify people in What's New of the new, consistent semantics. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 17:57:14 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 21:57:14 +0000 Subject: [issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used In-Reply-To: <1519299488.62.0.467229070634.issue32910@psf.upfronthosting.co.za> Message-ID: <1564178234.34.0.278201012224.issue32910@roundup.psfhosted.org> Steve Dower added the comment: New changeset 91e49575095ca16d1b67dd8822deeb7885e421da by Steve Dower (Derek Keeler) in branch 'master': bpo-32910: Remove implementation detail in venv documentation. (GH-14968) https://github.com/python/cpython/commit/91e49575095ca16d1b67dd8822deeb7885e421da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 17:57:26 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Jul 2019 21:57:26 +0000 Subject: [issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used In-Reply-To: <1519299488.62.0.467229070634.issue32910@psf.upfronthosting.co.za> Message-ID: <1564178246.18.0.583040145708.issue32910@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14740 pull_request: https://github.com/python/cpython/pull/14971 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 17:57:34 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Jul 2019 21:57:34 +0000 Subject: [issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used In-Reply-To: <1519299488.62.0.467229070634.issue32910@psf.upfronthosting.co.za> Message-ID: <1564178254.63.0.45816436598.issue32910@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14741 pull_request: https://github.com/python/cpython/pull/14972 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 18:03:26 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Jul 2019 22:03:26 +0000 Subject: [issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used In-Reply-To: <1519299488.62.0.467229070634.issue32910@psf.upfronthosting.co.za> Message-ID: <1564178606.77.0.48862956001.issue32910@roundup.psfhosted.org> miss-islington added the comment: New changeset 4b6421c61e9335253ea7004f2878317b88096c30 by Miss Islington (bot) in branch '3.7': bpo-32910: Remove implementation detail in venv documentation. (GH-14968) https://github.com/python/cpython/commit/4b6421c61e9335253ea7004f2878317b88096c30 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 18:04:31 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Jul 2019 22:04:31 +0000 Subject: [issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used In-Reply-To: <1519299488.62.0.467229070634.issue32910@psf.upfronthosting.co.za> Message-ID: <1564178671.32.0.844226764593.issue32910@roundup.psfhosted.org> miss-islington added the comment: New changeset 06e8fc95d138775e942c18c8e47e72cdcc32f95c by Miss Islington (bot) in branch '3.8': bpo-32910: Remove implementation detail in venv documentation. (GH-14968) https://github.com/python/cpython/commit/06e8fc95d138775e942c18c8e47e72cdcc32f95c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 18:06:24 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 26 Jul 2019 22:06:24 +0000 Subject: [issue33439] python-config.py should be part of the stdlib In-Reply-To: <1525695349.77.0.682650639539.issue33439@psf.upfronthosting.co.za> Message-ID: <1564178784.77.0.30780174011.issue33439@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 18:10:21 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 26 Jul 2019 22:10:21 +0000 Subject: [issue11602] python-config code should be in sysconfig In-Reply-To: <1300475478.49.0.935411639754.issue11602@psf.upfronthosting.co.za> Message-ID: <1564179021.29.0.0643251257781.issue11602@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 18:26:33 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 26 Jul 2019 22:26:33 +0000 Subject: [issue11953] Missing WSA* error codes In-Reply-To: <1304030330.14.0.209711289978.issue11953@psf.upfronthosting.co.za> Message-ID: <1564179993.81.0.373422172489.issue11953@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 18:31:13 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 26 Jul 2019 22:31:13 +0000 Subject: [issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently In-Reply-To: <1559438292.33.0.601764456145.issue37130@roundup.psfhosted.org> Message-ID: <1564180273.45.0.412185267102.issue37130@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I'll take a crack at adding support for Path('.').name == '.'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 20:50:06 2019 From: report at bugs.python.org (David Edelsohn) Date: Sat, 27 Jul 2019 00:50:06 +0000 Subject: [issue37690] Simplify linking of shared libraries on the AIX OS In-Reply-To: <1564162349.26.0.0398435522922.issue37690@roundup.psfhosted.org> Message-ID: <1564188606.28.0.267273175403.issue37690@roundup.psfhosted.org> David Edelsohn added the comment: Runtime linking allows a dynamically loaded library to interpose symbols. The classic example is allowing a program or dynamic library to overload C++ operator new. A library or program overrides the symbol by name. Python does not require this. Python does not need to allow an extension module to override a function in Python. If one needs to add AIX ld -G and runtime linking, 99% of the time one is covering up a problem. The downside of -G is that it forces all global functions to be called through the AIX glink code (equivalent to SVR4 PLT) and not inlined. This allows every global function call to be overriden, but forces every call to go through a function pointer. This is expensive. Calling functions through the "PLT" requires that the function pointers for each global function be placed in the AIX TOC (equivalent to SVR4 GOT). If the program or shared library is large enough, this can overflow the "GOT", which then requires even more expensive fixup code. The mistaken use of this option leads down a path with bad performance and potentially requiring more and more effort to recover from problems introduced by the choice. I don't know exactly the symptoms that you observed, but one possibility is that the shared object you are building is not being linked against all of the dependent libraries. Separate from runtime linking, SVR4 allows unresolved symbols when a shared library is created and used to export all global symbols by default (before the efforts on symbol visibility). A simplistic way of describing this is that a process into which an executable and shared libraries are loaded sort of has this soup of all global symbols floating around and available to the runtime loader. When a new shared library is loaded, the dynamic linker can resolve the symbols from any definitions available in the process. Allowing the unresolved symbols at shared library link time is a promise that the symbols will be provided by someone at runtime. At runtime, all of the symbol needs and definitions are thrown in the air and hopefully match up correctly when first referenced at runtime. AIX requires that all shared objects be fully resolved at link-edit time. It requires that the shared object refer to all dependent libraries at link time, even if those libraries also will be present and provided by other shared libraries or executable at runtime. In other words, on AIX, one must link all C++ shared objects against the C++ standard library, even if the main executable is linked against the library. So, again, one possible explanation for the error of missing symbols is that one or more dependent libraries are missing from the link command building the shared object and that omission coincidentally happens to work on SVR4/Linux because of its semantics, but it doesn't work in the more strict environment of AIX. This type of error should not be solved through runtime linking to borrow the missing symbols from the running process, which is a very expensive solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 21:27:06 2019 From: report at bugs.python.org (mental) Date: Sat, 27 Jul 2019 01:27:06 +0000 Subject: [issue37652] Multiprocessing shared_memory ValueError on race with ShareableList In-Reply-To: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org> Message-ID: <1564190826.05.0.744485027201.issue37652@roundup.psfhosted.org> mental added the comment: > The root of the error is that struct.pack_into starts by memsetting the underlying memory area with NULL bytes before filling the data with memcpy. I've had a fix spinning for about a day now, it introduced a `multiprocessing.Lock` and it was simply wrapped around any struct packing and unpacking calls. I've been reluctant to submit anything due to a suspicious resource warning I kept seeing about leaked shared_memory objects appearing spuriously and I wanted to rule out the possibility that other tests were causing a side effect. Also I wanted to hear an expert from the noisy list share their thoughts. > I'm not sure this should be done internally I agree, even with my patch not reproducing the issue I didn't like placing a lock around various components in the class. > +1 For a documentation addition. If there are no objections, I'll submit a PR with a doc update :) @Pierre mind if I cc' you for a review? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 23:24:40 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2019 03:24:40 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1564197880.68.0.227345061806.issue17535@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 46ebd4a6a22431ce9676546d2bbe5a6dcd1cc1c1 by Terry Jan Reedy (Tal Einat) in branch 'master': bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959) https://github.com/python/cpython/commit/46ebd4a6a22431ce9676546d2bbe5a6dcd1cc1c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 23:24:55 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jul 2019 03:24:55 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1564197895.87.0.946353817031.issue17535@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14742 pull_request: https://github.com/python/cpython/pull/14973 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 23:25:24 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jul 2019 03:25:24 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1564197924.11.0.485001230395.issue17535@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14743 pull_request: https://github.com/python/cpython/pull/14974 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 23:42:04 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jul 2019 03:42:04 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1564198924.13.0.341057646942.issue17535@roundup.psfhosted.org> miss-islington added the comment: New changeset 9e7697b3c55e0bd8663cf0641d4718e853af2d9c by Miss Islington (bot) in branch '3.7': bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959) https://github.com/python/cpython/commit/9e7697b3c55e0bd8663cf0641d4718e853af2d9c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 23:46:56 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jul 2019 03:46:56 +0000 Subject: [issue17535] IDLE editor line numbers In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1564199216.21.0.531782172456.issue17535@roundup.psfhosted.org> miss-islington added the comment: New changeset f6ab188323444fe0dd916ed3860cc5c8806caa16 by Miss Islington (bot) in branch '3.8': bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959) https://github.com/python/cpython/commit/f6ab188323444fe0dd916ed3860cc5c8806caa16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 00:26:57 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2019 04:26:57 +0000 Subject: [issue37673] Tkinter won't create 5000 check boxes, stops at 1309. In-Reply-To: <1564004376.63.0.730032701785.issue37673@roundup.psfhosted.org> Message-ID: <1564201617.88.0.824327038623.issue37673@roundup.psfhosted.org> Terry J. Reedy added the comment: It stopped at 1309 for me too, running with IDLE, then added 4999 and the quit button, which did not work. If you can, try to make the code simpler. Here is one guide. https://stackoverflow.com/help/minimal-reproducible-example However, limitations in tcl/tk are out of our control. So we may close this as 3rd party. Python also has undocumented limitations, which we close as "won't fix". ---------- nosy: +serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 01:28:58 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jul 2019 05:28:58 +0000 Subject: [issue37691] Let math.dist() accept coordinates as sequences Message-ID: <1564205338.06.0.366598705946.issue37691@roundup.psfhosted.org> New submission from Raymond Hettinger : I did some user testing with Python 3.8 and found that math.dist() was a little restrictive in only accepting coordinates as tuples. Mostly it worked out fine except but was a little inconvenient with generalized unpacking: label, *coordinates = cursor.fetchone() # coordinates is a list Also, it would be nice to allow numpy arrays as arguments. ---------- assignee: rhettinger components: Library (Lib) messages: 348541 nosy: mark.dickinson, rhettinger, tim.peters priority: normal severity: normal status: open title: Let math.dist() accept coordinates as sequences versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 01:37:15 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jul 2019 05:37:15 +0000 Subject: [issue37691] Let math.dist() accept coordinates as sequences In-Reply-To: <1564205338.06.0.366598705946.issue37691@roundup.psfhosted.org> Message-ID: <1564205835.05.0.883955009685.issue37691@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +14744 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 01:38:24 2019 From: report at bugs.python.org (Lou Perazzoli) Date: Sat, 27 Jul 2019 05:38:24 +0000 Subject: [issue37673] Tkinter won't create 5000 check boxes, stops at 1309. In-Reply-To: <1564201617.88.0.824327038623.issue37673@roundup.psfhosted.org> Message-ID: <7A064E6B-D7EB-4D3B-8920-336DB830C446@gmail.com> Lou Perazzoli added the comment: Thanks for the reply. I?ll make it simpler Regards Lou > On Jul 26, 2019, at 9:26 PM, Terry J. Reedy wrote: > > > Terry J. Reedy added the comment: > > It stopped at 1309 for me too, running with IDLE, then added 4999 and the quit button, which did not work. If you can, try to make the code simpler. Here is one guide. > https://stackoverflow.com/help/minimal-reproducible-example > > However, limitations in tcl/tk are out of our control. So we may close this as 3rd party. Python also has undocumented limitations, which we close as "won't fix". > > ---------- > nosy: +serhiy.storchaka, terry.reedy > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 04:20:31 2019 From: report at bugs.python.org (Flavian Hautbois) Date: Sat, 27 Jul 2019 08:20:31 +0000 Subject: [issue29553] Argparser does not display closing parentheses in nested mutex groups In-Reply-To: <1487084393.73.0.392893421751.issue29553@psf.upfronthosting.co.za> Message-ID: <1564215631.11.0.597205356243.issue29553@roundup.psfhosted.org> Change by Flavian Hautbois : ---------- keywords: +patch pull_requests: +14745 pull_request: https://github.com/python/cpython/pull/14976 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 05:55:07 2019 From: report at bugs.python.org (Flavian Hautbois) Date: Sat, 27 Jul 2019 09:55:07 +0000 Subject: [issue30193] Support the buffer protocol in json.loads() In-Reply-To: <1493333744.87.0.320689923757.issue30193@psf.upfronthosting.co.za> Message-ID: <1564221307.83.0.357891582937.issue30193@roundup.psfhosted.org> Change by Flavian Hautbois : ---------- keywords: +patch pull_requests: +14746 pull_request: https://github.com/python/cpython/pull/14977 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 06:49:03 2019 From: report at bugs.python.org (Flavian Hautbois) Date: Sat, 27 Jul 2019 10:49:03 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1564224543.61.0.21387322225.issue29636@roundup.psfhosted.org> Flavian Hautbois added the comment: So what do we do about this? Two possibilities: 1. We merge PR 9765 and close PRs 345 and 201, as 9765 seems more straighforward and was already approved. 9765 should be resubmitted to be merged since the base repo does not exist anymore, I could do that. 2. We consider that this is out of scope for Python, and since jq is widely used, it does not make a lot of sense to include it. We should then close all PRs to keep our pull requests clean I suggest going with 2 ---------- nosy: +flavianhautbois _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 10:16:45 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Sat, 27 Jul 2019 14:16:45 +0000 Subject: [issue37664] Update bundled pip and setuptools In-Reply-To: <1563918687.03.0.591223674737.issue37664@roundup.psfhosted.org> Message-ID: <1564237005.99.0.283979000449.issue37664@roundup.psfhosted.org> Change by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 10:21:58 2019 From: report at bugs.python.org (Philip Dye) Date: Sat, 27 Jul 2019 14:21:58 +0000 Subject: [issue36692] Unexpected stderr output from test_sys_settrace In-Reply-To: <1555853588.91.0.708286420314.issue36692@roundup.psfhosted.org> Message-ID: <1564237318.74.0.201645113861.issue36692@roundup.psfhosted.org> Philip Dye added the comment: Once consensus is reached, I would be happy to do the work. ---------- nosy: +Philip Dye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 10:32:06 2019 From: report at bugs.python.org (Philip Dye) Date: Sat, 27 Jul 2019 14:32:06 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1564237926.41.0.482760585138.issue15987@roundup.psfhosted.org> Philip Dye added the comment: If consensus has been reached on this, I am willing to do the work. ---------- nosy: +Philip Dye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 10:39:42 2019 From: report at bugs.python.org (Matthias Klose) Date: Sat, 27 Jul 2019 14:39:42 +0000 Subject: [issue33439] python-config.py should be part of the stdlib In-Reply-To: <1525695349.77.0.682650639539.issue33439@psf.upfronthosting.co.za> Message-ID: <1564238382.77.0.671849213948.issue33439@roundup.psfhosted.org> Matthias Klose added the comment: what are the situations where the path for python and python-config is different? This proposal doesn't say anything how to retrieve the correct information for cross builds using this module. From my point of view, python-config should stay outside the standard library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 12:32:43 2019 From: report at bugs.python.org (Steve Dower) Date: Sat, 27 Jul 2019 16:32:43 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564245163.14.0.163639164114.issue36044@roundup.psfhosted.org> Steve Dower added the comment: I just ran this on Windows and noticed that there is no data for _msi.pyd, winsound.pyd or _sqlite3.pyd. The first two don't matter - we should just suppress PGO on those projects to avoid the warnings (add a false property). That's a note to myself, unless someone else gets there first. However, I think we should get coverage of the sqlite3 module, so it may be worth adding its tests into this set. I'm not sure if they're great coverage, but it'll be better than nothing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 12:49:33 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2019 16:49:33 +0000 Subject: [issue37692] IDLE: clarify shell part of highlight sample Message-ID: <1564246173.2.0.322711834924.issue37692@roundup.psfhosted.org> New submission from Terry J. Reedy : The 'console' highlight is described as Shell Normal Text. It is the 'normal' text for non-error output *from the shell* (prompt and debug status), but not the 'normal' text, which is used for code. Aside from this, the editor section uses examples rather than description, such as 'list' rather than 'builtin'. I think the shell section should also: "Traceback" instead of stderr (which beginners may or may not understand), 'program output' instead of 'stdout'. Removing the two blank line will make room to put these on separate lines, like they actually are. ---------- assignee: terry.reedy components: IDLE messages: 348548 nosy: terry.reedy priority: normal severity: normal status: open title: IDLE: clarify shell part of highlight sample type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 12:58:06 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jul 2019 16:58:06 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564246686.62.0.840979379452.issue37628@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14747 pull_request: https://github.com/python/cpython/pull/14980 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 12:58:12 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2019 16:58:12 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564246692.53.0.653367449544.issue37628@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 3221a63c69268a9362802371a616f49d522a5c4f by Terry Jan Reedy (Tal Einat) in branch 'master': bpo-37628: Fix IDLE config sample sizes (#14958) https://github.com/python/cpython/commit/3221a63c69268a9362802371a616f49d522a5c4f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 12:58:55 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jul 2019 16:58:55 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564246735.36.0.990342391468.issue37628@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14748 pull_request: https://github.com/python/cpython/pull/14981 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 13:14:57 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jul 2019 17:14:57 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564247697.12.0.109322905637.issue37628@roundup.psfhosted.org> miss-islington added the comment: New changeset 0242eb3fa7818eb078c0915a4b844c5a2070b810 by Miss Islington (bot) in branch '3.7': bpo-37628: Fix IDLE config sample sizes (GH-14958) https://github.com/python/cpython/commit/0242eb3fa7818eb078c0915a4b844c5a2070b810 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 13:19:15 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jul 2019 17:19:15 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564247955.65.0.829643379716.issue37628@roundup.psfhosted.org> miss-islington added the comment: New changeset 171019354aa2c717af2e7b2c90aec7b9724f7282 by Miss Islington (bot) in branch '3.8': bpo-37628: Fix IDLE config sample sizes (GH-14958) https://github.com/python/cpython/commit/171019354aa2c717af2e7b2c90aec7b9724f7282 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 13:30:37 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 27 Jul 2019 17:30:37 +0000 Subject: [issue37685] Fix equality checks for some types In-Reply-To: <1564088866.66.0.720895226226.issue37685@roundup.psfhosted.org> Message-ID: <1564248637.03.0.56915452006.issue37685@roundup.psfhosted.org> Kyle Stanley added the comment: > Serhiy: Is there a reason not to use the functools.total_ordering decorator on TimerHandle, so you can get rid of __le__/__ge__/__gt__ rather than fixing them > individually? I strongly agree with this suggestion, unless there's some unique behavior with TimerHandle objects which would prevent this from being viable. IMO, the @total_ordering decorator should be used as much as practically possible. Individually specifying all of the rich comparisons when we don't have to adds a significant maintenance cost. ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 13:56:46 2019 From: report at bugs.python.org (hai shi) Date: Sat, 27 Jul 2019 17:56:46 +0000 Subject: [issue37689] Add Path.is_relative_to() In-Reply-To: <1564156564.69.0.23140154802.issue37689@roundup.psfhosted.org> Message-ID: <1564250206.36.0.561373933556.issue37689@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14749 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 14:04:06 2019 From: report at bugs.python.org (hai shi) Date: Sat, 27 Jul 2019 18:04:06 +0000 Subject: [issue37689] Add Path.is_relative_to() In-Reply-To: <1564156564.69.0.23140154802.issue37689@roundup.psfhosted.org> Message-ID: <1564250646.43.0.13648181208.issue37689@roundup.psfhosted.org> hai shi added the comment: Hi, Antoine, pls review this PR if you have free time. Looks is_relative_to only catch valueError is good enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 14:07:58 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 27 Jul 2019 18:07:58 +0000 Subject: [issue37693] IDLE: File names are hidden in "Open" menu (Linux) Message-ID: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> New submission from Kyle Stanley : In the most recent development version of Python 3.9, when opening the file selection menu through File > Open (or Ctrl-o) in the IDLE, the file names are hidden. Clicking once on each of the icons or the areas in front of them can make the names visible again, but this can be quite cumbersome to users. I'm not certain if this issue is specific to KWin (window manager, component of the Plasma DE), but I've never ran into this problem when using any other applications. If it would be helpful, I can attempt to see if this issue occurs when using other window managers. I attached two screenshots below, the first one is the initial view of "Open" menu and the second one is what it looks like after clicking once on a few of the icons. Tested on... OS: Arch Linux 5.2.3 DE: Plasma WM: KWin ---------- files: bpo-idle-open-menu-0.png messages: 348554 nosy: aeros167 priority: normal severity: normal status: open title: IDLE: File names are hidden in "Open" menu (Linux) versions: Python 3.9 Added file: https://bugs.python.org/file48509/bpo-idle-open-menu-0.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 14:08:33 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 27 Jul 2019 18:08:33 +0000 Subject: [issue37693] IDLE: File names are hidden in "Open" menu (Linux) In-Reply-To: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> Message-ID: <1564250913.81.0.553859009437.issue37693@roundup.psfhosted.org> Kyle Stanley added the comment: Was unable to attach both files to the first comment, here's the second one of the "Open" menu after clicking a few icons. ---------- Added file: https://bugs.python.org/file48510/bpo-idle-open-menu-1.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 14:09:26 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Sat, 27 Jul 2019 18:09:26 +0000 Subject: [issue37496] Support annotations in signature strings. In-Reply-To: <1562197526.36.0.0415942737779.issue37496@roundup.psfhosted.org> Message-ID: <1564250966.02.0.959666285927.issue37496@roundup.psfhosted.org> Giovanni Cappellotto added the comment: > You might want to look into how PEP 563 is implemented, it has a utility to turn an AST back into a string (I assume this is what you want). Thanks for your suggestion @levkivskyi. I took a look at https://github.com/python/cpython/pull/4390, that implements PEP 563. In that PR `ast_unparse.c` has been introduced, that is > a close translation of the relevant parts of `Tools/unparse.py` Source: https://github.com/python/cpython/pull/4390#issuecomment-346554817 I have a couple of questions about how to use `ast_unparse.c`'s `expr_as_unicode` function: 1. Should I create a new function in the `ast` module that exposes that C function in Python in order to use it in `Lib/inspect.py`? 2. Would it be better to just re-use the _AST to string_ implementation in `Tools/unparse.py`? On a side note: would it make sense to reconcile the two "unparse AST" implementations? > +1 on using a string for Parameter.annotation and Signature.return_annotation. Thanks for your comment @eric.snow. >From what I saw in the test I've written, right now `Parameter.annotation` and `Signature.return_annotation` return Python type classes. At the beginning, in order to keep `Parameter.annotation`'s return type consistent with the current implementation, I tried to evaluate the annotation's "unparse AST" string output, but I was getting errors evaluating type aliases and refined types. Returning strings would make `parse_name`'s implementation easier, but I'm wondering if would be backward compatible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 14:14:15 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 27 Jul 2019 18:14:15 +0000 Subject: [issue37693] IDLE: File names are hidden in "Open" menu (Linux) In-Reply-To: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> Message-ID: <1564251255.03.0.250368967935.issue37693@roundup.psfhosted.org> Kyle Stanley added the comment: Since the names are still there in the screenshots but slightly grayed out, it may have to do with my local font settings. If so, an easy solution to this would be using an override for the IDLE instead of relying the local themes. I can't what practical purpose it would provide to have the icon names grayed out, and then darkened after clicking on them once. If anything, the default coloring upon opening the window should probably be the darker color changed to after the icon is clicked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 14:19:38 2019 From: report at bugs.python.org (hai shi) Date: Sat, 27 Jul 2019 18:19:38 +0000 Subject: [issue33439] python-config.py should be part of the stdlib In-Reply-To: <1525695349.77.0.682650639539.issue33439@psf.upfronthosting.co.za> Message-ID: <1564251578.56.0.523091244167.issue33439@roundup.psfhosted.org> hai shi added the comment: En, looks like just only makefile would call python-config.py. IMHO, if no out user call this script, looks it move to stdlib would be better. ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 14:27:05 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 27 Jul 2019 18:27:05 +0000 Subject: [issue37693] IDLE: File names are hidden in "Open" menu (Linux) In-Reply-To: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> Message-ID: <1564252025.54.0.733488539118.issue37693@roundup.psfhosted.org> Kyle Stanley added the comment: Corrections: "I can't what practical" => "I can't imagine what practical..." (PS: Definitely looking forward to the full move from bpo to github. Being able to copy-paste temporary image files and edit comments is quite convenient.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 14:28:15 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 27 Jul 2019 18:28:15 +0000 Subject: [issue37693] IDLE: File names are hidden in "Open" menu (Linux) In-Reply-To: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> Message-ID: <1564252095.92.0.217802896274.issue37693@roundup.psfhosted.org> Change by Kyle Stanley : ---------- assignee: -> terry.reedy components: +IDLE nosy: +taleinat, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 14:40:54 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 27 Jul 2019 18:40:54 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564252854.07.0.142299410845.issue37628@roundup.psfhosted.org> Kyle Stanley added the comment: After PR-14958 was merged, I tested the latest development version of CPython on Arch Linux 5.2.3 and I can confirm that the "Settings" window no longer scales past the edge of the screen. Instead, the window size remains fixed and the scroll area dynamically changes to allow for preview of the enlarged font sample. To make sure it worked for all of the fonts, I scrolled the list of font faces with a size setting of 40 (as well as some other sizes, but not every possible combination). The window size remained the same and the "Font Sample" preview scaled dynamically with the scrollbar in every instance. This recent round of recent updates to the IDLE have added some fantastic QoL changes, nicely done taleinat and terry! ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 14:46:30 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 27 Jul 2019 18:46:30 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564253190.54.0.967469207386.issue37628@roundup.psfhosted.org> Kyle Stanley added the comment: Correction: By "scroll the list of fonts" I meant that I went through all of them by holding the down arrow from the top of the list (Adobe Courier - Z003), scrolling through the list wouldn't accomplish anything. I did that starting with a font size 40 and a few other ones. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 16:16:53 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2019 20:16:53 +0000 Subject: [issue37693] IDLE/Tkinter: File names are hidden in "Open" menu (Linux) In-Reply-To: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> Message-ID: <1564258613.48.0.290156989545.issue37693@roundup.psfhosted.org> Terry J. Reedy added the comment: This is definitely not an IDLE issue. To open files, IDLE calls tkinter.filedialog.Open(parent, filetypes).show(initial_dir, initial_file). Open is a subclass of filedialog._Dialog(commondialog.Dialog). It sets command = "tk_getOpenFile". Dialog.show calls the command with root.tk.call after fixing passed in options. It then fixes the result and returns it. I believe this command calls the native file dialog. Since tkinter's option processing, converting python object to strings suitable for tk.call, is OS independent, I presume the problem is in tk_getOpenFile. I suspect tcl/tk developers have trouble keeping up with the parade linuxes and window managers. (What is a 'DE?) If so, this should be closed as 3rd party. If you want to test first, bypass IDLE and most of tkinter with the following, run directly in Python. >>> import tkinter as tk >>> r = tk.Tk() >>> r.tk.call("tk_getOpenFile") # select codecontext.py, hit 'Open' 'C:/Programs/Python38/Lib/idlelib/codecontext.py' >>> r.tk.call("tk_getOpenFile") # hit 'Cancel' '' ---------- assignee: terry.reedy -> components: +Tkinter -IDLE nosy: +serhiy.storchaka title: IDLE: File names are hidden in "Open" menu (Linux) -> IDLE/Tkinter: File names are hidden in "Open" menu (Linux) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 16:31:48 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2019 20:31:48 +0000 Subject: [issue37693] IDLE/Tkinter: File names are hidden in "Open" menu (Linux) In-Reply-To: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> Message-ID: <1564259508.79.0.934297919785.issue37693@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +14750 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 16:52:03 2019 From: report at bugs.python.org (Alexandre Hamelin) Date: Sat, 27 Jul 2019 20:52:03 +0000 Subject: [issue37694] Crash when calling zipimport.zipimporter.__new__().() Message-ID: <1564260723.26.0.279102723907.issue37694@roundup.psfhosted.org> New submission from Alexandre Hamelin : Found a crash with zipimport.zipimporter. Might or might not be related to Issue31723 which I've found searching the issues afterwards. import zipimport zipimport.zipimporter.__new__(zipimport.zipimporter).find_module('') Python 2.7 and 3.6. Seems to be 'fixed' in 3.7+ (Linux, x86-64); reports that __init__ hasn't been called yet. Found during manual testing in a break-the-python-jail CTF-like challenge. Backtrace for Python 2.7 Python 2.7.15 (default, Oct 10 2018, 09:10:43) [GCC 6.4.0] on linux2 $ gdb -q python2 Reading symbols from python2...(no debugging symbols found)...done. (gdb) run zipcrash.py Starting program: /usr/bin/python2 zipcrash.py process 11106 is executing new program: /usr/bin/python2.7 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7a86695 in PyString_AsString () from /usr/lib64/libpython2.7.so.1.0 (gdb) bt #0 0x00007ffff7a86695 in PyString_AsString () from /usr/lib64/libpython2.7.so.1.0 #1 0x00007ffff7b20269 in ?? () from /usr/lib64/libpython2.7.so.1.0 #2 0x00007ffff7b20400 in ?? () from /usr/lib64/libpython2.7.so.1.0 #3 0x00007ffff7adb3e7 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0 #4 0x00007ffff7adca6c in PyEval_EvalCodeEx () from /usr/lib64/libpython2.7.so.1.0 #5 0x00007ffff7adcb59 in PyEval_EvalCode () from /usr/lib64/libpython2.7.so.1.0 #6 0x00007ffff7af60df in ?? () from /usr/lib64/libpython2.7.so.1.0 #7 0x00007ffff7af7322 in PyRun_FileExFlags () from /usr/lib64/libpython2.7.so.1.0 #8 0x00007ffff7af8535 in PyRun_SimpleFileExFlags () from /usr/lib64/libpython2.7.so.1.0 #9 0x00007ffff7b0a537 in Py_Main () from /usr/lib64/libpython2.7.so.1.0 #10 0x00007ffff74281db in __libc_start_main () from /lib64/libc.so.6 #11 0x00005555555547ca in _start () (gdb) Backtrace for Python 3.6 Python 3.6.5 (default, Jul 16 2018, 11:40:44) [GCC 6.4.0] on linux $ gdb -q python3 Reading symbols from python3...(no debugging symbols found)...done. (gdb) run zipcrash.py Starting program: /usr/bin/python3 zipcrash.py process 11149 is executing new program: /usr/bin/python3.6m [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7aa5eea in ?? () from /usr/lib64/libpython3.6m.so.1.0 (gdb) bt #0 0x00007ffff7aa5eea in ?? () from /usr/lib64/libpython3.6m.so.1.0 #1 0x00007ffff7aa6a92 in ?? () from /usr/lib64/libpython3.6m.so.1.0 #2 0x00007ffff7aa6c9c in ?? () from /usr/lib64/libpython3.6m.so.1.0 #3 0x00007ffff7aa6f49 in ?? () from /usr/lib64/libpython3.6m.so.1.0 #4 0x00007ffff79a8d49 in _PyCFunction_FastCallDict () from /usr/lib64/libpython3.6m.so.1.0 #5 0x00007ffff7a1d0d5 in ?? () from /usr/lib64/libpython3.6m.so.1.0 #6 0x00007ffff7a20dea in _PyEval_EvalFrameDefault () from /usr/lib64/libpython3.6m.so.1.0 #7 0x00007ffff7a1cc3c in ?? () from /usr/lib64/libpython3.6m.so.1.0 #8 0x00007ffff7a1d1ce in PyEval_EvalCodeEx () from /usr/lib64/libpython3.6m.so.1.0 #9 0x00007ffff7a1d1fb in PyEval_EvalCode () from /usr/lib64/libpython3.6m.so.1.0 #10 0x00007ffff7a478b4 in ?? () from /usr/lib64/libpython3.6m.so.1.0 #11 0x00007ffff7a49f35 in PyRun_FileExFlags () from /usr/lib64/libpython3.6m.so.1.0 #12 0x00007ffff7a4a0a5 in PyRun_SimpleFileExFlags () from /usr/lib64/libpython3.6m.so.1.0 #13 0x00007ffff7a610a3 in Py_Main () from /usr/lib64/libpython3.6m.so.1.0 #14 0x0000555555554b99 in main () (gdb) ---------- components: Extension Modules messages: 348563 nosy: Alexandre Hamelin priority: normal severity: normal status: open title: Crash when calling zipimport.zipimporter.__new__().() versions: Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 16:59:53 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 27 Jul 2019 20:59:53 +0000 Subject: [issue37693] IDLE/Tkinter: File names are hidden in "Open" menu (Linux) In-Reply-To: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> Message-ID: <1564261193.04.0.0111373188726.issue37693@roundup.psfhosted.org> Kyle Stanley added the comment: > What is a 'DE'? DE stands for Desktop Environment, usually they come with a number of packages (mainly GUI) such as window managers, login managers, toolbars, theming, etc. Some of the popular ones include Gnome, Plasma, Mate and LXDE. Usually anything related to appearance and GUI behavior is more closely tied to the DE than the Linux distro itself. Optionally, users can also create their own cocktail of a desktop environment, but in my experience that usually leads to more compatibility issues. > If so, this should be closed as 3rd party. If you want to test first, bypass IDLE and most of > tkinter with the following, run directly in Python. Hmm, it looks like setting the path object to codecontext.py didn't fix the issue, but either way, it looks like the issue is directly tied with tk_getOpenFile as you suspected and not the IDLE. I'm not overly familiar with tk in general since most of my experience with Python has not involving building GUIs. I'll probably spend some time messing around with tk to see if I can fix the issue. Thanks for looking into it. Should I leave it open to get feedback from the tkinter devs since the bypass didn't fix the issue? I'll add gpolo to the nosy list since he's listed as a tkinter expert and remove IDLE from the title. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:00:11 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 27 Jul 2019 21:00:11 +0000 Subject: [issue37693] Tkinter: File names are hidden in "Open" menu (Linux) In-Reply-To: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> Message-ID: <1564261211.89.0.890506367785.issue37693@roundup.psfhosted.org> Change by Kyle Stanley : ---------- nosy: +gpolo title: IDLE/Tkinter: File names are hidden in "Open" menu (Linux) -> Tkinter: File names are hidden in "Open" menu (Linux) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:04:43 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Jul 2019 21:04:43 +0000 Subject: [issue37691] Let math.dist() accept coordinates as sequences In-Reply-To: <1564205338.06.0.366598705946.issue37691@roundup.psfhosted.org> Message-ID: <1564261483.07.0.178219104343.issue37691@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14751 pull_request: https://github.com/python/cpython/pull/14984 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:04:45 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jul 2019 21:04:45 +0000 Subject: [issue37691] Let math.dist() accept coordinates as sequences In-Reply-To: <1564205338.06.0.366598705946.issue37691@roundup.psfhosted.org> Message-ID: <1564261485.07.0.816940456475.issue37691@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 6b5f1b496f0b20144592b640b9c975df43a29eb0 by Raymond Hettinger in branch 'master': bpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975) https://github.com/python/cpython/commit/6b5f1b496f0b20144592b640b9c975df43a29eb0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:27:04 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jul 2019 21:27:04 +0000 Subject: [issue37691] Let math.dist() accept coordinates as sequences In-Reply-To: <1564205338.06.0.366598705946.issue37691@roundup.psfhosted.org> Message-ID: <1564262824.57.0.407159753469.issue37691@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 76821bab9cb77fa7f847e66f8b2309ca30546c7f by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975) (GH-14984) https://github.com/python/cpython/commit/76821bab9cb77fa7f847e66f8b2309ca30546c7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:27:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Jul 2019 21:27:32 +0000 Subject: [issue37691] Let math.dist() accept coordinates as sequences In-Reply-To: <1564205338.06.0.366598705946.issue37691@roundup.psfhosted.org> Message-ID: <1564262852.57.0.082044019444.issue37691@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 17:54:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2019 21:54:51 +0000 Subject: [issue37692] IDLE: clarify shell part of highlight sample In-Reply-To: <1564246173.2.0.322711834924.issue37692@roundup.psfhosted.org> Message-ID: <1564264491.66.0.361454913845.issue37692@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +14752 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 18:07:41 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2019 22:07:41 +0000 Subject: [issue37693] Tkinter: File names are hidden in "Open" menu (Linux) In-Reply-To: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> Message-ID: <1564265261.12.0.491668016978.issue37693@roundup.psfhosted.org> Terry J. Reedy added the comment: gpolo should be removed or marked inactive as he has not responded in several years. I'm closing for now. Serhiy can say something if he wants, but has other issues to attend to. Running from IDLE, the dialog opened in idlelib. codecontext.py was a randon selection to verify return of a proper filename, suitable for open(). Are all Linux DE still based on X-Windows? Or are there divergent forks to contend with? If the problem is limited to just the one, consider reporting it. ---------- nosy: -gpolo resolution: -> third party stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 18:09:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2019 22:09:22 +0000 Subject: [issue37692] IDLE: clarify shell part of highlight sample In-Reply-To: <1564246173.2.0.322711834924.issue37692@roundup.psfhosted.org> Message-ID: <1564265362.88.0.223650453356.issue37692@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -14752 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 18:09:38 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2019 22:09:38 +0000 Subject: [issue37692] IDLE: clarify shell part of highlight sample In-Reply-To: <1564246173.2.0.322711834924.issue37692@roundup.psfhosted.org> Message-ID: <1564265378.66.0.73282788805.issue37692@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14752 pull_request: https://github.com/python/cpython/pull/14983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 18:10:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Jul 2019 22:10:04 +0000 Subject: [issue37693] Tkinter: File names are hidden in "Open" menu (Linux) In-Reply-To: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> Message-ID: <1564265404.23.0.988690717464.issue37693@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -14750 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 19:00:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 27 Jul 2019 23:00:15 +0000 Subject: [issue37694] Crash when calling zipimport.zipimporter.__new__().() In-Reply-To: <1564260723.26.0.279102723907.issue37694@roundup.psfhosted.org> Message-ID: <1564268415.44.0.481792873994.issue37694@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 19:32:45 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 27 Jul 2019 23:32:45 +0000 Subject: [issue37693] Tkinter: File names are hidden in "Open" menu (Linux) In-Reply-To: <1564250878.35.0.446772632023.issue37693@roundup.psfhosted.org> Message-ID: <1564270365.11.0.662407920477.issue37693@roundup.psfhosted.org> Kyle Stanley added the comment: > gpolo should be removed or marked inactive as he has not responded in several years. Oh okay, good to know. I'm currently working on an issue to add github usernames to the experts list, so I'll see if I can mark him as inactive as well. > Are all Linux DE still based on X-Windows? Or are there divergent forks to contend with? The one I'm currently using (KWin) is based on X, but I believe some of the other ones may have diverged a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 22:02:24 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 28 Jul 2019 02:02:24 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564279344.21.0.547381472501.issue36044@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +14753 pull_request: https://github.com/python/cpython/pull/14985 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 22:05:58 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 28 Jul 2019 02:05:58 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564279558.76.0.808740915063.issue36044@roundup.psfhosted.org> Steve Dower added the comment: I also added test_bz2 and test_lzma into the PGO profile, as the extension modules for those on Windows were barely being covered (they get imported, apparently, but that seems to be it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 23:14:58 2019 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 28 Jul 2019 03:14:58 +0000 Subject: [issue37695] Incorrect error message for `unget_wch(bytes_object)` Message-ID: <1564283698.6.0.693266446979.issue37695@roundup.psfhosted.org> New submission from Anthony Sottile : For example: curses.unget_wch(b'x') TypeError: expect bytes or str of length 1, or int, got bytes ---------- components: Extension Modules messages: 348570 nosy: Anthony Sottile priority: normal severity: normal status: open title: Incorrect error message for `unget_wch(bytes_object)` versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 27 23:21:40 2019 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 28 Jul 2019 03:21:40 +0000 Subject: [issue37695] Incorrect error message for `unget_wch(bytes_object)` In-Reply-To: <1564283698.6.0.693266446979.issue37695@roundup.psfhosted.org> Message-ID: <1564284100.19.0.837848621479.issue37695@roundup.psfhosted.org> Change by Anthony Sottile : ---------- keywords: +patch pull_requests: +14754 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 00:17:54 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 28 Jul 2019 04:17:54 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564287474.9.0.144479927576.issue36044@roundup.psfhosted.org> Inada Naoki added the comment: @steve.dower Does the PGO have significant benefit for those modules? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 01:57:57 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 28 Jul 2019 05:57:57 +0000 Subject: [issue2920] Patch to print symbolic value or errno in EnvironmentError.__str__() In-Reply-To: <1211228076.96.0.534347381118.issue2920@psf.upfronthosting.co.za> Message-ID: <1564293477.15.0.462029146252.issue2920@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +14755 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14988 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 02:00:03 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 28 Jul 2019 06:00:03 +0000 Subject: [issue2920] Patch to print symbolic value of errno in OSError.__str__() In-Reply-To: <1211228076.96.0.534347381118.issue2920@psf.upfronthosting.co.za> Message-ID: <1564293603.51.0.114266808127.issue2920@roundup.psfhosted.org> Change by Zackery Spytz : ---------- title: Patch to print symbolic value or errno in EnvironmentError.__str__() -> Patch to print symbolic value of errno in OSError.__str__() versions: +Python 3.9 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 02:00:06 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 28 Jul 2019 06:00:06 +0000 Subject: [issue37628] IDLE: Fix Font sample (config dialog) geometry In-Reply-To: <1563521552.15.0.28406404437.issue37628@roundup.psfhosted.org> Message-ID: <1564293606.98.0.871676956746.issue37628@roundup.psfhosted.org> Tal Einat added the comment: Terry, thanks for reviewing, helping get this fully ready, and merging. Kyle, thanks for the kind feedback, it's truly heart-warming! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 02:01:12 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 28 Jul 2019 06:01:12 +0000 Subject: [issue33772] Fix few dead code paths Message-ID: <1564293672.48.0.573302806093.issue33772@roundup.psfhosted.org> New submission from Zackery Spytz : PR 7418 has been merged, so I think this issue can be closed. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 02:24:33 2019 From: report at bugs.python.org (Linsey Alvarez) Date: Sun, 28 Jul 2019 06:24:33 +0000 Subject: [issue1760357] Loveubylulu@gmail.com Message-ID: <1564295073.61.0.0235555322216.issue1760357@roundup.psfhosted.org> Change by Linsey Alvarez : ---------- title: ZipFile.write fails with bad modification time -> Loveubylulu at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 02:26:51 2019 From: report at bugs.python.org (Linsey Alvarez) Date: Sun, 28 Jul 2019 06:26:51 +0000 Subject: [issue1760357] Loveubylulu@gmail.com Message-ID: <1564295211.44.0.14838873992.issue1760357@roundup.psfhosted.org> Change by Linsey Alvarez : ---------- components: +email nosy: +Linsey Alvarez, barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 02:48:51 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 28 Jul 2019 06:48:51 +0000 Subject: [issue1760357] ZipFile.write fails with bad modification time Message-ID: <1564296531.76.0.21543893661.issue1760357@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Linsey Alvarez, I am not sure how it's related to email. So I am removing the email tag and changing the subject back. ---------- components: -email nosy: +xtreak title: Loveubylulu at gmail.com -> ZipFile.write fails with bad modification time _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 09:24:48 2019 From: report at bugs.python.org (Michael Foord) Date: Sun, 28 Jul 2019 13:24:48 +0000 Subject: [issue37668] Allow individual test to be specified by "#" or "." In-Reply-To: <1563964241.47.0.656426706164.issue37668@roundup.psfhosted.org> Message-ID: <1564320288.49.0.483261113639.issue37668@roundup.psfhosted.org> Change by Michael Foord : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 09:25:29 2019 From: report at bugs.python.org (Michael Foord) Date: Sun, 28 Jul 2019 13:25:29 +0000 Subject: [issue37669] Make mock_open return per-file content In-Reply-To: <1563972418.64.0.300779941937.issue37669@roundup.psfhosted.org> Message-ID: <1564320329.19.0.498994898345.issue37669@roundup.psfhosted.org> Michael Foord added the comment: Can you suggest an API for doing this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 09:26:47 2019 From: report at bugs.python.org (Michael Foord) Date: Sun, 28 Jul 2019 13:26:47 +0000 Subject: [issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls) In-Reply-To: <1555752054.75.0.256314796752.issue36674@roundup.psfhosted.org> Message-ID: <1564320407.37.0.780499398677.issue36674@roundup.psfhosted.org> Michael Foord added the comment: "I don't know why run() returns None for skipIf cases instead of returning a TestResult with non-empty skipped, as it does for skipTest, or if the None is a separate bug." That does sound like a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 10:18:20 2019 From: report at bugs.python.org (royf) Date: Sun, 28 Jul 2019 14:18:20 +0000 Subject: [issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1564323500.13.0.896980916579.issue34313@roundup.psfhosted.org> royf added the comment: I started having a similar issue after updating to macOS Mojave 10.14.6. I'm not using idle, but the following minimal code has a similar issue: ```python import tkinter as tk w = tk.Tk() w.mainloop() ``` The crash happens on `mainloop`. This worked for me on macOS <= 10.14.5, but started crashing after updating to macOS 10.14.6. I'm using miniconda with conda=4.7.10, python=3.7.3, and tk=8.6.8. The above code does work fine on the macOS 10.14.6 in a conda environment with python=3.6.2 and tk=8.5.18. But I really want to use python 3.7, which requires tk>=8.6.8, at least on the default conda channels. ---------- nosy: +royf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 10:51:10 2019 From: report at bugs.python.org (David Wilson) Date: Sun, 28 Jul 2019 14:51:10 +0000 Subject: [issue37696] FileIO.read() on a closed TTY throws an exception prematurely Message-ID: <1564325470.84.0.0876609070441.issue37696@roundup.psfhosted.org> New submission from David Wilson : Given: $ cat tty-failure.py import pty import os master, slave = pty.openpty() master = os.fdopen(master, 'r+b', 0) slave = os.fdopen(slave, 'r+b', 0) slave.write(b'foo') slave.close() print(master.read()) On Python 2, read() would return b'foo', with subsequent calls raising IOError, whereas on Python 3 an OSError is raised due to the underlying file descriptor returning EIO. In the case of a PTY, EIO indicates the remote side has hung up and more or less can be treated as an EOF indicator. On Python 3 the partial buffer should not be discarded when a subsequent read() syscall returns an error. Secondarily, the change from IOError to OSError looks wrong. Does anyone know what's going on there? I would never expect to see OSError raised by a builtin ---------- components: IO messages: 348578 nosy: dw priority: normal severity: normal status: open title: FileIO.read() on a closed TTY throws an exception prematurely type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 10:52:58 2019 From: report at bugs.python.org (David Wilson) Date: Sun, 28 Jul 2019 14:52:58 +0000 Subject: [issue37696] FileIO.read() on a closed TTY throws an exception prematurely In-Reply-To: <1564325470.84.0.0876609070441.issue37696@roundup.psfhosted.org> Message-ID: <1564325578.2.0.147834524502.issue37696@roundup.psfhosted.org> David Wilson added the comment: Happy to send a patch for this if we can agree on the semantic being incorrect, and more importantly, someone is happy to review the patch once it reaches GitHub ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 12:04:46 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jul 2019 16:04:46 +0000 Subject: [issue37692] IDLE: clarify shell part of highlight sample In-Reply-To: <1564246173.2.0.322711834924.issue37692@roundup.psfhosted.org> Message-ID: <1564329886.42.0.673849798733.issue37692@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14756 pull_request: https://github.com/python/cpython/pull/14990 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 12:04:47 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Jul 2019 16:04:47 +0000 Subject: [issue37692] IDLE: clarify shell part of highlight sample In-Reply-To: <1564246173.2.0.322711834924.issue37692@roundup.psfhosted.org> Message-ID: <1564329887.72.0.12718640005.issue37692@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset b222955355c8077a3ceca79195731663d7c3dd5f by Terry Jan Reedy in branch 'master': bpo-37692: Improve highlight config sample (#14983) https://github.com/python/cpython/commit/b222955355c8077a3ceca79195731663d7c3dd5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 12:14:20 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jul 2019 16:14:20 +0000 Subject: [issue37692] IDLE: clarify shell part of highlight sample In-Reply-To: <1564246173.2.0.322711834924.issue37692@roundup.psfhosted.org> Message-ID: <1564330460.26.0.0994352632873.issue37692@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14757 pull_request: https://github.com/python/cpython/pull/14991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 12:14:59 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 28 Jul 2019 16:14:59 +0000 Subject: [issue37697] Incorporate changes from importlib_metadata 0.19 Message-ID: <1564330499.13.0.825368111768.issue37697@roundup.psfhosted.org> New submission from Jason R. Coombs : Importlib_metadata 0.19 is about to release. Let's sync the code with that milestone (https://gitlab.com/python-devs/importlib_metadata/-/milestones/20). ---------- components: Library (Lib) messages: 348581 nosy: barry, jaraco priority: normal severity: normal status: open title: Incorporate changes from importlib_metadata 0.19 versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 12:20:59 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 28 Jul 2019 16:20:59 +0000 Subject: [issue37697] Incorporate changes from importlib_metadata 0.19 In-Reply-To: <1564330499.13.0.825368111768.issue37697@roundup.psfhosted.org> Message-ID: <1564330859.03.0.753791895792.issue37697@roundup.psfhosted.org> Jason R. Coombs added the comment: I've started work on this in https://github.com/jaraco/cpython/commit/ee913fd4b1cc3bb324f43bfebd4f1006f90c2b6e, but two tests are failing: ====================================================================== FAIL: test_egg_info (test.test_importlib.test_main.DirectoryTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/jaraco/code/public/cpython/Lib/test/test_importlib/test_main.py", line 172, in test_egg_info version('unknown-package') AssertionError: PackageNotFoundError not raised ====================================================================== FAIL: test_zip_version_does_not_match (test.test_importlib.test_zip.TestEgg) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/jaraco/code/public/cpython/Lib/test/test_importlib/test_zip.py", line 29, in test_zip_version_does_not_match version('definitely-not-installed') AssertionError: PackageNotFoundError not raised ---------------------------------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 12:22:23 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jul 2019 16:22:23 +0000 Subject: [issue37692] IDLE: clarify shell part of highlight sample In-Reply-To: <1564246173.2.0.322711834924.issue37692@roundup.psfhosted.org> Message-ID: <1564330943.71.0.732440902246.issue37692@roundup.psfhosted.org> miss-islington added the comment: New changeset d30626443d3ca0ea690c6124bdc95a53c12ecd9d by Miss Islington (bot) in branch '3.7': bpo-37692: Improve highlight config sample (GH-14983) https://github.com/python/cpython/commit/d30626443d3ca0ea690c6124bdc95a53c12ecd9d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 12:39:09 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jul 2019 16:39:09 +0000 Subject: [issue37692] IDLE: clarify shell part of highlight sample In-Reply-To: <1564246173.2.0.322711834924.issue37692@roundup.psfhosted.org> Message-ID: <1564331949.02.0.700511258982.issue37692@roundup.psfhosted.org> miss-islington added the comment: New changeset c94386d01372e69a67935bf284bfab31dac2adab by Miss Islington (bot) in branch '3.8': bpo-37692: Improve highlight config sample (GH-14983) https://github.com/python/cpython/commit/c94386d01372e69a67935bf284bfab31dac2adab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 13:24:40 2019 From: report at bugs.python.org (hai shi) Date: Sun, 28 Jul 2019 17:24:40 +0000 Subject: [issue37698] Update doc of PyBuffer_ToContiguous Message-ID: <1564334680.0.0.401210106575.issue37698@roundup.psfhosted.org> New submission from hai shi : Due to https://github.com/python/cpython/blob/master/Objects/memoryobject.c#L985, order could be 'A' in PyBuffer_ToContiguous() ---------- assignee: docs at python components: Documentation messages: 348585 nosy: docs at python, shihai1991 priority: normal severity: normal status: open title: Update doc of PyBuffer_ToContiguous _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 13:27:15 2019 From: report at bugs.python.org (hai shi) Date: Sun, 28 Jul 2019 17:27:15 +0000 Subject: [issue37698] Update doc of PyBuffer_ToContiguous In-Reply-To: <1564334680.0.0.401210106575.issue37698@roundup.psfhosted.org> Message-ID: <1564334835.89.0.79619640919.issue37698@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14758 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14992 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 13:38:16 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 28 Jul 2019 17:38:16 +0000 Subject: [issue37697] Incorporate changes from importlib_metadata 0.19 In-Reply-To: <1564330499.13.0.825368111768.issue37697@roundup.psfhosted.org> Message-ID: <1564335496.78.0.990168358488.issue37697@roundup.psfhosted.org> Jason R. Coombs added the comment: Okay, I think the issue was that I had failed to `make regen-importlib`. After doing that, the tests are passing. PR incoming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 13:39:16 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 28 Jul 2019 17:39:16 +0000 Subject: [issue37697] Incorporate changes from importlib_metadata 0.19 In-Reply-To: <1564330499.13.0.825368111768.issue37697@roundup.psfhosted.org> Message-ID: <1564335556.19.0.274586018409.issue37697@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +14759 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14993 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:08:02 2019 From: report at bugs.python.org (hai shi) Date: Sun, 28 Jul 2019 18:08:02 +0000 Subject: [issue34101] PyBuffer_GetPointer() not documented Message-ID: <1564337282.02.0.290929151791.issue34101@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14760 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:59:27 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 28 Jul 2019 18:59:27 +0000 Subject: [issue37697] Incorporate changes from importlib_metadata 0.19 In-Reply-To: <1564330499.13.0.825368111768.issue37697@roundup.psfhosted.org> Message-ID: <1564340367.67.0.836149045746.issue37697@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 049460da9c7b5f51732e2966195c44713af9dc4c by Jason R. Coombs in branch 'master': bpo-37697: Sync with importlib_metadata 0.19 (#14993) https://github.com/python/cpython/commit/049460da9c7b5f51732e2966195c44713af9dc4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:59:37 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Jul 2019 18:59:37 +0000 Subject: [issue37697] Incorporate changes from importlib_metadata 0.19 In-Reply-To: <1564330499.13.0.825368111768.issue37697@roundup.psfhosted.org> Message-ID: <1564340377.45.0.592330276192.issue37697@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14761 pull_request: https://github.com/python/cpython/pull/14995 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 15:32:34 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Jul 2019 19:32:34 +0000 Subject: [issue37685] Fix equality checks for some types In-Reply-To: <1564088866.66.0.720895226226.issue37685@roundup.psfhosted.org> Message-ID: <1564342354.06.0.372675312652.issue37685@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +14762 pull_request: https://github.com/python/cpython/pull/14996 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 15:45:49 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 28 Jul 2019 19:45:49 +0000 Subject: [issue37697] Incorporate changes from importlib_metadata 0.19 In-Reply-To: <1564330499.13.0.825368111768.issue37697@roundup.psfhosted.org> Message-ID: <1564343149.85.0.144438591041.issue37697@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset f96334c17946683dd4fb5a84e86a7a4caa4b487d by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-37697: Sync with importlib_metadata 0.19 (GH-14993) (GH-14995) https://github.com/python/cpython/commit/f96334c17946683dd4fb5a84e86a7a4caa4b487d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 15:46:47 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 28 Jul 2019 19:46:47 +0000 Subject: [issue37697] Incorporate changes from importlib_metadata 0.19 In-Reply-To: <1564330499.13.0.825368111768.issue37697@roundup.psfhosted.org> Message-ID: <1564343207.73.0.332297808416.issue37697@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 21:01:16 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 01:01:16 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564362076.97.0.295755356048.issue36044@roundup.psfhosted.org> miss-islington added the comment: New changeset e1b900247227dad49d8231f1d028872412230ab4 by Miss Islington (bot) (Steve Dower) in branch 'master': bpo-36044: Avoid warnings in Windows PGO build and add lzma, bz2 and sqlite coverage (GH-14985) https://github.com/python/cpython/commit/e1b900247227dad49d8231f1d028872412230ab4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 21:01:44 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 01:01:44 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564362104.89.0.114434476535.issue36044@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14763 pull_request: https://github.com/python/cpython/pull/14997 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 21:02:58 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 29 Jul 2019 01:02:58 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564362178.37.0.851321542435.issue36044@roundup.psfhosted.org> Gregory P. Smith added the comment: i doubt test_lzma test_bz2 and test_sqlite matter. What matters there is compiling the underlying lzma, bz2, and sqlite3 libraries with PGO. that isn't done as part of our build system. regardless, those tests are fast enough so i've approved the PR to add them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 21:20:11 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 01:20:11 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564363211.67.0.25969441305.issue36044@roundup.psfhosted.org> miss-islington added the comment: New changeset 36fd7b6f01127bc6a8b4a37a363e0aa9cfd76506 by Miss Islington (bot) in branch '3.8': bpo-36044: Avoid warnings in Windows PGO build and add lzma, bz2 and sqlite coverage (GH-14985) https://github.com/python/cpython/commit/36fd7b6f01127bc6a8b4a37a363e0aa9cfd76506 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 21:27:06 2019 From: report at bugs.python.org (Doyle Rowland) Date: Mon, 29 Jul 2019 01:27:06 +0000 Subject: [issue36002] configure --enable-optimizations with clang fails to detect llvm-profdata In-Reply-To: <1550237355.31.0.735770966924.issue36002@roundup.psfhosted.org> Message-ID: <1564363626.52.0.186885431303.issue36002@roundup.psfhosted.org> Change by Doyle Rowland : ---------- keywords: +patch pull_requests: +14764 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14998 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 21:39:20 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2019 01:39:20 +0000 Subject: [issue37692] IDLE: clarify shell part of highlight sample In-Reply-To: <1564246173.2.0.322711834924.issue37692@roundup.psfhosted.org> Message-ID: <1564364360.32.0.648646431891.issue37692@roundup.psfhosted.org> Terry J. Reedy added the comment: A comment on the PR discussed the label changes made. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 22:29:50 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Mon, 29 Jul 2019 02:29:50 +0000 Subject: [issue37666] urllib.requests.urlopen doesn't support cadata= In-Reply-To: <1563926058.03.0.180495297284.issue37666@roundup.psfhosted.org> Message-ID: <1564367390.29.0.768570443946.issue37666@roundup.psfhosted.org> Change by Giovanni Cappellotto : ---------- nosy: +potomak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 23:06:07 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Mon, 29 Jul 2019 03:06:07 +0000 Subject: [issue21992] New AST node Else() should be introduced In-Reply-To: <1405527228.32.0.961029538035.issue21992@psf.upfronthosting.co.za> Message-ID: <1564369567.38.0.611218815795.issue21992@roundup.psfhosted.org> Change by Giovanni Cappellotto : ---------- nosy: +potomak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 23:30:11 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Mon, 29 Jul 2019 03:30:11 +0000 Subject: [issue37678] Incorrect behaviour for user@password URI pattern in urlparse In-Reply-To: <1564048166.67.0.214181978799.issue37678@roundup.psfhosted.org> Message-ID: <1564371011.42.0.576532060564.issue37678@roundup.psfhosted.org> Giovanni Cappellotto added the comment: What do you mean that urlparse act as unexpected? I tried your example and I think urlparse's behavior is correct. >From the RFC 1738: > Octets must be encoded if they have no corresponding graphic > character within the US-ASCII coded character set, if the use of the > corresponding character is unsafe, or if the corresponding character > is reserved for some other interpretation within the particular URL > scheme. Your example: ``` >>> from urllib.parse import urlparse >>> urlparse('http://user:pass#?[word at example.com:80/path') ParseResult(scheme='http', netloc='user:pass', path='', params='', query='', fragment='?[word at example.com:80/path') ``` Part of the password is parsed as the URL fragment because the character `#` has a special meaning: > The character "#" is unsafe and should > always be encoded because it is used in World Wide Web and in other > systems to delimit a URL from a fragment/anchor identifier that might > follow it. ---------- nosy: +potomak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 23:34:58 2019 From: report at bugs.python.org (Brian Skinn) Date: Mon, 29 Jul 2019 03:34:58 +0000 Subject: [issue37699] Explicit mention of raised ValueError's after .detach() of underlying IO buffer Message-ID: <1564371298.05.0.400100937454.issue37699@roundup.psfhosted.org> New submission from Brian Skinn : Once the underlying buffer/stream is .detach()ed from an instance of a subclass of TextIOBase or BufferedIOBase, accession of most attributes defined on TextIOBase/BufferedIOBase or the IOBase parent, as well as calling of most methods defined on TextIOBase/BufferedIOBase/IOBase, results in raising of a ValueError. Currently, the documentation of both .detach() methods states simply: > After the raw stream has been detached, the buffer is in an unusable state. I propose augmenting the above to something like the following in the docs for both .detach() methods, to make this behavior more explicit: > After the raw stream has been detached, the buffer > is in an unusable state. As a result, accessing/calling most > attributes/methods of either :class:`BufferedIOBase` or its > :class:`IOBase` parent will raise :exc:`ValueError`. I confirm that the error raised for both `BufferedReader` and `TextIOWrapper` after `.detach()` *is* ValueError in all of 3.5.7, 3.6.8, 3.7.3, and 3.8.0b1. ---------- assignee: docs at python components: Documentation messages: 348594 nosy: bskinn, docs at python priority: normal severity: normal status: open title: Explicit mention of raised ValueError's after .detach() of underlying IO buffer type: enhancement 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 Jul 28 23:35:26 2019 From: report at bugs.python.org (Brian Skinn) Date: Mon, 29 Jul 2019 03:35:26 +0000 Subject: [issue37699] Explicit mention of raised ValueError's after .detach() of underlying IO buffer In-Reply-To: <1564371298.05.0.400100937454.issue37699@roundup.psfhosted.org> Message-ID: <1564371326.46.0.577514826798.issue37699@roundup.psfhosted.org> Change by Brian Skinn : ---------- type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 00:22:16 2019 From: report at bugs.python.org (Christopher Hunt) Date: Mon, 29 Jul 2019 04:22:16 +0000 Subject: [issue37700] shutil.copyfile does not raise SpecialFileError for socket files Message-ID: <1564374136.89.0.594392746042.issue37700@roundup.psfhosted.org> New submission from Christopher Hunt : Currently shutil.copyfile only raises SpecialFileError for named pipes. When trying to use the function to copy a socket file, the exception raised depends on the platform, for example: macOS: "[Errno 102] Operation not supported on socket: '/Users/guido/src/mypy/dmypy.sock'" HP-UX: "[Errno 223] Operation not supported: 'example/foo'" Solaris: "[Errno 122] Operation not supported on transport endpoint: 'example/foo'" AIX: "[Errno 64] Operation not supported on socket: '../../example/foo'" Linux: "[Errno 6] No such device or address: 'example/foo'" This can be reproduced like: import os import shutil import socket import tempfile d = tempfile.mkdtemp() src = os.path.join(d, "src") dest = os.path.join(d, "dest") sock = socket.socket(socket.AF_UNIX) sock.bind(src) shutil.copyfile(src, dest) Making shutil.copyfile raise SpecialFileError for socket files would improve the interface of this function since the same class of error could be ignored. This is mostly useful with shutil.copytree, which defaults to copyfile for its copy function. ---------- components: Library (Lib) messages: 348595 nosy: chrahunt priority: normal severity: normal status: open title: shutil.copyfile does not raise SpecialFileError for socket files type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 00:24:03 2019 From: report at bugs.python.org (Christopher Hunt) Date: Mon, 29 Jul 2019 04:24:03 +0000 Subject: [issue37700] shutil.copyfile does not raise SpecialFileError for socket files In-Reply-To: <1564374136.89.0.594392746042.issue37700@roundup.psfhosted.org> Message-ID: <1564374243.83.0.626244707263.issue37700@roundup.psfhosted.org> Christopher Hunt added the comment: See also: the comment from https://github.com/python/cpython/blob/e1b900247227dad49d8231f1d028872412230ab4/Lib/shutil.py#L245: > # XXX What about other special files? (sockets, devices...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 00:36:51 2019 From: report at bugs.python.org (Christopher Hunt) Date: Mon, 29 Jul 2019 04:36:51 +0000 Subject: [issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo Message-ID: <1564375011.26.0.591034083368.issue37701@roundup.psfhosted.org> New submission from Christopher Hunt : Currently shutil.copyfile raises SpecialFileError when src is a link to a fifo. To reproduce: import os import shutil import tempfile d = tempfile.mkdtemp() fifo = os.path.join(d, 'fifo') link_to_fifo = os.path.join(d, 'link-to-fifo') copy_of_link_to_fifo = os.path.join(d, 'copy-of-link-to-fifo') os.mkfifo(fifo) os.symlink(fifo, link_to_fifo) shutil.copyfile(link_to_fifo, copy_of_link_to_fifo) Example output: Traceback (most recent call last): File "repro.py", line 14, in shutil.copyfile(link_to_fifo, copy_of_link_to_fifo) File "/home/chris/.pyenv/versions/3.7.2/lib/python3.7/shutil.py", line 115, in copyfile raise SpecialFileError("`%s` is a named pipe" % fn) shutil.SpecialFileError: `/tmp/user/1000/tmpxhigll5g/link-to-fifo` is a named pipe I would have expected this to copy the symlink without complaint. Raising a SpecialFileError would be OK if `follow_symlinks` was False. ---------- components: Library (Lib) messages: 348597 nosy: chrahunt priority: normal severity: normal status: open title: shutil.copyfile raises SpecialFileError for symlink to fifo type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 01:15:54 2019 From: report at bugs.python.org (Christopher Hunt) Date: Mon, 29 Jul 2019 05:15:54 +0000 Subject: [issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo In-Reply-To: <1564375011.26.0.591034083368.issue37701@roundup.psfhosted.org> Message-ID: <1564377354.5.0.253355405103.issue37701@roundup.psfhosted.org> Christopher Hunt added the comment: Likewise when the destination is a symlink - though in that case the value of `follow_symlinks` should probably not matter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 02:40:07 2019 From: report at bugs.python.org (=?utf-8?q?Damien_Nad=C3=A9?=) Date: Mon, 29 Jul 2019 06:40:07 +0000 Subject: [issue37669] Make mock_open return per-file content In-Reply-To: <1563972418.64.0.300779941937.issue37669@roundup.psfhosted.org> Message-ID: <1564382407.56.0.507098088284.issue37669@roundup.psfhosted.org> Damien Nad? added the comment: I've submitted a patch to mock_open, but if you think it's a bad approach, I'm open to discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 03:45:29 2019 From: report at bugs.python.org (neonene) Date: Mon, 29 Jul 2019 07:45:29 +0000 Subject: [issue37702] memory leak in ssl certification Message-ID: <1564386329.8.0.956014299339.issue37702@roundup.psfhosted.org> New submission from neonene : Windows10/7(x86/x64) After issue35941 (any PR merged) In https-access, memory usage increases by about 200KB per urlopen() and easily reach to giga bytes. I found out leak of certificate-store-handles in _ssl.c and made patch, which works fine for my pc. I guess some users are in trouble with this leak. I'm about to raise PR, so please review. Thanks! ---------- assignee: christian.heimes components: SSL, Windows messages: 348600 nosy: christian.heimes, neonene, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: memory leak in ssl certification type: resource usage versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 04:11:13 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Jul 2019 08:11:13 +0000 Subject: [issue37696] FileIO.read() on a closed TTY throws an exception prematurely In-Reply-To: <1564325470.84.0.0876609070441.issue37696@roundup.psfhosted.org> Message-ID: <1564387873.67.0.656395024422.issue37696@roundup.psfhosted.org> Serhiy Storchaka added the comment: If your patch can fix the issue with buffering without breaking other things I would be happy to make a review. But OSError and IOError (and several other error types) were merged a long time ago. It can not be undone. ---------- components: +Library (Lib) nosy: +benjamin.peterson, serhiy.storchaka, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 04:41:13 2019 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 29 Jul 2019 08:41:13 +0000 Subject: [issue37700] shutil.copyfile does not raise SpecialFileError for socket files In-Reply-To: <1564374136.89.0.594392746042.issue37700@roundup.psfhosted.org> Message-ID: <1564389673.07.0.705214046291.issue37700@roundup.psfhosted.org> Chris Jerdonek added the comment: This issue is being filed after coming up in pip's tracker here (in a comment by Guido): https://github.com/pypa/pip/issues/5306#issuecomment-383355379 ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 04:50:09 2019 From: report at bugs.python.org (Dmitrii Ivaniushin) Date: Mon, 29 Jul 2019 08:50:09 +0000 Subject: [issue37703] Inconsistent gather with child exception Message-ID: <1564390209.24.0.854284418154.issue37703@roundup.psfhosted.org> New submission from Dmitrii Ivaniushin : I found some issue that I suppose is a bug. Let us have long running coroutines. We use them in gather, and one of them raises an error. Since then we cannot cancel the gather anymore, thus remaining children are not cancelable and executed until complete or raise an exception themselves. === import asyncio async def coro_with_error(): # Coro raises en error with 1 sec delay await asyncio.sleep(1) raise Exception('Error in coro') async def cancellator(coro): # We use this to cancel gather with delay 1 sec await asyncio.sleep(1) coro.cancel() async def success_long_coro(): # Long running coro, 2 sec try: await asyncio.sleep(2) print("I'm ok!") return 42 except asyncio.CancelledError: # Track that this coro is really cancelled print('I was cancelled') raise async def collector_with_error(): gather = asyncio.gather(coro_with_error(), success_long_coro()) try: await gather except Exception: print(f"WHOAGH ERROR, gather done={gather.done()}") print(f'EXC={type(gather.exception()).__name__}') # We want to cancel still running success_long_coro() gather.cancel() async def collector_with_cancel(): # Gather result from success_long_coro() gather = asyncio.gather(success_long_coro()) # schedule cancel in 1 sec asyncio.create_task(cancellator(gather)) try: await gather except Exception: print(f"WHOAGH ERROR, gather done={gather.done()}") print(f'EXC={type(gather.exception()).__name__}') # We want to cancel still running success_long_coro() gather.cancel() return # First case, cancel gather when children are running print('First case') loop = asyncio.get_event_loop() loop.create_task(collector_with_cancel()) # Ensure test coros we fully run loop.run_until_complete(asyncio.sleep(3)) print('Done') # Second case, cancel gather when child raise error print('Second case') loop = asyncio.get_event_loop() loop.create_task(collector_with_error()) # Ensure test coros we fully run loop.run_until_complete(asyncio.sleep(3)) print('Done') === Actual output: First case I was cancelled WHOAGH ERROR, gather done=True EXC=CancelledError Done Second case WHOAGH ERROR, gather done=True EXC=Exception I'm ok! Done Expected output: First case I was cancelled WHOAGH ERROR, gather done=True EXC=CancelledError Done Second case I was cancelled WHOAGH ERROR, gather done=True EXC=Exception Done Documentations says: > If gather() is cancelled, all submitted awaitables (that have not completed yet) are also cancelled. But it mentions no cases on child coros' exceptions. >From doc: > If return_exceptions is False (default), the first raised exception is immediately propagated to the task that awaits on gather(). Other awaitables in the aws sequence won?t be cancelled and will continue to run. Which is true, exception is propagated, the gather has an exception set, marked as done() so its children are not cancelled. I believe asyncio should allow cancellation in that case. ---------- components: asyncio messages: 348603 nosy: Dmitrii Ivaniushin, asvetlov, yselivanov priority: normal severity: normal status: open title: Inconsistent gather with child exception type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 04:53:12 2019 From: report at bugs.python.org (Pierre Glaser) Date: Mon, 29 Jul 2019 08:53:12 +0000 Subject: [issue37652] Multiprocessing shared_memory ValueError on race with ShareableList In-Reply-To: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org> Message-ID: <1564390392.41.0.527246316282.issue37652@roundup.psfhosted.org> Pierre Glaser added the comment: Sure, although I won't be able to merge it. Make sure you ping a core-dev such as pitrou or davin :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 05:12:27 2019 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Jul 2019 09:12:27 +0000 Subject: [issue37702] memory leak in ssl certification In-Reply-To: <1564386329.8.0.956014299339.issue37702@roundup.psfhosted.org> Message-ID: <1564391547.74.0.958709463416.issue37702@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14765 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14999 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 06:22:41 2019 From: report at bugs.python.org (Michael Felt) Date: Mon, 29 Jul 2019 10:22:41 +0000 Subject: [issue37690] Simplify linking of shared libraries on the AIX OS In-Reply-To: <1564162349.26.0.0398435522922.issue37690@roundup.psfhosted.org> Message-ID: <1564395761.85.0.362039078003.issue37690@roundup.psfhosted.org> Michael Felt added the comment: David gives several reasons why this PR should not be used. And, in reading them - while I follow them at face value, there may be things I miss due to ignorance or being naive (more the system admin than tool developer). Isn't there an configure --enable-shared that (sadly!) gives a SVR4 like shared library (sys-admin view - it is a .so file (libpython3.7m.so) rather than "the same file" as a member of an archive (e.g., libpython3.a[libpython3.7m.so]). While it may be common on other OS systems to have two "lib" directories, e.g., /usr/lib and /usr/lib64 - on AIX there is expected - one directory (/usr/lib) and the "archives aka .a files" may have multiple members, e.g., a 32-bit and a 64-bit member. Not using .a files makes it very hard to keep a "tight-ship" on an AIX server - and I feel it is incorrect for a tool to dictate system administration policy. As I do not know how Python looks on other systems - here is a short view of Python and ldd when --enable-shared is used: /opt/bin/python3 needs: /usr/lib/libc.a(shr.o) /usr/lib/libpthreads.a(shr_xpg5.o) /opt/lib/libpython3.7m.so /unix /usr/lib/libcrypt.a(shr.o) /usr/lib/libpthreads.a(shr_comm.o) /usr/lib/libdl.a(shr.o) Here is an example not using --enable-shared: /opt/bin/python3 needs: /usr/lib/libc.a(shr.o) /usr/lib/libpthreads.a(shr_xpg5.o) /usr/lib/libpthreads.a(shr_comm.o) /usr/lib/libdl.a(shr.o) /usr/lib/libintl.a(libintl.so.8) /unix /usr/lib/libcrypt.a(shr.o) /usr/lib/libpthread.a(shr_xpg5.o) /usr/lib/libiconv.a(libiconv.so.2) /usr/lib/libc.a(shr_64.o) /usr/lib/libcrypt.a(shr_64.o) Both versions build ".so" files, that are accessed using dlopen() root at x066:[/home/root]find /opt/lib/python3.7 -name \*.so | head /opt/lib/python3.7/lib-dynload/_asyncio.so /opt/lib/python3.7/lib-dynload/_bisect.so /opt/lib/python3.7/lib-dynload/_blake2.so /opt/lib/python3.7/lib-dynload/_bz2.so /opt/lib/python3.7/lib-dynload/_codecs_cn.so /opt/lib/python3.7/lib-dynload/_codecs_hk.so /opt/lib/python3.7/lib-dynload/_codecs_iso2022.so /opt/lib/python3.7/lib-dynload/_codecs_jp.so /opt/lib/python3.7/lib-dynload/_codecs_kr.so /opt/lib/python3.7/lib-dynload/_codecs_tw.so and root at x064:[/opt/lib/python3.7]find /opt/lib/python3.7 -name \*.so | head /opt/lib/python3.7/lib-dynload/_asyncio.so /opt/lib/python3.7/lib-dynload/_bisect.so /opt/lib/python3.7/lib-dynload/_blake2.so /opt/lib/python3.7/lib-dynload/_bz2.so /opt/lib/python3.7/lib-dynload/_codecs_cn.so /opt/lib/python3.7/lib-dynload/_codecs_hk.so /opt/lib/python3.7/lib-dynload/_codecs_iso2022.so /opt/lib/python3.7/lib-dynload/_codecs_jp.so /opt/lib/python3.7/lib-dynload/_codecs_kr.so /opt/lib/python3.7/lib-dynload/_codecs_tw.so Lastly, The PR, asis, appears to be broken. make: *** [Makefile:613: sharedmods] Illegal instruction (core dumped) /opt/bin/make returned an error root at x066:[/data/prj/python/python3-3.9]make V=1 CC='xlc_r' LDSHARED='xlc_r -G ' OPT='-DNDEBUG -O' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python -E ../git/python3-3.9/setup.py build make: *** [Makefile:613: sharedmods] Illegal instruction (core dumped) Note also: LDSHARED has added xlc_r to it's flags - that does not seem right either. -1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 06:50:32 2019 From: report at bugs.python.org (Ben) Date: Mon, 29 Jul 2019 10:50:32 +0000 Subject: [issue37652] Multiprocessing shared_memory ValueError on race with ShareableList In-Reply-To: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org> Message-ID: <1564397432.3.0.455478181594.issue37652@roundup.psfhosted.org> Ben added the comment: It would be nice to get davin to clarify the API for this module. What are the use cases for SharedMemory and ShareableList? Are you supposed to ever use a raw SharedMemory buffer directly? What atomicity guarantees are there for ShareableList operations and read/write to the SharedMemory buffer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:24:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:24:34 +0000 Subject: [issue1185124] pydoc doesn't find all module doc strings Message-ID: <1564399474.89.0.843126492293.issue1185124@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 14 years old, inactive for 5 years, has 3 patches: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- keywords: -easy versions: +Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:26:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:26:25 +0000 Subject: [issue1635217] Warn against using requires/provides/obsoletes in setup.py Message-ID: <1564399585.79.0.157740304301.issue1635217@roundup.psfhosted.org> STINNER Victor added the comment: This issue seems to be controversial. I suggest to open a discussion at te Packaging forum https://discuss.python.org/c/packaging rather than using the bug tracker. I close this issue. ---------- nosy: +vstinner resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:27:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:27:12 +0000 Subject: [issue1398781] Example in section 5.3 "Pure Embedding" doesn't work. Message-ID: <1564399631.99.0.0834820645106.issue1398781@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 13 years old, inactive for 5 years, has a patch: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:27:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:27:55 +0000 Subject: [issue10932] distutils.core.setup - data_files misbehaviour ? In-Reply-To: <1295353825.23.0.755300594789.issue10932@psf.upfronthosting.co.za> Message-ID: <1564399675.82.0.101835444872.issue10932@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 8 years old has 4 patches: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:28:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:28:33 +0000 Subject: =?utf-8?q?=5Bissue9322=5D_Don=E2=80=99t_fail_silently_if_ext=5Fmodules_us?= =?utf-8?q?e_absolute_paths?= In-Reply-To: <1279721130.09.0.919872519995.issue9322@psf.upfronthosting.co.za> Message-ID: <1564399713.29.0.889264084059.issue9322@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 9 years old has a patch: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:29:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:29:10 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1564399750.88.0.78894967186.issue1170@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 12 years old has 3 patches: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:29:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:29:41 +0000 Subject: [issue4256] argparse: provide a simple way to get a programmatically useful list of options In-Reply-To: <1225729854.98.0.852900527881.issue4256@psf.upfronthosting.co.za> Message-ID: <1564399781.58.0.888485190405.issue4256@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 11 years old has a patch (with 2 versions): it's far from being "newcomer friendly", I remove the "Easy" label. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:30:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:30:04 +0000 Subject: [issue6114] distutils build_ext path comparison only based on strings In-Reply-To: <1243335359.03.0.865660639037.issue6114@psf.upfronthosting.co.za> Message-ID: <1564399804.43.0.574543501284.issue6114@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 10 years old has a patch: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:30:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:30:38 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1564399838.92.0.214960430419.issue7976@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 9 years old has two patch (one having 8 versions): it's far from being "newcomer friendly", I remove the "Easy" label. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:31:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:31:06 +0000 Subject: [issue15266] Perform the same checks as PyPI for Description field In-Reply-To: <1341614489.26.0.385769914645.issue15266@psf.upfronthosting.co.za> Message-ID: <1564399866.62.0.746131335303.issue15266@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 7 years old: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:32:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:32:21 +0000 Subject: [issue22011] test_os extended attribute setxattr tests can fail with ENOSPC (Errno 28) In-Reply-To: <1405786207.71.0.923118203201.issue22011@psf.upfronthosting.co.za> Message-ID: <1564399941.7.0.0245074738085.issue22011@roundup.psfhosted.org> STINNER Victor added the comment: We don't have enough info to decide if we should ignore the error or not. I just close this old issue as out of date. ---------- nosy: +vstinner resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:32:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:32:48 +0000 Subject: [issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars In-Reply-To: <1405482059.28.0.321220843423.issue21987@psf.upfronthosting.co.za> Message-ID: <1564399968.65.0.775302522153.issue21987@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 5 years old has 4 patches: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:33:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:33:36 +0000 Subject: [issue1371826] distutils is silent about multiple -I/-L/-R Message-ID: <1564400016.41.0.0389306361662.issue1371826@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 14 years old: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:34:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:34:18 +0000 Subject: =?utf-8?q?=5Bissue1011113=5D_Make_=E2=80=9Cinstall=E2=80=9D_find_the_buil?= =?utf-8?q?d=5Fbase_directory?= Message-ID: <1564400058.14.0.927626310035.issue1011113@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 15 years old and has 3 patches: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:35:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:35:02 +0000 Subject: [issue22024] Add to shutil the ability to wait until files are definitely deleted In-Reply-To: <1405972808.55.0.924744488039.issue22024@psf.upfronthosting.co.za> Message-ID: <1564400102.72.0.473083546851.issue22024@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 5 years old and has 2 patches: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:35:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:35:29 +0000 Subject: [issue15125] argparse: positional arguments containing - in name not handled well In-Reply-To: <1340292847.64.0.123942573403.issue15125@psf.upfronthosting.co.za> Message-ID: <1564400129.06.0.785319050178.issue15125@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 7 years old and has 3 patches: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:35:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:35:38 +0000 Subject: [issue15125] argparse: positional arguments containing - in name not handled well In-Reply-To: <1340292847.64.0.123942573403.issue15125@psf.upfronthosting.co.za> Message-ID: <1564400138.41.0.691037460573.issue15125@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:36:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:36:07 +0000 Subject: [issue12933] Update or remove claims that distutils requires external programs In-Reply-To: <1315411614.16.0.0292960363033.issue12933@psf.upfronthosting.co.za> Message-ID: <1564400167.15.0.484914208419.issue12933@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 8 years old and has 3 patches: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:37:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:37:45 +0000 Subject: [issue4733] Add a "decode to declared encoding" version of urlopen to urllib In-Reply-To: <1230068654.82.0.881542673607.issue4733@psf.upfronthosting.co.za> Message-ID: <1564400265.33.0.671907765117.issue4733@roundup.psfhosted.org> STINNER Victor added the comment: This feature request seems to be controversial: there is no clear consensus on which encoding should be used. I suggest to simply close the issue. In the meanwhile, since this issue is far from being "newcomer friendly", I remove the "Easy" label. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:38:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:38:53 +0000 Subject: [issue13378] ET: add custom namespaces to serialization methods In-Reply-To: <1320877071.09.0.895123668254.issue13378@psf.upfronthosting.co.za> Message-ID: <1564400333.58.0.685189386259.issue13378@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 8 years old and has already 3 patches attached, it is not newcomer friendly: I remove the "easy" keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:40:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:40:02 +0000 Subject: [issue7918] distutils always ignores byte compilation errors In-Reply-To: <1265995747.45.0.532654407664.issue7918@psf.upfronthosting.co.za> Message-ID: <1564400402.12.0.839734635796.issue7918@roundup.psfhosted.org> STINNER Victor added the comment: It seems like this issue is not a bug, I close it. ---------- nosy: +vstinner resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:43:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:43:10 +0000 Subject: [issue9647] os.confstr() does not handle value changing length between calls In-Reply-To: <1282243493.08.0.1214343728.issue9647@psf.upfronthosting.co.za> Message-ID: <1564400590.04.0.50330890223.issue9647@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 9 years old and has patches: it is no newcomer friendly, I remove the "easy" keyword. ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:43:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:43:52 +0000 Subject: [issue17840] base64_codec uses assert for runtime validity checks In-Reply-To: <1366875650.57.0.151905786577.issue17840@psf.upfronthosting.co.za> Message-ID: <1564400632.89.0.765220246469.issue17840@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 6 years old and has patches: it is no newcomer friendly, I remove the "easy" keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:44:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:44:13 +0000 Subject: [issue21574] Port image types detections from PIL to the imghdr module In-Reply-To: <1401010621.11.0.919611847501.issue21574@psf.upfronthosting.co.za> Message-ID: <1564400653.64.0.188565468815.issue21574@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 5 years old and has patches: it is no newcomer friendly, I remove the "easy" keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:44:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:44:38 +0000 Subject: [issue15403] Refactor package creation support code into a common location In-Reply-To: <1342782793.3.0.140383152387.issue15403@psf.upfronthosting.co.za> Message-ID: <1564400678.19.0.347311794815.issue15403@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 7 years old and has patches: it is no newcomer friendly, I remove the "easy" keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:45:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:45:13 +0000 Subject: [issue17311] use distutils terminology in "PyPI package display" section In-Reply-To: <1361988977.92.0.980923457558.issue17311@psf.upfronthosting.co.za> Message-ID: <1564400713.2.0.0962990144255.issue17311@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 6 years old and has a patch: it is no newcomer friendly, I remove the "easy" keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:45:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:45:47 +0000 Subject: [issue24479] Support LMMS project files in mimetypes.guess_type In-Reply-To: <1434795502.53.0.948243693094.issue24479@psf.upfronthosting.co.za> Message-ID: <1564400747.05.0.327275536199.issue24479@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 4 years old and has patches: it is no newcomer friendly, I remove the "easy" keyword. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:46:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:46:08 +0000 Subject: [issue16958] The sqlite3 context manager does not work with isolation_level=None In-Reply-To: <1358124405.04.0.0310758361359.issue16958@psf.upfronthosting.co.za> Message-ID: <1564400768.78.0.818720792427.issue16958@roundup.psfhosted.org> STINNER Victor added the comment: This issue is no newcomer friendly, I remove the "easy" keyword. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:46:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:46:27 +0000 Subject: [issue13559] Use sendfile where possible in httplib In-Reply-To: <1323377245.96.0.509517020675.issue13559@psf.upfronthosting.co.za> Message-ID: <1564400787.95.0.568479313069.issue13559@roundup.psfhosted.org> STINNER Victor added the comment: This issue is no newcomer friendly, I remove the "easy" keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:47:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:47:10 +0000 Subject: [issue17908] Unittest runner needs an option to call gc.collect() after each test In-Reply-To: <1367720444.87.0.21268529715.issue17908@psf.upfronthosting.co.za> Message-ID: <1564400830.16.0.178680624724.issue17908@roundup.psfhosted.org> STINNER Victor added the comment: This issue is no newcomer friendly, I remove the "easy" keyword. ---------- keywords: -easy versions: +Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:47:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:47:28 +0000 Subject: [issue14019] Unify tests for str.format and string.Formatter In-Reply-To: <1329293704.94.0.0580926341423.issue14019@psf.upfronthosting.co.za> Message-ID: <1564400848.01.0.278262033289.issue14019@roundup.psfhosted.org> STINNER Victor added the comment: This issue is no newcomer friendly, I remove the "easy" keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:47:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:47:55 +0000 Subject: [issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py In-Reply-To: <1320183133.27.0.209500697705.issue13317@psf.upfronthosting.co.za> Message-ID: <1564400875.53.0.380804415396.issue13317@roundup.psfhosted.org> STINNER Victor added the comment: This issue is no newcomer friendly, I remove the "easy" keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:49:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:49:14 +0000 Subject: [issue24841] Some test_ssl network tests fail if svn.python.org is not accessible. In-Reply-To: <1439252941.43.0.787973342114.issue24841@psf.upfronthosting.co.za> Message-ID: <1564400954.57.0.351833329199.issue24841@roundup.psfhosted.org> STINNER Victor added the comment: test_ssl doesn't use svn.python.org anymore and it now better handle network failures. I close the issue as out of date. ---------- nosy: +vstinner resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:49:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:49:58 +0000 Subject: [issue17369] Message.get_filename produces exception if the RFC2231 encoding is ill-formed In-Reply-To: <1362608740.33.0.297004510938.issue17369@psf.upfronthosting.co.za> Message-ID: <1564400998.77.0.552683511629.issue17369@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:50:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:50:14 +0000 Subject: [issue24505] shutil.which wrong result on Windows In-Reply-To: <1435183779.2.0.13075721906.issue24505@psf.upfronthosting.co.za> Message-ID: <1564401014.69.0.543516807476.issue24505@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:51:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:51:31 +0000 Subject: [issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch In-Reply-To: <1444693845.85.0.133666844386.issue25386@psf.upfronthosting.co.za> Message-ID: <1564401091.82.0.597585140859.issue25386@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:51:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:51:41 +0000 Subject: [issue17233] http.client header debug output format In-Reply-To: <1361256774.67.0.162902666936.issue17233@psf.upfronthosting.co.za> Message-ID: <1564401101.35.0.440971591752.issue17233@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:52:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:52:09 +0000 Subject: [issue24790] Idle: improve stack viewer In-Reply-To: <1438734562.89.0.932245136919.issue24790@psf.upfronthosting.co.za> Message-ID: <1564401129.28.0.922691503964.issue24790@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:53:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:53:08 +0000 Subject: [issue23883] __all__ lists are incomplete In-Reply-To: <1428423790.05.0.732881467443.issue23883@psf.upfronthosting.co.za> Message-ID: <1564401188.07.0.183686032461.issue23883@roundup.psfhosted.org> STINNER Victor added the comment: Can this issue be closed now? ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:54:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:54:09 +0000 Subject: [issue5758] fileinput.hook_compressed returning bytes from gz file In-Reply-To: <1239752882.45.0.853698903963.issue5758@psf.upfronthosting.co.za> Message-ID: <1564401249.66.0.178302025312.issue5758@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:58:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:58:12 +0000 Subject: [issue37704] Remove Tools/scripts/h2py.py Message-ID: <1564401492.74.0.0281923171365.issue37704@roundup.psfhosted.org> New submission from STINNER Victor : Python 2 standard library had platform specific modules like CDROM which were generated by Tools/scripts/h2py.py. These modules were removed, but h2py.py is still around. There are now way better ways to expose C APIs in Python like cffi. I propose to simply remove Tools/scripts/h2py.py. Attached PR removes the file and update files which mention it. It would allow to simply close bpo-13032. ---------- components: Library (Lib) messages: 348643 nosy: vstinner priority: normal severity: normal status: open title: Remove Tools/scripts/h2py.py versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:00:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 12:00:03 +0000 Subject: [issue37704] Remove Tools/scripts/h2py.py In-Reply-To: <1564401492.74.0.0281923171365.issue37704@roundup.psfhosted.org> Message-ID: <1564401603.24.0.224469937924.issue37704@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +14766 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:00:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 12:00:39 +0000 Subject: [issue13032] h2py.py can fail with UnicodeDecodeError In-Reply-To: <1316767061.34.0.367682305149.issue13032@psf.upfronthosting.co.za> Message-ID: <1564401639.27.0.238696090234.issue13032@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-37704 to propose to remove Tools/scripts/h2py.py. ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:00:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 12:00:52 +0000 Subject: [issue1443875] email/charset.py convert() patch Message-ID: <1564401652.21.0.781885631196.issue1443875@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:01:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 12:01:00 +0000 Subject: [issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart In-Reply-To: <1200309434.22.0.561367082724.issue1823@psf.upfronthosting.co.za> Message-ID: <1564401660.78.0.284174407668.issue1823@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:01:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 12:01:12 +0000 Subject: [issue8898] The email package should defer to the codecs module for all aliases In-Reply-To: <1275677631.44.0.514670475259.issue8898@psf.upfronthosting.co.za> Message-ID: <1564401672.92.0.593553623792.issue8898@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:01:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 12:01:30 +0000 Subject: [issue968430] error flattening complex smime signed message Message-ID: <1564401690.58.0.277360063464.issue968430@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:01:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 12:01:51 +0000 Subject: [issue15010] unittest: _top_level_dir is incorrectly persisted between calls to different load_test methods In-Reply-To: <1338945643.44.0.808523506511.issue15010@psf.upfronthosting.co.za> Message-ID: <1564401711.15.0.0590823828957.issue15010@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:02:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 12:02:18 +0000 Subject: [issue15454] Allow dircmp.report() output stream to be customized In-Reply-To: <1343288932.25.0.229744443043.issue15454@psf.upfronthosting.co.za> Message-ID: <1564401738.4.0.913348699865.issue15454@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:02:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 12:02:28 +0000 Subject: [issue12436] Missing items in installation/setup instructions In-Reply-To: <1309305395.29.0.101516779086.issue12436@psf.upfronthosting.co.za> Message-ID: <1564401748.68.0.101293488295.issue12436@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:02:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 12:02:35 +0000 Subject: [issue5256] rlcompleter adds builtins when custom dict is used In-Reply-To: <1234569860.16.0.0783224890959.issue5256@psf.upfronthosting.co.za> Message-ID: <1564401755.1.0.333590824492.issue5256@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:09:33 2019 From: report at bugs.python.org (=?utf-8?q?Damien_Nad=C3=A9?=) Date: Mon, 29 Jul 2019 12:09:33 +0000 Subject: [issue37669] Make mock_open return per-file content In-Reply-To: <1563972418.64.0.300779941937.issue37669@roundup.psfhosted.org> Message-ID: <1564402173.42.0.925696401764.issue37669@roundup.psfhosted.org> Damien Nad? added the comment: To summarize the change I'm proposing, I'd say that instead of having mock_open creating closures (functions inside a specific context), mock_open now creates objects that will hold the contexts. Each context would be filename-dedicated and would include specific 'read_data' and linked MagikMock object. So the change is fully transparent compared to the currently-existing mock_open. It just brings a little extra something, in the way of an extra parameter to mock_open : mock_open(mock, read_data, data) While the name 'data' obviously can (and should) be replaced before merge (I dont have a "good" name in mind ATM, feel free to suggest), I'm suggesting in my PR that it could be a {: } mapping. e.g: If i call mock_open(read_data="default read data", data={"/foo": "abc", "/asdf/bar": "xyz"}) Then, after mock.patching open, I can assert the following: assert open("random file").read() == "default read data" assert open("/foo").read() == "abc" assert open("/bar").read() == "xyz" And so far, that's all I'm proposing... But I'm really open to suggestion on that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 09:06:55 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 29 Jul 2019 13:06:55 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1564405615.74.0.834098977011.issue37500@roundup.psfhosted.org> ?ukasz Langa added the comment: Victor closed the 3.8 backport, stating on GitHub: "I closed the 3.8 backport (without merging it), until we agree on what should be done." This is marked as release blocker. I will be releasing 3.8b3 as is, please decide what to do here before b4, I will block the last beta on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 09:08:21 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 29 Jul 2019 13:08:21 +0000 Subject: [issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py In-Reply-To: <1563270741.47.0.416934432776.issue37603@roundup.psfhosted.org> Message-ID: <1564405701.7.0.859438992445.issue37603@roundup.psfhosted.org> ?ukasz Langa added the comment: This is marked as release blocker but since BPO-37433 is still in review, I'm releasing 3.0b3 as is. Please resolve this by b4, I will block the last beta on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 09:13:01 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 29 Jul 2019 13:13:01 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1564405981.06.0.232878385322.issue37549@roundup.psfhosted.org> ?ukasz Langa added the comment: This is marked as release blocker but since there is no movement on the possible solution, I'm releasing 3.80b3 without a fix. Please resolve this by b4, I will block the last beta on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 09:17:50 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Jul 2019 13:17:50 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564406270.99.0.11906515489.issue36044@roundup.psfhosted.org> Steve Dower added the comment: > What matters there is compiling the underlying lzma, bz2, and sqlite3 libraries with PGO. that isn't done as part of our build system. On Windows they are linked in as source files, which is why it matters for us. On platforms where we rely on system libraries for this it doesn't matter. We currently don't PGO OpenSSL on Windows, which would probably be nice but is much harder to set up as we use their build scripts. Libffi is built in our build though, so adding ctypes would get that covered, but I'm not so worried about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 09:18:14 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Jul 2019 13:18:14 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564406294.87.0.190297422453.issue36044@roundup.psfhosted.org> Steve Dower added the comment: Thanks for approving my PR, Greg! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 09:20:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Jul 2019 13:20:43 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1564406443.9.0.951438842086.issue37500@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am fine with backporting the 3.9 solution to 3.8. Sorry for the delay. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 09:23:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 13:23:11 +0000 Subject: [issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py In-Reply-To: <1563270741.47.0.416934432776.issue37603@roundup.psfhosted.org> Message-ID: <1564406591.92.0.0618859560461.issue37603@roundup.psfhosted.org> STINNER Victor added the comment: > This is marked as release blocker but since BPO-37433 is still in review, I'm releasing 3.0b3 as is. Please resolve this by b4, I will block the last beta on this issue. That sounds reasonable to me. FYI I just approved (but not merged) PR 14433. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 09:41:00 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 29 Jul 2019 13:41:00 +0000 Subject: [issue37705] winerror_to_errno implementation Message-ID: <1564407660.89.0.454912973453.issue37705@roundup.psfhosted.org> New submission from Eryk Sun : OSError and _Py_fstat_noraise rely on winerror_to_errno() in PC/errmap.h in order to translate a Windows system error code into a POSIX errno value. PC/errmap.h is supposed to be generated by PC/generrmap.c, which is based on the old CRT's _dosmapperr() function. However, this function isn't implemented in the Universal CRT, and ucrt's corresponding function, __acrt_errno_from_os_error, isn't exported for public use. If generrmap.c is effectively dead, then it's no longer possible to add custom mappings there, as was done for issue 12802 (ERROR_DIRECTORY -> ENOTDIR) and issue 13063 (ERROR_NO_DATA -> EPIPE). Also, errmap.h hasn't been regenerated in 8 years, and since then the CRT added a new mapped value: ERROR_NO_UNICODE_TRANSLATION (1113) -> EILSEQ. Unless someone can suggest a way to continue automatically generating errmap.h via generrmap.c, then I think winerror_to_errno should be manually implemented in a more readable and maintainable way, and updated from the ucrt source (ucrt\misc\errno.cpp) with each major Python release. The implementation could use a switch statement like it currently does, but with named error codes, grouped by result. For example: int winerror_to_errno(int winerror) { switch(winerror) { case ERROR_FILE_NOT_FOUND: // 2 case ERROR_PATH_NOT_FOUND: // 3 case ERROR_INVALID_DRIVE: // 15 case ERROR_NO_MORE_FILES: // 18 case ERROR_BAD_NETPATH: // 53 case ERROR_BAD_NET_NAME: // 67 case ERROR_BAD_PATHNAME: // 161 case ERROR_FILENAME_EXCED_RANGE: // 206 return ENOENT; case ERROR_BAD_ENVIRONMENT: // 10 return E2BIG; case ERROR_BAD_FORMAT: // 11 case ERROR_INVALID_STARTING_CODESEG: // 188 case ERROR_INVALID_STACKSEG: // 189 case ERROR_INVALID_MODULETYPE: // 190 case ERROR_INVALID_EXE_SIGNATURE: // 191 case ERROR_EXE_MARKED_INVALID: // 192 case ERROR_BAD_EXE_FORMAT: // 193 case ERROR_ITERATED_DATA_EXCEEDS_64k: // 194 case ERROR_INVALID_MINALLOCSIZE: // 195 case ERROR_DYNLINK_FROM_INVALID_RING: // 196 case ERROR_IOPL_NOT_ENABLED: // 197 case ERROR_INVALID_SEGDPL: // 198 case ERROR_AUTODATASEG_EXCEEDS_64k: // 199 case ERROR_RING2SEG_MUST_BE_MOVABLE: // 200 case ERROR_RELOC_CHAIN_XEEDS_SEGLIM: // 201 case ERROR_INFLOOP_IN_RELOC_CHAIN: // 202 return ENOEXEC; case ERROR_INVALID_HANDLE: // 6 case ERROR_INVALID_TARGET_HANDLE: // 114 case ERROR_DIRECT_ACCESS_HANDLE: // 130 return EBADF; case ERROR_WAIT_NO_CHILDREN: // 128 case ERROR_CHILD_NOT_COMPLETE: // 129 return ECHILD; case ERROR_NO_PROC_SLOTS: // 89 case ERROR_MAX_THRDS_REACHED: // 164 case ERROR_NESTING_NOT_ALLOWED: // 215 return EAGAIN; case ERROR_ARENA_TRASHED: // 7 case ERROR_NOT_ENOUGH_MEMORY: // 8 case ERROR_INVALID_BLOCK: // 9 case ERROR_NOT_ENOUGH_QUOTA: // 1816 return ENOMEM; case ERROR_ACCESS_DENIED: // 5 case ERROR_CURRENT_DIRECTORY: // 16 case ERROR_WRITE_PROTECT: // 19 case ERROR_BAD_UNIT: // 20 case ERROR_NOT_READY: // 21 case ERROR_BAD_COMMAND: // 22 case ERROR_CRC: // 23 case ERROR_BAD_LENGTH: // 24 case ERROR_SEEK: // 25 case ERROR_NOT_DOS_DISK: // 26 case ERROR_SECTOR_NOT_FOUND: // 27 case ERROR_OUT_OF_PAPER: // 28 case ERROR_WRITE_FAULT: // 29 case ERROR_READ_FAULT: // 30 case ERROR_GEN_FAILURE: // 31 case ERROR_SHARING_VIOLATION: // 32 case ERROR_LOCK_VIOLATION: // 33 case ERROR_WRONG_DISK: // 34 case ERROR_SHARING_BUFFER_EXCEEDED: // 36 case ERROR_NETWORK_ACCESS_DENIED: // 65 case ERROR_CANNOT_MAKE: // 82 case ERROR_FAIL_I24: // 83 case ERROR_DRIVE_LOCKED: // 108 case ERROR_SEEK_ON_DEVICE: // 132 case ERROR_NOT_LOCKED: // 158 case ERROR_LOCK_FAILED: // 167 case 35: // 35 [undefined] return EACCES; case ERROR_FILE_EXISTS: // 80 case ERROR_ALREADY_EXISTS: // 183 return EEXIST; case ERROR_NOT_SAME_DEVICE: // 17 return EXDEV; case ERROR_DIRECTORY: // 267 [bpo-12802] return ENOTDIR; case ERROR_TOO_MANY_OPEN_FILES: // 4 return EMFILE; case ERROR_DISK_FULL: // 112 return ENOSPC; case ERROR_BROKEN_PIPE: // 109 case ERROR_NO_DATA: // 232 [bpo-13063] return EPIPE; case ERROR_DIR_NOT_EMPTY: // 145 return ENOTEMPTY; case ERROR_NO_UNICODE_TRANSLATION: // 1113 return EILSEQ; case ERROR_INVALID_FUNCTION: // 1 case ERROR_INVALID_ACCESS: // 12 case ERROR_INVALID_DATA: // 13 case ERROR_INVALID_PARAMETER: // 87 case ERROR_NEGATIVE_SEEK: // 131 default: return EINVAL; } } ---------- components: Interpreter Core, Windows messages: 348661 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: winerror_to_errno implementation type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:00:44 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 14:00:44 +0000 Subject: [issue37433] syntax error in multiline f-string produces ~40k spaces output In-Reply-To: <1561659761.86.0.416757939602.issue37433@roundup.psfhosted.org> Message-ID: <1564408844.56.0.0410251216961.issue37433@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14767 pull_request: https://github.com/python/cpython/pull/15001 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:02:52 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Jul 2019 14:02:52 +0000 Subject: [issue37433] syntax error in multiline f-string produces ~40k spaces output In-Reply-To: <1561659761.86.0.416757939602.issue37433@roundup.psfhosted.org> Message-ID: <1564408972.03.0.80917993773.issue37433@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks Anthony Sottile for the fix! I suggest adding more test cases that do not involve f-strings, what do you think? Can you create another PR for those? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:05:50 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Jul 2019 14:05:50 +0000 Subject: [issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py In-Reply-To: <1563270741.47.0.416934432776.issue37603@roundup.psfhosted.org> Message-ID: <1564409150.35.0.340412582831.issue37603@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I just merged PR 14433 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:06:12 2019 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 29 Jul 2019 14:06:12 +0000 Subject: [issue37433] syntax error in multiline f-string produces ~40k spaces output In-Reply-To: <1561659761.86.0.416757939602.issue37433@roundup.psfhosted.org> Message-ID: <1564409172.81.0.862079354869.issue37433@roundup.psfhosted.org> Anthony Sottile added the comment: sure! the only other case I could come up with involves multi-line strings and invalid escape sequences + Werror let me see if I can fold that in as well ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:22:42 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 14:22:42 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1564410162.48.0.798767846789.issue37500@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14768 pull_request: https://github.com/python/cpython/pull/15002 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:24:06 2019 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 29 Jul 2019 14:24:06 +0000 Subject: [issue37433] syntax error in multiline f-string produces ~40k spaces output In-Reply-To: <1561659761.86.0.416757939602.issue37433@roundup.psfhosted.org> Message-ID: <1564410246.31.0.00516165265965.issue37433@roundup.psfhosted.org> Change by Anthony Sottile : ---------- pull_requests: +14769 pull_request: https://github.com/python/cpython/pull/15003 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:38:00 2019 From: report at bugs.python.org (Doyle Rowland) Date: Mon, 29 Jul 2019 14:38:00 +0000 Subject: [issue36002] configure --enable-optimizations with clang fails to detect llvm-profdata In-Reply-To: <1550237355.31.0.735770966924.issue36002@roundup.psfhosted.org> Message-ID: <1564411080.23.0.472027844696.issue36002@roundup.psfhosted.org> Doyle Rowland added the comment: ../configure LLVM_PROFDATA=//llvm-profdata --enable-optimizations is also work-around. ---------- nosy: +weibullguy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:41:39 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Jul 2019 14:41:39 +0000 Subject: [issue37706] IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS Message-ID: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> New submission from Ned Deily : On macOS, there are two test failure seen with test_sidebar (tested on 10.14 with Tk 8.6.8 and 8.6.0 - the failures should be reproducible with the python.org 3.8.0b3 installer for macOS which will be available soon.) ====================================================================== FAIL: test_click_selection (idlelib.idle_test.test_sidebar.LineNumbersTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/idle_test/test_sidebar.py", line 253, in test_click_selection self.assertEqual(self.get_selection(), ('2.0', '3.0')) AssertionError: Tuples differ: ('1.0', '2.0') != ('2.0', '3.0') First differing element 0: '1.0' '2.0' - ('1.0', '2.0') + ('2.0', '3.0') ====================================================================== FAIL: test_drag_selection (idlelib.idle_test.test_sidebar.LineNumbersTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/idle_test/test_sidebar.py", line 273, in test_drag_selection self.assertEqual(self.get_selection(), ('1.0', '4.0')) AssertionError: Tuples differ: ('1.0', '3.0') != ('1.0', '4.0') First differing element 1: '3.0' '4.0' - ('1.0', '3.0') ? ^ + ('1.0', '4.0') ? ^ ---------------------------------------------------------------------- ---------- assignee: terry.reedy components: IDLE messages: 348666 nosy: ned.deily, taleinat, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:42:12 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Mon, 29 Jul 2019 14:42:12 +0000 Subject: [issue11953] Missing WSA* error codes In-Reply-To: <1304030330.14.0.209711289978.issue11953@psf.upfronthosting.co.za> Message-ID: <1564411332.96.0.195577408272.issue11953@roundup.psfhosted.org> Change by Ngalim Siregar : ---------- keywords: +patch pull_requests: +14770 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15004 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:45:37 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Jul 2019 14:45:37 +0000 Subject: [issue37706] IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1564411537.17.0.104664378491.issue37706@roundup.psfhosted.org> Ned Deily added the comment: > tested on 10.14 with Tk 8.6.8 and 8.6.0 er, make that "8.6.9" not "8.6.0" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 10:47:34 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 14:47:34 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1564411654.0.0.535546321997.issue37500@roundup.psfhosted.org> miss-islington added the comment: New changeset 9ea738e580f58c3d2f9b0d56561d57b9e9412973 by Miss Islington (bot) in branch '3.8': bpo-37500: Make sure dead code does not generate bytecode but also detect syntax errors (GH-14612) https://github.com/python/cpython/commit/9ea738e580f58c3d2f9b0d56561d57b9e9412973 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 11:12:15 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 15:12:15 +0000 Subject: [issue37433] syntax error in multiline f-string produces ~40k spaces output In-Reply-To: <1561659761.86.0.416757939602.issue37433@roundup.psfhosted.org> Message-ID: <1564413135.73.0.44402794452.issue37433@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14771 pull_request: https://github.com/python/cpython/pull/15005 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 11:17:11 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Jul 2019 15:17:11 +0000 Subject: [issue37500] 3.8.0b2 no longer optimizes away "if 0:" ? In-Reply-To: <1562295759.87.0.390556054321.issue37500@roundup.psfhosted.org> Message-ID: <1564413431.71.0.605459594178.issue37500@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I will close this for now, we can revisit this if we find a better solution for the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 11:26:46 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 29 Jul 2019 15:26:46 +0000 Subject: [issue37706] IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1564414006.21.0.690795043876.issue37706@roundup.psfhosted.org> Tal Einat added the comment: Unfortunately, my Mac is out of order, so I am unable to diagnose and fix this. I hope to be able to do so again in a few weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 11:45:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 15:45:35 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1564415135.3.0.57871575019.issue37549@roundup.psfhosted.org> STINNER Victor added the comment: Honestly, I'm not sure of what is the right solution for this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 11:46:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 15:46:04 +0000 Subject: [issue37689] Add Path.is_relative_to() In-Reply-To: <1564156564.69.0.23140154802.issue37689@roundup.psfhosted.org> Message-ID: <1564415164.29.0.674192683988.issue37689@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 11:46:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 15:46:44 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1564415204.33.0.707760026995.issue15987@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 11:53:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 15:53:31 +0000 Subject: [issue10819] ValueError on repr(closed_socket_file) In-Reply-To: <1294098693.54.0.480300363848.issue10819@psf.upfronthosting.co.za> Message-ID: <1564415611.29.0.945449965799.issue10819@roundup.psfhosted.org> STINNER Victor added the comment: This issue is closed. Please open a new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 11:54:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 15:54:44 +0000 Subject: [issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8 In-Reply-To: <1498409939.21.0.261757462715.issue30755@psf.upfronthosting.co.za> Message-ID: <1564415684.99.0.654426439393.issue30755@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 11:56:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 15:56:02 +0000 Subject: [issue37653] make install fails In-Reply-To: <1563809636.35.0.686043283541.issue37653@roundup.psfhosted.org> Message-ID: <1564415762.3.0.931320105192.issue37653@roundup.psfhosted.org> STINNER Victor added the comment: Crap. That's why I didn't want to put the comment "inside" the code, but as separated commands. Well, I learnt something today: bash is the standard :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 12:04:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 16:04:12 +0000 Subject: [issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll In-Reply-To: <1563568606.34.0.923231546212.issue37633@roundup.psfhosted.org> Message-ID: <1564416252.92.0.726961347154.issue37633@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 12:10:09 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Jul 2019 16:10:09 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1564416609.27.0.360951444143.issue37549@roundup.psfhosted.org> Steve Dower added the comment: > What 3.7.3 does is to skip calling _Py_set_inheritable for all files of type FILE_TYPE_CHAR It sounds like we should probably revert to the middle ground, and skip _raising the error_ if _Py_set_inheritable for files of type FILE_TYPE_CHAR. As Victor pointed out, the docs already call out the special case in Windows. Since this applies to Windows 7, which will be EOL only a couple months after 3.8's release, I think it's fine to have the slightly less secure behavior and just suppress the error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 12:42:55 2019 From: report at bugs.python.org (Eric N. Vander Weele) Date: Mon, 29 Jul 2019 16:42:55 +0000 Subject: [issue37690] Simplify linking of shared libraries on the AIX OS In-Reply-To: <1564162349.26.0.0398435522922.issue37690@roundup.psfhosted.org> Message-ID: <1564418575.04.0.715906419839.issue37690@roundup.psfhosted.org> Eric N. Vander Weele added the comment: Thanks for the in-depth responses and feedback. When reinvestigating this in more detail that led me to create this patch, I discovered that the premise upon which I was operating upon was not the default (desired) compiler and linker flags. It turns out the environment I am working in builds all of the software using -bsvr4 and -brtl on AIX. I have a lot more to unravel now. I already closed the PR and will abandon this issue since it has been clearly illustrated that this is masking an underlying problem. Thanks for taking the time to provide feedback and detail of what is problematic with this change. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:26:00 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 29 Jul 2019 18:26:00 +0000 Subject: [issue37653] make install fails In-Reply-To: <1563809636.35.0.686043283541.issue37653@roundup.psfhosted.org> Message-ID: <1564424760.65.0.842207364606.issue37653@roundup.psfhosted.org> Ronald Oussoren added the comment: A trick w.r.t. comments in command-lines is to use the ":" command, that's a no-op shell command that ignores its arguments (although you do need to take care with shell special characters as it is just a command like any other). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:27:33 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 29 Jul 2019 18:27:33 +0000 Subject: [issue37444] Differing exception between builtins and importlib when importing beyond top-level package In-Reply-To: <1561749733.32.0.955430999512.issue37444@roundup.psfhosted.org> Message-ID: <1564424853.22.0.238881328631.issue37444@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: -nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:27:53 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 29 Jul 2019 18:27:53 +0000 Subject: [issue11953] Missing WSA* error codes In-Reply-To: <1304030330.14.0.209711289978.issue11953@psf.upfronthosting.co.za> Message-ID: <1564424873.98.0.0195732492393.issue11953@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: -nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:33:58 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 29 Jul 2019 18:33:58 +0000 Subject: [issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag) In-Reply-To: <1410207529.54.0.778133775349.issue22367@psf.upfronthosting.co.za> Message-ID: <1564425238.08.0.938457898751.issue22367@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: -nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:34:07 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 29 Jul 2019 18:34:07 +0000 Subject: [issue37707] Skip individual unit tests that are expensive for the PGO task Message-ID: <1564425247.23.0.845576191882.issue37707@roundup.psfhosted.org> New submission from Neil Schemenauer : Add a new support decorator, @skip_if_pgo_task and then use it to mark test cases. I suspect the PGO task works well if it can exercise common code paths. Running long tests likely have rapidly diminishing benefits. The instrumented PGO executable runs quite a bit slower than a normal build and so it is useful to spend a bit of time to exclude expensive tests. ---------- components: Build messages: 348677 nosy: nascheme priority: normal severity: normal stage: patch review status: open title: Skip individual unit tests that are expensive for the PGO task type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:35:31 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 29 Jul 2019 18:35:31 +0000 Subject: [issue33150] Signature error for methods of class configparser.Interpolation In-Reply-To: <1522118388.18.0.467229070634.issue33150@psf.upfronthosting.co.za> Message-ID: <1564425331.38.0.90079783207.issue33150@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: -nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:36:31 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 29 Jul 2019 18:36:31 +0000 Subject: [issue14817] pkgutil.extend_path has no tests In-Reply-To: <1337109540.72.0.0262382182113.issue14817@psf.upfronthosting.co.za> Message-ID: <1564425391.54.0.71709429814.issue14817@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: -nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:39:03 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 29 Jul 2019 18:39:03 +0000 Subject: [issue37496] Support annotations in signature strings. In-Reply-To: <1562197526.36.0.0415942737779.issue37496@roundup.psfhosted.org> Message-ID: <1564425543.66.0.970313797357.issue37496@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: -nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:40:55 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 29 Jul 2019 18:40:55 +0000 Subject: [issue37707] Skip individual unit tests that are expensive for the PGO task In-Reply-To: <1564425247.23.0.845576191882.issue37707@roundup.psfhosted.org> Message-ID: <1564425655.49.0.0377915213373.issue37707@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- keywords: +patch pull_requests: +14772 pull_request: https://github.com/python/cpython/pull/15009 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:42:54 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 29 Jul 2019 18:42:54 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564425774.29.0.68985540752.issue36044@roundup.psfhosted.org> Neil Schemenauer added the comment: I think expanding the list of tests used by --pgo is fine, as long as we put a little thought into each one we add. The ones added by Steve look fine to me. It seems useful to run a profiler and see if there are any unusually expensive tests being added. I used 'cprofile' and found a few candidates. See bug #37707 and PR 15009. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:47:27 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 29 Jul 2019 18:47:27 +0000 Subject: [issue37689] Add Path.is_relative_to() In-Reply-To: <1564156564.69.0.23140154802.issue37689@roundup.psfhosted.org> Message-ID: <1564426047.84.0.0199882620539.issue37689@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:50:44 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 29 Jul 2019 18:50:44 +0000 Subject: [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564426244.73.0.476564173575.issue37688@roundup.psfhosted.org> Brett Cannon added the comment: Changing the semantics of os.path.isdir() for something like this isn't worth breaking code; basically it's now a quirk of the function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 15:28:24 2019 From: report at bugs.python.org (Lex Flagel) Date: Mon, 29 Jul 2019 19:28:24 +0000 Subject: [issue37708] Harmonize random.choice(s) behavior with random.sample on iterators Message-ID: <1564428504.8.0.524832279971.issue37708@roundup.psfhosted.org> New submission from Lex Flagel : It would be nice to make random.sample and random.choice both have the same behavior with iterators. Currently random.sample accepts them happily, and whereas random.choice does not. E.g. > import random > d = {'a':1, 'b':2} > random.sample(d.keys(),1) Out: ['a'] > random.choice(d.keys()) Out: TypeError: 'dict_keys' object is not subscriptable random.choice could be redefined as follows to harmonize behavior, but I think the solution for random.choices maybe be more involved: def choice(x): random.sample(x,1)[0] ---------- components: Library (Lib) messages: 348680 nosy: Lex Flagel priority: normal severity: normal status: open title: Harmonize random.choice(s) behavior with random.sample on iterators type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 15:32:08 2019 From: report at bugs.python.org (Benjamin Schollnick) Date: Mon, 29 Jul 2019 19:32:08 +0000 Subject: [issue37709] CSVReader ignores dialect.lineterminator Message-ID: <1564428728.47.0.33259508348.issue37709@roundup.psfhosted.org> New submission from Benjamin Schollnick : I've run into a situation where the CSV input file is very unusual. The Delimiter is "\x06" and the lineterminator is "\x07". While I've written code to work around this, it would be significantly nicer if the CSV Reader code actually paid attention to the dialect's lineterminator value. ---------- components: Library (Lib) messages: 348681 nosy: Benjamin Schollnick priority: normal severity: normal status: open title: CSVReader ignores dialect.lineterminator type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 15:32:33 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 29 Jul 2019 19:32:33 +0000 Subject: [issue37708] Harmonize random.choice(s) behavior with random.sample on iterators In-Reply-To: <1564428504.8.0.524832279971.issue37708@roundup.psfhosted.org> Message-ID: <1564428753.55.0.0606321020631.issue37708@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Seems similar to https://bugs.python.org/issue37682 ---------- nosy: +rhettinger, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 16:19:16 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 29 Jul 2019 20:19:16 +0000 Subject: [issue37709] CSVReader ignores dialect.lineterminator In-Reply-To: <1564428728.47.0.33259508348.issue37709@roundup.psfhosted.org> Message-ID: <1564431556.24.0.539590602401.issue37709@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Seems related : https://bugs.python.org/issue1072404 . There is a note on docs that it's ignored and may be changed in future. https://docs.python.org/3/library/csv.html ---------- nosy: +skip.montanaro, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:17:25 2019 From: report at bugs.python.org (Andrew Collins) Date: Mon, 29 Jul 2019 21:17:25 +0000 Subject: [issue37710] Python SSL module does not clear error queue before IO operations using SSL_get_error Message-ID: <1564435045.14.0.99217067203.issue37710@roundup.psfhosted.org> New submission from Andrew Collins : Per the OpenSSL documentation: "The current thread's error queue must be empty before the TLS/SSL I/O operation is attempted, or SSL_get_error() will not work reliably." https://www.openssl.org/docs/man1.1.1/man3/SSL_get_error.html Modules/_ssl.c does clear errors on socket creation, and upon handling an error itself, but does not clear before IO operations that are checked with SSL_get_error. When using OpenSSL outside of Modules/_ssl.c in the same process context (for example, using libssh through python bindings), this can results in random ssl errors being picked up by Modules/_ssl.c. ---------- assignee: christian.heimes components: SSL messages: 348684 nosy: Andrew Collins, christian.heimes priority: normal severity: normal status: open title: Python SSL module does not clear error queue before IO operations using SSL_get_error 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 Jul 29 17:30:29 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2019 21:30:29 +0000 Subject: [issue37706] IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1564435829.83.0.0477658212663.issue37706@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +14773 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15010 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:36:16 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2019 21:36:16 +0000 Subject: [issue37706] IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1564436176.05.0.023478566232.issue37706@roundup.psfhosted.org> Terry J. Reedy added the comment: IDLE tests passed the Azure macOS test (when it does not timeout) before and since #17535 was merged. So this failure report initially surprised me. But then I checked Display Build Info on https://dev.azure.com/Python/cpython/_build/results?buildId=47634&view=logs&j=18d1a34d-6940-5fc1-f55b-405e2fba32b1 tkinter.TCL_VERSION: 8.5 tkinter.TK_VERSION: 8.5 tkinter.info_patchlevel: 8.5.9 Oh dear. Azure is testing Tkinter, Turtle, and IDLE with Apple's ancient, buggy, and somewhat obsolete system tcl/tk, which we do not support. Steve, for years we have closed issues reporting failures and crashes with 8.5.9 and told users to install something more recent. https://www.python.org/download/mac/tcltk/ We now directly supply something current in the Mac installer. We need tkinter, etc, tested on macOS with the tcl/tk that we support and supply, just like Azure does on Windows. tkinter.TCL_VERSION: 8.6 tkinter.TK_VERSION: 8.6 tkinter.info_patchlevel: 8.6.9 Ned, for the present, we should skip the tests on Mac. If the code and test were made to work on 8.6.x, they might well fail on 8.5.9. PR 15010. You will have to un-comment the skips to test for real. What behavior do users see. Can you check? The test says that clicking on line 2 selects line 1. Does it? That would be awful. What does click and drag do? Given the off-by-one reports, I made the text five lines so that a 3-line drag should have unselected lines above and below. I added a test for drag up as well as down. ---------- nosy: +steve.dower stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:48:21 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2019 21:48:21 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564436901.48.0.42975527307.issue34162@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14774 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/15011 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:57:39 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 29 Jul 2019 21:57:39 +0000 Subject: [issue37549] os.dup() fails for standard streams on Windows 7 In-Reply-To: <1562781125.98.0.893970984377.issue37549@roundup.psfhosted.org> Message-ID: <1564437459.69.0.662310029436.issue37549@roundup.psfhosted.org> Eryk Sun added the comment: > It sounds like we should probably revert to the middle ground, and > skip _raising the error_ if _Py_set_inheritable for files of type > FILE_TYPE_CHAR. The problem is just console pseudohandles in Windows 7 and earlier. Maybe it should just check for this case before calling SetHandleInformation. For example: /* This check can be removed once support for Windows 7 ends. */ #define CONSOLE_PSEUDOHANDLE(handle) (((ULONG_PTR)(handle) & 0x3) == 0x3 && \ GetFileType(handle) == FILE_TYPE_CHAR) if (!CONSOLE_PSEUDOHANDLE(handle) && !SetHandleInformation(handle, HANDLE_FLAG_INHERIT, flags)) { if (raise) PyErr_SetFromWindowsErr(0); return -1; } We have similar Python code in subprocess Popen._filter_handle_list, which filters out console pseudohandles because they don't work with PROC_THREAD_ATTRIBUTE_HANDLE_LIST. A similar check could be added to os_set_handle_inheritable_impl in Modules/posixmodule.c. > As Victor pointed out, the docs already call out the special case in > Windows. For os.dup it says On Windows, when duplicating a standard stream (0: stdin, 1: stdout, 2: stderr), the new file descriptor is inheritable. The standard handles aren't relevant. Also, under "inheritance of file descriptors", it says: On Windows, non-inheritable handles and file descriptors are closed in child processes, except for standard streams (file descriptors 0, 1 and 2: stdin, stdout and stderr), which are always inherited. The standard handles aren't always inherited. If bInheritHandles is TRUE (i.e. close_fds=False), a standard handle has to be iheritable for it to be inherited. For example, in Windows 10, make stderr (a ConDrv console handle) non-inheritable and create a child process with close_fds=False: >>> os.set_handle_inheritable(msvcrt.get_osfhandle(2), False) >>> cmd = 'import sys; print(sys.stderr)' >>> subprocess.call(f'python.exe -c "{cmd}"', close_fds=False) None 0 In Windows 7 and earlier, it seems that inheritable console pseudohandles are always inherited, regardless of bInheritHandles -- as long as the child process attaches to the parent's console. SetHandleInformation isn't supported for console pseudohandles, but the inheritable flag is still set or cleared when a console pseudohandle is created via CreateConsoleScreenBuffer, CreateFileW (routed to OpenConsoleW), and DuplicateHandle (routed to DuplicateConsoleHandle). It's worth mentioning that the system sometimes duplicates (not inherits) standard handles to a child process. A simple example in Windows 10 would be subprocess.call('python.exe'). All of the follow requirements must be satisfied for CreateProcessW to duplicate a standard handle to a child: * it's not a console pseudohandle (e.g. it's a ConDrv console handle in Windows 8+, or handle for the NUL device, a pipe, or disk file) * the target executable is a console application (e.g. python.exe, not pythonw.exe) * handle inheritance is disabled (i.e. bInheritHandles is FALSE) * the startup-info standard handles aren't used (i.e. STARTF_USESTDHANDLES isn't set) * the call isn't flagged to execute without a console or to allocate a new console (i.e. no DETACHED_PROCESS, CREATE_NEW_CONSOLE, or CREATE_NO_WINDOW) In this case, CreateProcessW also has to update the handle value in the child since generally the duplicate has a new value. With inheritance, in contrast, the handle value is the same in the parent and child. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:57:40 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2019 21:57:40 +0000 Subject: [issue37706] IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1564437460.34.0.997446675342.issue37706@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset e8874b85b4e3bbb735467b0beaa933dcef362004 by Terry Jan Reedy in branch 'master': bpo-37706: Disable 3 IDLE scrollbar tests on Mac. (#15010) https://github.com/python/cpython/commit/e8874b85b4e3bbb735467b0beaa933dcef362004 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:57:49 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 21:57:49 +0000 Subject: [issue37706] IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1564437469.89.0.916338078338.issue37706@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14775 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15012 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 17:57:57 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 21:57:57 +0000 Subject: [issue37706] IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1564437477.28.0.818875827764.issue37706@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14776 pull_request: https://github.com/python/cpython/pull/15013 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:01:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2019 22:01:51 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1564437711.9.0.472651896946.issue37309@roundup.psfhosted.org> Terry J. Reedy added the comment: Release peps -- needed for proposed and actual release dates. 3.7 PEP 537 https://www.python.org/dev/peps/pep-0537/ 3.8 PEP 569 https://www.python.org/dev/peps/pep-0569/ 3.9 PEP 596 https://www.python.org/dev/peps/pep-0596/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:09:41 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2019 22:09:41 +0000 Subject: [issue33820] IDLE subsection of What's New 3.6 In-Reply-To: <1528651910.74.0.592728768989.issue33820@psf.upfronthosting.co.za> Message-ID: <1564438181.42.0.204374271266.issue33820@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> IDLE subsection of What's New 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:12:27 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2019 22:12:27 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564438347.49.0.543984855615.issue34162@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset f35c51d2eadd297bcf06d4f7c536bd1d8682b724 by Terry Jan Reedy in branch 'master': bpo-34162: Update idlelib/news.txt. (#15011) https://github.com/python/cpython/commit/f35c51d2eadd297bcf06d4f7c536bd1d8682b724 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:12:29 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 22:12:29 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564438349.97.0.395867029367.issue34162@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14777 pull_request: https://github.com/python/cpython/pull/15014 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:12:37 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 22:12:37 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564438357.47.0.5940430511.issue34162@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14778 pull_request: https://github.com/python/cpython/pull/15015 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:15:54 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 22:15:54 +0000 Subject: [issue37706] IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1564438554.86.0.775439629359.issue37706@roundup.psfhosted.org> miss-islington added the comment: New changeset 8513b90e114a815ebf4b389bcdfb08b49207a751 by Miss Islington (bot) in branch '3.8': bpo-37706: Disable 3 IDLE scrollbar tests on Mac. (GH-15010) https://github.com/python/cpython/commit/8513b90e114a815ebf4b389bcdfb08b49207a751 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:23:02 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 22:23:02 +0000 Subject: [issue37706] IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1564438982.79.0.401224749329.issue37706@roundup.psfhosted.org> miss-islington added the comment: New changeset ad36d21223fd8118af8dbcf55ead03ee5905e7c3 by Miss Islington (bot) in branch '3.7': bpo-37706: Disable 3 IDLE scrollbar tests on Mac. (GH-15010) https://github.com/python/cpython/commit/ad36d21223fd8118af8dbcf55ead03ee5905e7c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:29:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2019 22:29:04 +0000 Subject: [issue37706] IDLE test_sidebar test_(click/drag)_selection fail on macOS 8.6 In-Reply-To: <1564411299.35.0.364998769852.issue37706@roundup.psfhosted.org> Message-ID: <1564439344.71.0.980728889003.issue37706@roundup.psfhosted.org> Terry J. Reedy added the comment: Tests disabled, leaving open for live behavior report. ---------- nosy: -miss-islington stage: patch review -> needs patch title: IDLE test_sidebar testcases test_click_selection and test_drag_selection can fail on macOS -> IDLE test_sidebar test_(click/drag)_selection fail on macOS 8.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:36:48 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 22:36:48 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564439808.03.0.500458825932.issue34162@roundup.psfhosted.org> miss-islington added the comment: New changeset 6c9f46fa3a90eeb02c35ba0e92e7f75edc67e51d by Miss Islington (bot) in branch '3.7': bpo-34162: Update idlelib/news.txt. (GH-15011) https://github.com/python/cpython/commit/6c9f46fa3a90eeb02c35ba0e92e7f75edc67e51d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:38:40 2019 From: report at bugs.python.org (Derek Keeler) Date: Mon, 29 Jul 2019 22:38:40 +0000 Subject: [issue37354] Write PowerShell Activate.ps1 to be static so it can be signed In-Reply-To: <1561055369.2.0.393754678677.issue37354@roundup.psfhosted.org> Message-ID: <1564439920.13.0.938831553268.issue37354@roundup.psfhosted.org> Change by Derek Keeler : ---------- nosy: +d3r3kk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:40:00 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Jul 2019 22:40:00 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564440000.81.0.63489730642.issue34162@roundup.psfhosted.org> miss-islington added the comment: New changeset 8b50e3e2729190d4b65ee9510d81f01bd31f2f7c by Miss Islington (bot) in branch '3.8': bpo-34162: Update idlelib/news.txt. (GH-15011) https://github.com/python/cpython/commit/8b50e3e2729190d4b65ee9510d81f01bd31f2f7c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:44:34 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Jul 2019 22:44:34 +0000 Subject: [issue37354] Write PowerShell Activate.ps1 to be static so it can be signed In-Reply-To: <1561055369.2.0.393754678677.issue37354@roundup.psfhosted.org> Message-ID: <1564440274.64.0.152856646147.issue37354@roundup.psfhosted.org> Steve Dower added the comment: I just chatted with Derek about this, and while we identified some potential regressions (previously we were injecting str(prompt) into Activate.ps1, and now we're showing repr(prompt)), I don't think they're widely used. For example, if you previously did: >>> py -m venv --prompt "my`nprompt" env You'd get 'my\nprompt' in pyvenv.cfg, but an actual newline in your printed prompt (note that passing "my\nprompt" in the command doesn't do this). There are likely other things that will be escaped in the configuration that previously would have been fine with the direct substitution. I have no real sense of how widely used these are. They are definitely less popular than machines that are configured to require code-signed Powershell scripts, so we still come out ahead. It's probably easy to handle some of the more common escapes, if we know what they are, but I doubt we're going to reimplement full Python string parsing in a Powershell script. Vinay - any thoughts here? For me, I think get it out in 3.8.0b4 and see how it fares. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 18:49:13 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2019 22:49:13 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564440553.74.0.384058874.issue34162@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14779 pull_request: https://github.com/python/cpython/pull/15016 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:09:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 23:09:22 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1564441762.2.0.21280238966.issue37474@roundup.psfhosted.org> STINNER Victor added the comment: > The current FreeBSD documentation for fedisableexcept says: All exceptions are masked by default. The fedisableexcept manual page says that since this manual page was added to FreeBSD 6.0 which was released in 2005. Python started to tune FPU control on FreeBSD in 2002. Should I understand that fedisableexcept(FE_OVERFLOW) is useless since FreeBSD 6? I'm also surprised that I never saw any complain about that on other BSD: OpenBSD, NetBSD, macOS, etc. It seems like the fedisableexcept(FE_OVERFLOW) call is useless since a long time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:18:52 2019 From: report at bugs.python.org (Ethan Furman) Date: Mon, 29 Jul 2019 23:18:52 +0000 Subject: [issue1047397] cgitb failures Message-ID: <1564442332.62.0.614678634526.issue1047397@roundup.psfhosted.org> Change by Ethan Furman : ---------- nosy: +Rhodri James, ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:21:25 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Jul 2019 23:21:25 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564442485.26.0.446613641386.issue34162@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset e941cbcf8c2fce59a9afa8043948f9a147e09177 by Terry Jan Reedy in branch '3.7': bpo-34162: Update idlelib/news.txt for 3.7.5 (GH-15016) https://github.com/python/cpython/commit/e941cbcf8c2fce59a9afa8043948f9a147e09177 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:34:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 23:34:12 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1564443252.9.0.475109832857.issue37474@roundup.psfhosted.org> STINNER Victor added the comment: fp_except.c: C program to test for float point exceptions: * FE_OVERFLOW * FE_UNDERFLOW * FE_INVALID I prefer to avoid testing FE_INEXACT which a test might be too specific to an implementation of the libm. I also chose to avoid testing FE_DIVBYZERO, since the default behavior is to kill the process with SIGFPE. ---------- Added file: https://bugs.python.org/file48511/fp_except.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:38:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 23:38:01 +0000 Subject: [issue37386] [EASY] test_io: test_large_file_ops() failed on AMD64 Windows7 SP1 3.x with: [Errno 28] No space left on device In-Reply-To: <1561376669.81.0.127051264665.issue37386@roundup.psfhosted.org> Message-ID: <1564443481.54.0.821580528841.issue37386@roundup.psfhosted.org> STINNER Victor added the comment: According to Serhiy, the right solution is to contact buildbot owners to ask them to ensure that all workers have enough free disk space: at least 2 GiB. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:44:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 23:44:36 +0000 Subject: [issue37711] regrtest: re-run tests in subprocesses Message-ID: <1564443876.23.0.3433987967.issue37711@roundup.psfhosted.org> New submission from STINNER Victor : When using python3 -m test -w, failed tests are re-run in the regrtest main process, even if -jN option is used. If a test does crash, regrtest doesn't remove its temporary directory which can lead to random test failures like bpo-37359. At least when using -jN, I suggest to run tests in a subprocess to ensure that regrtest is able to cleanup its temporary directory, even if a test does crash. ---------- components: Tests messages: 348700 nosy: vstinner priority: normal severity: normal status: open title: regrtest: re-run tests in subprocesses versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:45:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 23:45:04 +0000 Subject: [issue37711] regrtest: re-run failed tests in subprocesses In-Reply-To: <1564443876.23.0.3433987967.issue37711@roundup.psfhosted.org> Message-ID: <1564443904.18.0.543459113773.issue37711@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: regrtest: re-run tests in subprocesses -> regrtest: re-run failed tests in subprocesses _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:45:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 23:45:27 +0000 Subject: [issue37359] test_regrtest: test_list_cases() fails on x86 Gentoo Installed with X 3.x In-Reply-To: <1561110016.05.0.998917374097.issue37359@roundup.psfhosted.org> Message-ID: <1564443927.53.0.780934814281.issue37359@roundup.psfhosted.org> STINNER Victor added the comment: The current status is that regrtest has a new --cleanup command but it's not used. regrtest should not leak temporary files anymore. The remaining issue is when regrtest re-runs tests sequentially and a test does crash the regrtest main process. In this case, the temporary directory is not removed. I created bpo-37711 "regrtest: re-run failed tests in subprocesses" for this case. The initial issue has been fixed, so I close the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:47:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 23:47:16 +0000 Subject: [issue37314] Compilation failed on AMD64 Debian root 3.8: undefined reference to _PyTraceMalloc_NewReference In-Reply-To: <1560760958.7.0.704551196442.issue37314@roundup.psfhosted.org> Message-ID: <1564444036.08.0.896065520998.issue37314@roundup.psfhosted.org> STINNER Victor added the comment: I didn't see the failure on this buildbot recently, so I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:48:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 23:48:28 +0000 Subject: [issue37313] test_concurrent_futures stopped after 25 hours on AMD64 Windows7 SP1 3.7 In-Reply-To: <1560759960.52.0.187936052525.issue37313@roundup.psfhosted.org> Message-ID: <1564444108.66.0.790382832235.issue37313@roundup.psfhosted.org> STINNER Victor added the comment: The root issue will be solved by bpo-37531: ensure that regrtest kills a worker process if it takes longer than TIMEOUT seconds. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:49:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 23:49:14 +0000 Subject: [issue37268] Deprecate the parser module In-Reply-To: <1560427899.74.0.436857498848.issue37268@roundup.psfhosted.org> Message-ID: <1564444154.21.0.746265968084.issue37268@roundup.psfhosted.org> STINNER Victor added the comment: > Yep, will make a PR soon. Any update on deprecating the parser module? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 19:50:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 23:50:33 +0000 Subject: [issue37069] regrtest: log unraisable exceptions and uncaught thread exceptions In-Reply-To: <1558997484.87.0.618934402283.issue37069@roundup.psfhosted.org> Message-ID: <1564444233.6.0.201068712851.issue37069@roundup.psfhosted.org> STINNER Victor added the comment: regrtest now uses :func:`sys.unraisablehook` to mark a test as "environment altered" (ENV_CHANGED) if it emits an "unraisable exception". ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 20:26:49 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 30 Jul 2019 00:26:49 +0000 Subject: [issue37268] Deprecate the parser module In-Reply-To: <1560427899.74.0.436857498848.issue37268@roundup.psfhosted.org> Message-ID: <1564446409.69.0.688375342564.issue37268@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +14780 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15017 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 20:29:48 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 30 Jul 2019 00:29:48 +0000 Subject: [issue37268] Deprecate the parser module In-Reply-To: <1560427899.74.0.436857498848.issue37268@roundup.psfhosted.org> Message-ID: <1564446588.03.0.970080656297.issue37268@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Any update on deprecating the parser module? Wish granted: PR 15017 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 20:44:20 2019 From: report at bugs.python.org (Marco Paolini) Date: Tue, 30 Jul 2019 00:44:20 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564447460.82.0.322462860952.issue37587@roundup.psfhosted.org> Marco Paolini added the comment: On gcc, running the tests above, the only change that is relevant for speedup is switching around the strict check. Removing the extra MOV related to the outer "c" variable is not significant (at least on gcc and the few tests I did) Unfortunately I had to change the patch we did together during the sprint because it was breaking the strict check logic... I updated my PR accordingly, kept only the bare minimum. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 20:57:04 2019 From: report at bugs.python.org (Matthew Roeschke) Date: Tue, 30 Jul 2019 00:57:04 +0000 Subject: [issue37712] Exception frames from unittest.TestCase.fail dependent on nesting Message-ID: <1564448224.13.0.206274970387.issue37712@roundup.psfhosted.org> New submission from Matthew Roeschke : With this toy example: import unittest def this_fails(): a = 1 + None class TestExample(unittest.TestCase): def test_this(self): try: this_fails() except Exception: self.fail('Fail') if __name__ == '__main__': unittest.run() I get the last frame for each chained exception: Traceback (most recent call last): File "/Users/me/test.py", line 10, in test_this this_fails() TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/me/test.py", line 12, in test_this self.fail('Fail') AssertionError: Fail But if the toy example contained a nested call, e.g. def helper(self): try: this_fails() except Exception: self.fail('Fail') def test_this(self): self.helper() I get the last 2 frames for each chained exception: Traceback (most recent call last): File "/Users/me/test.py", line 10, in helper this_fails() File "/Users/me/test.py", line 4, in this_fails a = 1 + None TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/me/test.py", line 15, in test_this self.helper() File "/Users/me/test.py", line 12, in helper self.fail('Fail') AssertionError: Fail Ideally, it would be great if the traceback went back to the root of the exception regardless. ---------- components: Library (Lib) messages: 348708 nosy: Matthew Roeschke priority: normal severity: normal status: open title: Exception frames from unittest.TestCase.fail dependent on nesting type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 20:57:15 2019 From: report at bugs.python.org (Marco Paolini) Date: Tue, 30 Jul 2019 00:57:15 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564448235.76.0.485869827879.issue37587@roundup.psfhosted.org> Marco Paolini added the comment: I am also working on a different patch that uses the "pcmpestri" SSE4 processor instruction, it looks like this for now. While at it I realized there is (maybe) another potential speedup: avoiding the ucs4lib_find_max_char we do for each chunk of the string ( that entails scanning the string in memory one more time)... anyways that's another (much longer) story, probably for another issue? ``` diff --git a/Modules/_json.c b/Modules/_json.c index 38beb6f50d..25b1cf4a99 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -400,6 +400,38 @@ _build_rval_index_tuple(PyObject *rval, Py_ssize_t idx) { Py_CLEAR(chunk); \ } + +inline unsigned int +_fast_search(const void *needle, unsigned int needle_len, const void *haystack, unsigned int haystack_len) +{ + unsigned int pos; + __asm__ __volatile__("movq (%1), %%xmm1;\n" + "mov %2, %%eax;\n" + "movq %3, %%r8;\n" + "mov %4, %%edx;\n" + ".intel_syntax noprefix;\n" + "loop: pcmpestri xmm1, [r8], 0;\n" /* 0 = equal any */ + /* "pcmpestri %%mm1, (%%r8), $0;\n" /\* 0 = equal any *\/ */ + ".att_syntax prefix;\n" + "cmp $15, %%ecx;\n" + "jbe found;\n" + "sub $16, %%edx;\n" + "jnge notfound;\n" + "add $16, %%r8;\n" + "jmp loop;\n" + "notfound: movl %4, %%ecx;\n" + "jmp exit;\n" + "found: mov %4, %%eax;\n" + "sub %%edx, %%eax;\n" + "add %%eax, %%ecx;\n" + "exit: mov %%ecx, %0;\n" + :"=m"(pos) + :"r"(needle), "r"(needle_len), "r"(haystack), "r"(haystack_len) + :"%eax", "%edx", "%ecx", "%r8", "%xmm1"); + return pos; +} + + static PyObject * scanstring_unicode(PyObject *pystr, Py_ssize_t end, int strict, Py_ssize_t *next_end_ptr) { @@ -431,17 +463,26 @@ scanstring_unicode(PyObject *pystr, Py_ssize_t end, int strict, Py_ssize_t *next PyErr_SetString(PyExc_ValueError, "end is out of bounds"); goto bail; } + char needle[2]; + needle[0] = '"'; + needle[1] = '\\'; while (1) { /* Find the end of the string or the next escape */ Py_UCS4 c = 0; - for (next = end; next < len; next++) { + if (kind == PyUnicode_1BYTE_KIND) { + next = _fast_search(needle, 2, buf+end, len-end) + end; + if (next < len) c = PyUnicode_READ(kind, buf, next); - if (c == '"' || c == '\\') { - break; - } - else if (strict && c <= 0x1f) { - raise_errmsg("Invalid control character at", pystr, next); - goto bail; + } else { + for (next = end; next < len; next++) { + c = PyUnicode_READ(kind, buf, next); + if (c == '"' || c == '\\') { + break; + } + else if (strict && c <= 0x1f) { + raise_errmsg("Invalid control character at", pystr, next); + goto bail; + } } } if (!(c == '"' || c == '\\')) { ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 21:00:46 2019 From: report at bugs.python.org (Marco Paolini) Date: Tue, 30 Jul 2019 01:00:46 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564448446.24.0.10471769805.issue37587@roundup.psfhosted.org> Marco Paolini added the comment: I forgot to mention, I was inspired by @christian.heimes 's talk at EuroPython 2019 https://ep2019.europython.eu/talks/es2pZ6C-introduction-to-low-level-profiling-and-tracing/ (thanks!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 21:20:12 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 30 Jul 2019 01:20:12 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1564449612.2.0.680979880934.issue37531@roundup.psfhosted.org> Change by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:18:15 2019 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 30 Jul 2019 02:18:15 +0000 Subject: [issue37709] CSVReader ignores dialect.lineterminator In-Reply-To: <1564428728.47.0.33259508348.issue37709@roundup.psfhosted.org> Message-ID: <1564453095.26.0.586024599542.issue37709@roundup.psfhosted.org> Skip Montanaro added the comment: I imagine this is a corner case which will continue to cause problems. At the time the csv module was originally written, I believe the authors' intent was to read and write CSV files which were compatible with Excel. In Python 3, you have to open input files in text mode (that provides the underlying line splitting behavior). Consequently, you're not going to see proper line splitting with unadorned files. Have you only tried this with Python 3? If you have tried Python 2, were you able to get it to work without your workaround? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:55:35 2019 From: report at bugs.python.org (Caleb Donovick) Date: Tue, 30 Jul 2019 02:55:35 +0000 Subject: [issue35083] Fix documentation for __instancecheck__ In-Reply-To: <1540671281.62.0.788709270274.issue35083@psf.upfronthosting.co.za> Message-ID: <1564455335.29.0.521120399622.issue35083@roundup.psfhosted.org> Change by Caleb Donovick : ---------- nosy: +donovick _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 23:39:50 2019 From: report at bugs.python.org (Xinmeng Xia) Date: Tue, 30 Jul 2019 03:39:50 +0000 Subject: [issue37713] 2to3 division problems leading to program crashes in Python3 Message-ID: <1564457990.59.0.231280845163.issue37713@roundup.psfhosted.org> New submission from Xinmeng Xia : The snake game will report a crash in Python3: Traceback (most recent call last): File "/home/xxm/Desktop/instrument/datasetpy3/Snake_game/runGame.py",line 20, in w.addch(food[0], food[1], curses.ACS_PI) TypeError: integer argument expected, got float food is assigned at line 19 "food = [sh/2, sw/2]" addch accepts "int" as the types of the first two parameter. In Python2, it will work well since the results of division will be "int".In Python3 ,the results will be "float" ---------- components: 2to3 (2.x to 3.x conversion tool) files: runGame.py messages: 348712 nosy: xxm priority: normal severity: normal status: open title: 2to3 division problems leading to program crashes in Python3 type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48512/runGame.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 23:56:24 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 30 Jul 2019 03:56:24 +0000 Subject: [issue37713] 2to3 division problems leading to program crashes in Python3 In-Reply-To: <1564457990.59.0.231280845163.issue37713@roundup.psfhosted.org> Message-ID: <1564458984.54.0.957231142713.issue37713@roundup.psfhosted.org> Zachary Ware added the comment: This is not a bug; division changed in Python 3 such that `/` is the "true division" operator, whereas `//` is the "integer division" operator. Note that this was actually added in Python 2.2, though it was guarded by `from __future__ import division` for the remainder of the 2.x line. ---------- components: -2to3 (2.x to 3.x conversion tool) nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 00:26:13 2019 From: report at bugs.python.org (Xinmeng Xia) Date: Tue, 30 Jul 2019 04:26:13 +0000 Subject: [issue37714] 2to3 tab Problems Message-ID: <1564460773.29.0.466388706007.issue37714@roundup.psfhosted.org> New submission from Xinmeng Xia : Traceback (most recent call last): File "/home/xxm/Desktop/instrument/datasetpy3/FrisPy/example.py", line 4, in import FrisPy File "/home/xxm/Desktop/instrument/datasetpy3/FrisPy/FrisPy/__init__.py", line 5, in from .disc import * File "/home/xxm/Desktop/instrument/datasetpy3/FrisPy/FrisPy/disc.py", line 7, in from . import coefficient_model File "/home/xxm/Desktop/instrument/datasetpy3/FrisPy/FrisPy/coefficient_model.py", line 34 if isinstance(args[0],np.ndarray): args = args[0] ^ TabError: inconsistent use of tabs and spaces in indentation It seems that it will better to use 4 spaces to replace "tab" in 2to3. ---------- components: 2to3 (2.x to 3.x conversion tool) files: example.py messages: 348714 nosy: xxm priority: normal severity: normal status: open title: 2to3 tab Problems type: compile error versions: Python 3.7 Added file: https://bugs.python.org/file48513/example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 00:45:17 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Jul 2019 04:45:17 +0000 Subject: [issue37714] 2to3 tab Problems In-Reply-To: <1564460773.29.0.466388706007.issue37714@roundup.psfhosted.org> Message-ID: <1564461917.96.0.59976342912.issue37714@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 01:03:41 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Tue, 30 Jul 2019 05:03:41 +0000 Subject: [issue37714] 2to3 tab Problems In-Reply-To: <1564460773.29.0.466388706007.issue37714@roundup.psfhosted.org> Message-ID: <1564463021.37.0.197957342024.issue37714@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: There is a reindent.py tool to help you in this case. After running the 2to3 on the FrisPy, I tried the reindent tool, and the example worked fine afterwards. $ wget https://raw.githubusercontent.com/python/cpython/master/Tools/scripts/reindent.py $ python3 reindent.py -r . $ python3 example.py ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 02:11:45 2019 From: report at bugs.python.org (Xinmeng Xia) Date: Tue, 30 Jul 2019 06:11:45 +0000 Subject: [issue37715] 2to3 set default encoding Message-ID: <1564467105.65.0.60061017687.issue37715@roundup.psfhosted.org> New submission from Xinmeng Xia : There is a bug in lib2to3. When dealing with this project "struts-scan" by 2to3,the following bug will show up. Traceback (most recent call last): File "/home/xxm/Desktop/instrument/datasetpy3/struts-scan/struts-scan.py", line 18, in sys.setdefaultencoding('utf-8') AttributeError: module 'sys' has no attribute 'setdefaultencoding' "sys.setdefaultencoding('utf-8')" is not dealt with by lib2to3. In Python3, there is no such API "setdefaultencoding" for "sys". A possible solution to improve 2to3 is to delete this line "sys.setdefaultencoding('utf-8')" when converting Python2 projects ---------- components: 2to3 (2.x to 3.x conversion tool) files: struts-scan.py messages: 348716 nosy: xxm priority: normal severity: normal status: open title: 2to3 set default encoding type: compile error versions: Python 3.7 Added file: https://bugs.python.org/file48514/struts-scan.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 02:37:14 2019 From: report at bugs.python.org (Xinmeng Xia) Date: Tue, 30 Jul 2019 06:37:14 +0000 Subject: [issue37716] 2to3 Accuracy of calculation Message-ID: <1564468634.17.0.599980785257.issue37716@roundup.psfhosted.org> New submission from Xinmeng Xia : In Python 2,the output is 1366. After converting by 2to3, the output is 1197.1463275484991 There exists bug in the conversion of 2to3. The output should be consistent for original Python2 code and converted Python3 code. At line 10 of this python file. The code "integer /= 10" is not converted by 2to3. Then I find there is no fixer for division in 2to3,which may lead to inaccuracy of output or even worse results. A possible fix solution is for the division problem of 2to3 I can think is that for division expression such as a/b in Python2, we can add the following type check to check type of a,b as a fix for conversion of 2to3: def DivOp(a, b): if (isinstance(a, int) and isinstance(b, int)): return (a // b) else: return (a / b) and modify a/b as Div(a,b) in converted Python3 file ---------- components: 2to3 (2.x to 3.x conversion tool) files: euler016.py messages: 348717 nosy: xxm priority: normal severity: normal status: open title: 2to3 Accuracy of calculation type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48515/euler016.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 03:18:21 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Jul 2019 07:18:21 +0000 Subject: [issue37712] Exception frames from unittest.TestCase.fail dependent on nesting In-Reply-To: <1564448224.13.0.206274970387.issue37712@roundup.psfhosted.org> Message-ID: <1564471101.72.0.532818786968.issue37712@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +ezio.melotti, michael.foord, rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 03:44:41 2019 From: report at bugs.python.org (retnikt) Date: Tue, 30 Jul 2019 07:44:41 +0000 Subject: [issue37717] argparse subcommand docs has non-existent parameter "action" Message-ID: <1564472681.57.0.734846453793.issue37717@roundup.psfhosted.org> New submission from retnikt : In the library documentation for argparse, the section for ArgumentParser.add_subparsers ( https://docs.python.org/3/library/argparse.html#sub-commands ) states that there is a parameter for 'action' with the description 'the basic type of action to be taken when this argument is encountered at the command line'. However, no such parameter actually exists, and passing it to the function causes very strange behaviour: Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/argparse.py", line 1716, in add_subparsers action = parsers_class(option_strings=[], **kwargs) TypeError: __init__() got an unexpected keyword argument 'parser_class' This line should be removed from the documentation. It is present in versions 3.4+ and 2.7 ---------- assignee: docs at python components: Documentation messages: 348718 nosy: docs at python, retnikt priority: normal severity: normal status: open title: argparse subcommand docs has non-existent parameter "action" 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 Tue Jul 30 04:08:20 2019 From: report at bugs.python.org (Sebastian Koslowski) Date: Tue, 30 Jul 2019 08:08:20 +0000 Subject: [issue36670] test suite broken due to cpu usage feature on win 10/ german In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1564474100.17.0.859372604644.issue36670@roundup.psfhosted.org> Sebastian Koslowski added the comment: I ran into this issue on a Win10 German box running the tests for version 3.7.4 Your changes fixes the issue for me. ---------- nosy: +skoslowski versions: +Python 3.7 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 04:10:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Jul 2019 08:10:56 +0000 Subject: [issue37717] argparse subcommand docs has non-existent parameter "action" In-Reply-To: <1564472681.57.0.734846453793.issue37717@roundup.psfhosted.org> Message-ID: <1564474256.83.0.212529917304.issue37717@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 04:24:58 2019 From: report at bugs.python.org (Xinmeng Xia) Date: Tue, 30 Jul 2019 08:24:58 +0000 Subject: [issue37718] 2to3 exception handling Message-ID: <1564475098.96.0.917553706699.issue37718@roundup.psfhosted.org> New submission from Xinmeng Xia : we run the converted Python3 code, the following error will happen: Traceback (most recent call last): File "/home/xxm/Desktop/instrument/datasetpy3/Labeled-LDA-Python/example.py", line 50, in llda_model.save_model_to_dir(save_model_dir) File "/home/xxm/Desktop/instrument/datasetpy3/Labeled-LDA-Python/model/labeled_lda.py", line 697, in save_model_to_dir LldaModel._write_object_to_file(save_model_path, save_model.__dict__) File "/home/xxm/Desktop/instrument/datasetpy3/Labeled-LDA-Python/model/labeled_lda.py", line 650, in _write_object_to_file print(("%s\n\t%s" % (message, e.message))) AttributeError: 'TypeError' object has no attribute 'message' it seems that attributes change between Python2 and Python3. However 2to3 lack for this fix when dealing with exception fix. ---------- components: 2to3 (2.x to 3.x conversion tool) files: labeled_lda.py messages: 348720 nosy: xxm priority: normal severity: normal status: open title: 2to3 exception handling versions: Python 3.7 Added file: https://bugs.python.org/file48516/labeled_lda.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 04:37:30 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Jul 2019 08:37:30 +0000 Subject: [issue37717] argparse subcommand docs has non-existent parameter "action" In-Reply-To: <1564472681.57.0.734846453793.issue37717@roundup.psfhosted.org> Message-ID: <1564475850.56.0.273496458764.issue37717@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Seems related : issue23487 . kwargs is manipulated before passing to parsers_class causing the error message and also the discussion in issue23487 notes this to be a documentation issue over usage of action argument. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 04:56:30 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Jul 2019 08:56:30 +0000 Subject: [issue37716] 2to3 Accuracy of calculation In-Reply-To: <1564468634.17.0.599980785257.issue37716@roundup.psfhosted.org> Message-ID: <1564476990.91.0.990934827833.issue37716@roundup.psfhosted.org> Mark Dickinson added the comment: This is essentially a duplicate of #12831. There's nothing 2to3 can reasonably do here, since it isn't in a position to guess whether true division or floor division was intended. As noted in the duplicate, the "-3" and the "-Q" command line options can help detect these cases. ---------- nosy: +mark.dickinson resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> 2to3 and integer division _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 04:58:13 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Jul 2019 08:58:13 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1564477093.92.0.789189359242.issue37474@roundup.psfhosted.org> Mark Dickinson added the comment: > Should I understand that fedisableexcept(FE_OVERFLOW) is useless since FreeBSD 6? That's my understanding, yes. And since it was only introduced in FreeBSD 6, it's been useless forever. IOW, I think it's true that this line of code, in its current form, hasn't ever had any effect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 04:59:20 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Jul 2019 08:59:20 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1564477160.01.0.384641008095.issue37474@roundup.psfhosted.org> Mark Dickinson added the comment: > And since it was only introduced Sorry, that was unclear. "it" refers to "fedisableexcept" in the above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 05:01:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jul 2019 09:01:36 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1564477296.68.0.784146443856.issue37474@roundup.psfhosted.org> STINNER Victor added the comment: Mark: Do you think that it's worth it to convert attached fp_except.c into tests run by test_float, to check floating point exceptions in Python? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 05:05:55 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Jul 2019 09:05:55 +0000 Subject: [issue37714] 2to3 tab Problems In-Reply-To: <1564460773.29.0.466388706007.issue37714@roundup.psfhosted.org> Message-ID: <1564477555.81.0.910894831683.issue37714@roundup.psfhosted.org> Mark Dickinson added the comment: Duplicate of #15332. ---------- nosy: +mark.dickinson resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> 2to3 should fix bad indentation (or warn about it) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 05:09:02 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Jul 2019 09:09:02 +0000 Subject: [issue37474] Should Py_Initialize() control the floating point mode? In-Reply-To: <1562002743.95.0.49076601863.issue37474@roundup.psfhosted.org> Message-ID: <1564477742.59.0.556401808605.issue37474@roundup.psfhosted.org> Mark Dickinson added the comment: > Mark: Do you think that it's worth it to convert attached fp_except.c into > tests run by test_float, to check floating point exceptions in Python? Sure, it wouldn't harm. I'd expect that all these cases are already being tested indirectly by some part of test_math, but direct tests are better. Note that Python still can't/won't assume IEEE 754 floating-point, so if the tests use special values like infinities and nans, or other IEEE 754 assumptions, then they should be guarded by a suitable "skipIf" decorator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 05:46:06 2019 From: report at bugs.python.org (=?utf-8?q?Xavier_Doll=C3=A9?=) Date: Tue, 30 Jul 2019 09:46:06 +0000 Subject: [issue37719] addSubtest not calling addFailure and addError Message-ID: <1564479966.23.0.678975484256.issue37719@roundup.psfhosted.org> New submission from Xavier Doll? : addSubTest from TestResult is appending elements to failures and errors without using addFailure or addError, making the extend of this class more difficult. suggestion: def addSubTest(self, test, subtest, err): ... if issubclass(err[0], test.failureException): self.addFailure(subtest, err) else: self.addError(subtest, err) The suggested change would make it more concise and easier to extend. ---------- components: Tests messages: 348728 nosy: Xavier Doll? priority: normal severity: normal status: open title: addSubtest not calling addFailure and addError type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 06:11:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Jul 2019 10:11:56 +0000 Subject: [issue37719] addSubtest not calling addFailure and addError In-Reply-To: <1564479966.23.0.678975484256.issue37719@roundup.psfhosted.org> Message-ID: <1564481516.3.0.311978730745.issue37719@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also issue29152 which seems to raise same concerns over this behvavior. ---------- nosy: +ezio.melotti, michael.foord, rbcollins, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 06:13:34 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 30 Jul 2019 10:13:34 +0000 Subject: [issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST In-Reply-To: <1563536952.58.0.764226132067.issue37631@roundup.psfhosted.org> Message-ID: <1564481614.97.0.335307080474.issue37631@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- keywords: +patch pull_requests: +14781 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15020 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 06:13:59 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 30 Jul 2019 10:13:59 +0000 Subject: [issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST In-Reply-To: <1563536952.58.0.764226132067.issue37631@roundup.psfhosted.org> Message-ID: <1564481639.24.0.794400736339.issue37631@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 06:14:00 2019 From: report at bugs.python.org (Hans Peter) Date: Tue, 30 Jul 2019 10:14:00 +0000 Subject: [issue37720] Crash of python3.7 with virt-manager Message-ID: <1564481640.74.0.184955629667.issue37720@roundup.psfhosted.org> New submission from Hans Peter : Hi! A few days ago, I upgraded to UbuntuMate 19.04. I can't run 'virt-manager' because of this: # virt-manager Output: Segmentation fault kernel: [ 2003.888116] virt-manager[16014]: segfault at 32d0 ip 00000000000032d0 sp 00007ffeb09ac658 error 14 in python3.7[400000+21000] kernel: [ 2003.888124] Code: Bad RIP value. Look at "crash_and_packages.log" I added to attachment. Please help, to fix that. Thanks! ---------- components: Installation files: crash_and_packages.log messages: 348730 nosy: mother-earth40 priority: normal severity: normal status: open title: Crash of python3.7 with virt-manager type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48517/crash_and_packages.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 06:19:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jul 2019 10:19:45 +0000 Subject: [issue37720] Crash of python3.7 with virt-manager In-Reply-To: <1564481640.74.0.184955629667.issue37720@roundup.psfhosted.org> Message-ID: <1564481985.66.0.0497064613495.issue37720@roundup.psfhosted.org> STINNER Victor added the comment: Try to run virt-manager with faulthandler enabled to get the Python traceback where the bug occurs: PYTHONDEVMODE=1 virt-manager --no-fork I expect that the bug comes from a third-party C extension (no part of Python standard library). My notes to debug a Python crash: https://pythondev.readthedocs.io/debug_tools.html ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 06:28:04 2019 From: report at bugs.python.org (Hans Peter) Date: Tue, 30 Jul 2019 10:28:04 +0000 Subject: [issue37720] Crash of python3.7 with virt-manager In-Reply-To: <1564481640.74.0.184955629667.issue37720@roundup.psfhosted.org> Message-ID: <1564482484.24.0.415731511078.issue37720@roundup.psfhosted.org> Hans Peter added the comment: PYTHONDEVMODE=1 virt-manager --no-fork Fatal Python error: Segmentation fault Current thread 0x00007f835bafd740 (most recent call first): File "", line 219 in _call_with_frames_removed File "", line 1043 in create_module File "", line 583 in module_from_spec File "", line 670 in _load_unlocked File "", line 967 in _find_and_load_unlocked File "", line 983 in _find_and_load File "/usr/lib/python3.7/lzma.py", line 27 in File "", line 219 in _call_with_frames_removed File "", line 728 in exec_module File "", line 677 in _load_unlocked File "", line 967 in _find_and_load_unlocked File "", line 983 in _find_and_load File "/usr/lib/python3.7/shutil.py", line 29 in File "", line 219 in _call_with_frames_removed File "", line 728 in exec_module File "", line 677 in _load_unlocked File "", line 967 in _find_and_load_unlocked File "", line 983 in _find_and_load File "/usr/lib/python3.7/tempfile.py", line 44 in File "", line 219 in _call_with_frames_removed File "", line 728 in exec_module File "", line 677 in _load_unlocked File "", line 967 in _find_and_load_unlocked File "", line 983 in _find_and_load File "/usr/lib/python3/dist-packages/apport/report.py", line 12 in File "", line 219 in _call_with_frames_removed File "", line 728 in exec_module File "", line 677 in _load_unlocked File "", line 967 in _find_and_load_unlocked File "", line 983 in _find_and_load File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5 in File "", line 219 in _call_with_frames_removed File "", line 728 in exec_module File "", line 677 in _load_unlocked File "", line 967 in _find_and_load_unlocked File "", line 983 in _find_and_load File "", line 219 in _call_with_frames_removed File "", line 953 in _find_and_load_unlocked File "", line 983 in _find_and_load File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63 in apport_excepthook Segmentation fault ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 06:49:12 2019 From: report at bugs.python.org (Hans Peter) Date: Tue, 30 Jul 2019 10:49:12 +0000 Subject: [issue37720] Crash of python3.7 with virt-manager In-Reply-To: <1564481640.74.0.184955629667.issue37720@roundup.psfhosted.org> Message-ID: <1564483752.24.0.795076605346.issue37720@roundup.psfhosted.org> Hans Peter added the comment: How to fix that? See above post. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 06:51:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jul 2019 10:51:47 +0000 Subject: [issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST In-Reply-To: <1563536952.58.0.764226132067.issue37631@roundup.psfhosted.org> Message-ID: <1564483907.07.0.279365869711.issue37631@roundup.psfhosted.org> STINNER Victor added the comment: Python has way too many variables to control compiler flags: --- # Compiler options OPT= @OPT@ BASECFLAGS= @BASECFLAGS@ BASECPPFLAGS= @BASECPPFLAGS@ CONFIGURE_CFLAGS= @CFLAGS@ # CFLAGS_NODIST is used for building the interpreter and stdlib C extensions. # Use it when a compiler flag should _not_ be part of the distutils CFLAGS # once Python is installed (Issue #21121). CONFIGURE_CFLAGS_NODIST=@CFLAGS_NODIST@ # LDFLAGS_NODIST is used in the same manner as CFLAGS_NODIST. # Use it when a linker flag should _not_ be part of the distutils LDFLAGS # once Python is installed (bpo-35257) CONFIGURE_LDFLAGS_NODIST=@LDFLAGS_NODIST@ CONFIGURE_CPPFLAGS= @CPPFLAGS@ CONFIGURE_LDFLAGS= @LDFLAGS@ # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the # command line to append to these values without stomping the pre-set # values. PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/internal # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to # be able to build extension modules using the directories specified in the # environment variables PY_CPPFLAGS= $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS) PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS) PY_LDFLAGS_NODIST=$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST) NO_AS_NEEDED= @NO_AS_NEEDED@ SGI_ABI= @SGI_ABI@ CCSHARED= @CCSHARED@ # LINKFORSHARED are the flags passed to the $(CC) command that links # the python executable -- this is only needed for a few systems LINKFORSHARED= @LINKFORSHARED@ ARFLAGS= @ARFLAGS@ # Extra C flags added for building the interpreter object files. CFLAGSFORSHARED=@CFLAGSFORSHARED@ # C flags used for building the interpreter object files PY_STDMODULE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) PY_BUILTIN_MODULE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN PY_CORE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE # Linker flags used for building the interpreter object files PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST) # Strict or non-strict aliasing flags used to compile dtoa.c, see above CFLAGS_ALIASING=@CFLAGS_ALIASING@ --- I'm not sure which variables are "standard" and supposed to be overriden or not, because there is no documentation. The priority because these variables is not documented at all. For example: * What the priority between BASECFLAGS, CFLAGS, OPT and EXTRA_FLAGS? * Which flags are used to build Python core? * Which flags are used to build modules of the standard library? * Which flags are used to build third-party modules? Linker flags are not documented neither which caused a regression for a short time (issue ith BLDSHARED if I recall correctly). Examples of variables related to linker flags: --- # LDFLAGS_NODIST is used in the same manner as CFLAGS_NODIST. # Use it when a linker flag should _not_ be part of the distutils LDFLAGS # once Python is installed (bpo-35257) CONFIGURE_LDFLAGS_NODIST=@LDFLAGS_NODIST@ CONFIGURE_LDFLAGS= @LDFLAGS@ PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS) PY_LDFLAGS_NODIST=$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST) PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST) LDSHARED= @LDSHARED@ $(PY_LDFLAGS) BLDSHARED= @BLDSHARED@ $(PY_CORE_LDFLAGS) --- ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 07:04:23 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jul 2019 11:04:23 +0000 Subject: [issue37268] Deprecate the parser module In-Reply-To: <1560427899.74.0.436857498848.issue37268@roundup.psfhosted.org> Message-ID: <1564484663.14.0.681726947398.issue37268@roundup.psfhosted.org> miss-islington added the comment: New changeset 9211e2fd81fe1db6f73ded70752b144cc9691ab6 by Miss Islington (bot) (Pablo Galindo) in branch 'master': bpo-37268: Add deprecation notice and a DeprecationWarning for the parser module (GH-15017) https://github.com/python/cpython/commit/9211e2fd81fe1db6f73ded70752b144cc9691ab6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 07:10:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jul 2019 11:10:22 +0000 Subject: [issue37720] Crash of python3.7 with virt-manager In-Reply-To: <1564481640.74.0.184955629667.issue37720@roundup.psfhosted.org> Message-ID: <1564485022.31.0.745179915246.issue37720@roundup.psfhosted.org> STINNER Victor added the comment: That's a crash in the apport project itself which is specific to Ubuntu, and unrelated to Python standard library. I close this issue. Please report issues specific to Ubuntu to the Ubuntu bug tracker. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 07:24:52 2019 From: report at bugs.python.org (Florian Bruhin) Date: Tue, 30 Jul 2019 11:24:52 +0000 Subject: [issue15817] Misc/gdbinit: Expose command documentation to gdb help In-Reply-To: <1346283185.13.0.0954859318202.issue15817@psf.upfronthosting.co.za> Message-ID: <1564485892.15.0.0176107455391.issue15817@roundup.psfhosted.org> Change by Florian Bruhin : ---------- pull_requests: +14782 pull_request: https://github.com/python/cpython/pull/15021 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 08:49:09 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 30 Jul 2019 12:49:09 +0000 Subject: [issue37268] Deprecate the parser module In-Reply-To: <1560427899.74.0.436857498848.issue37268@roundup.psfhosted.org> Message-ID: <1564490949.02.0.174215262154.issue37268@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 08:55:50 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 30 Jul 2019 12:55:50 +0000 Subject: [issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST In-Reply-To: <1563536952.58.0.764226132067.issue37631@roundup.psfhosted.org> Message-ID: <1564491350.67.0.956875867075.issue37631@roundup.psfhosted.org> Charalampos Stratakis added the comment: I agree that documenting the flags is quite important, I've had a hard time trying to figure out how to implement the LDFLAGS_NODIST, and the change still broke macos builds (luckily it was fixed swiftly). Nevertheless, this is still a bug which should be addressed. On another note, where would be the best place to start documenting those flags? Makefile, the python docs, somewhere else? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 09:05:39 2019 From: report at bugs.python.org (Benjamin Schollnick) Date: Tue, 30 Jul 2019 13:05:39 +0000 Subject: [issue37709] CSVReader ignores dialect.lineterminator In-Reply-To: <1564428728.47.0.33259508348.issue37709@roundup.psfhosted.org> Message-ID: <1564491939.18.0.191099088464.issue37709@roundup.psfhosted.org> Benjamin Schollnick added the comment: This is tested under python 3... filename = "csv_Sample.csv" from csv import DictReader datafile = open(filename, 'r') data = csv.DictReader(datafile, lineterminator = '\x07', delimiter='\x06') print(next(data)) OrderedDict([('Field1', 'A'), ('Field2', 'B'), ('Field3', 'C'), ('Field4', 'D'), ('Field5', 'E'), ('Field6', 'F'), ('Field7', 'G'), ('Field8', 'H'), ('Field9', 'I'), ('Field10\x07', 'J\x07')]) print(ord(data.reader.dialect.lineterminator)) So it's untested under python 2, since I've stopped developing under Py2. I noticed the note in the CSV reader documentation, *AFTER* I diagnosed the issue with the CSV reader... Which is why I opened the bug / feature enhancement request, since this is an very odd edge case. I agree 90+% of all CSVs are going to be \n line terminated, but if we offer it for writing, we should offer it for reading. The main emphasis here is this code will not working in the real world, eg. filename = "csvFile.csv" from csv import DictReader, DictWriter import csv with open(filename, mode='w') as output_file: outcsv = csv.writer(output_file, delimiter=',', lineterminator=";") outcsv.writerow(['John Cleese', 'CEO', 'March']) outcsv.writerow(['Graham Chapman', 'CFO', 'November']) outcsv.writerow(['Terry Jones', 'Animation', 'March']) outcsv.writerow(['Eric Idle', 'Laugh Track', 'November']) outcsv.writerow(['Michael Palin', 'Snake Wrangler', 'March']) with open(filename, mode='r') as input_file: csv_reader = csv.reader(input_file, delimiter=',', lineterminator=";") for row in csv_reader: print(row) ---------- Added file: https://bugs.python.org/file48518/CSV_SAMPLE.CSV _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 09:10:44 2019 From: report at bugs.python.org (Jarek Zgoda) Date: Tue, 30 Jul 2019 13:10:44 +0000 Subject: [issue37544] Test hang causes --enable-optimizations build to hang In-Reply-To: <1562757478.69.0.905991720528.issue37544@roundup.psfhosted.org> Message-ID: <1564492244.52.0.843625099843.issue37544@roundup.psfhosted.org> Change by Jarek Zgoda : Added file: https://bugs.python.org/file48519/test.pythoninfo.libressl-2.9.2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 09:40:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jul 2019 13:40:04 +0000 Subject: [issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST In-Reply-To: <1563536952.58.0.764226132067.issue37631@roundup.psfhosted.org> Message-ID: <1564494004.08.0.965902705394.issue37631@roundup.psfhosted.org> STINNER Victor added the comment: IMHO comments in Makefile.pre.in is a good start. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 09:48:29 2019 From: report at bugs.python.org (Daniel Himmelstein) Date: Tue, 30 Jul 2019 13:48:29 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1564494509.58.0.754337821984.issue29636@roundup.psfhosted.org> Daniel Himmelstein added the comment: Since opening this issue, I've encountered several additional instances where indentation control would have been nice. I don't agree that jq is a sufficient substitute: 1. jq is generally not pre-installed on systems. For projects where users are guaranteed to have Python installed (but may be on any operating system), it is most straightforward to be able to just use a python command and not have to explain how to install jq on 3 different OSes. 2. jq does a lot more than prettifying JSON. The simple use case of reformatting JSON (to/from a file or stdin/stdout) can be challenging. 3. json.tool describes itself as a "simple command line interface to ... pretty-print JSON objects". Indentation is an essential aspect of pretty printing. Why even have this CLI if we're unwilling to add essential basic functionality that is already well supported by the underlying json.dump API? Python excels at APIs that match user needs. It seems like we're a small change away from making json.tool flexible enough to satisfy real-world needs. So I'm in favor of merging PR 9765 or PR 345. I'm happy to do the work on either to get them mergeable based on whatever specification we can agree on here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 09:48:35 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 30 Jul 2019 13:48:35 +0000 Subject: =?utf-8?q?=5Bissue37681=5D_warning=3A_=E2=80=98no=5Fsanitize=5Fthread?= =?utf-8?b?4oCZ?= In-Reply-To: <1564070558.89.0.656147417061.issue37681@roundup.psfhosted.org> Message-ID: <1564494515.59.0.643400869984.issue37681@roundup.psfhosted.org> Ronald Oussoren added the comment: - Which python version do you try to build? - What platform are you on? - Which compiler and compiler version do you use? ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 10:07:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jul 2019 14:07:46 +0000 Subject: [issue37704] Remove Tools/scripts/h2py.py In-Reply-To: <1564401492.74.0.0281923171365.issue37704@roundup.psfhosted.org> Message-ID: <1564495666.19.0.763715968665.issue37704@roundup.psfhosted.org> STINNER Victor added the comment: Lib/plat-*/ directories has been removed in Python 3.6 by: commit 20737cc91e823b6b17fff16574283c034c99d641 Author: Zachary Ware Date: Thu Sep 8 11:38:46 2016 -0700 Issue #28027: Remove Lib/plat-* files > Python 2 standard library had platform specific modules like CDROM which were generated by Tools/scripts/h2py.py. These modules were removed, but h2py.py is still around. Example of Python 2.7: $ head -n1 Lib/plat-linux2/IN.py # Generated by h2py from /usr/include/netinet/in.h ... $ tail -n1 Lib/plat-linux2/regen ... h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 10:16:49 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 30 Jul 2019 14:16:49 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564496209.51.0.269395640735.issue37587@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset 8a758f5b99c5fc3fd32edeac049d7d4a4b7cc163 by Nick Coghlan (Marco Paolini) in branch 'master': bpo-37587: Make json.loads faster for long strings (GH-14752) https://github.com/python/cpython/commit/8a758f5b99c5fc3fd32edeac049d7d4a4b7cc163 ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 10:18:19 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jul 2019 14:18:19 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564496299.48.0.0451049810102.issue37587@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14783 pull_request: https://github.com/python/cpython/pull/15022 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 10:22:29 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 30 Jul 2019 14:22:29 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564496549.91.0.915760348035.issue37587@roundup.psfhosted.org> Nick Coghlan added the comment: I went ahead and merged the minimal PR and flagged it for backporting to 3.8 - it's an obviously beneficial change, that clearly does less work on each pass through the loop. Even if you are doing non-strict parsing of a string that consists entirely of invalid characters, you'll get the same level of performance that the previous code offered for all strict parsing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 10:37:50 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jul 2019 14:37:50 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564497470.88.0.21659786712.issue37587@roundup.psfhosted.org> miss-islington added the comment: New changeset 9265a877426af4fa5c44cc8482e0198806889350 by Miss Islington (bot) in branch '3.8': bpo-37587: Make json.loads faster for long strings (GH-14752) https://github.com/python/cpython/commit/9265a877426af4fa5c44cc8482e0198806889350 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 10:43:51 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Tue, 30 Jul 2019 14:43:51 +0000 Subject: [issue37246] http.cookiejar.DefaultCookiePolicy should use current timestamp instead of last updated timestamp value for checking expiry In-Reply-To: <1560340784.82.0.908352351929.issue37246@roundup.psfhosted.org> Message-ID: <1564497831.82.0.0889226375332.issue37246@roundup.psfhosted.org> Change by Ngalim Siregar : ---------- keywords: +patch pull_requests: +14784 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15023 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 10:45:37 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jul 2019 14:45:37 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564497937.02.0.952943103852.issue37587@roundup.psfhosted.org> Inada Naoki added the comment: Wait... there is no benchmark for the "minimum change". I tested 4 compilers, and provide much better patch in https://bugs.python.org/issue37587#msg348114 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 10:46:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jul 2019 14:46:03 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1564497963.57.0.102984528705.issue9216@roundup.psfhosted.org> STINNER Victor added the comment: FYI the multiprocessing module uses hmac.new(authkey, message, 'md5').digest(). I don't think that using MD5 even for HMAC is allowed in FIPS mode. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:18:50 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 30 Jul 2019 15:18:50 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564499930.68.0.408860112126.issue37587@roundup.psfhosted.org> Steve Dower added the comment: While you're testing patches, can you try this version too? Py_UCS4 c = 0, minc = 0x20; for (next = end; next < len; next++) { c = PyUnicode_READ(kind, buf, next); if (c == '"' || c == '\\') { break; } minc = c < minc ? c : minc; } if (strict && minc <= 0x1f) { raise_errmsg("Invalid control character at", pystr, next); goto bail; } When we tried this, the conditional expression became a "cmovl" operator which removed 3-4 branches from within the loop entirely, and it was 18% better than the baseline (which has now moved...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:20:05 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 30 Jul 2019 15:20:05 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564500005.12.0.441508024433.issue37587@roundup.psfhosted.org> Steve Dower added the comment: Oh, we also need to capture "next"... but then again, since the success case is far more common, I'd be okay with scanning again to find it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:23:21 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 30 Jul 2019 15:23:21 +0000 Subject: [issue36670] test suite broken due to cpu usage feature on win 10/ german In-Reply-To: <1555689157.38.0.435665423105.issue36670@roundup.psfhosted.org> Message-ID: <1564500201.39.0.321310304882.issue36670@roundup.psfhosted.org> Change by Steve Dower : ---------- stage: -> needs patch versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:32:47 2019 From: report at bugs.python.org (Marco Paolini) Date: Tue, 30 Jul 2019 15:32:47 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564500767.27.0.663270396001.issue37587@roundup.psfhosted.org> Marco Paolini added the comment: @steve.dower yes, that's what made me discard that experiment we did during the sprint. Ok will test your new patch soon ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:35:10 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jul 2019 15:35:10 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564500910.67.0.973515623864.issue37587@roundup.psfhosted.org> Inada Naoki added the comment: Since scope of "c" is very wide, and there is even `&c` in the scope, compiler stores the `c` to stack every time on: c = PyUnicode_READ(kind, buf, next); That is the bottleneck. `if (strict && ...)` is not the bottleneck. My patch used a new variable with tight scope so compiler can bypass store it to the stack. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:41:30 2019 From: report at bugs.python.org (cherusk) Date: Tue, 30 Jul 2019 15:41:30 +0000 Subject: [issue37721] smtpd: staling connect Message-ID: <1564501290.13.0.408923844386.issue37721@roundup.psfhosted.org> New submission from cherusk : >From PR: Following script stals/hangs. According to my tracing done, in the smtpd component. The concept of the script is baseline of my unit testing for [1], so not hypothetical: import logging import sys logging.basicConfig(level=logging.DEBUG, stream=sys.stdout) from smtpd import DebuggingServer as TestMailServer import threading from notifiers import get_notifier import time import itertools as it mail_server = threading.Thread(target=TestMailServer, args=(("localhost", 2500), None)) mail_server.daemon = True mail_server.start() time.sleep(2) for msg in it.repeat('copy', 100): print(msg) get_notifier('email').notify(from_='cherusk at localhost', to='root at localhost', message=msg, subject='TST', host='localhost', port=2500, tls=False, ssl=False, html=False, username="some", password='pw' ) I evaluated that on several platforms(FED29, UBUNTU-Latest), same symptoms. Also, on network stack I saw a clean TCP handshake happening, also cleanly ACKed by the smptd. So, presumption is that it's something in the dispatcher. [1] https://github.com/cherusk/tw_timeliness/blob/master/test/time_engine_test.py ---------- components: email messages: 348752 nosy: barry, cherusk, r.david.murray priority: normal pull_requests: 14785 severity: normal status: open title: smtpd: staling connect type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:43:52 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 30 Jul 2019 15:43:52 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564501432.5.0.858745115243.issue37587@roundup.psfhosted.org> Steve Dower added the comment: > compiler stores the `c` to stack every time The disassembly we looked at didn't do this, so it may just be certain compilers. Perhaps we can actually use the register keyword to help them out? :) Here's a slightly altered one that doesn't require rescanning for the sake of the error message: Py_UCS4 c = 0, minc = strict ? 0x20 : 0x00; for (next = end; next < len; next++) { c = PyUnicode_READ(kind, buf, next); if (c == '"' || c == '\\' || c < minc) { break; } } if (c < minc) { raise_errmsg("Invalid control character at", pystr, next); goto bail; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:45:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jul 2019 15:45:33 +0000 Subject: [issue37704] Remove Tools/scripts/h2py.py In-Reply-To: <1564401492.74.0.0281923171365.issue37704@roundup.psfhosted.org> Message-ID: <1564501533.63.0.0971349297456.issue37704@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 27eeaf0f2c9bd53a0fbdfdf38ee759e971221f8d by Victor Stinner in branch 'master': bpo-37704: Remove Tools/scripts/h2py.py (GH-15000) https://github.com/python/cpython/commit/27eeaf0f2c9bd53a0fbdfdf38ee759e971221f8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:45:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jul 2019 15:45:43 +0000 Subject: [issue13032] h2py.py can fail with UnicodeDecodeError In-Reply-To: <1316767061.34.0.367682305149.issue13032@psf.upfronthosting.co.za> Message-ID: <1564501543.89.0.221663725397.issue13032@roundup.psfhosted.org> STINNER Victor added the comment: I just removed Tools/scripts/h2py.py in bpo-37704. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 11:45:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jul 2019 15:45:57 +0000 Subject: [issue37704] Remove Tools/scripts/h2py.py In-Reply-To: <1564401492.74.0.0281923171365.issue37704@roundup.psfhosted.org> Message-ID: <1564501557.15.0.751415952029.issue37704@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 12:24:58 2019 From: report at bugs.python.org (Tommy Sparber) Date: Tue, 30 Jul 2019 16:24:58 +0000 Subject: [issue15459] ctypes Structures with subclassed types in the _fields_ list In-Reply-To: <1343327705.62.0.223741820518.issue15459@psf.upfronthosting.co.za> Message-ID: <1564503898.44.0.173577042847.issue15459@roundup.psfhosted.org> Tommy Sparber added the comment: This bug is still present using Python 3.7. I'm also not sure how to fix the leakage of the internal bitfield size encoding. ---------- nosy: +tsparber versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 12:42:52 2019 From: report at bugs.python.org (hai shi) Date: Tue, 30 Jul 2019 16:42:52 +0000 Subject: =?utf-8?q?=5Bissue37681=5D_warning=3A_=E2=80=98no=5Fsanitize=5Fthread?= =?utf-8?b?4oCZ?= In-Reply-To: <1564070558.89.0.656147417061.issue37681@roundup.psfhosted.org> Message-ID: <1564504972.86.0.395085385185.issue37681@roundup.psfhosted.org> hai shi added the comment: I want to build the cpython of master. My platform and compiler info: Linux version 3.10.0-957.1.3.el7.x86_64 (mockbuild at kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Thu Nov 29 14:49:43 UTC 2018 Looks not all platform get this info. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 12:46:33 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jul 2019 16:46:33 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564505193.29.0.940788749924.issue37587@roundup.psfhosted.org> Inada Naoki added the comment: I tested before, after, Steve's patch, and my patch with gcc 8.3.0 and PGO+LTO. https://gist.github.com/methane/f6077bd1b0b04d40a9c790d9ed670a44#file-gcc-8-3-0-pgo-md Surprisingly, there is no difference. Even my patch didn't help register allocation when PGO is enabled. I will run same test with other compilers & PGO (enabled|disabled). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 12:52:29 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jul 2019 16:52:29 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564505549.83.0.348687981589.issue37587@roundup.psfhosted.org> Inada Naoki added the comment: I'm sorry, I was wrong. PGO did very nice job on all cases. gcc allocates `c` to register in the hot loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 13:09:51 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Jul 2019 17:09:51 +0000 Subject: [issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1564506591.21.0.545093257906.issue34313@roundup.psfhosted.org> Ned Deily added the comment: @royf, Without more information, we can only speculate what kind of crash you are seeing. But based on past experience, it is almost certainly a crash in Tk itself and, if so, you need to work with your supplier of Tk, presumably the conda project, to get a working version of Tk 8.6.x. Our most recent experience with building Tk on macOS for the python.org installers found that using the released Tk 8.6.8 source tarball (ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tk8.6.8-src.tar.gz) was the least problematic at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 13:28:04 2019 From: report at bugs.python.org (paul j3) Date: Tue, 30 Jul 2019 17:28:04 +0000 Subject: [issue37717] argparse subcommand docs has non-existent parameter "action" In-Reply-To: <1564472681.57.0.734846453793.issue37717@roundup.psfhosted.org> Message-ID: <1564507684.61.0.142040247826.issue37717@roundup.psfhosted.org> paul j3 added the comment: As discussed in https://bugs.python.org/issue23487, `action` works if the class is compatible with argparse._SubParsersAction. these commands all do the same thing: parser.add_subparsers() # default parser.add_subparsers(action='parsers') parser.add_subparsers(action=argparse._SubParsersAction) Your example using parser.add_subparsers(action='store') raises the error because the argparse._StoreAction class cannot handle the `parser_class` parameter that add_subparsers has added to the kwargs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 13:30:09 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 30 Jul 2019 17:30:09 +0000 Subject: [issue37587] JSON loads performance improvement for long strings In-Reply-To: <1563028922.54.0.821649437171.issue37587@roundup.psfhosted.org> Message-ID: <1564507809.3.0.98975400051.issue37587@roundup.psfhosted.org> Inada Naoki added the comment: This issue is very compiler sensitive. Please don't report performance without compiler version and PGO option. Now I'm facing strange behavior. pyperf reports slower time (1ms) for PGO builds, although disasm looks good. But it's 2:30am already... Please wait for a few days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:08:26 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 30 Jul 2019 18:08:26 +0000 Subject: [issue37707] Skip individual unit tests that are expensive for the PGO task In-Reply-To: <1564425247.23.0.845576191882.issue37707@roundup.psfhosted.org> Message-ID: <1564510106.75.0.595727349777.issue37707@roundup.psfhosted.org> Neil Schemenauer added the comment: New changeset 52a48e62c6a94577152f9301bbe5f3bc806cfcf1 by Neil Schemenauer in branch 'master': bpo-37707: Exclude expensive unit tests from PGO task (GH-15009) https://github.com/python/cpython/commit/52a48e62c6a94577152f9301bbe5f3bc806cfcf1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:08:37 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jul 2019 18:08:37 +0000 Subject: [issue37707] Skip individual unit tests that are expensive for the PGO task In-Reply-To: <1564425247.23.0.845576191882.issue37707@roundup.psfhosted.org> Message-ID: <1564510117.33.0.684983260217.issue37707@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14786 pull_request: https://github.com/python/cpython/pull/15024 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:11:44 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 30 Jul 2019 18:11:44 +0000 Subject: [issue36044] PROFILE_TASK for PGO build is not a good workload In-Reply-To: <1550608790.89.0.306917505619.issue36044@roundup.psfhosted.org> Message-ID: <1564510304.14.0.405231255613.issue36044@roundup.psfhosted.org> Neil Schemenauer added the comment: Closing as I think PR 14702 mostly resolves this. The gc_collect() issue has not been resolved but based on some investigation, I think it is not worth the effort to try to reduce the time spend in that function. Reducing the number of unit tests being run had a huge benefit and did not significantly impact the optimization. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:12:56 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 30 Jul 2019 18:12:56 +0000 Subject: [issue37707] Skip individual unit tests that are expensive for the PGO task In-Reply-To: <1564425247.23.0.845576191882.issue37707@roundup.psfhosted.org> Message-ID: <1564510376.43.0.0381993759845.issue37707@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:13:19 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Jul 2019 18:13:19 +0000 Subject: [issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1564510399.4.0.68389805882.issue34313@roundup.psfhosted.org> Terry J. Reedy added the comment: Is this issue open for some specific action in a repository covered by this tracker, or should it be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:25:17 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 30 Jul 2019 18:25:17 +0000 Subject: =?utf-8?q?=5Bissue37681=5D_warning=3A_=E2=80=98no=5Fsanitize=5Fthread?= =?utf-8?b?4oCZ?= In-Reply-To: <1564070558.89.0.656147417061.issue37681@roundup.psfhosted.org> Message-ID: <1564511117.1.0.622838461511.issue37681@roundup.psfhosted.org> Ronald Oussoren added the comment: A GCC export should be able to tell more, but the warning should be harmless. Objects/obmalloc.c says that the thread sanitizer is available from GCC 4.8, but for some reason it isn't on your system. This seems to be a bug in obmalloc.c: The GCC 4.8.5 docs don't mention this attribute [1], while the 5.5 docs do [2] [1] https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Function-Attributes.html#Function-Attributes [2] https://gcc.gnu.org/onlinedocs/gcc-5.5.0/gcc/Function-Attributes.html#Function-Attributes There's a couple of releases between 4.8.5 and 5.5.0, I don't know which one introduces this function attribute. Once that version is know it should be fairly easy to provide a patch that only uses the attribute for new enough compilers. ---------- stage: -> needs patch type: -> compile error versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:34:48 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 30 Jul 2019 18:34:48 +0000 Subject: [issue37707] Skip individual unit tests that are expensive for the PGO task In-Reply-To: <1564425247.23.0.845576191882.issue37707@roundup.psfhosted.org> Message-ID: <1564511688.95.0.788790495961.issue37707@roundup.psfhosted.org> Neil Schemenauer added the comment: New changeset 382cb85401bb010ead411c0532499ffe16c3cf27 by Neil Schemenauer (Miss Islington (bot)) in branch '3.8': bpo-37707: Exclude expensive unit tests from PGO task (GH-15009) (#15024) https://github.com/python/cpython/commit/382cb85401bb010ead411c0532499ffe16c3cf27 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 14:35:10 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 30 Jul 2019 18:35:10 +0000 Subject: [issue37705] winerror_to_errno implementation In-Reply-To: <1564407660.89.0.454912973453.issue37705@roundup.psfhosted.org> Message-ID: <1564511710.04.0.447667243947.issue37705@roundup.psfhosted.org> Eryk Sun added the comment: Special casing of Winsock error codes should be handled in winerror_to_errno rather than in oserror_parse_args, so it's consistently applied everywhere. And it should use the proper range for Winsock, 10000-11999 -- not 10000-2147483647. Codes above the Winsock range should map to EINVAL. It's not a non-issue since this range has the following blocks allocated: IPSEC 13000-13999 SXS 14000-14999 EVT 15000-15079 EC 15080-15099 MUI 15100-15199 MCA 15200-15249 SYSPART 15250-15299 VORTEX 15300-15320 GPIO 15321-15340 RUNLEVEL 15400-15500 COMTASK 15501-15510 APPX 15600-15699 APPMODEL 15700-15720 APPXSTATE 15800-15840 API 15841-15860 STORE 15861-15880 Another thing winerror_to_errno should do is unwrap HRESULT codes for Win32 errors (0x80070000-0x8007FFFF). In other words, 0x80070005 is effectively the same as ERROR_ACCESS_DENIED (5). It should be mapped to EACCES and raise PermissionError. For example: int winerror_to_errno(int winerror) { /* Unwrap FACILITY_WIN32 HRESULT errors. */ if ((winerror & 0xFFFF0000) == 0x80070000) { winerror &= 0x0000FFFF; } /* Winsock error codes (10000-11999) are errno values. */ if (winerror >= 10000 && winerror < 12000) { return winerror; } switch(winerror) { /* ... */ } } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 15:33:35 2019 From: report at bugs.python.org (=?utf-8?b?0JjQstCw0L0g0JzQuNGF0LDQudC70L7Qsg==?=) Date: Tue, 30 Jul 2019 19:33:35 +0000 Subject: =?utf-8?q?=5Bissue37722=5D_imaplib_crashes_when_trying_to_read_a_letter_f?= =?utf-8?b?cm9tIGFuIGltYXAgc2VydmVyIGltYXBzLtC/0L7Rh9GC0LAu0YDRg9GB?= Message-ID: <1564515215.95.0.35649081562.issue37722@roundup.psfhosted.org> Change by ???? ???????? : ---------- components: Library (Lib) files: imaplib.png nosy: ???? ???????? priority: normal severity: normal status: open title: imaplib crashes when trying to read a letter from an imap server imaps.?????.??? type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48520/imaplib.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 17:42:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Jul 2019 21:42:12 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1564522932.3.0.114024702709.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 84846b0187919551b1b08dca447658bbbbb710b1 by Victor Stinner (Jake Tesler) in branch 'master': bpo-36084: Add threading Native ID information to What's New documentation (GH-14845) https://github.com/python/cpython/commit/84846b0187919551b1b08dca447658bbbbb710b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 17:42:48 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jul 2019 21:42:48 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1564522968.57.0.526825734446.issue36084@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14787 pull_request: https://github.com/python/cpython/pull/15028 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 17:49:28 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Jul 2019 21:49:28 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1564523368.26.0.0896596136393.issue36084@roundup.psfhosted.org> miss-islington added the comment: New changeset 7026737d77836657c3b713000c3154cfdb7451db by Miss Islington (bot) in branch '3.8': bpo-36084: Add threading Native ID information to What's New documentation (GH-14845) https://github.com/python/cpython/commit/7026737d77836657c3b713000c3154cfdb7451db ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 18:02:34 2019 From: report at bugs.python.org (yannvgn) Date: Tue, 30 Jul 2019 22:02:34 +0000 Subject: [issue37723] important performance regression on regular expression parsing Message-ID: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> New submission from yannvgn : On complex cases, parsing regular expressions takes much, much longer on Python >= 3.7 Example (ipython): In [1]: import re In [2]: char_list = ''.join([chr(i) for i in range(0xffff)]) In [3]: long_char_list = char_list * 10 In [4]: pattern = f'[{re.escape(long_char_list)}]' In [5]: %time compiled = re.compile(pattern) The test was run on Amazon Linux AMI 2017.03. On Python 3.6.1, the regexp compiled in 2.6 seconds: CPU times: user 2.59 s, sys: 30 ms, total: 2.62 s Wall time: 2.64 s On Python 3.7.3, the regexp compiled in 15 minutes (~350x increase in this case): CPU times: user 15min 6s, sys: 240 ms, total: 15min 7s Wall time: 15min 9s Doing some profiling with cProfile shows that the issue is caused by sre_parse._uniq function, which does not exist in Python <= 3.6 The complexity of this function is on average O(N^2) but can be easily reduced to O(N). The issue might not be noticeable with simple regexps, but programs like text tokenizers - which use complex regexps - might really be impacted by this regression. ---------- components: Regular Expressions messages: 348771 nosy: ezio.melotti, mrabarnett, yannvgn priority: normal severity: normal status: open title: important performance regression on regular expression parsing type: performance versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 18:03:50 2019 From: report at bugs.python.org (yannvgn) Date: Tue, 30 Jul 2019 22:03:50 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564524230.25.0.42713859738.issue37723@roundup.psfhosted.org> Change by yannvgn : ---------- keywords: +patch pull_requests: +14788 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15030 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 18:20:23 2019 From: report at bugs.python.org (Tal Cohen) Date: Tue, 30 Jul 2019 22:20:23 +0000 Subject: [issue37724] [[Errno 17] File exists: ] # Try create directories that are not part of the archive with Message-ID: <1564525223.13.0.366878047407.issue37724@roundup.psfhosted.org> Change by Tal Cohen <3talcohen at gmail.com>: ---------- components: Library (Lib) nosy: Tal Cohen, lars.gustaebel priority: normal severity: normal status: open title: [[Errno 17] File exists: ] # Try create directories that are not part of the archive with versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 18:27:02 2019 From: report at bugs.python.org (Tal Cohen) Date: Tue, 30 Jul 2019 22:27:02 +0000 Subject: [issue37724] [[Errno 17] File exists: ] # Try create directories that are not part of the archive with Message-ID: <1564525622.36.0.964910267569.issue37724@roundup.psfhosted.org> New submission from Tal Cohen <3talcohen at gmail.com>: _extract_member, raised an exception in case of more than one process, This happens because "not os.path.exists(upperdirs" return True in case of multiprocess CODE: ............. if upperdirs and not os.path.exists(upperdirs): # Create directories that are not part of the archive with # default permissions. os.makedirs(upperdirs) ................ I solved the problem by creating the root path before like: try: os.makedirs(path) except OSError as e: if e.errno != os.errno.EEXIST: raise pass there is an option to add : if e.errno != os.errno.EEXIST: in your code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 19:23:49 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 30 Jul 2019 23:23:49 +0000 Subject: [issue37725] "make clean" should remove PGO task data Message-ID: <1564529029.65.0.599090827857.issue37725@roundup.psfhosted.org> New submission from Neil Schemenauer : I find it annoying and surprising that "make clean" does not remove the PGO data. If you change a source file, running "make clean" and "make" should result in a newly built executable, IMHO. As it is now, you usually get a confusing build failure (PGO data is out of date). The fix is fairly easy. Make a new target that does what "clean" currently does. Have the PGO build call that when it needs to preserve the PGO data. Introduce a new "clean" target that does what the old clean did and also removes the PGO data. Changing the build system is fraught with danger but I think this is a fairly safe change. The current behavior is quite annoying, IMHO. ---------- components: Build messages: 348773 nosy: nascheme priority: normal severity: normal stage: patch review status: open title: "make clean" should remove PGO task data type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 20:23:59 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 31 Jul 2019 00:23:59 +0000 Subject: [issue37725] "make clean" should remove PGO task data In-Reply-To: <1564529029.65.0.599090827857.issue37725@roundup.psfhosted.org> Message-ID: <1564532639.59.0.522315141985.issue37725@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- keywords: +patch pull_requests: +14790 pull_request: https://github.com/python/cpython/pull/15033 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:18:10 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 31 Jul 2019 04:18:10 +0000 Subject: [issue37726] Tutorial should not recommend getopt Message-ID: <1564546690.91.0.192257836854.issue37726@roundup.psfhosted.org> New submission from Guido van Rossum : I read on python-ideas that the tutorial recommends getopt as the simple argument parsing choice, and argparse as advanced. This is silly. We should only promote argparse (unless you want to use raw sys.argv[1:]). ---------- assignee: docs at python components: Documentation keywords: newcomer friendly messages: 348774 nosy: docs at python, gvanrossum priority: normal severity: normal stage: needs patch status: open title: Tutorial should not recommend getopt versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:19:02 2019 From: report at bugs.python.org (Whitequill Riclo) Date: Wed, 31 Jul 2019 04:19:02 +0000 Subject: [issue37727] error past 15 places Message-ID: <1564546742.66.0.212195941437.issue37727@roundup.psfhosted.org> New submission from Whitequill Riclo : I have found that when doing the calculation when running: pow(1 + 1/100000000000000, 100000000000000) = 2.716110034087023 pow(1 + 1/1000000000000000, 1000000000000000) = 3.03503520654962 This is incorrect as the following is a well known way to calculate Euler's number. I do not know what component is the cause so I just picked one. ---------- components: Library (Lib) messages: 348775 nosy: Whitequill Riclo priority: normal severity: normal status: open title: error past 15 places type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:24:41 2019 From: report at bugs.python.org (Whitequill Riclo) Date: Wed, 31 Jul 2019 04:24:41 +0000 Subject: [issue37727] error past 15 places In-Reply-To: <1564546742.66.0.212195941437.issue37727@roundup.psfhosted.org> Message-ID: <1564547081.66.0.78727949561.issue37727@roundup.psfhosted.org> Whitequill Riclo added the comment: This error happens in Google's search too which means that Google is using Python server-side and some how this hasn't been addressed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:27:18 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Jul 2019 04:27:18 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564547238.68.0.74869386221.issue34162@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14791 pull_request: https://github.com/python/cpython/pull/15034 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:35:36 2019 From: report at bugs.python.org (hai shi) Date: Wed, 31 Jul 2019 04:35:36 +0000 Subject: =?utf-8?q?=5Bissue37681=5D_warning=3A_=E2=80=98no=5Fsanitize=5Fthread?= =?utf-8?b?4oCZ?= In-Reply-To: <1564070558.89.0.656147417061.issue37681@roundup.psfhosted.org> Message-ID: <1564547736.18.0.158578464553.issue37681@roundup.psfhosted.org> hai shi added the comment: thanks, Ronald. Let me check the process by the upstairs refs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:38:35 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Jul 2019 04:38:35 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1564547915.56.0.40703292503.issue33822@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +14792 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15035 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:43:52 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Jul 2019 04:43:52 +0000 Subject: [issue33821] IDLE subsection of What's New 3.7 In-Reply-To: <1528651926.75.0.592728768989.issue33821@psf.upfronthosting.co.za> Message-ID: <1564548232.05.0.96889151118.issue33821@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14793 pull_request: https://github.com/python/cpython/pull/15036 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:46:21 2019 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 31 Jul 2019 04:46:21 +0000 Subject: [issue37709] CSVReader ignores dialect.lineterminator In-Reply-To: <1564428728.47.0.33259508348.issue37709@roundup.psfhosted.org> Message-ID: <1564548381.86.0.540784775843.issue37709@roundup.psfhosted.org> Skip Montanaro added the comment: Looking at your sample file, it seems stranger than you first indicated. Your line terminator actually appears to be '\x07\r\n', not just '\x07'. Opening your file in text mode will leave you with '\x07' as the last character of the last cell in each row. I've attached two files, bell.csv, which has just '\x07' as the line terminator, and lfmapper.py, which provides a class (suboptimally named LFMapper) which takes a file object opened in binary mode and optional line_terminator and encoding args, and performs the necessary slicing of the input bytes, decoding them and returning strings. Unless Python grows a way for you to tell the open() function what string to use as the line terminator in text mode, I don't think your example is ever going to work without some sort of shim class. ---------- Added file: https://bugs.python.org/file48521/bell.csv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:46:34 2019 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 31 Jul 2019 04:46:34 +0000 Subject: [issue37709] CSVReader ignores dialect.lineterminator In-Reply-To: <1564428728.47.0.33259508348.issue37709@roundup.psfhosted.org> Message-ID: <1564548394.17.0.682310635626.issue37709@roundup.psfhosted.org> Change by Skip Montanaro : Added file: https://bugs.python.org/file48522/lfmapper.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:58:48 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Jul 2019 04:58:48 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564549128.24.0.45677954688.issue34162@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset fff5cb21ae270d8572741e18030765580c7ae361 by Terry Jan Reedy in branch 'master': bpo-34162: Add missing items to idlelib/NEWS.txt. (GH-15034) https://github.com/python/cpython/commit/fff5cb21ae270d8572741e18030765580c7ae361 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:58:58 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 04:58:58 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564549138.47.0.303720788336.issue34162@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14794 pull_request: https://github.com/python/cpython/pull/15037 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:59:06 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 04:59:06 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564549146.72.0.688435767696.issue34162@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14795 pull_request: https://github.com/python/cpython/pull/15038 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:03:56 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Jul 2019 05:03:56 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1564549436.67.0.830295930994.issue33822@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset a72ca90eb9f13ee2abc7e19b669974d2d0b3d63e by Terry Jan Reedy in branch 'master': bpo-33822: Add IDLE section of What's New 3.8 (#15035) https://github.com/python/cpython/commit/a72ca90eb9f13ee2abc7e19b669974d2d0b3d63e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:04:07 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 05:04:07 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1564549447.64.0.296536746159.issue33822@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14796 pull_request: https://github.com/python/cpython/pull/15039 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:04:32 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Jul 2019 05:04:32 +0000 Subject: [issue33821] IDLE subsection of What's New 3.7 In-Reply-To: <1528651926.75.0.592728768989.issue33821@psf.upfronthosting.co.za> Message-ID: <1564549472.1.0.426564073586.issue33821@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 5982b7201b84bfd24a1c2b2836401afee1cad8a7 by Terry Jan Reedy in branch 'master': bpo-33821: Update IDLE section of What's New 3.7 (#15036) https://github.com/python/cpython/commit/5982b7201b84bfd24a1c2b2836401afee1cad8a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:04:40 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 05:04:40 +0000 Subject: [issue33821] IDLE subsection of What's New 3.7 In-Reply-To: <1528651926.75.0.592728768989.issue33821@psf.upfronthosting.co.za> Message-ID: <1564549480.44.0.0773416311282.issue33821@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14797 pull_request: https://github.com/python/cpython/pull/15040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:04:46 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 05:04:46 +0000 Subject: [issue33821] IDLE subsection of What's New 3.7 In-Reply-To: <1528651926.75.0.592728768989.issue33821@psf.upfronthosting.co.za> Message-ID: <1564549486.37.0.485570889925.issue33821@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14798 pull_request: https://github.com/python/cpython/pull/15041 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:16:48 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 05:16:48 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1564550208.76.0.87666592738.issue33822@roundup.psfhosted.org> miss-islington added the comment: New changeset c7236b498fa2fda2240308064605a8ab5eb0fdf8 by Miss Islington (bot) in branch '3.8': bpo-33822: Add IDLE section of What's New 3.8 (GH-15035) https://github.com/python/cpython/commit/c7236b498fa2fda2240308064605a8ab5eb0fdf8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:19:31 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 05:19:31 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564550371.86.0.00841904865641.issue34162@roundup.psfhosted.org> miss-islington added the comment: New changeset 34de5dcf218badfece4ef78587733bbb903ab7b9 by Miss Islington (bot) in branch '3.8': bpo-34162: Add missing items to idlelib/NEWS.txt. (GH-15034) https://github.com/python/cpython/commit/34de5dcf218badfece4ef78587733bbb903ab7b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:20:53 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 31 Jul 2019 05:20:53 +0000 Subject: [issue37727] error past 15 places In-Reply-To: <1564546742.66.0.212195941437.issue37727@roundup.psfhosted.org> Message-ID: <1564550453.17.0.702201790279.issue37727@roundup.psfhosted.org> Zachary Ware added the comment: This is a limitation of binary floating point, please see https://docs.python.org/3/tutorial/floatingpoint.html ---------- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:21:16 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 05:21:16 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1564550476.97.0.0794928012722.issue34162@roundup.psfhosted.org> miss-islington added the comment: New changeset ac7cb7b9beaf907a4a484991e467913813bb4971 by Miss Islington (bot) in branch '3.7': bpo-34162: Add missing items to idlelib/NEWS.txt. (GH-15034) https://github.com/python/cpython/commit/ac7cb7b9beaf907a4a484991e467913813bb4971 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:23:08 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 05:23:08 +0000 Subject: [issue33821] IDLE subsection of What's New 3.7 In-Reply-To: <1528651926.75.0.592728768989.issue33821@psf.upfronthosting.co.za> Message-ID: <1564550588.24.0.138342335829.issue33821@roundup.psfhosted.org> miss-islington added the comment: New changeset 9e044ddefd5e02cf0ffac52bcbae6a21a677d257 by Miss Islington (bot) in branch '3.8': bpo-33821: Update IDLE section of What's New 3.7 (GH-15036) https://github.com/python/cpython/commit/9e044ddefd5e02cf0ffac52bcbae6a21a677d257 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:24:08 2019 From: report at bugs.python.org (Tim Peters) Date: Wed, 31 Jul 2019 05:24:08 +0000 Subject: [issue37727] error past 15 places In-Reply-To: <1564546742.66.0.212195941437.issue37727@roundup.psfhosted.org> Message-ID: <1564550648.2.0.39657108538.issue37727@roundup.psfhosted.org> Tim Peters added the comment: You'll see much the same in every programming language that supports your computer's floating-point hardware. Start by reading this gentle introduction: https://docs.python.org/3/tutorial/floatingpoint.html This bug tracker isn't a place for tutorials, though, and understanding floating-point deeply is a massive undertaking. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:24:46 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 05:24:46 +0000 Subject: [issue33821] IDLE subsection of What's New 3.7 In-Reply-To: <1528651926.75.0.592728768989.issue33821@psf.upfronthosting.co.za> Message-ID: <1564550686.67.0.0273396068013.issue33821@roundup.psfhosted.org> miss-islington added the comment: New changeset 8c6e35d2d21928d3e611c39399099e69532952a9 by Miss Islington (bot) in branch '3.7': bpo-33821: Update IDLE section of What's New 3.7 (GH-15036) https://github.com/python/cpython/commit/8c6e35d2d21928d3e611c39399099e69532952a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 01:48:07 2019 From: report at bugs.python.org (Abhilash Raj) Date: Wed, 31 Jul 2019 05:48:07 +0000 Subject: [issue32178] Some invalid email address groups cause an IndexError instead of a HeaderParseError In-Reply-To: <1512038434.94.0.213398074469.issue32178@psf.upfronthosting.co.za> Message-ID: <1564552087.14.0.731987901179.issue32178@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +14799 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/15044 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 02:24:39 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2019 06:24:39 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564554279.29.0.176936742553.issue37723@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 03:58:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2019 07:58:00 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564559880.88.0.44542861856.issue37723@roundup.psfhosted.org> Serhiy Storchaka added the comment: Indeed, it was not expected that the character set contains hundreds of thousands items. What is its size in your real code? Could you please show benchmarking results for different implementations and different sizes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 04:16:38 2019 From: report at bugs.python.org (rathinavelu thiruvenkatam) Date: Wed, 31 Jul 2019 08:16:38 +0000 Subject: [issue37728] 'is' behaving differently in script and interactive shel Message-ID: <1564560998.12.0.121909535779.issue37728@roundup.psfhosted.org> New submission from rathinavelu thiruvenkatam : af=1.1 bf=1.1 print(f'{af==bf},{af is bf}, {bf is af}' ) """ Script outputs True,True, True. On Shell af=1.1 bf=1.1 print(f'{af==bf},{af is bf}, {bf is af}' ) True,False, False """ ---------- messages: 348790 nosy: rathinavelu thiruvenkatam priority: normal severity: normal status: open title: 'is' behaving differently in script and interactive shel type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 04:40:11 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 31 Jul 2019 08:40:11 +0000 Subject: [issue37728] 'is' behaving differently in script and interactive shel In-Reply-To: <1564560998.12.0.121909535779.issue37728@roundup.psfhosted.org> Message-ID: <1564562411.85.0.269130976963.issue37728@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi rathinavelu thiruvenkatam, cPython has some optimizations where some immutable constants will be folded in the same object to save memory so this is not a bug, it's just that those optimization are not run when typing directly in the shell. You should just use == to compare floats. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 04:47:35 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 08:47:35 +0000 Subject: [issue37085] Expose additional socket constants for CAN_BCM flags In-Reply-To: <1559112780.91.0.584487288185.issue37085@roundup.psfhosted.org> Message-ID: <1564562855.97.0.529827080283.issue37085@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14800 pull_request: https://github.com/python/cpython/pull/15049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 04:47:39 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 31 Jul 2019 08:47:39 +0000 Subject: [issue37085] Expose additional socket constants for CAN_BCM flags In-Reply-To: <1559112780.91.0.584487288185.issue37085@roundup.psfhosted.org> Message-ID: <1564562859.52.0.722598045769.issue37085@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 31c4fd2a10d90beaa37d630e5f74a471e14e089d by ?ukasz Langa (karl ding) in branch 'master': bpo-37085: Expose SocketCAN bcm_msg_head flags (#13646) https://github.com/python/cpython/commit/31c4fd2a10d90beaa37d630e5f74a471e14e089d ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 05:10:43 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 09:10:43 +0000 Subject: [issue37085] Expose additional socket constants for CAN_BCM flags In-Reply-To: <1559112780.91.0.584487288185.issue37085@roundup.psfhosted.org> Message-ID: <1564564243.52.0.303302019282.issue37085@roundup.psfhosted.org> miss-islington added the comment: New changeset d8b914a30b0849476345a19ce0a0ab1ade171b19 by Miss Islington (bot) in branch '3.8': bpo-37085: Expose SocketCAN bcm_msg_head flags (GH-13646) https://github.com/python/cpython/commit/d8b914a30b0849476345a19ce0a0ab1ade171b19 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 05:12:48 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 31 Jul 2019 09:12:48 +0000 Subject: [issue37728] 'is' behaving differently in script and interactive shel In-Reply-To: <1564560998.12.0.121909535779.issue37728@roundup.psfhosted.org> Message-ID: <1564564368.91.0.145672641602.issue37728@roundup.psfhosted.org> Eryk Sun added the comment: The CPython interpreter doesn't centrally cache and reuse float objects, and even if it did that would be an implementation detail, like what it does with small int objects and strings. What you're seeing at the module level is a compilation side effect. The compiler is free to reuse immutable constants in a code object. For example: >>> code = compile('af=1.1\nbf=1.1', '', 'exec') >>> dis.dis(code) 1 0 LOAD_CONST 0 (1.1) 2 STORE_NAME 0 (af) 2 4 LOAD_CONST 0 (1.1) 6 STORE_NAME 1 (bf) 8 LOAD_CONST 1 (None) 10 RETURN_VALUE In the above case, both af and bf are initialized with the same `1.1` constant float object, which is at index 0 of the code object's tuple of constants: >>> code.co_consts (1.1, None) But if we run `af=1.1` and `bf=1.1` as separate statements in the REPL shell, the statements are compiled separately, and af and bf won't necessarily reference the same float object. Don't expect two immutable objects that have the same value to be the same object -- unless it's a singleton such as `None` and `Ellipsis`: >>> type(None)() is None True >>> type(Ellipsis)() is Ellipsis True Or an n-way extension of this case, such as bool in Python 3: >>> bool(0) is False True >>> bool(1) is True True The consequences of immutability on object identity are discussed briefly in the final paragraph of "3.1 Objects, values, and types" [1]. Offhand, I don't know where the specific implementation details of CPython builtin immutable types and compiler behavior are discussed, if it's discussed at all. [1] https://docs.python.org/3/reference/datamodel.html#objects-values-and-types ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 05:35:28 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 31 Jul 2019 09:35:28 +0000 Subject: [issue37729] gc: stats from multi process are mixed up Message-ID: <1564565728.92.0.202188074199.issue37729@roundup.psfhosted.org> New submission from Inada Naoki : gc used several PySys_WriteStderr() calls to write stats. This caused stats mixed up when stderr is shared by multiple threads or processes. Attached file (t.py) demonstrates it. Sometimes stats from two processes are mixed up like this: ``` gc: collecting generation 0... gc: objects in each generation: 782 0 7759 gc: objects in permanent generation: 0gc: collecting generation 0... gc: objects in each generation: 782 0 7764 gc: objects in permanent generation: 0gc: done, 781 unreachable, 0 uncollectable, 0.0001s elapsed gc: done, 781 unreachable, 0 uncollectable, 0.0000s elapsed ``` Writing one stat by one PySys_WriteStderr() reduces this. ---------- components: Interpreter Core files: t.py messages: 348795 nosy: inada.naoki priority: normal severity: normal status: open title: gc: stats from multi process are mixed up versions: Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48523/t.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 05:35:51 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 31 Jul 2019 09:35:51 +0000 Subject: [issue37729] gc: stats from multi process are mixed up In-Reply-To: <1564565728.92.0.202188074199.issue37729@roundup.psfhosted.org> Message-ID: <1564565751.89.0.257578220345.issue37729@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +14801 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15050 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 06:59:44 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 31 Jul 2019 10:59:44 +0000 Subject: [issue37729] gc: stats from multi process are mixed up In-Reply-To: <1564565728.92.0.202188074199.issue37729@roundup.psfhosted.org> Message-ID: <1564570784.8.0.455052668646.issue37729@roundup.psfhosted.org> Josh Rosenberg added the comment: Delaying the write means you don't get an indication of the steps in the process; if someone is trying to debug a crash caused by corruption of the gc list (e.g. due to a bad extension module), deferring the writes means they won't see any output before the crash, where before, they'd see: gc: collecting generation 0... gc: objects in each generation: and numbers for however many gc list traversals succeeded before the corrupt entry in the gc list was hit. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 07:09:29 2019 From: report at bugs.python.org (mental) Date: Wed, 31 Jul 2019 11:09:29 +0000 Subject: [issue37726] Tutorial should not recommend getopt In-Reply-To: <1564546690.91.0.192257836854.issue37726@roundup.psfhosted.org> Message-ID: <1564571369.22.0.448412573146.issue37726@roundup.psfhosted.org> mental added the comment: It's nice to see the newcomer friendly tag being encouraged :thumbsup: I'm submitting a PR for a doc change (I'd appreciate a review :D). I've replaced any mention of getopt in the tutorial section with the argparse module. Additionally I have added several small examples of usage promoting its usability. Should the section recommend using other dedicated packages for parsing: fire, click, docopt? urllib.request does this for the requests package. ---------- nosy: +mental _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 07:09:40 2019 From: report at bugs.python.org (mental) Date: Wed, 31 Jul 2019 11:09:40 +0000 Subject: [issue37726] Tutorial should not recommend getopt In-Reply-To: <1564546690.91.0.192257836854.issue37726@roundup.psfhosted.org> Message-ID: <1564571380.18.0.47956812378.issue37726@roundup.psfhosted.org> Change by mental : ---------- keywords: +patch pull_requests: +14802 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15052 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 07:19:46 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 31 Jul 2019 11:19:46 +0000 Subject: [issue37729] gc: stats from multi process are mixed up In-Reply-To: <1564565728.92.0.202188074199.issue37729@roundup.psfhosted.org> Message-ID: <1564571986.69.0.83144279095.issue37729@roundup.psfhosted.org> Inada Naoki added the comment: I updated the PR to show "gc: collecting generation 0...\n" before counting objects in each generations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 08:04:47 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 31 Jul 2019 12:04:47 +0000 Subject: [issue37085] Expose additional socket constants for CAN_BCM flags In-Reply-To: <1559112780.91.0.584487288185.issue37085@roundup.psfhosted.org> Message-ID: <1564574687.13.0.174975780555.issue37085@roundup.psfhosted.org> Tal Einat added the comment: Karl, many thanks for bringing this up, making a PR and iterating on it with me! ---------- nosy: +taleinat resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 08:11:40 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 12:11:40 +0000 Subject: [issue37695] Incorrect error message for `unget_wch(bytes_object)` In-Reply-To: <1564283698.6.0.693266446979.issue37695@roundup.psfhosted.org> Message-ID: <1564575100.92.0.545489167187.issue37695@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14803 pull_request: https://github.com/python/cpython/pull/15053 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 08:11:47 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2019 12:11:47 +0000 Subject: [issue37695] Incorrect error message for `unget_wch(bytes_object)` In-Reply-To: <1564283698.6.0.693266446979.issue37695@roundup.psfhosted.org> Message-ID: <1564575107.4.0.116023375971.issue37695@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset c9345e382c630ddcc2b148b30954640e0e435c8a by Serhiy Storchaka (Anthony Sottile) in branch 'master': bpo-37695: Correct unget_wch error message. (GH-14986) https://github.com/python/cpython/commit/c9345e382c630ddcc2b148b30954640e0e435c8a ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 08:29:20 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2019 12:29:20 +0000 Subject: [issue37730] NotImplemented is used instead of NotImplementedError in docs Message-ID: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> New submission from Serhiy Storchaka : In some places in the documentation NotImplemented is used instead of correct NotImplementedError. All occurrences of NotImplemented should be manually checked and wrong spelling should be corrected. ---------- assignee: docs at python components: Documentation keywords: easy, newcomer friendly messages: 348801 nosy: docs at python, serhiy.storchaka priority: normal severity: normal status: open title: NotImplemented is used instead of NotImplementedError in docs versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 08:54:08 2019 From: report at bugs.python.org (David Heiberg) Date: Wed, 31 Jul 2019 12:54:08 +0000 Subject: [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564577648.74.0.660137991632.issue37730@roundup.psfhosted.org> David Heiberg added the comment: I'm happy to take a look at this, I found one example here: https://docs.python.org/3/library/winreg.html#winreg.DisableReflectionKey How would I go about submitting a patch for all of the docs across the versions? Would I apply the patch to the relevant branches and submit a PR for each? Still fairly new to this, thanks for any pointers! ---------- nosy: +dheiberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:23:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2019 13:23:53 +0000 Subject: [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564579433.76.0.588163826284.issue37730@roundup.psfhosted.org> Serhiy Storchaka added the comment: Create a PR for master. When it be merged it can be backported automatically to other branches. Sometimes it may require manually backporting, but changes should be merged to master first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:29:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Jul 2019 13:29:07 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1564579747.25.0.0701347607844.issue36974@roundup.psfhosted.org> STINNER Victor added the comment: > [3.8] bpo-36974: separate vectorcall functions for each calling convention (GH-13781) (#14782) > https://github.com/python/cpython/commit/bf8e82f976b37856c7d35cdf88a238cb6f57fe65 FYI this change caused a regression in libcomps with Python 3.8 beta3, whereas it works well with Python 3.8 beta2. It's not a bug in Python, but it was a bug in libcomps (already fixed upstream). I just fixed libcomps: https://github.com/rpm-software-management/libcomps/pull/50 This project used the following method descriptors (for module functions): {"categories_match", (PyCFunction)PyCOMPS_categories_match, METH_KEYWORDS, PyCOMPS_validate__doc__}, {"environments_match", (PyCFunction)PyCOMPS_envs_match, METH_KEYWORDS, PyCOMPS_validate__doc__}, In Python 3.7, importing the module was just fine: descriptor flags are only checked at the first call to the method. In Python 3.8, descriptor flags are checked when the module is imported. Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=1734777 The fix is to use the right flags: "METH_VARARGS | METH_KEYWORDS" instead of "METH_KEYWORDS". Should we add a note like "if you get a 'SystemError: bad call flags' on import, check the descriptor flags of your functions" in What's New in Python 3.8? Maybe with a link to this issue. https://docs.python.org/dev/whatsnew/3.8.html#changes-in-the-c-api ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:44:48 2019 From: report at bugs.python.org (David Heiberg) Date: Wed, 31 Jul 2019 13:44:48 +0000 Subject: [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564580688.03.0.125055739019.issue37730@roundup.psfhosted.org> David Heiberg added the comment: Super, thanks for the help, I'll submit a PR as soon as it is ready ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:14:39 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 31 Jul 2019 14:14:39 +0000 Subject: [issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h Message-ID: <1564582479.63.0.743037360682.issue37731@roundup.psfhosted.org> New submission from Joannah Nanjekye : While compiling Python, I got this warning. ./pyconfig.h:1590:0: warning: "_POSIX_C_SOURCE" redefined #define _POSIX_C_SOURCE 200809L In file included from /usr/include/s390x-linux-gnu/bits/libc-header-start.h:33:0, from /usr/include/string.h:26, from /homes/jnanjeky/projects/cpython/Modules/expat/xmltok.c:34: /usr/include/features.h:294:0: note: this is the location of the previous definition # define _POSIX_C_SOURCE 199506L I think there is need to investigate this warning and potential remedy. ---------- messages: 348806 nosy: nanjekyejoannah priority: normal severity: normal status: open title: Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:17:16 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 31 Jul 2019 14:17:16 +0000 Subject: [issue37732] Possible uninitialized variable in Objects/obmalloc.c Message-ID: <1564582636.59.0.312005293129.issue37732@roundup.psfhosted.org> New submission from Joannah Nanjekye : Here is a compilation warning I got; Objects/obmalloc.c: In function ?_PyObject_Malloc?: Objects/obmalloc.c:1646:16: warning: ?ptr? may be used uninitialized in this function [-Wmaybe-uninitialized] return ptr; ^~~ We can investigate If its not a false alarm. ---------- messages: 348807 nosy: nanjekyejoannah priority: normal severity: normal status: open title: Possible uninitialized variable in Objects/obmalloc.c type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:27:55 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 31 Jul 2019 14:27:55 +0000 Subject: [issue37732] Possible uninitialized variable in Objects/obmalloc.c In-Reply-To: <1564582636.59.0.312005293129.issue37732@roundup.psfhosted.org> Message-ID: <1564583275.91.0.669325939341.issue37732@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- type: behavior -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:28:12 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 31 Jul 2019 14:28:12 +0000 Subject: [issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h In-Reply-To: <1564582479.63.0.743037360682.issue37731@roundup.psfhosted.org> Message-ID: <1564583292.62.0.666418830289.issue37731@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- type: behavior -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:48:37 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 14:48:37 +0000 Subject: [issue34101] PyBuffer_GetPointer() not documented Message-ID: <1564584517.43.0.615548652676.issue34101@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14804 pull_request: https://github.com/python/cpython/pull/15055 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:48:38 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2019 14:48:38 +0000 Subject: [issue34101] PyBuffer_GetPointer() not documented Message-ID: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> New submission from Antoine Pitrou : New changeset 1b29af83bc17e773b0c0d117f5fe1018fde46b0d by Antoine Pitrou (Hai Shi) in branch 'master': bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994) https://github.com/python/cpython/commit/1b29af83bc17e773b0c0d117f5fe1018fde46b0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:57:14 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2019 14:57:14 +0000 Subject: [issue34101] PyBuffer_GetPointer() not documented In-Reply-To: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> Message-ID: <1564585034.6.0.969512401122.issue34101@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 353306137176985f1a2995ff964b0c00eccd1434 by Antoine Pitrou (Miss Islington (bot)) in branch '3.7': bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994) (GH-15055) https://github.com/python/cpython/commit/353306137176985f1a2995ff964b0c00eccd1434 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:57:25 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2019 14:57:25 +0000 Subject: [issue34101] PyBuffer_GetPointer() not documented In-Reply-To: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> Message-ID: <1564585045.54.0.75663356612.issue34101@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:57:34 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2019 14:57:34 +0000 Subject: [issue34101] PyBuffer_GetPointer() not documented In-Reply-To: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> Message-ID: <1564585054.3.0.704871409838.issue34101@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:57:55 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 14:57:55 +0000 Subject: [issue34101] PyBuffer_GetPointer() not documented In-Reply-To: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> Message-ID: <1564585075.8.0.0791593540926.issue34101@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14805 pull_request: https://github.com/python/cpython/pull/15056 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 11:04:54 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 15:04:54 +0000 Subject: [issue34101] PyBuffer_GetPointer() not documented In-Reply-To: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> Message-ID: <1564585494.88.0.0123302589614.issue34101@roundup.psfhosted.org> miss-islington added the comment: New changeset 29a3a33d99dae0106c6af9d0fd75a11bef26d15c by Miss Islington (bot) in branch '3.8': bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994) https://github.com/python/cpython/commit/29a3a33d99dae0106c6af9d0fd75a11bef26d15c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 11:08:46 2019 From: report at bugs.python.org (LIU YONG) Date: Wed, 31 Jul 2019 15:08:46 +0000 Subject: [issue37733] Fail to build Python 3.7.4 on AIX 7.1 using gcc Message-ID: <1564585726.95.0.247783534499.issue37733@roundup.psfhosted.org> New submission from LIU YONG : Trying to build Python 3.7.4 on AIX 7.1 using gcc 6.3.0 but failed Failed to build these modules: _ctypes _curses _curses_panel building '_curses' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include -I. -I/uxx/bxx/Python-3.7.4/Include -I/uxx/bxx/Python-3.7.4 -c /uxx/bxx/Python-3.7.4/Modules/_cursesmodule.c -o build/temp.aix-7.1-3.7/uxx/bxx/Python-3.7.4/Modules/_cursesmodule.o Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp build/temp.aix-7.1-3.7/uxx/bxx/Python-3.7.4/Modules/_cursesmodule.o -lncurses -o build/lib.aix-7.1-3.7/_curses.so ld: 0711-317 ERROR: Undefined symbol: .box32 ld: 0711-317 ERROR: Undefined symbol: ._setqiflush ld: 0711-317 ERROR: Undefined symbol: .setsyx ld: 0711-317 ERROR: Undefined symbol: ._getsyx ld: 0711-317 ERROR: Undefined symbol: .w32attroff ld: 0711-317 ERROR: Undefined symbol: .w32attron ld: 0711-317 ERROR: Undefined symbol: .w32attrset ld: 0711-317 ERROR: Undefined symbol: .w32addch ld: 0711-317 ERROR: Undefined symbol: _unctrl ld: 0711-317 ERROR: Undefined symbol: .w32insch ld: 0711-317 ERROR: Undefined symbol: .w32echochar ld: 0711-317 ERROR: Undefined symbol: .p32echochar ld: 0711-317 ERROR: Undefined symbol: .initscr32 ld: 0711-317 ERROR: Undefined symbol: wacs_map ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: error: ld returned 8 exit status building '_curses_panel' extension gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include -I. -I/uxx/bxx/Python-3.7.4/Include -I/uxx/bxx/Python-3.7.4 -c /uxx/bxx/Python-3.7.4/Modules/_curses_panel.c -o build/temp.aix-7.1-3.7/uxx/bxx/Python-3.7.4/Modules/_curses_panel.o In file included from /opt/freeware/include/ncurses/panel.h:42:0, from /uxx/bxx/Python-3.7.4/Modules/_curses_panel.c:17: /opt/freeware/include/ncurses/curses.h:388:16: error: conflicting types for 'attr_t' typedef chtype attr_t; /* ...must be at least as wide as chtype */ ^~~~~~ In file included from ./Include/py_curses.h:36:0, from /uxx/bxx/Python-3.7.4/Modules/_curses_panel.c:15: /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/6.3.0/include-fixed/curses.h:80:21: note: previous declaration of 'attr_t' was here typedef int attr_t; ^~~~~~ ---------- components: Build messages: 348811 nosy: LIU YONG priority: normal severity: normal status: open title: Fail to build Python 3.7.4 on AIX 7.1 using gcc versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 11:30:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Jul 2019 15:30:11 +0000 Subject: [issue37733] Fail to build _curses module of Python 3.7.4 on AIX 7.1 using gcc In-Reply-To: <1564585726.95.0.247783534499.issue37733@roundup.psfhosted.org> Message-ID: <1564587011.39.0.866183226925.issue37733@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Fail to build Python 3.7.4 on AIX 7.1 using gcc -> Fail to build _curses module of Python 3.7.4 on AIX 7.1 using gcc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 11:30:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Jul 2019 15:30:34 +0000 Subject: [issue37733] Fail to build _curses module of Python 3.7.4 on AIX 7.1 using gcc In-Reply-To: <1564585726.95.0.247783534499.issue37733@roundup.psfhosted.org> Message-ID: <1564587034.35.0.929312406689.issue37733@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 11:51:07 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 31 Jul 2019 15:51:07 +0000 Subject: [issue35943] PyImport_GetModule() can return partially-initialized module In-Reply-To: <1549646017.22.0.395154635441.issue35943@roundup.psfhosted.org> Message-ID: <1564588267.79.0.260338925796.issue35943@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- keywords: +patch pull_requests: +14806 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15057 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 12:17:41 2019 From: report at bugs.python.org (Pierre Glaser) Date: Wed, 31 Jul 2019 16:17:41 +0000 Subject: [issue28053] parameterize what serialization is used in multiprocessing In-Reply-To: <1473454734.41.0.810069156927.issue28053@psf.upfronthosting.co.za> Message-ID: <1564589861.26.0.61233284361.issue28053@roundup.psfhosted.org> Change by Pierre Glaser : ---------- pull_requests: +14807 pull_request: https://github.com/python/cpython/pull/15058 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 12:20:02 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 31 Jul 2019 16:20:02 +0000 Subject: [issue37734] Registry keys for Windows Store package have wrong executable Message-ID: <1564590002.03.0.889517252351.issue37734@roundup.psfhosted.org> New submission from Steve Dower : The next update to Windows will prevent launching executables from within the package install folder, and require you to launch from the user's local symlink to the executable (see issue37369). Currently, the only value we can put into the registry when installing via the Store package points directly to the package install. There is no way to point at the local symlink. I'm working with the Windows team to find either a fix or a workaround, but right now anyone who updates to preview Windows (or gets the update when it releases at the end of the year) will not be able to launch Python through tools that look in the registry. ---------- assignee: steve.dower components: Windows messages: 348812 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Registry keys for Windows Store package have wrong executable type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 12:28:12 2019 From: report at bugs.python.org (yannvgn) Date: Wed, 31 Jul 2019 16:28:12 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564590492.95.0.758690818609.issue37723@roundup.psfhosted.org> yannvgn added the comment: > Indeed, it was not expected that the character set contains hundreds of thousands items. What is its size in your real code? > Could you please show benchmarking results for different implementations and different sizes? I can't precisely answer that, but sacremoses (a tokenization package) for example is strongly impacted. See https://github.com/alvations/sacremoses/issues/61#issuecomment-516401853 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 12:32:51 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2019 16:32:51 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564590771.62.0.578430398158.issue37723@roundup.psfhosted.org> Serhiy Storchaka added the comment: Oh, this is convincing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 12:37:08 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 31 Jul 2019 16:37:08 +0000 Subject: [issue37734] Registry keys for Windows Store package have wrong executable In-Reply-To: <1564590002.03.0.889517252351.issue37734@roundup.psfhosted.org> Message-ID: <1564591028.85.0.646657305131.issue37734@roundup.psfhosted.org> Change by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 12:49:40 2019 From: report at bugs.python.org (anand Mohan) Date: Wed, 31 Jul 2019 16:49:40 +0000 Subject: [issue37735] Current Region as a Method either in openpyxl.worksheet.cell.Cell or .cell_range.CellRange Message-ID: <1564591780.57.0.0395525070594.issue37735@roundup.psfhosted.org> New submission from anand Mohan : Excel has a CurrentRegion Method that is invoked as Range(range_string).CurrentRegion The Idea behind this is to choose a region that have contiguous blank cells on all sides ( except the case of 1 column and 1 row ) that separate I have Python code that I written to accomplish this Method. I have extended the CellRange class and added the methodand it is working as expected. Please let me know if this will be a useful feature and I will submit code. It may not be the best code, but has performed well and correctly in all my testing so far Please see example snap shots attached fro Current Region is expected to work (for reference from the link https://www.excel-easy.com/vba/examples/currentregion.html Here is additional reference to the Method as implemented in Excel VBA https://docs.microsoft.com/en-us/office/vba/api/excel.range.currentregion ---------- components: Demos and Tools files: CurrentRegion.Example.png messages: 348815 nosy: anand Mohan priority: normal severity: normal status: open title: Current Region as a Method either in openpyxl.worksheet.cell.Cell or .cell_range.CellRange type: enhancement versions: Python 3.7 Added file: https://bugs.python.org/file48524/CurrentRegion.Example.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 12:59:36 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 31 Jul 2019 16:59:36 +0000 Subject: [issue37735] Current Region as a Method either in openpyxl.worksheet.cell.Cell or .cell_range.CellRange In-Reply-To: <1564591780.57.0.0395525070594.issue37735@roundup.psfhosted.org> Message-ID: <1564592376.14.0.168095527566.issue37735@roundup.psfhosted.org> Brett Cannon added the comment: This is the issue tracker for Python itself, not openpyxl, so this isn't the right place to report this. I would go to openpyxl's website and see where they specify to report bugs. ---------- nosy: +brett.cannon resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 12:59:50 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 31 Jul 2019 16:59:50 +0000 Subject: [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564592390.13.0.0844686165327.issue37730@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 13:23:32 2019 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 31 Jul 2019 17:23:32 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564593812.49.0.157396144592.issue37723@roundup.psfhosted.org> Matthew Barnett added the comment: I've just had a look at _uniq, and the code surprises me. The obvious way to detect duplicates is with a set, but that requires the items to be hashable. Are they? Well, the first line of the function uses 'set', so they are. Why, then, isn't it using a set to detect the duplicates? How about this: def _uniq(items): newitems = [] seen = set() for item in items: if item not in seen: newitems.append(item) seen.add(item) return newitems ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 13:52:53 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 31 Jul 2019 17:52:53 +0000 Subject: [issue34313] Tkinter crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1564595573.79.0.698411620925.issue34313@roundup.psfhosted.org> Ned Deily added the comment: Good question. I don't think there's anything more to do here other than to continue to monitor and evaluate future Tk releases, which we do anyway. Improvements to the build documentation etc are covered by other open issues. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 13:59:50 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 31 Jul 2019 17:59:50 +0000 Subject: [issue37544] Test hang causes --enable-optimizations build to hang In-Reply-To: <1562757478.69.0.905991720528.issue37544@roundup.psfhosted.org> Message-ID: <1564595990.38.0.611734937086.issue37544@roundup.psfhosted.org> Ned Deily added the comment: Jerek, is there anything more you are expecting us to do for this issue? The only thing I can think of at the moment might be to add something to the "Profile Guided Optimization" section of the top-level README.rst to include @gps's suggestions for tailoring PROFILE_TASK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 14:33:42 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 31 Jul 2019 18:33:42 +0000 Subject: [issue2920] Patch to print symbolic value of errno in OSError.__str__() In-Reply-To: <1211228076.96.0.534347381118.issue2920@psf.upfronthosting.co.za> Message-ID: <1564598022.81.0.780149341957.issue2920@roundup.psfhosted.org> Eryk Sun added the comment: How about doing something similar for Windows when winerror is set? This is a common case since many os functions use the Windows API directly. Showing the symbolic error name will help to disambiguate exceptions, such as FileNotFoundError (ENOENT) from: ERROR_FILE_NOT_FOUND ERROR_PATH_NOT_FOUND ERROR_FILENAME_EXCED_RANGE ERROR_BAD_PATHNAME ERROR_BAD_NET_NAME PermissionError (EACCES) from: ERROR_ACCESS_DENIED ERROR_SHARING_VIOLATION ERROR_LOCK_VIOLATION ERROR_NETWORK_ACCESS_DENIED ERROR_NOT_READY It could also support additional error codes that are common or used internally, such as ERROR_NOT_SUPPORTED ERROR_INVALID_NAME ERROR_MOD_NOT_FOUND ERROR_PRIVILEGE_NOT_HELD ERROR_CANT_RESOLVE_FILENAME ERROR_INVALID_REPARSE_DATA Modules/_winapi.c: ERROR_NETNAME_DELETED ERROR_SEM_TIMEOUT ERROR_PIPE_BUSY ERROR_MORE_DATA ERROR_PIPE_CONNECTED ERROR_OPERATION_ABORTED ERROR_IO_PENDING ERROR_NO_SYSTEM_RESOURCES ---------- nosy: +ZackerySpytz, eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 14:45:08 2019 From: report at bugs.python.org (yannvgn) Date: Wed, 31 Jul 2019 18:45:08 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564598708.36.0.51346908536.issue37723@roundup.psfhosted.org> yannvgn added the comment: Hey Matthew, we decided to go for this, which is simpler and straightforward: def _uniq(items): return list(dict.fromkeys(items)) (see https://github.com/python/cpython/pull/15030) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 14:50:54 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 18:50:54 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564599054.05.0.417547410465.issue37723@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14808 pull_request: https://github.com/python/cpython/pull/15059 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 14:51:01 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 18:51:01 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564599061.53.0.291096779816.issue37723@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14809 pull_request: https://github.com/python/cpython/pull/15060 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 14:51:06 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2019 18:51:06 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564599066.91.0.395851101386.issue37723@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 9f55551f3df238e58315e724e50cb0d574d75b94 by Serhiy Storchaka (yannvgn) in branch 'master': bpo-37723: Fix performance regression on regular expression parsing. (GH-15030) https://github.com/python/cpython/commit/9f55551f3df238e58315e724e50cb0d574d75b94 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 16:22:38 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 20:22:38 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564604558.78.0.0199986406048.issue37723@roundup.psfhosted.org> miss-islington added the comment: New changeset 33b700ba8cbb128519442eeed8c8747ff73f4524 by Miss Islington (bot) in branch '3.7': bpo-37723: Fix performance regression on regular expression parsing. (GH-15030) https://github.com/python/cpython/commit/33b700ba8cbb128519442eeed8c8747ff73f4524 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 16:22:38 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 20:22:38 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564604558.78.0.0199986406048.issue37723@roundup.psfhosted.org> miss-islington added the comment: New changeset 33b700ba8cbb128519442eeed8c8747ff73f4524 by Miss Islington (bot) in branch '3.7': bpo-37723: Fix performance regression on regular expression parsing. (GH-15030) https://github.com/python/cpython/commit/33b700ba8cbb128519442eeed8c8747ff73f4524 ---------- nosy: +miss-islington, miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 16:22:38 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 20:22:38 +0000 Subject: [issue37723] important performance regression on regular expression parsing In-Reply-To: <1564524154.39.0.245394903935.issue37723@roundup.psfhosted.org> Message-ID: <1564604558.87.0.70340545581.issue37723@roundup.psfhosted.org> miss-islington added the comment: New changeset 77fcccb5321137456549b7f55b819f2c8a4c78a4 by Miss Islington (bot) in branch '3.8': bpo-37723: Fix performance regression on regular expression parsing. (GH-15030) https://github.com/python/cpython/commit/77fcccb5321137456549b7f55b819f2c8a4c78a4 ---------- nosy: +miss-islington, miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 16:24:43 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 20:24:43 +0000 Subject: [issue37695] Incorrect error message for `unget_wch(bytes_object)` In-Reply-To: <1564283698.6.0.693266446979.issue37695@roundup.psfhosted.org> Message-ID: <1564604683.16.0.496948808389.issue37695@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14810 pull_request: https://github.com/python/cpython/pull/15061 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 16:25:55 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 20:25:55 +0000 Subject: [issue37695] Incorrect error message for `unget_wch(bytes_object)` In-Reply-To: <1564283698.6.0.693266446979.issue37695@roundup.psfhosted.org> Message-ID: <1564604755.58.0.935959531433.issue37695@roundup.psfhosted.org> miss-islington added the comment: New changeset 35d9c37e271c35b87d64cc7422600e573f3ee244 by Miss Islington (bot) in branch '3.7': bpo-37695: Correct unget_wch error message. (GH-14986) https://github.com/python/cpython/commit/35d9c37e271c35b87d64cc7422600e573f3ee244 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 16:45:18 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 20:45:18 +0000 Subject: [issue37695] Incorrect error message for `unget_wch(bytes_object)` In-Reply-To: <1564283698.6.0.693266446979.issue37695@roundup.psfhosted.org> Message-ID: <1564605918.79.0.116645506171.issue37695@roundup.psfhosted.org> miss-islington added the comment: New changeset 462f07040b39b778aa782d0f62050b70416dec7b by Miss Islington (bot) in branch '3.8': bpo-37695: Correct unget_wch error message. (GH-14986) https://github.com/python/cpython/commit/462f07040b39b778aa782d0f62050b70416dec7b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 18:10:32 2019 From: report at bugs.python.org (David Heiberg) Date: Wed, 31 Jul 2019 22:10:32 +0000 Subject: [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564611032.38.0.885016516627.issue37730@roundup.psfhosted.org> Change by David Heiberg : ---------- keywords: +patch pull_requests: +14811 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 18:50:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2019 22:50:02 +0000 Subject: [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564613402.01.0.942842519993.issue37730@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset ed5e8e06cbf766e89d6c58a882ee024abb5b2ed7 by Serhiy Storchaka (David H) in branch 'master': bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs. (GH-15062) https://github.com/python/cpython/commit/ed5e8e06cbf766e89d6c58a882ee024abb5b2ed7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 18:50:13 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 22:50:13 +0000 Subject: [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564613413.35.0.926830337974.issue37730@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14812 pull_request: https://github.com/python/cpython/pull/15063 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 19:40:56 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Jul 2019 23:40:56 +0000 Subject: [issue37708] Harmonize random.choice(s) behavior with random.sample on iterators In-Reply-To: <1564428504.8.0.524832279971.issue37708@roundup.psfhosted.org> Message-ID: <1564616456.61.0.27222181448.issue37708@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 19:59:17 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Jul 2019 23:59:17 +0000 Subject: [issue37708] Harmonize random.choice(s) behavior with random.sample on iterators In-Reply-To: <1564428504.8.0.524832279971.issue37708@roundup.psfhosted.org> Message-ID: <1564617557.88.0.108835534751.issue37708@roundup.psfhosted.org> Raymond Hettinger added the comment: The sample() function accepts d.keys() because a keys view is registered as being an instance of collections.abc.Set. We have to do that because sample() is specifically documented as accepting sets. If we had it do over again, that functionality would likely not be supported (it implicitly the population into a tuple). For a fine-grained function like choice() that implicit population conversion would make no sense at all. For choices(), we can choose not to make that API mistake again. Thanks for the suggestion, but I am going to decline. It isn't something that we need in practice and it would add complication for near zero gain. (Also, there is no rule that all of these functions have to accept the same kinds of inputs -- different algorithms and different use cases allow for some flexibility). ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 20:25:28 2019 From: report at bugs.python.org (daniel hahler) Date: Thu, 01 Aug 2019 00:25:28 +0000 Subject: [issue21161] list comprehensions don't see local variables in pdb in python3 In-Reply-To: <1396698943.39.0.489151150852.issue21161@psf.upfronthosting.co.za> Message-ID: <1564619128.29.0.891460155434.issue21161@roundup.psfhosted.org> daniel hahler added the comment: Georg, please consider re-opening. This patch here appears to fix this after all. ---------- nosy: +blueyed versions: +Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 21:19:37 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 01 Aug 2019 01:19:37 +0000 Subject: [issue37734] Registry keys for Windows Store package have wrong executable In-Reply-To: <1564590002.03.0.889517252351.issue37734@roundup.psfhosted.org> Message-ID: <1564622377.25.0.0557050852089.issue37734@roundup.psfhosted.org> Steve Dower added the comment: So far we've figured out that using the full installed path will work fine (by design) if you have enabled the matching alias. So essentially, if Python is on your PATH, you can also launch it using the full path. I'm trying to convince them that it should only have to be installed for the current user. If they agree with that, we might get this fixed properly and then there's nothing to do here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 21:31:13 2019 From: report at bugs.python.org (Sebastien Luttringer) Date: Thu, 01 Aug 2019 01:31:13 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords In-Reply-To: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> Message-ID: <1564623073.36.0.808840231416.issue29750@roundup.psfhosted.org> Sebastien Luttringer added the comment: I hit the same issue. Do you have news about the patch review and its inclusion? ---------- nosy: +seblu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 22:15:47 2019 From: report at bugs.python.org (Windson Yang) Date: Thu, 01 Aug 2019 02:15:47 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords In-Reply-To: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> Message-ID: <1564625747.83.0.794409058028.issue29750@roundup.psfhosted.org> Windson Yang added the comment: Sorry, I forgot about this PR, I will update the patch depends on review soon :D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 22:57:31 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Thu, 01 Aug 2019 02:57:31 +0000 Subject: [issue37724] [[Errno 17] File exists: ] # Try create directories that are not part of the archive with In-Reply-To: <1564525622.36.0.964910267569.issue37724@roundup.psfhosted.org> Message-ID: <1564628251.47.0.543596462915.issue37724@roundup.psfhosted.org> Giovanni Cappellotto added the comment: There's also the `makedirs`'s `exist_ok` optional parameter, `False` by default. You could use it to avoid this error, but I'm not an expert on this particular library, so I'm not sure if it would make sense to make this change. On a side note, searching for `_extract_member`, I found a very similar implementation of that function in `tarfile.py`. In case I think we should apply the same behavior in that module too. ---------- nosy: +potomak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:13:21 2019 From: report at bugs.python.org (Kal Sze) Date: Thu, 01 Aug 2019 03:13:21 +0000 Subject: [issue37595] Python 3.7.4 does not build on Raspbian Buster In-Reply-To: <1563155199.46.0.613653313897.issue37595@roundup.psfhosted.org> Message-ID: <1564629201.03.0.204968264216.issue37595@roundup.psfhosted.org> Kal Sze added the comment: I looked at my build log again. The very first line that jumps out as abnormal is this: /usr/bin/ld: /usr/bin/ld: DWARF error: invalid abstract instance DIE ref A quick DuckDuckGoing suggests that this *may* be related to a broken version of binutils: https://lists.gnu.org/archive/html/bug-binutils/2018-07/msg00150.html The current, most up-to-date version of binutils in Raspbian Stretch is this: $ dpkg -l binutils Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-==============-============-========================================== ii binutils 2.31.1-16+rpi1 armhf GNU assembler, linker and binary utilities A quick grep of the output of `apt changelog binutils` doesn't mention the bug number (23425). I don't know what conclusion to draw. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:14:15 2019 From: report at bugs.python.org (Kal Sze) Date: Thu, 01 Aug 2019 03:14:15 +0000 Subject: [issue37595] Python 3.7.4 does not build on Raspbian Buster In-Reply-To: <1563155199.46.0.613653313897.issue37595@roundup.psfhosted.org> Message-ID: <1564629255.33.0.741846313528.issue37595@roundup.psfhosted.org> Kal Sze added the comment: Sorry, I meant most up-to-date version of binutils in Raspbian *Buster* in my previous message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 23:45:48 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 01 Aug 2019 03:45:48 +0000 Subject: [issue37595] Python 3.7.4 does not build on Raspbian Buster In-Reply-To: <1563155199.46.0.613653313897.issue37595@roundup.psfhosted.org> Message-ID: <1564631148.2.0.589006955256.issue37595@roundup.psfhosted.org> Benjamin Peterson added the comment: Presumably dropping --enable-optimizations will fix this problem. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________